Class: OCI::Core::Models::InstanceMaintenanceEventSummary
- Inherits:
-
Object
- Object
- OCI::Core::Models::InstanceMaintenanceEventSummary
- Defined in:
- lib/oci/core/models/instance_maintenance_event_summary.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
- 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
Instance Attribute Summary collapse
-
#alternative_resolution_actions ⇒ Array<String>
[Required] These are alternative actions to the requested instanceAction that can be taken to resolve 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_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 = {}) ⇒ InstanceMaintenanceEventSummary
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 = {}) ⇒ InstanceMaintenanceEventSummary
Initializes the object
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 299 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 |
# File 'lib/oci/core/models/instance_maintenance_event_summary.rb', line 232 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. = 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.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[:'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.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'] end |
Instance Attribute Details
#alternative_resolution_actions ⇒ Array<String>
[Required] These are alternative actions to the requested instanceAction that can be taken to resolve the Maintenance.
77 78 79 |
# File 'lib/oci/core/models/instance_maintenance_event_summary.rb', line 77 def alternative_resolution_actions @alternative_resolution_actions end |
#can_reschedule ⇒ BOOLEAN
[Required] Indicates if this MaintenanceEvent is capable of being rescheduled up to the timeHardDueDate.
114 115 116 |
# File 'lib/oci/core/models/instance_maintenance_event_summary.rb', line 114 def can_reschedule @can_reschedule end |
#compartment_id ⇒ String
[Required] The OCID of the compartment that contains the instance.
53 54 55 |
# File 'lib/oci/core/models/instance_maintenance_event_summary.rb', line 53 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.
142 143 144 |
# File 'lib/oci/core/models/instance_maintenance_event_summary.rb', line 142 def correlation_token @correlation_token end |
#created_by ⇒ String
[Required] The creator of the maintenance event.
130 131 132 |
# File 'lib/oci/core/models/instance_maintenance_event_summary.rb', line 130 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\"}}
25 26 27 |
# File 'lib/oci/core/models/instance_maintenance_event_summary.rb', line 25 def @defined_tags end |
#description ⇒ String
It is the descriptive information about the maintenance taking place on the customer instance.
135 136 137 |
# File 'lib/oci/core/models/instance_maintenance_event_summary.rb', line 135 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.
31 32 33 |
# File 'lib/oci/core/models/instance_maintenance_event_summary.rb', line 31 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.
103 104 105 |
# File 'lib/oci/core/models/instance_maintenance_event_summary.rb', line 103 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\"}
39 40 41 |
# File 'lib/oci/core/models/instance_maintenance_event_summary.rb', line 39 def @freeform_tags end |
#id ⇒ String
[Required] The OCID of the maintenance event.
44 45 46 |
# File 'lib/oci/core/models/instance_maintenance_event_summary.rb', line 44 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.
72 73 74 |
# File 'lib/oci/core/models/instance_maintenance_event_summary.rb', line 72 def instance_action @instance_action end |
#instance_id ⇒ String
[Required] The OCID of the instance.
48 49 50 |
# File 'lib/oci/core/models/instance_maintenance_event_summary.rb', line 48 def instance_id @instance_id end |
#lifecycle_state ⇒ String
[Required] The current state of the maintenance event.
125 126 127 |
# File 'lib/oci/core/models/instance_maintenance_event_summary.rb', line 125 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.
61 62 63 |
# File 'lib/oci/core/models/instance_maintenance_event_summary.rb', line 61 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.
67 68 69 |
# File 'lib/oci/core/models/instance_maintenance_event_summary.rb', line 67 def maintenance_reason @maintenance_reason end |
#start_window_duration ⇒ String
The duration of the time window Maintenance is scheduled to begin within.
98 99 100 |
# File 'lib/oci/core/models/instance_maintenance_event_summary.rb', line 98 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
120 121 122 |
# File 'lib/oci/core/models/instance_maintenance_event_summary.rb', line 120 def time_created @time_created end |
#time_finished ⇒ DateTime
The time at which the Maintenance actually finished.
87 88 89 |
# File 'lib/oci/core/models/instance_maintenance_event_summary.rb', line 87 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.
109 110 111 |
# File 'lib/oci/core/models/instance_maintenance_event_summary.rb', line 109 def time_hard_due_date @time_hard_due_date end |
#time_started ⇒ DateTime
The time at which the Maintenance actually started.
82 83 84 |
# File 'lib/oci/core/models/instance_maintenance_event_summary.rb', line 82 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.
93 94 95 |
# File 'lib/oci/core/models/instance_maintenance_event_summary.rb', line 93 def time_window_start @time_window_start end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 |
# File 'lib/oci/core/models/instance_maintenance_event_summary.rb', line 145 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'defined_tags': :'definedTags', 'display_name': :'displayName', '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', 'created_by': :'createdBy', 'description': :'description', 'correlation_token': :'correlationToken' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 |
# File 'lib/oci/core/models/instance_maintenance_event_summary.rb', line 175 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'defined_tags': :'Hash<String, Hash<String, Object>>', 'display_name': :'String', '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', 'created_by': :'String', 'description': :'String', 'correlation_token': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
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 |
# File 'lib/oci/core/models/instance_maintenance_event_summary.rb', line 390 def ==(other) return true if equal?(other) self.class == other.class && == other. && display_name == other.display_name && == 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 && created_by == other.created_by && description == other.description && correlation_token == other.correlation_token end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 |
# File 'lib/oci/core/models/instance_maintenance_event_summary.rb', line 441 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
421 422 423 |
# File 'lib/oci/core/models/instance_maintenance_event_summary.rb', line 421 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
430 431 432 |
# File 'lib/oci/core/models/instance_maintenance_event_summary.rb', line 430 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, created_by, description, correlation_token].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
474 475 476 477 478 479 480 481 482 483 |
# File 'lib/oci/core/models/instance_maintenance_event_summary.rb', line 474 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
468 469 470 |
# File 'lib/oci/core/models/instance_maintenance_event_summary.rb', line 468 def to_s to_hash.to_s end |