Class: OCI::Core::Models::InstanceMaintenanceEvent
- Inherits:
-
Object
- Object
- OCI::Core::Models::InstanceMaintenanceEvent
- 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
-
#additional_details ⇒ Hash<String, String>
Additional details of the maintenance in the form of json.
-
#alternative_resolution_actions ⇒ Array<String>
[Required] These are alternative actions to the requested instanceAction that can be taken to resolve the Maintenance.
-
#can_delete_local_storage ⇒ BOOLEAN
For Instances that have local storage, this field is set to true when local storage will be deleted as a result of the Maintenance.
-
#can_reschedule ⇒ BOOLEAN
[Required] Indicates if this MaintenanceEvent is capable of being rescheduled up to the timeHardDueDate.
-
#compartment_id ⇒ String
[Required] The OCID of the compartment that contains the instance.
-
#correlation_token ⇒ String
A unique identifier that will group Instances that have a relationship with one another and must be scheduled together for the Maintenance to proceed.
-
#created_by ⇒ String
[Required] The creator of the maintenance event.
-
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource.
-
#description ⇒ String
It is the descriptive information about the maintenance taking place on the customer instance.
-
#display_name ⇒ String
A user-friendly name.
-
#estimated_duration ⇒ String
This is the estimated duration of the Maintenance, once the Maintenance has entered the STARTED state.
-
#freeform_tags ⇒ Hash<String, String>
Free-form tags for this resource.
-
#id ⇒ String
[Required] The OCID of the maintenance event.
-
#instance_action ⇒ String
[Required] This is the action that will be performed on the Instance by OCI when the Maintenance begins.
-
#instance_id ⇒ String
[Required] The OCID of the instance.
-
#lifecycle_details ⇒ String
Provides more details about the state of the maintenance event.
-
#lifecycle_state ⇒ String
[Required] The current state of the maintenance event.
-
#maintenance_category ⇒ String
[Required] This indicates the priority and allowed actions for this Maintenance.
-
#maintenance_reason ⇒ String
[Required] This is the reason that Maintenance is being performed.
-
#start_window_duration ⇒ String
The duration of the time window Maintenance is scheduled to begin within.
-
#time_created ⇒ DateTime
[Required] The date and time the maintenance event was created, in the format defined by RFC3339.
-
#time_finished ⇒ DateTime
The time at which the Maintenance actually finished.
-
#time_hard_due_date ⇒ DateTime
It is the scheduled hard due date and time of the maintenance event.
-
#time_started ⇒ DateTime
The time at which the Maintenance actually started.
-
#time_window_start ⇒ DateTime
[Required] The beginning of the time window when Maintenance is scheduled to begin.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ InstanceMaintenanceEvent
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ InstanceMaintenanceEvent
Initializes the object
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. = attributes[:'definedTags'] if attributes[:'definedTags'] raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags') self. = attributes[:'defined_tags'] if attributes[:'defined_tags'] self. = attributes[:'freeformTags'] if attributes[:'freeformTags'] raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags') self. = 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_details ⇒ Hash<String, String>
Additional details of the maintenance in the form of json.
201 202 203 |
# File 'lib/oci/core/models/instance_maintenance_event.rb', line 201 def additional_details @additional_details end |
#alternative_resolution_actions ⇒ Array<String>
[Required] These are alternative actions to the requested instanceAction that can be taken to resolve the Maintenance.
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_storage ⇒ BOOLEAN
For Instances that have local storage, this field is set to true when local storage will be deleted as a result of the Maintenance.
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_reschedule ⇒ BOOLEAN
[Required] Indicates if this MaintenanceEvent is capable of being rescheduled up to the timeHardDueDate.
157 158 159 |
# File 'lib/oci/core/models/instance_maintenance_event.rb', line 157 def can_reschedule @can_reschedule end |
#compartment_id ⇒ String
[Required] The OCID of the compartment that contains the instance.
96 97 98 |
# File 'lib/oci/core/models/instance_maintenance_event.rb', line 96 def compartment_id @compartment_id end |
#correlation_token ⇒ String
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.
190 191 192 |
# File 'lib/oci/core/models/instance_maintenance_event.rb', line 190 def correlation_token @correlation_token end |
#created_by ⇒ String
[Required] The creator of the maintenance event.
178 179 180 |
# File 'lib/oci/core/models/instance_maintenance_event.rb', line 178 def created_by @created_by end |
#defined_tags ⇒ Hash<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\"}}
74 75 76 |
# File 'lib/oci/core/models/instance_maintenance_event.rb', line 74 def @defined_tags end |
#description ⇒ String
It is the descriptive information about the maintenance taking place on the customer instance.
183 184 185 |
# File 'lib/oci/core/models/instance_maintenance_event.rb', line 183 def description @description end |
#display_name ⇒ String
A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
66 67 68 |
# File 'lib/oci/core/models/instance_maintenance_event.rb', line 66 def display_name @display_name end |
#estimated_duration ⇒ String
This is the estimated duration of the Maintenance, once the Maintenance has entered the STARTED state.
146 147 148 |
# File 'lib/oci/core/models/instance_maintenance_event.rb', line 146 def estimated_duration @estimated_duration end |
#freeform_tags ⇒ Hash<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\"}
82 83 84 |
# File 'lib/oci/core/models/instance_maintenance_event.rb', line 82 def @freeform_tags end |
#id ⇒ String
[Required] The OCID of the maintenance event.
87 88 89 |
# File 'lib/oci/core/models/instance_maintenance_event.rb', line 87 def id @id end |
#instance_action ⇒ String
[Required] This is the action that will be performed on the Instance by OCI when the Maintenance begins.
115 116 117 |
# File 'lib/oci/core/models/instance_maintenance_event.rb', line 115 def instance_action @instance_action end |
#instance_id ⇒ String
[Required] The OCID of the instance.
91 92 93 |
# File 'lib/oci/core/models/instance_maintenance_event.rb', line 91 def instance_id @instance_id end |
#lifecycle_details ⇒ String
Provides more details about the state of the maintenance event.
173 174 175 |
# File 'lib/oci/core/models/instance_maintenance_event.rb', line 173 def lifecycle_details @lifecycle_details end |
#lifecycle_state ⇒ String
[Required] The current state of the maintenance event.
168 169 170 |
# File 'lib/oci/core/models/instance_maintenance_event.rb', line 168 def lifecycle_state @lifecycle_state end |
#maintenance_category ⇒ String
[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.
104 105 106 |
# File 'lib/oci/core/models/instance_maintenance_event.rb', line 104 def maintenance_category @maintenance_category end |
#maintenance_reason ⇒ String
[Required] This is the reason that Maintenance is being performed. See Instance Maintenance documentation for details.
110 111 112 |
# File 'lib/oci/core/models/instance_maintenance_event.rb', line 110 def maintenance_reason @maintenance_reason end |
#start_window_duration ⇒ String
The duration of the time window Maintenance is scheduled to begin within.
141 142 143 |
# File 'lib/oci/core/models/instance_maintenance_event.rb', line 141 def start_window_duration @start_window_duration end |
#time_created ⇒ DateTime
[Required] The date and time the maintenance event was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
163 164 165 |
# File 'lib/oci/core/models/instance_maintenance_event.rb', line 163 def time_created @time_created end |
#time_finished ⇒ DateTime
The time at which the Maintenance actually finished.
130 131 132 |
# File 'lib/oci/core/models/instance_maintenance_event.rb', line 130 def time_finished @time_finished end |
#time_hard_due_date ⇒ DateTime
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.
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_started ⇒ DateTime
The time at which the Maintenance actually started.
125 126 127 |
# File 'lib/oci/core/models/instance_maintenance_event.rb', line 125 def time_started @time_started end |
#time_window_start ⇒ DateTime
[Required] The beginning of the time window when Maintenance is scheduled to begin. The Maintenance will not begin before this time.
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_map ⇒ Object
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_types ⇒ Object
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.
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 && == other. && == other. && 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
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
575 576 577 |
# File 'lib/oci/core/models/instance_maintenance_event.rb', line 575 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
584 585 586 |
# File 'lib/oci/core/models/instance_maintenance_event.rb', line 584 def hash [display_name, , , 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_hash ⇒ 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_s ⇒ String
Returns the string representation 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 |