Class: Apcera::APIError
- Inherits:
-
BaseObject
- Object
- BaseObject
- Apcera::APIError
- Defined in:
- lib/apcera/models/api_error.rb
Instance Attribute Summary collapse
-
#_retry ⇒ Object
Returns the value of attribute _retry.
-
#client_side ⇒ Object
Returns the value of attribute client_side.
-
#code ⇒ Object
Returns the value of attribute code.
-
#duplicate_key ⇒ Object
Returns the value of attribute duplicate_key.
-
#fatal ⇒ Object
Returns the value of attribute fatal.
-
#message ⇒ Object
Returns the value of attribute message.
-
#missing_claims ⇒ Object
Returns the value of attribute missing_claims.
-
#policy_error ⇒ Object
Returns the value of attribute policy_error.
-
#request_id ⇒ Object
Returns the value of attribute request_id.
-
#request_invalid ⇒ Object
Returns the value of attribute request_invalid.
-
#requires_restart ⇒ Object
Returns the value of attribute requires_restart.
-
#resource_missing ⇒ Object
Returns the value of attribute resource_missing.
-
#token_invalid ⇒ Object
Returns the value of attribute token_invalid.
-
#try_again_in_ms ⇒ Object
Returns the value of attribute try_again_in_ms.
Class Method Summary collapse
-
.attribute_map ⇒ Object
attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
attribute type.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ APIError
constructor
A new instance of APIError.
Methods inherited from BaseObject
#_deserialize, #_to_hash, #build_from_hash, #to_body, #to_hash, #to_s
Constructor Details
#initialize(attributes = {}) ⇒ APIError
Returns a new instance of APIError.
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 |
# File 'lib/apcera/models/api_error.rb', line 75 def initialize(attributes = {}) return if !attributes.is_a?(Hash) || attributes.empty? # convert string to symbol for hash key attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo} if attributes[:'client_side'] self.client_side = attributes[:'client_side'] end if attributes[:'code'] self.code = attributes[:'code'] end if attributes[:'duplicate_key'] self.duplicate_key = attributes[:'duplicate_key'] end if attributes[:'fatal'] self.fatal = attributes[:'fatal'] end if attributes[:'message'] self. = attributes[:'message'] end if attributes[:'missing_claims'] if (value = attributes[:'missing_claims']).is_a?(Array) self.missing_claims = value end end if attributes[:'policy_error'] self.policy_error = attributes[:'policy_error'] end if attributes[:'request_id'] self.request_id = attributes[:'request_id'] end if attributes[:'request_invalid'] self.request_invalid = attributes[:'request_invalid'] end if attributes[:'requires_restart'] self.requires_restart = attributes[:'requires_restart'] end if attributes[:'resource_missing'] self.resource_missing = attributes[:'resource_missing'] end if attributes[:'retry'] self._retry = attributes[:'retry'] end if attributes[:'token_invalid'] self.token_invalid = attributes[:'token_invalid'] end if attributes[:'try_again_in_ms'] self.try_again_in_ms = attributes[:'try_again_in_ms'] end end |
Instance Attribute Details
#_retry ⇒ Object
Returns the value of attribute _retry.
4 5 6 |
# File 'lib/apcera/models/api_error.rb', line 4 def _retry @_retry end |
#client_side ⇒ Object
Returns the value of attribute client_side.
4 5 6 |
# File 'lib/apcera/models/api_error.rb', line 4 def client_side @client_side end |
#code ⇒ Object
Returns the value of attribute code.
4 5 6 |
# File 'lib/apcera/models/api_error.rb', line 4 def code @code end |
#duplicate_key ⇒ Object
Returns the value of attribute duplicate_key.
4 5 6 |
# File 'lib/apcera/models/api_error.rb', line 4 def duplicate_key @duplicate_key end |
#fatal ⇒ Object
Returns the value of attribute fatal.
4 5 6 |
# File 'lib/apcera/models/api_error.rb', line 4 def fatal @fatal end |
#message ⇒ Object
Returns the value of attribute message.
4 5 6 |
# File 'lib/apcera/models/api_error.rb', line 4 def @message end |
#missing_claims ⇒ Object
Returns the value of attribute missing_claims.
4 5 6 |
# File 'lib/apcera/models/api_error.rb', line 4 def missing_claims @missing_claims end |
#policy_error ⇒ Object
Returns the value of attribute policy_error.
4 5 6 |
# File 'lib/apcera/models/api_error.rb', line 4 def policy_error @policy_error end |
#request_id ⇒ Object
Returns the value of attribute request_id.
4 5 6 |
# File 'lib/apcera/models/api_error.rb', line 4 def request_id @request_id end |
#request_invalid ⇒ Object
Returns the value of attribute request_invalid.
4 5 6 |
# File 'lib/apcera/models/api_error.rb', line 4 def request_invalid @request_invalid end |
#requires_restart ⇒ Object
Returns the value of attribute requires_restart.
4 5 6 |
# File 'lib/apcera/models/api_error.rb', line 4 def requires_restart @requires_restart end |
#resource_missing ⇒ Object
Returns the value of attribute resource_missing.
4 5 6 |
# File 'lib/apcera/models/api_error.rb', line 4 def resource_missing @resource_missing end |
#token_invalid ⇒ Object
Returns the value of attribute token_invalid.
4 5 6 |
# File 'lib/apcera/models/api_error.rb', line 4 def token_invalid @token_invalid end |
#try_again_in_ms ⇒ Object
Returns the value of attribute try_again_in_ms.
4 5 6 |
# File 'lib/apcera/models/api_error.rb', line 4 def try_again_in_ms @try_again_in_ms end |
Class Method Details
.attribute_map ⇒ Object
attribute mapping from ruby-style variable name to JSON key
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/apcera/models/api_error.rb', line 6 def self.attribute_map { # If `true`, the error was due to a client-side error (e.g., invalid data); otherwise, the error was due to a server-side error (e.g. a NATS timeout). :'client_side' => :'client_side', # HTTP status code returned to the user. :'code' => :'code', # If `true`, the resource that's being sought already exists. :'duplicate_key' => :'duplicate_key', # If `true`, the action was fatal and should not be retried. :'fatal' => :'fatal', # Error message string. :'message' => :'message', # A list of missing policy claim(s) on policy denials. :'missing_claims' => :'missing_claims', # :'policy_error' => :'policy_error', # ID of the NATS message or HTTP request that generated the error. :'request_id' => :'request_id', # If `true`, the request cannot be processed due to a conflict. :'request_invalid' => :'request_invalid', # If `true`, the targeted resource is in a state where the request cannot be fulfilled; for instance, a job in the `started` state may not have its resources changed. :'requires_restart' => :'requires_restart', # If `true`, the requested resource could not be located. :'resource_missing' => :'resource_missing', # If `true`, the problem encountered was transient, and the same payload can be delivered again. :'_retry' => :'retry', # If `true`, the requestor's token was invalid (e.g., due to a timeout.) :'token_invalid' => :'token_invalid', # Specifies the amount of time in milliseconds that the client should wait before retrying the request. :'try_again_in_ms' => :'try_again_in_ms' } end |
.swagger_types ⇒ Object
attribute type
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/apcera/models/api_error.rb', line 55 def self.swagger_types { :'client_side' => :'BOOLEAN', :'code' => :'Integer', :'duplicate_key' => :'BOOLEAN', :'fatal' => :'BOOLEAN', :'message' => :'String', :'missing_claims' => :'Array<String>', :'policy_error' => :'PolicyError', :'request_id' => :'String', :'request_invalid' => :'BOOLEAN', :'requires_restart' => :'BOOLEAN', :'resource_missing' => :'BOOLEAN', :'_retry' => :'BOOLEAN', :'token_invalid' => :'BOOLEAN', :'try_again_in_ms' => :'Integer' } end |