Method: OCI::ObjectStorage::Models::ObjectLifecyclePolicy#initialize

Defined in:
lib/oci/object_storage/models/object_lifecycle_policy.rb

#initialize(attributes = {}) ⇒ ObjectLifecyclePolicy

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



53
54
55
56
57
58
59
60
61
62
63
64
65
66
# File 'lib/oci/object_storage/models/object_lifecycle_policy.rb', line 53

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

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

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

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