38 lines
1.1 KiB
Go
38 lines
1.1 KiB
Go
// Code generated by "stringer -type ErrorCode"; DO NOT EDIT.
|
|
|
|
package egoscale
|
|
|
|
import "strconv"
|
|
|
|
const (
|
|
_ErrorCode_name_0 = "Unauthorized"
|
|
_ErrorCode_name_1 = "MethodNotAllowed"
|
|
_ErrorCode_name_2 = "UnsupportedActionError"
|
|
_ErrorCode_name_3 = "APILimitExceededMalformedParameterErrorParamError"
|
|
_ErrorCode_name_4 = "InternalErrorAccountErrorAccountResourceLimitErrorInsufficientCapacityErrorResourceUnavailableErrorResourceAllocationErrorResourceInUseErrorNetworkRuleConflictError"
|
|
)
|
|
|
|
var (
|
|
_ErrorCode_index_3 = [...]uint8{0, 16, 39, 49}
|
|
_ErrorCode_index_4 = [...]uint8{0, 13, 25, 50, 75, 99, 122, 140, 164}
|
|
)
|
|
|
|
func (i ErrorCode) String() string {
|
|
switch {
|
|
case i == 401:
|
|
return _ErrorCode_name_0
|
|
case i == 405:
|
|
return _ErrorCode_name_1
|
|
case i == 422:
|
|
return _ErrorCode_name_2
|
|
case 429 <= i && i <= 431:
|
|
i -= 429
|
|
return _ErrorCode_name_3[_ErrorCode_index_3[i]:_ErrorCode_index_3[i+1]]
|
|
case 530 <= i && i <= 537:
|
|
i -= 530
|
|
return _ErrorCode_name_4[_ErrorCode_index_4[i]:_ErrorCode_index_4[i+1]]
|
|
default:
|
|
return "ErrorCode(" + strconv.FormatInt(int64(i), 10) + ")"
|
|
}
|
|
}
|