Method: OCI::Database::Models::UpdateMaintenanceRunDetails#initialize

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

#initialize(attributes = {}) ⇒ UpdateMaintenanceRunDetails

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :is_enabled (BOOLEAN)

    The value to assign to the #is_enabled property

  • :time_scheduled (DateTime)

    The value to assign to the #time_scheduled property

  • :is_patch_now_enabled (BOOLEAN)

    The value to assign to the #is_patch_now_enabled property

  • :patch_id (String)

    The value to assign to the #patch_id property

  • :patching_mode (String)

    The value to assign to the #patching_mode property



76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# File 'lib/oci/database/models/update_maintenance_run_details.rb', line 76

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.is_enabled = attributes[:'isEnabled'] unless attributes[:'isEnabled'].nil?

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

  self.is_enabled = attributes[:'is_enabled'] unless attributes[:'is_enabled'].nil?

  self.time_scheduled = attributes[:'timeScheduled'] if attributes[:'timeScheduled']

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

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

  self.is_patch_now_enabled = attributes[:'isPatchNowEnabled'] unless attributes[:'isPatchNowEnabled'].nil?

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

  self.is_patch_now_enabled = attributes[:'is_patch_now_enabled'] unless attributes[:'is_patch_now_enabled'].nil?

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

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

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