Class: OCI::Database::Models::CreateMaintenanceRunDetails

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/database/models/create_maintenance_run_details.rb

Overview

Details to schedule Maintenance Run with Latest Release Update along TimeZone File Update for the specified resource.

Constant Summary collapse

PATCHING_MODE_ENUM =
[
  PATCHING_MODE_ROLLING = 'ROLLING'.freeze,
  PATCHING_MODE_NONROLLING = 'NONROLLING'.freeze
].freeze
PATCH_TYPE_ENUM =
[
  PATCH_TYPE_QUARTERLY = 'QUARTERLY'.freeze,
  PATCH_TYPE_TIMEZONE = 'TIMEZONE'.freeze,
  PATCH_TYPE_CUSTOM_DATABASE_SOFTWARE_IMAGE = 'CUSTOM_DATABASE_SOFTWARE_IMAGE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ CreateMaintenanceRunDetails

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
# File 'lib/oci/database/models/create_maintenance_run_details.rb', line 98

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

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

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

  self.is_dst_file_update_enabled = attributes[:'isDstFileUpdateEnabled'] unless attributes[:'isDstFileUpdateEnabled'].nil?

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

  self.is_dst_file_update_enabled = attributes[:'is_dst_file_update_enabled'] unless attributes[:'is_dst_file_update_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.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']

  self.patch_type = attributes[:'patchType'] if attributes[:'patchType']

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

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

  self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId']

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

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

  self.database_software_image_id = attributes[:'databaseSoftwareImageId'] if attributes[:'databaseSoftwareImageId']

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

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

Instance Attribute Details

#compartment_idString

The OCID of the compartment containing the Maintenance Run.

Returns:

  • (String)


49
50
51
# File 'lib/oci/database/models/create_maintenance_run_details.rb', line 49

def compartment_id
  @compartment_id
end

#database_software_image_idString

The Autonomous Database Software Image OCID

Returns:

  • (String)


53
54
55
# File 'lib/oci/database/models/create_maintenance_run_details.rb', line 53

def database_software_image_id
  @database_software_image_id
end

#is_dst_file_update_enabledBOOLEAN

Indicates if an automatic DST Time Zone file update is enabled for the Autonomous Container Database. If enabled along with Release Update, patching will be done in a Non-Rolling manner.

Returns:

  • (BOOLEAN)


29
30
31
# File 'lib/oci/database/models/create_maintenance_run_details.rb', line 29

def is_dst_file_update_enabled
  @is_dst_file_update_enabled
end

#patch_typeString

[Required] Patch type, either "QUARTERLY", "TIMEZONE" or "CUSTOM_DATABASE_SOFTWARE_IMAGE".

Returns:

  • (String)


45
46
47
# File 'lib/oci/database/models/create_maintenance_run_details.rb', line 45

def patch_type
  @patch_type
end

#patching_modeString

Cloud Exadata infrastructure node patching method, either "ROLLING" or "NONROLLING". Default value is ROLLING.

IMPORTANT: Non-rolling infrastructure patching involves system down time. See Oracle-Managed Infrastructure Maintenance Updates for more information.

Returns:

  • (String)


40
41
42
# File 'lib/oci/database/models/create_maintenance_run_details.rb', line 40

def patching_mode
  @patching_mode
end

#target_resource_idString

[Required] The ID of the target resource for which the maintenance run should be created.

Returns:

  • (String)


25
26
27
# File 'lib/oci/database/models/create_maintenance_run_details.rb', line 25

def target_resource_id
  @target_resource_id
end

#time_scheduledDateTime

[Required] The date and time that update should be scheduled.

Returns:

  • (DateTime)


33
34
35
# File 'lib/oci/database/models/create_maintenance_run_details.rb', line 33

def time_scheduled
  @time_scheduled
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'lib/oci/database/models/create_maintenance_run_details.rb', line 56

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'target_resource_id': :'targetResourceId',
    'is_dst_file_update_enabled': :'isDstFileUpdateEnabled',
    'time_scheduled': :'timeScheduled',
    'patching_mode': :'patchingMode',
    'patch_type': :'patchType',
    'compartment_id': :'compartmentId',
    'database_software_image_id': :'databaseSoftwareImageId'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



71
72
73
74
75
76
77
78
79
80
81
82
83
# File 'lib/oci/database/models/create_maintenance_run_details.rb', line 71

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'target_resource_id': :'String',
    'is_dst_file_update_enabled': :'BOOLEAN',
    'time_scheduled': :'DateTime',
    'patching_mode': :'String',
    'patch_type': :'String',
    'compartment_id': :'String',
    'database_software_image_id': :'String'
    # rubocop:enable Style/SymbolLiteral
  }
end

Instance Method Details

#==(other) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • other (Object)

    the other object to be compared



170
171
172
173
174
175
176
177
178
179
180
181
# File 'lib/oci/database/models/create_maintenance_run_details.rb', line 170

def ==(other)
  return true if equal?(other)

  self.class == other.class &&
    target_resource_id == other.target_resource_id &&
    is_dst_file_update_enabled == other.is_dst_file_update_enabled &&
    time_scheduled == other.time_scheduled &&
    patching_mode == other.patching_mode &&
    patch_type == other.patch_type &&
    compartment_id == other.compartment_id &&
    database_software_image_id == other.database_software_image_id
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
# File 'lib/oci/database/models/create_maintenance_run_details.rb', line 206

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)

  self.class.swagger_types.each_pair do |key, type|
    if type =~ /^Array<(.*)>/i
      # check to ensure the input is an array given that the the attribute
      # is documented as an array but the input is not
      if attributes[self.class.attribute_map[key]].is_a?(Array)
        public_method("#{key}=").call(
          attributes[self.class.attribute_map[key]]
            .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
        )
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      public_method("#{key}=").call(
        OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
      )
    end
    # or else data not found in attributes(hash), not an issue as the data can be optional
  end

  self
end

#eql?(other) ⇒ Boolean

Parameters:

  • other (Object)

    the other object to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


186
187
188
# File 'lib/oci/database/models/create_maintenance_run_details.rb', line 186

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



195
196
197
# File 'lib/oci/database/models/create_maintenance_run_details.rb', line 195

def hash
  [target_resource_id, is_dst_file_update_enabled, time_scheduled, patching_mode, patch_type, compartment_id, database_software_image_id].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



239
240
241
242
243
244
245
246
247
248
# File 'lib/oci/database/models/create_maintenance_run_details.rb', line 239

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = public_method(attr).call
    next if value.nil? && !instance_variable_defined?("@#{attr}")

    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



233
234
235
# File 'lib/oci/database/models/create_maintenance_run_details.rb', line 233

def to_s
  to_hash.to_s
end