Class: OCI::Database::Models::MaintenanceRunSummary

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

Overview

Details of a maintenance run.

Constant Summary collapse

LIFECYCLE_STATE_ENUM =
[
  LIFECYCLE_STATE_SCHEDULED = 'SCHEDULED'.freeze,
  LIFECYCLE_STATE_IN_PROGRESS = 'IN_PROGRESS'.freeze,
  LIFECYCLE_STATE_SUCCEEDED = 'SUCCEEDED'.freeze,
  LIFECYCLE_STATE_SKIPPED = 'SKIPPED'.freeze,
  LIFECYCLE_STATE_FAILED = 'FAILED'.freeze,
  LIFECYCLE_STATE_UPDATING = 'UPDATING'.freeze,
  LIFECYCLE_STATE_DELETING = 'DELETING'.freeze,
  LIFECYCLE_STATE_DELETED = 'DELETED'.freeze,
  LIFECYCLE_STATE_CANCELED = 'CANCELED'.freeze,
  LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
TARGET_RESOURCE_TYPE_ENUM =
[
  TARGET_RESOURCE_TYPE_AUTONOMOUS_EXADATA_INFRASTRUCTURE = 'AUTONOMOUS_EXADATA_INFRASTRUCTURE'.freeze,
  TARGET_RESOURCE_TYPE_AUTONOMOUS_CONTAINER_DATABASE = 'AUTONOMOUS_CONTAINER_DATABASE'.freeze,
  TARGET_RESOURCE_TYPE_EXADATA_DB_SYSTEM = 'EXADATA_DB_SYSTEM'.freeze,
  TARGET_RESOURCE_TYPE_CLOUD_EXADATA_INFRASTRUCTURE = 'CLOUD_EXADATA_INFRASTRUCTURE'.freeze,
  TARGET_RESOURCE_TYPE_EXACC_INFRASTRUCTURE = 'EXACC_INFRASTRUCTURE'.freeze,
  TARGET_RESOURCE_TYPE_AUTONOMOUS_DATABASE = 'AUTONOMOUS_DATABASE'.freeze,
  TARGET_RESOURCE_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
MAINTENANCE_TYPE_ENUM =
[
  MAINTENANCE_TYPE_PLANNED = 'PLANNED'.freeze,
  MAINTENANCE_TYPE_UNPLANNED = 'UNPLANNED'.freeze,
  MAINTENANCE_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
MAINTENANCE_SUBTYPE_ENUM =
[
  MAINTENANCE_SUBTYPE_QUARTERLY = 'QUARTERLY'.freeze,
  MAINTENANCE_SUBTYPE_HARDWARE = 'HARDWARE'.freeze,
  MAINTENANCE_SUBTYPE_CRITICAL = 'CRITICAL'.freeze,
  MAINTENANCE_SUBTYPE_INFRASTRUCTURE = 'INFRASTRUCTURE'.freeze,
  MAINTENANCE_SUBTYPE_DATABASE = 'DATABASE'.freeze,
  MAINTENANCE_SUBTYPE_ONEOFF = 'ONEOFF'.freeze,
  MAINTENANCE_SUBTYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
PATCHING_MODE_ENUM =
[
  PATCHING_MODE_ROLLING = 'ROLLING'.freeze,
  PATCHING_MODE_NONROLLING = 'NONROLLING'.freeze,
  PATCHING_MODE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ MaintenanceRunSummary

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :id (String)

    The value to assign to the #id property

  • :compartment_id (String)

    The value to assign to the #compartment_id property

  • :display_name (String)

    The value to assign to the #display_name property

  • :description (String)

    The value to assign to the #description property

  • :lifecycle_state (String)

    The value to assign to the #lifecycle_state property

  • :lifecycle_details (String)

    The value to assign to the #lifecycle_details property

  • :time_scheduled (DateTime)

    The value to assign to the #time_scheduled property

  • :time_started (DateTime)

    The value to assign to the #time_started property

  • :time_ended (DateTime)

    The value to assign to the #time_ended property

  • :target_resource_type (String)

    The value to assign to the #target_resource_type property

  • :target_resource_id (String)

    The value to assign to the #target_resource_id property

  • :maintenance_type (String)

    The value to assign to the #maintenance_type property

  • :patch_id (String)

    The value to assign to the #patch_id property

  • :maintenance_subtype (String)

    The value to assign to the #maintenance_subtype property

  • :peer_maintenance_run_id (String)

    The value to assign to the #peer_maintenance_run_id property

  • :patching_mode (String)

    The value to assign to the #patching_mode property

  • :patch_failure_count (Integer)

    The value to assign to the #patch_failure_count property



199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
# File 'lib/oci/database/models/maintenance_run_summary.rb', line 199

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

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

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

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

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

  self.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState']

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

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

  self.lifecycle_details = attributes[:'lifecycleDetails'] if attributes[:'lifecycleDetails']

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

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

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

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

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

  self.time_ended = attributes[:'timeEnded'] if attributes[:'timeEnded']

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

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

  self.target_resource_type = attributes[:'targetResourceType'] if attributes[:'targetResourceType']

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

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

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

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

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

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

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

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

  self.peer_maintenance_run_id = attributes[:'peerMaintenanceRunId'] if attributes[:'peerMaintenanceRunId']

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

  self.peer_maintenance_run_id = attributes[:'peer_maintenance_run_id'] if attributes[:'peer_maintenance_run_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']

  self.patch_failure_count = attributes[:'patchFailureCount'] if attributes[:'patchFailureCount']

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

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

Instance Attribute Details

#compartment_idString

[Required] The OCID of the compartment.

Returns:

  • (String)


63
64
65
# File 'lib/oci/database/models/maintenance_run_summary.rb', line 63

def compartment_id
  @compartment_id
end

#descriptionString

Description of the maintenance run.

Returns:

  • (String)


71
72
73
# File 'lib/oci/database/models/maintenance_run_summary.rb', line 71

def description
  @description
end

#display_nameString

[Required] The user-friendly name for the maintenance run.

Returns:

  • (String)


67
68
69
# File 'lib/oci/database/models/maintenance_run_summary.rb', line 67

def display_name
  @display_name
end

#idString

[Required] The OCID of the maintenance run.

Returns:

  • (String)


59
60
61
# File 'lib/oci/database/models/maintenance_run_summary.rb', line 59

def id
  @id
end

#lifecycle_detailsString

Additional information about the current lifecycle state.

Returns:

  • (String)


80
81
82
# File 'lib/oci/database/models/maintenance_run_summary.rb', line 80

def lifecycle_details
  @lifecycle_details
end

#lifecycle_stateString

[Required] The current state of the maintenance run. For Autonomous Database on shared Exadata infrastructure, valid states are IN_PROGRESS, SUCCEEDED and FAILED.

Returns:

  • (String)


76
77
78
# File 'lib/oci/database/models/maintenance_run_summary.rb', line 76

def lifecycle_state
  @lifecycle_state
end

#maintenance_subtypeString

Maintenance sub-type.

Returns:

  • (String)


112
113
114
# File 'lib/oci/database/models/maintenance_run_summary.rb', line 112

def maintenance_subtype
  @maintenance_subtype
end

#maintenance_typeString

Maintenance type.

Returns:

  • (String)


104
105
106
# File 'lib/oci/database/models/maintenance_run_summary.rb', line 104

def maintenance_type
  @maintenance_type
end

#patch_failure_countInteger

Contain the patch failure count.

Returns:

  • (Integer)


124
125
126
# File 'lib/oci/database/models/maintenance_run_summary.rb', line 124

def patch_failure_count
  @patch_failure_count
end

#patch_idString

The unique identifier of the patch. The identifier string includes the patch type, the Oracle Database version, and the patch creation date (using the format YYMMDD). For example, the identifier ru_patch_19.9.0.0_201030 is used for an RU patch for Oracle Database 19.9.0.0 that was released October 30, 2020.

Returns:

  • (String)


108
109
110
# File 'lib/oci/database/models/maintenance_run_summary.rb', line 108

def patch_id
  @patch_id
end

#patching_modeString

Maintenance method, it will be either "ROLLING" or "NONROLLING". Default value is ROLLING.

Returns:

  • (String)


120
121
122
# File 'lib/oci/database/models/maintenance_run_summary.rb', line 120

def patching_mode
  @patching_mode
end

#peer_maintenance_run_idString

The [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the maintenance run for the Autonomous Data Guard association’s peer container database.

Returns:

  • (String)


116
117
118
# File 'lib/oci/database/models/maintenance_run_summary.rb', line 116

def peer_maintenance_run_id
  @peer_maintenance_run_id
end

#target_resource_idString

The ID of the target resource on which the maintenance run occurs.

Returns:

  • (String)


100
101
102
# File 'lib/oci/database/models/maintenance_run_summary.rb', line 100

def target_resource_id
  @target_resource_id
end

#target_resource_typeString

The type of the target resource on which the maintenance run occurs.

Returns:

  • (String)


96
97
98
# File 'lib/oci/database/models/maintenance_run_summary.rb', line 96

def target_resource_type
  @target_resource_type
end

#time_endedDateTime

The date and time the maintenance run was completed.

Returns:

  • (DateTime)


92
93
94
# File 'lib/oci/database/models/maintenance_run_summary.rb', line 92

def time_ended
  @time_ended
end

#time_scheduledDateTime

[Required] The date and time the maintenance run is scheduled to occur.

Returns:

  • (DateTime)


84
85
86
# File 'lib/oci/database/models/maintenance_run_summary.rb', line 84

def time_scheduled
  @time_scheduled
end

#time_startedDateTime

The date and time the maintenance run starts.

Returns:

  • (DateTime)


88
89
90
# File 'lib/oci/database/models/maintenance_run_summary.rb', line 88

def time_started
  @time_started
end

Class Method Details

.attribute_mapObject

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



127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
# File 'lib/oci/database/models/maintenance_run_summary.rb', line 127

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'id',
    'compartment_id': :'compartmentId',
    'display_name': :'displayName',
    'description': :'description',
    'lifecycle_state': :'lifecycleState',
    'lifecycle_details': :'lifecycleDetails',
    'time_scheduled': :'timeScheduled',
    'time_started': :'timeStarted',
    'time_ended': :'timeEnded',
    'target_resource_type': :'targetResourceType',
    'target_resource_id': :'targetResourceId',
    'maintenance_type': :'maintenanceType',
    'patch_id': :'patchId',
    'maintenance_subtype': :'maintenanceSubtype',
    'peer_maintenance_run_id': :'peerMaintenanceRunId',
    'patching_mode': :'patchingMode',
    'patch_failure_count': :'patchFailureCount'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
# File 'lib/oci/database/models/maintenance_run_summary.rb', line 152

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'String',
    'compartment_id': :'String',
    'display_name': :'String',
    'description': :'String',
    'lifecycle_state': :'String',
    'lifecycle_details': :'String',
    'time_scheduled': :'DateTime',
    'time_started': :'DateTime',
    'time_ended': :'DateTime',
    'target_resource_type': :'String',
    'target_resource_id': :'String',
    'maintenance_type': :'String',
    'patch_id': :'String',
    'maintenance_subtype': :'String',
    'peer_maintenance_run_id': :'String',
    'patching_mode': :'String',
    'patch_failure_count': :'Integer'
    # 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



372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
# File 'lib/oci/database/models/maintenance_run_summary.rb', line 372

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

  self.class == other.class &&
    id == other.id &&
    compartment_id == other.compartment_id &&
    display_name == other.display_name &&
    description == other.description &&
    lifecycle_state == other.lifecycle_state &&
    lifecycle_details == other.lifecycle_details &&
    time_scheduled == other.time_scheduled &&
    time_started == other.time_started &&
    time_ended == other.time_ended &&
    target_resource_type == other.target_resource_type &&
    target_resource_id == other.target_resource_id &&
    maintenance_type == other.maintenance_type &&
    patch_id == other.patch_id &&
    maintenance_subtype == other.maintenance_subtype &&
    peer_maintenance_run_id == other.peer_maintenance_run_id &&
    patching_mode == other.patching_mode &&
    patch_failure_count == other.patch_failure_count
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



418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
# File 'lib/oci/database/models/maintenance_run_summary.rb', line 418

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


398
399
400
# File 'lib/oci/database/models/maintenance_run_summary.rb', line 398

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



407
408
409
# File 'lib/oci/database/models/maintenance_run_summary.rb', line 407

def hash
  [id, compartment_id, display_name, description, lifecycle_state, lifecycle_details, time_scheduled, time_started, time_ended, target_resource_type, target_resource_id, maintenance_type, patch_id, maintenance_subtype, peer_maintenance_run_id, patching_mode, patch_failure_count].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



451
452
453
454
455
456
457
458
459
460
# File 'lib/oci/database/models/maintenance_run_summary.rb', line 451

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



445
446
447
# File 'lib/oci/database/models/maintenance_run_summary.rb', line 445

def to_s
  to_hash.to_s
end