Method: OCI::Core::Models::InstanceConfigurationBlockVolumeDetails#initialize

Defined in:
lib/oci/core/models/instance_configuration_block_volume_details.rb

#initialize(attributes = {}) ⇒ InstanceConfigurationBlockVolumeDetails

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/oci/core/models/instance_configuration_block_volume_details.rb', line 51

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.attach_details = attributes[:'attachDetails'] if attributes[:'attachDetails']

  raise 'You cannot provide both :attachDetails and :attach_details' if attributes.key?(:'attachDetails') && attributes.key?(:'attach_details')

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

  self.create_details = attributes[:'createDetails'] if attributes[:'createDetails']

  raise 'You cannot provide both :createDetails and :create_details' if attributes.key?(:'createDetails') && attributes.key?(:'create_details')

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

  self.volume_id = attributes[:'volumeId'] if attributes[:'volumeId']

  raise 'You cannot provide both :volumeId and :volume_id' if attributes.key?(:'volumeId') && attributes.key?(:'volume_id')

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