Class: OCI::Core::Models::InstanceMaintenanceEvent

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/core/models/instance_maintenance_event.rb

Overview

It is the event in which the maintenance action will be be performed on the customer instance on the scheduled date and time.

Constant Summary collapse

MAINTENANCE_CATEGORY_ENUM =
[
  MAINTENANCE_CATEGORY_EMERGENCY = 'EMERGENCY'.freeze,
  MAINTENANCE_CATEGORY_MANDATORY = 'MANDATORY'.freeze,
  MAINTENANCE_CATEGORY_FLEXIBLE = 'FLEXIBLE'.freeze,
  MAINTENANCE_CATEGORY_OPTIONAL = 'OPTIONAL'.freeze,
  MAINTENANCE_CATEGORY_NOTIFICATION = 'NOTIFICATION'.freeze,
  MAINTENANCE_CATEGORY_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
MAINTENANCE_REASON_ENUM =
[
  MAINTENANCE_REASON_EVACUATION = 'EVACUATION'.freeze,
  MAINTENANCE_REASON_ENVIRONMENTAL_FACTORS = 'ENVIRONMENTAL_FACTORS'.freeze,
  MAINTENANCE_REASON_DECOMMISSION = 'DECOMMISSION'.freeze,
  MAINTENANCE_REASON_HARDWARE_REPLACEMENT = 'HARDWARE_REPLACEMENT'.freeze,
  MAINTENANCE_REASON_FIRMWARE_UPDATE = 'FIRMWARE_UPDATE'.freeze,
  MAINTENANCE_REASON_SECURITY_UPDATE = 'SECURITY_UPDATE'.freeze,
  MAINTENANCE_REASON_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
INSTANCE_ACTION_ENUM =
[
  INSTANCE_ACTION_REBOOT_MIGRATION = 'REBOOT_MIGRATION'.freeze,
  INSTANCE_ACTION_TERMINATE = 'TERMINATE'.freeze,
  INSTANCE_ACTION_STOP = 'STOP'.freeze,
  INSTANCE_ACTION_NONE = 'NONE'.freeze,
  INSTANCE_ACTION_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
ALTERNATIVE_RESOLUTION_ACTIONS_ENUM =
[
  ALTERNATIVE_RESOLUTION_ACTIONS_REBOOT_MIGRATION = 'REBOOT_MIGRATION'.freeze,
  ALTERNATIVE_RESOLUTION_ACTIONS_TERMINATE = 'TERMINATE'.freeze,
  ALTERNATIVE_RESOLUTION_ACTIONS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
LIFECYCLE_STATE_ENUM =
[
  LIFECYCLE_STATE_SCHEDULED = 'SCHEDULED'.freeze,
  LIFECYCLE_STATE_STARTED = 'STARTED'.freeze,
  LIFECYCLE_STATE_PROCESSING = 'PROCESSING'.freeze,
  LIFECYCLE_STATE_SUCCEEDED = 'SUCCEEDED'.freeze,
  LIFECYCLE_STATE_FAILED = 'FAILED'.freeze,
  LIFECYCLE_STATE_CANCELED = 'CANCELED'.freeze,
  LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
CREATED_BY_ENUM =
[
  CREATED_BY_CUSTOMER = 'CUSTOMER'.freeze,
  CREATED_BY_SYSTEM = 'SYSTEM'.freeze,
  CREATED_BY_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ InstanceMaintenanceEvent

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :display_name (String)

    The value to assign to the #display_name property

  • :defined_tags (Hash<String, Hash<String, Object>>)

    The value to assign to the #defined_tags property

  • :freeform_tags (Hash<String, String>)

    The value to assign to the #freeform_tags property

  • :id (String)

    The value to assign to the #id property

  • :instance_id (String)

    The value to assign to the #instance_id property

  • :compartment_id (String)

    The value to assign to the #compartment_id property

  • :maintenance_category (String)

    The value to assign to the #maintenance_category property

  • :maintenance_reason (String)

    The value to assign to the #maintenance_reason property

  • :instance_action (String)

    The value to assign to the #instance_action property

  • :alternative_resolution_actions (Array<String>)

    The value to assign to the #alternative_resolution_actions property

  • :time_started (DateTime)

    The value to assign to the #time_started property

  • :time_finished (DateTime)

    The value to assign to the #time_finished property

  • :time_window_start (DateTime)

    The value to assign to the #time_window_start property

  • :start_window_duration (String)

    The value to assign to the #start_window_duration property

  • :estimated_duration (String)

    The value to assign to the #estimated_duration property

  • :time_hard_due_date (DateTime)

    The value to assign to the #time_hard_due_date property

  • :can_reschedule (BOOLEAN)

    The value to assign to the #can_reschedule property

  • :time_created (DateTime)

    The value to assign to the #time_created 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

  • :created_by (String)

    The value to assign to the #created_by property

  • :description (String)

    The value to assign to the #description property

  • :correlation_token (String)

    The value to assign to the #correlation_token property

  • :can_delete_local_storage (BOOLEAN)

    The value to assign to the #can_delete_local_storage property

  • :additional_details (Hash<String, String>)

    The value to assign to the #additional_details property



300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
# File 'lib/oci/core/models/instance_maintenance_event.rb', line 300

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

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

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

  self.freeform_tags = attributes[:'freeformTags'] if attributes[:'freeformTags']

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

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

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

  self.instance_id = attributes[:'instanceId'] if attributes[:'instanceId']

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

  self.instance_id = attributes[:'instance_id'] if attributes[:'instance_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.maintenance_category = attributes[:'maintenanceCategory'] if attributes[:'maintenanceCategory']

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

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

  self.maintenance_reason = attributes[:'maintenanceReason'] if attributes[:'maintenanceReason']

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

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

  self.instance_action = attributes[:'instanceAction'] if attributes[:'instanceAction']

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

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

  self.alternative_resolution_actions = attributes[:'alternativeResolutionActions'] if attributes[:'alternativeResolutionActions']

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

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

  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_finished = attributes[:'timeFinished'] if attributes[:'timeFinished']

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

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

  self.time_window_start = attributes[:'timeWindowStart'] if attributes[:'timeWindowStart']

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

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

  self.start_window_duration = attributes[:'startWindowDuration'] if attributes[:'startWindowDuration']

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

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

  self.estimated_duration = attributes[:'estimatedDuration'] if attributes[:'estimatedDuration']

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

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

  self.time_hard_due_date = attributes[:'timeHardDueDate'] if attributes[:'timeHardDueDate']

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

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

  self.can_reschedule = attributes[:'canReschedule'] unless attributes[:'canReschedule'].nil?

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

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

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

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

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

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

  self.correlation_token = attributes[:'correlationToken'] if attributes[:'correlationToken']

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

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

  self.can_delete_local_storage = attributes[:'canDeleteLocalStorage'] unless attributes[:'canDeleteLocalStorage'].nil?

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

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

  self.additional_details = attributes[:'additionalDetails'] if attributes[:'additionalDetails']

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

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

Instance Attribute Details

#additional_detailsHash<String, String>

Additional details of the maintenance in the form of json.

Returns:

  • (Hash<String, String>)


201
202
203
# File 'lib/oci/core/models/instance_maintenance_event.rb', line 201

def additional_details
  @additional_details
end

#alternative_resolution_actionsArray<String>

[Required] These are alternative actions to the requested instanceAction that can be taken to resolve the Maintenance.

Returns:

  • (Array<String>)


120
121
122
# File 'lib/oci/core/models/instance_maintenance_event.rb', line 120

def alternative_resolution_actions
  @alternative_resolution_actions
end

#can_delete_local_storageBOOLEAN

For Instances that have local storage, this field is set to true when local storage will be deleted as a result of the Maintenance.

Returns:

  • (BOOLEAN)


196
197
198
# File 'lib/oci/core/models/instance_maintenance_event.rb', line 196

def can_delete_local_storage
  @can_delete_local_storage
end

#can_rescheduleBOOLEAN

[Required] Indicates if this MaintenanceEvent is capable of being rescheduled up to the timeHardDueDate.

Returns:

  • (BOOLEAN)


157
158
159
# File 'lib/oci/core/models/instance_maintenance_event.rb', line 157

def can_reschedule
  @can_reschedule
end

#compartment_idString

[Required] The OCID of the compartment that contains the instance.

Returns:

  • (String)


96
97
98
# File 'lib/oci/core/models/instance_maintenance_event.rb', line 96

def compartment_id
  @compartment_id
end

#correlation_tokenString

A unique identifier that will group Instances that have a relationship with one another and must be scheduled together for the Maintenance to proceed. Any Instances that have a relationship with one another from a Maintenance perspective will have a matching correlationToken.

Returns:

  • (String)


190
191
192
# File 'lib/oci/core/models/instance_maintenance_event.rb', line 190

def correlation_token
  @correlation_token
end

#created_byString

[Required] The creator of the maintenance event.

Returns:

  • (String)


178
179
180
# File 'lib/oci/core/models/instance_maintenance_event.rb', line 178

def created_by
  @created_by
end

#defined_tagsHash<String, Hash<String, Object>>

Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.

Example: {\"Operations\": {\"CostCenter\": \"42\"}}

Returns:

  • (Hash<String, Hash<String, Object>>)


74
75
76
# File 'lib/oci/core/models/instance_maintenance_event.rb', line 74

def defined_tags
  @defined_tags
end

#descriptionString

It is the descriptive information about the maintenance taking place on the customer instance.

Returns:

  • (String)


183
184
185
# File 'lib/oci/core/models/instance_maintenance_event.rb', line 183

def description
  @description
end

#display_nameString

A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.

Returns:

  • (String)


66
67
68
# File 'lib/oci/core/models/instance_maintenance_event.rb', line 66

def display_name
  @display_name
end

#estimated_durationString

This is the estimated duration of the Maintenance, once the Maintenance has entered the STARTED state.

Returns:

  • (String)


146
147
148
# File 'lib/oci/core/models/instance_maintenance_event.rb', line 146

def estimated_duration
  @estimated_duration
end

#freeform_tagsHash<String, String>

Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags.

Example: {\"Department\": \"Finance\"}

Returns:

  • (Hash<String, String>)


82
83
84
# File 'lib/oci/core/models/instance_maintenance_event.rb', line 82

def freeform_tags
  @freeform_tags
end

#idString

[Required] The OCID of the maintenance event.

Returns:

  • (String)


87
88
89
# File 'lib/oci/core/models/instance_maintenance_event.rb', line 87

def id
  @id
end

#instance_actionString

[Required] This is the action that will be performed on the Instance by OCI when the Maintenance begins.

Returns:

  • (String)


115
116
117
# File 'lib/oci/core/models/instance_maintenance_event.rb', line 115

def instance_action
  @instance_action
end

#instance_idString

[Required] The OCID of the instance.

Returns:

  • (String)


91
92
93
# File 'lib/oci/core/models/instance_maintenance_event.rb', line 91

def instance_id
  @instance_id
end

#lifecycle_detailsString

Provides more details about the state of the maintenance event.

Returns:

  • (String)


173
174
175
# File 'lib/oci/core/models/instance_maintenance_event.rb', line 173

def lifecycle_details
  @lifecycle_details
end

#lifecycle_stateString

[Required] The current state of the maintenance event.

Returns:

  • (String)


168
169
170
# File 'lib/oci/core/models/instance_maintenance_event.rb', line 168

def lifecycle_state
  @lifecycle_state
end

#maintenance_categoryString

[Required] This indicates the priority and allowed actions for this Maintenance. Higher priority forms of Maintenance have tighter restrictions and may not be rescheduled, while lower priority/severity Maintenance can be rescheduled, deferred, or even cancelled. Please see the Instance Maintenance documentation for details.

Returns:

  • (String)


104
105
106
# File 'lib/oci/core/models/instance_maintenance_event.rb', line 104

def maintenance_category
  @maintenance_category
end

#maintenance_reasonString

[Required] This is the reason that Maintenance is being performed. See Instance Maintenance documentation for details.

Returns:

  • (String)


110
111
112
# File 'lib/oci/core/models/instance_maintenance_event.rb', line 110

def maintenance_reason
  @maintenance_reason
end

#start_window_durationString

The duration of the time window Maintenance is scheduled to begin within.

Returns:

  • (String)


141
142
143
# File 'lib/oci/core/models/instance_maintenance_event.rb', line 141

def start_window_duration
  @start_window_duration
end

#time_createdDateTime

[Required] The date and time the maintenance event was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z

Returns:

  • (DateTime)


163
164
165
# File 'lib/oci/core/models/instance_maintenance_event.rb', line 163

def time_created
  @time_created
end

#time_finishedDateTime

The time at which the Maintenance actually finished.

Returns:

  • (DateTime)


130
131
132
# File 'lib/oci/core/models/instance_maintenance_event.rb', line 130

def time_finished
  @time_finished
end

#time_hard_due_dateDateTime

It is the scheduled hard due date and time of the maintenance event. The maintenance event will happen at this time and the due date will not be extended.

Returns:

  • (DateTime)


152
153
154
# File 'lib/oci/core/models/instance_maintenance_event.rb', line 152

def time_hard_due_date
  @time_hard_due_date
end

#time_startedDateTime

The time at which the Maintenance actually started.

Returns:

  • (DateTime)


125
126
127
# File 'lib/oci/core/models/instance_maintenance_event.rb', line 125

def time_started
  @time_started
end

#time_window_startDateTime

[Required] The beginning of the time window when Maintenance is scheduled to begin. The Maintenance will not begin before this time.

Returns:

  • (DateTime)


136
137
138
# File 'lib/oci/core/models/instance_maintenance_event.rb', line 136

def time_window_start
  @time_window_start
end

Class Method Details

.attribute_mapObject

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



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
# File 'lib/oci/core/models/instance_maintenance_event.rb', line 204

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'display_name': :'displayName',
    'defined_tags': :'definedTags',
    'freeform_tags': :'freeformTags',
    'id': :'id',
    'instance_id': :'instanceId',
    'compartment_id': :'compartmentId',
    'maintenance_category': :'maintenanceCategory',
    'maintenance_reason': :'maintenanceReason',
    'instance_action': :'instanceAction',
    'alternative_resolution_actions': :'alternativeResolutionActions',
    'time_started': :'timeStarted',
    'time_finished': :'timeFinished',
    'time_window_start': :'timeWindowStart',
    'start_window_duration': :'startWindowDuration',
    'estimated_duration': :'estimatedDuration',
    'time_hard_due_date': :'timeHardDueDate',
    'can_reschedule': :'canReschedule',
    'time_created': :'timeCreated',
    'lifecycle_state': :'lifecycleState',
    'lifecycle_details': :'lifecycleDetails',
    'created_by': :'createdBy',
    'description': :'description',
    'correlation_token': :'correlationToken',
    'can_delete_local_storage': :'canDeleteLocalStorage',
    'additional_details': :'additionalDetails'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



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
# File 'lib/oci/core/models/instance_maintenance_event.rb', line 237

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'display_name': :'String',
    'defined_tags': :'Hash<String, Hash<String, Object>>',
    'freeform_tags': :'Hash<String, String>',
    'id': :'String',
    'instance_id': :'String',
    'compartment_id': :'String',
    'maintenance_category': :'String',
    'maintenance_reason': :'String',
    'instance_action': :'String',
    'alternative_resolution_actions': :'Array<String>',
    'time_started': :'DateTime',
    'time_finished': :'DateTime',
    'time_window_start': :'DateTime',
    'start_window_duration': :'String',
    'estimated_duration': :'String',
    'time_hard_due_date': :'DateTime',
    'can_reschedule': :'BOOLEAN',
    'time_created': :'DateTime',
    'lifecycle_state': :'String',
    'lifecycle_details': :'String',
    'created_by': :'String',
    'description': :'String',
    'correlation_token': :'String',
    'can_delete_local_storage': :'BOOLEAN',
    'additional_details': :'Hash<String, 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



541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
# File 'lib/oci/core/models/instance_maintenance_event.rb', line 541

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

  self.class == other.class &&
    display_name == other.display_name &&
    defined_tags == other.defined_tags &&
    freeform_tags == other.freeform_tags &&
    id == other.id &&
    instance_id == other.instance_id &&
    compartment_id == other.compartment_id &&
    maintenance_category == other.maintenance_category &&
    maintenance_reason == other.maintenance_reason &&
    instance_action == other.instance_action &&
    alternative_resolution_actions == other.alternative_resolution_actions &&
    time_started == other.time_started &&
    time_finished == other.time_finished &&
    time_window_start == other.time_window_start &&
    start_window_duration == other.start_window_duration &&
    estimated_duration == other.estimated_duration &&
    time_hard_due_date == other.time_hard_due_date &&
    can_reschedule == other.can_reschedule &&
    time_created == other.time_created &&
    lifecycle_state == other.lifecycle_state &&
    lifecycle_details == other.lifecycle_details &&
    created_by == other.created_by &&
    description == other.description &&
    correlation_token == other.correlation_token &&
    can_delete_local_storage == other.can_delete_local_storage &&
    additional_details == other.additional_details
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



595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
# File 'lib/oci/core/models/instance_maintenance_event.rb', line 595

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


575
576
577
# File 'lib/oci/core/models/instance_maintenance_event.rb', line 575

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



584
585
586
# File 'lib/oci/core/models/instance_maintenance_event.rb', line 584

def hash
  [display_name, defined_tags, freeform_tags, id, instance_id, compartment_id, maintenance_category, maintenance_reason, instance_action, alternative_resolution_actions, time_started, time_finished, time_window_start, start_window_duration, estimated_duration, time_hard_due_date, can_reschedule, time_created, lifecycle_state, lifecycle_details, created_by, description, correlation_token, can_delete_local_storage, additional_details].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



628
629
630
631
632
633
634
635
636
637
# File 'lib/oci/core/models/instance_maintenance_event.rb', line 628

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



622
623
624
# File 'lib/oci/core/models/instance_maintenance_event.rb', line 622

def to_s
  to_hash.to_s
end