class Apcera::APIError

Attributes

_retry[RW]
client_side[RW]
code[RW]
duplicate_key[RW]
fatal[RW]
message[RW]
missing_claims[RW]
policy_error[RW]
request_id[RW]
request_invalid[RW]
requires_restart[RW]
resource_missing[RW]
token_invalid[RW]
try_again_in_ms[RW]

Public Class Methods

attribute_map() click to toggle source

attribute mapping from ruby-style variable name to JSON key

# 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
new(attributes = {}) click to toggle source
# 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.message = 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
swagger_types() click to toggle source

attribute type

# 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