Method: OCI::Database::Models::PatchDetails#initialize

Defined in:
lib/oci/database/models/patch_details.rb

#initialize(attributes = {}) ⇒ PatchDetails

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :patch_id (String)

    The value to assign to the #patch_id property

  • :action (String)

    The value to assign to the #action property



53
54
55
56
57
58
59
60
61
62
63
64
65
66
# File 'lib/oci/database/models/patch_details.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.patch_id = attributes[:'patchId'] if attributes[:'patchId']

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

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

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