Class: OCI::DisasterRecovery::Models::AutomaticDrConfiguration
- Inherits:
-
Object
- Object
- OCI::DisasterRecovery::Models::AutomaticDrConfiguration
- Defined in:
- lib/oci/disaster_recovery/models/automatic_dr_configuration.rb
Overview
The details of Automatic DR configuration.
Constant Summary collapse
- LIFECYCLE_STATE_ENUM =
[ LIFECYCLE_STATE_CREATING = 'CREATING'.freeze, LIFECYCLE_STATE_UPDATING = 'UPDATING'.freeze, LIFECYCLE_STATE_ACTIVE = 'ACTIVE'.freeze, LIFECYCLE_STATE_INACTIVE = 'INACTIVE'.freeze, LIFECYCLE_STATE_NEEDS_ATTENTION = 'NEEDS_ATTENTION'.freeze, LIFECYCLE_STATE_DELETING = 'DELETING'.freeze, LIFECYCLE_STATE_DELETED = 'DELETED'.freeze, LIFECYCLE_STATE_FAILED = 'FAILED'.freeze, LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- LIFECYCLE_SUB_STATE_ENUM =
[ LIFECYCLE_SUB_STATE_RESOURCE_PRINCIPAL_VALIDATION_FAILED = 'RESOURCE_PRINCIPAL_VALIDATION_FAILED'.freeze, LIFECYCLE_SUB_STATE_DR_PLAN_NEEDS_ATTENTION = 'DR_PLAN_NEEDS_ATTENTION'.freeze, LIFECYCLE_SUB_STATE_DR_PLAN_INACTIVE = 'DR_PLAN_INACTIVE'.freeze, LIFECYCLE_SUB_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- LAST_AUTOMATIC_DR_EXECUTION_SUBMIT_STATUS_ENUM =
[ LAST_AUTOMATIC_DR_EXECUTION_SUBMIT_STATUS_AUTOMATIC_DR_EXECUTION_STARTED_SUCCESSFULLY = 'AUTOMATIC_DR_EXECUTION_STARTED_SUCCESSFULLY'.freeze, LAST_AUTOMATIC_DR_EXECUTION_SUBMIT_STATUS_AUTOMATIC_DR_EXECUTION_BLOCKED_VALIDATION_FAILED = 'AUTOMATIC_DR_EXECUTION_BLOCKED_VALIDATION_FAILED'.freeze, LAST_AUTOMATIC_DR_EXECUTION_SUBMIT_STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#compartment_id ⇒ String
[Required] The OCID of the compartment containing the Automatic DR configuration.
-
#default_failover_dr_plan_id ⇒ String
The unique id of a Failover DR Plan.
-
#default_switchover_dr_plan_id ⇒ String
The unique id of a Switchover DR Plan.
-
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource.
-
#display_name ⇒ String
[Required] The display name of the Automatic DR configuration.
-
#dr_protection_group_id ⇒ String
[Required] The OCID of the DR protection group to which this Automatic DR configuration belongs.
-
#freeform_tags ⇒ Hash<String, String>
Simple key-value pair that is applied without any predefined name, type or scope.
-
#id ⇒ String
[Required] The OCID of the Automatic DR configuration.
-
#last_automatic_dr_execution_submit_details ⇒ String
A message describing the result of the most recent attempt made to submit an Automatic DR plan execution.
-
#last_automatic_dr_execution_submit_status ⇒ String
The status of most recent attempt to submit Automatic DR plan execution.
-
#lifecycle_details ⇒ String
A message describing the Automatic DR configuration's current state in more detail.
-
#lifecycle_state ⇒ String
[Required] The current state of the Automatic DR configuration.
-
#lifecycle_sub_state ⇒ String
The current sub-state of the Automatic DR configuration.
-
#members ⇒ Array<OCI::DisasterRecovery::Models::AutomaticDrConfigurationMember>
[Required] The list of members in this Automatic DR configuration.
-
#system_tags ⇒ Hash<String, Hash<String, Object>>
Usage of system tag keys.
-
#time_created ⇒ DateTime
[Required] The date and time the Automatic DR configuration was created.
-
#time_last_automatic_dr_execution_submit_attempt ⇒ DateTime
The date and time of the most recent attempt made to submit an Automatic DR plan execution.
-
#time_updated ⇒ DateTime
[Required] The date and time the Automatic DR configuration was updated.
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 = {}) ⇒ AutomaticDrConfiguration
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 = {}) ⇒ AutomaticDrConfiguration
Initializes the object
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 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 |
# File 'lib/oci/disaster_recovery/models/automatic_dr_configuration.rb', line 225 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.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.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.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.time_updated = attributes[:'timeUpdated'] if attributes[:'timeUpdated'] raise 'You cannot provide both :timeUpdated and :time_updated' if attributes.key?(:'timeUpdated') && attributes.key?(:'time_updated') self.time_updated = attributes[:'time_updated'] if attributes[:'time_updated'] self.dr_protection_group_id = attributes[:'drProtectionGroupId'] if attributes[:'drProtectionGroupId'] raise 'You cannot provide both :drProtectionGroupId and :dr_protection_group_id' if attributes.key?(:'drProtectionGroupId') && attributes.key?(:'dr_protection_group_id') self.dr_protection_group_id = attributes[:'dr_protection_group_id'] if attributes[:'dr_protection_group_id'] self.members = attributes[:'members'] if attributes[:'members'] self.default_switchover_dr_plan_id = attributes[:'defaultSwitchoverDrPlanId'] if attributes[:'defaultSwitchoverDrPlanId'] raise 'You cannot provide both :defaultSwitchoverDrPlanId and :default_switchover_dr_plan_id' if attributes.key?(:'defaultSwitchoverDrPlanId') && attributes.key?(:'default_switchover_dr_plan_id') self.default_switchover_dr_plan_id = attributes[:'default_switchover_dr_plan_id'] if attributes[:'default_switchover_dr_plan_id'] self.default_failover_dr_plan_id = attributes[:'defaultFailoverDrPlanId'] if attributes[:'defaultFailoverDrPlanId'] raise 'You cannot provide both :defaultFailoverDrPlanId and :default_failover_dr_plan_id' if attributes.key?(:'defaultFailoverDrPlanId') && attributes.key?(:'default_failover_dr_plan_id') self.default_failover_dr_plan_id = attributes[:'default_failover_dr_plan_id'] if attributes[:'default_failover_dr_plan_id'] 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_sub_state = attributes[:'lifecycleSubState'] if attributes[:'lifecycleSubState'] raise 'You cannot provide both :lifecycleSubState and :lifecycle_sub_state' if attributes.key?(:'lifecycleSubState') && attributes.key?(:'lifecycle_sub_state') self.lifecycle_sub_state = attributes[:'lifecycle_sub_state'] if attributes[:'lifecycle_sub_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.last_automatic_dr_execution_submit_status = attributes[:'lastAutomaticDrExecutionSubmitStatus'] if attributes[:'lastAutomaticDrExecutionSubmitStatus'] raise 'You cannot provide both :lastAutomaticDrExecutionSubmitStatus and :last_automatic_dr_execution_submit_status' if attributes.key?(:'lastAutomaticDrExecutionSubmitStatus') && attributes.key?(:'last_automatic_dr_execution_submit_status') self.last_automatic_dr_execution_submit_status = attributes[:'last_automatic_dr_execution_submit_status'] if attributes[:'last_automatic_dr_execution_submit_status'] self.last_automatic_dr_execution_submit_details = attributes[:'lastAutomaticDrExecutionSubmitDetails'] if attributes[:'lastAutomaticDrExecutionSubmitDetails'] raise 'You cannot provide both :lastAutomaticDrExecutionSubmitDetails and :last_automatic_dr_execution_submit_details' if attributes.key?(:'lastAutomaticDrExecutionSubmitDetails') && attributes.key?(:'last_automatic_dr_execution_submit_details') self.last_automatic_dr_execution_submit_details = attributes[:'last_automatic_dr_execution_submit_details'] if attributes[:'last_automatic_dr_execution_submit_details'] self.time_last_automatic_dr_execution_submit_attempt = attributes[:'timeLastAutomaticDrExecutionSubmitAttempt'] if attributes[:'timeLastAutomaticDrExecutionSubmitAttempt'] raise 'You cannot provide both :timeLastAutomaticDrExecutionSubmitAttempt and :time_last_automatic_dr_execution_submit_attempt' if attributes.key?(:'timeLastAutomaticDrExecutionSubmitAttempt') && attributes.key?(:'time_last_automatic_dr_execution_submit_attempt') self.time_last_automatic_dr_execution_submit_attempt = attributes[:'time_last_automatic_dr_execution_submit_attempt'] if attributes[:'time_last_automatic_dr_execution_submit_attempt'] 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. = 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[:'systemTags'] if attributes[:'systemTags'] raise 'You cannot provide both :systemTags and :system_tags' if attributes.key?(:'systemTags') && attributes.key?(:'system_tags') self. = attributes[:'system_tags'] if attributes[:'system_tags'] end |
Instance Attribute Details
#compartment_id ⇒ String
[Required] The OCID of the compartment containing the Automatic DR configuration.
Example: ocid1.compartment.oc1..uniqueID
54 55 56 |
# File 'lib/oci/disaster_recovery/models/automatic_dr_configuration.rb', line 54 def compartment_id @compartment_id end |
#default_failover_dr_plan_id ⇒ String
The unique id of a Failover DR Plan.
Example: ocid1.drplan.oc1..uniqueID
94 95 96 |
# File 'lib/oci/disaster_recovery/models/automatic_dr_configuration.rb', line 94 def default_failover_dr_plan_id @default_failover_dr_plan_id end |
#default_switchover_dr_plan_id ⇒ String
The unique id of a Switchover DR Plan.
Example: ocid1.drplan.oc1..uniqueID
87 88 89 |
# File 'lib/oci/disaster_recovery/models/automatic_dr_configuration.rb', line 87 def default_switchover_dr_plan_id @default_switchover_dr_plan_id end |
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource. Each key is predefined and scoped to a namespace.
Example: {\"Operations\": {\"CostCenter\": \"42\"}}
140 141 142 |
# File 'lib/oci/disaster_recovery/models/automatic_dr_configuration.rb', line 140 def @defined_tags end |
#display_name ⇒ String
[Required] The display name of the Automatic DR configuration.
47 48 49 |
# File 'lib/oci/disaster_recovery/models/automatic_dr_configuration.rb', line 47 def display_name @display_name end |
#dr_protection_group_id ⇒ String
[Required] The OCID of the DR protection group to which this Automatic DR configuration belongs.
Example: ocid1.drprotectiongroup.oc1..uniqueID
75 76 77 |
# File 'lib/oci/disaster_recovery/models/automatic_dr_configuration.rb', line 75 def dr_protection_group_id @dr_protection_group_id end |
#freeform_tags ⇒ Hash<String, String>
Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only.
Example: {\"Department\": \"Finance\"}
133 134 135 |
# File 'lib/oci/disaster_recovery/models/automatic_dr_configuration.rb', line 133 def @freeform_tags end |
#id ⇒ String
[Required] The OCID of the Automatic DR configuration.
Example: ocid1.automaticdrconfiguration.oc1..uniqueID
42 43 44 |
# File 'lib/oci/disaster_recovery/models/automatic_dr_configuration.rb', line 42 def id @id end |
#last_automatic_dr_execution_submit_details ⇒ String
A message describing the result of the most recent attempt made to submit an Automatic DR plan execution.
119 120 121 |
# File 'lib/oci/disaster_recovery/models/automatic_dr_configuration.rb', line 119 def last_automatic_dr_execution_submit_details @last_automatic_dr_execution_submit_details end |
#last_automatic_dr_execution_submit_status ⇒ String
The status of most recent attempt to submit Automatic DR plan execution.
114 115 116 |
# File 'lib/oci/disaster_recovery/models/automatic_dr_configuration.rb', line 114 def last_automatic_dr_execution_submit_status @last_automatic_dr_execution_submit_status end |
#lifecycle_details ⇒ String
A message describing the Automatic DR configuration's current state in more detail.
109 110 111 |
# File 'lib/oci/disaster_recovery/models/automatic_dr_configuration.rb', line 109 def lifecycle_details @lifecycle_details end |
#lifecycle_state ⇒ String
[Required] The current state of the Automatic DR configuration.
99 100 101 |
# File 'lib/oci/disaster_recovery/models/automatic_dr_configuration.rb', line 99 def lifecycle_state @lifecycle_state end |
#lifecycle_sub_state ⇒ String
The current sub-state of the Automatic DR configuration.
104 105 106 |
# File 'lib/oci/disaster_recovery/models/automatic_dr_configuration.rb', line 104 def lifecycle_sub_state @lifecycle_sub_state end |
#members ⇒ Array<OCI::DisasterRecovery::Models::AutomaticDrConfigurationMember>
[Required] The list of members in this Automatic DR configuration.
80 81 82 |
# File 'lib/oci/disaster_recovery/models/automatic_dr_configuration.rb', line 80 def members @members end |
#system_tags ⇒ Hash<String, Hash<String, Object>>
Usage of system tag keys. These predefined keys are scoped to namespaces.
Example: {\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}
147 148 149 |
# File 'lib/oci/disaster_recovery/models/automatic_dr_configuration.rb', line 147 def @system_tags end |
#time_created ⇒ DateTime
[Required] The date and time the Automatic DR configuration was created. An RFC3339 formatted datetime string.
Example: 2024-03-29T09:36:42Z
61 62 63 |
# File 'lib/oci/disaster_recovery/models/automatic_dr_configuration.rb', line 61 def time_created @time_created end |
#time_last_automatic_dr_execution_submit_attempt ⇒ DateTime
The date and time of the most recent attempt made to submit an Automatic DR plan execution. An RFC3339 formatted datetime string.
Example: 2025-06-30T09:36:42Z
126 127 128 |
# File 'lib/oci/disaster_recovery/models/automatic_dr_configuration.rb', line 126 def time_last_automatic_dr_execution_submit_attempt @time_last_automatic_dr_execution_submit_attempt end |
#time_updated ⇒ DateTime
[Required] The date and time the Automatic DR configuration was updated. An RFC3339 formatted datetime string.
Example: 2024-03-29T09:36:42Z
68 69 70 |
# File 'lib/oci/disaster_recovery/models/automatic_dr_configuration.rb', line 68 def time_updated @time_updated end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 |
# File 'lib/oci/disaster_recovery/models/automatic_dr_configuration.rb', line 150 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'id': :'id', 'display_name': :'displayName', 'compartment_id': :'compartmentId', 'time_created': :'timeCreated', 'time_updated': :'timeUpdated', 'dr_protection_group_id': :'drProtectionGroupId', 'members': :'members', 'default_switchover_dr_plan_id': :'defaultSwitchoverDrPlanId', 'default_failover_dr_plan_id': :'defaultFailoverDrPlanId', 'lifecycle_state': :'lifecycleState', 'lifecycle_sub_state': :'lifecycleSubState', 'lifecycle_details': :'lifecycleDetails', 'last_automatic_dr_execution_submit_status': :'lastAutomaticDrExecutionSubmitStatus', 'last_automatic_dr_execution_submit_details': :'lastAutomaticDrExecutionSubmitDetails', 'time_last_automatic_dr_execution_submit_attempt': :'timeLastAutomaticDrExecutionSubmitAttempt', 'freeform_tags': :'freeformTags', 'defined_tags': :'definedTags', 'system_tags': :'systemTags' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 |
# File 'lib/oci/disaster_recovery/models/automatic_dr_configuration.rb', line 176 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'id': :'String', 'display_name': :'String', 'compartment_id': :'String', 'time_created': :'DateTime', 'time_updated': :'DateTime', 'dr_protection_group_id': :'String', 'members': :'Array<OCI::DisasterRecovery::Models::AutomaticDrConfigurationMember>', 'default_switchover_dr_plan_id': :'String', 'default_failover_dr_plan_id': :'String', 'lifecycle_state': :'String', 'lifecycle_sub_state': :'String', 'lifecycle_details': :'String', 'last_automatic_dr_execution_submit_status': :'String', 'last_automatic_dr_execution_submit_details': :'String', 'time_last_automatic_dr_execution_submit_attempt': :'DateTime', 'freeform_tags': :'Hash<String, String>', 'defined_tags': :'Hash<String, Hash<String, Object>>', 'system_tags': :'Hash<String, Hash<String, Object>>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 |
# File 'lib/oci/disaster_recovery/models/automatic_dr_configuration.rb', line 378 def ==(other) return true if equal?(other) self.class == other.class && id == other.id && display_name == other.display_name && compartment_id == other.compartment_id && time_created == other.time_created && time_updated == other.time_updated && dr_protection_group_id == other.dr_protection_group_id && members == other.members && default_switchover_dr_plan_id == other.default_switchover_dr_plan_id && default_failover_dr_plan_id == other.default_failover_dr_plan_id && lifecycle_state == other.lifecycle_state && lifecycle_sub_state == other.lifecycle_sub_state && lifecycle_details == other.lifecycle_details && last_automatic_dr_execution_submit_status == other.last_automatic_dr_execution_submit_status && last_automatic_dr_execution_submit_details == other.last_automatic_dr_execution_submit_details && time_last_automatic_dr_execution_submit_attempt == other.time_last_automatic_dr_execution_submit_attempt && == other. && == other. && == other. end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
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/disaster_recovery/models/automatic_dr_configuration.rb', line 425 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
405 406 407 |
# File 'lib/oci/disaster_recovery/models/automatic_dr_configuration.rb', line 405 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
414 415 416 |
# File 'lib/oci/disaster_recovery/models/automatic_dr_configuration.rb', line 414 def hash [id, display_name, compartment_id, time_created, time_updated, dr_protection_group_id, members, default_switchover_dr_plan_id, default_failover_dr_plan_id, lifecycle_state, lifecycle_sub_state, lifecycle_details, last_automatic_dr_execution_submit_status, last_automatic_dr_execution_submit_details, time_last_automatic_dr_execution_submit_attempt, , , ].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
458 459 460 461 462 463 464 465 466 467 |
# File 'lib/oci/disaster_recovery/models/automatic_dr_configuration.rb', line 458 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
452 453 454 |
# File 'lib/oci/disaster_recovery/models/automatic_dr_configuration.rb', line 452 def to_s to_hash.to_s end |