Method: OCI::ContainerEngine::Models::NodeError#initialize

Defined in:
lib/oci/container_engine/models/node_error.rb

#initialize(attributes = {}) ⇒ NodeError

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash

Options Hash (attributes):

  • :code (String)

    The value to assign to the #code property

  • :message (String)

    The value to assign to the #message property

  • :status (String)

    The value to assign to the #status property

  • :opc_request_id (String)

    The value to assign to the #opc_request_id property



59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# File 'lib/oci/container_engine/models/node_error.rb', line 59

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

  self.code = attributes[:'code'] if attributes[:'code']

  self.message = attributes[:'message'] if attributes[:'message']

  self.status = attributes[:'status'] if attributes[:'status']

  self.opc_request_id = attributes[:'opc-request-id'] if attributes[:'opc-request-id']

  raise 'You cannot provide both :opc-request-id and :opc_request_id' if attributes.key?(:'opc-request-id') && attributes.key?(:'opc_request_id')

  self.opc_request_id = attributes[:'opc_request_id'] if attributes[:'opc_request_id']
end