Class: OCI::DisasterRecovery::Models::AutomaticDrConfigurationSummary
- Inherits:
-
Object
- Object
- OCI::DisasterRecovery::Models::AutomaticDrConfigurationSummary
- Defined in:
- lib/oci/disaster_recovery/models/automatic_dr_configuration_summary.rb
Overview
The summary of an 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
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.
-
#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.
-
#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_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 = {}) ⇒ AutomaticDrConfigurationSummary
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 = {}) ⇒ AutomaticDrConfigurationSummary
Initializes the object
185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 |
# File 'lib/oci/disaster_recovery/models/automatic_dr_configuration_summary.rb', line 185 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.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. = 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
48 49 50 |
# File 'lib/oci/disaster_recovery/models/automatic_dr_configuration_summary.rb', line 48 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
83 84 85 |
# File 'lib/oci/disaster_recovery/models/automatic_dr_configuration_summary.rb', line 83 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
76 77 78 |
# File 'lib/oci/disaster_recovery/models/automatic_dr_configuration_summary.rb', line 76 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\"}}
112 113 114 |
# File 'lib/oci/disaster_recovery/models/automatic_dr_configuration_summary.rb', line 112 def @defined_tags end |
#display_name ⇒ String
[Required] The display name of the Automatic DR configuration.
41 42 43 |
# File 'lib/oci/disaster_recovery/models/automatic_dr_configuration_summary.rb', line 41 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
69 70 71 |
# File 'lib/oci/disaster_recovery/models/automatic_dr_configuration_summary.rb', line 69 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\"}
105 106 107 |
# File 'lib/oci/disaster_recovery/models/automatic_dr_configuration_summary.rb', line 105 def @freeform_tags end |
#id ⇒ String
[Required] The OCID of the Automatic DR configuration.
Example: ocid1.automaticdrconfiguration.oc1..uniqueID
36 37 38 |
# File 'lib/oci/disaster_recovery/models/automatic_dr_configuration_summary.rb', line 36 def id @id end |
#lifecycle_details ⇒ String
A message describing the Automatic DR configuration's current state in more detail.
98 99 100 |
# File 'lib/oci/disaster_recovery/models/automatic_dr_configuration_summary.rb', line 98 def lifecycle_details @lifecycle_details end |
#lifecycle_state ⇒ String
[Required] The current state of the Automatic DR configuration.
88 89 90 |
# File 'lib/oci/disaster_recovery/models/automatic_dr_configuration_summary.rb', line 88 def lifecycle_state @lifecycle_state end |
#lifecycle_sub_state ⇒ String
The current sub-state of the Automatic DR configuration.
93 94 95 |
# File 'lib/oci/disaster_recovery/models/automatic_dr_configuration_summary.rb', line 93 def lifecycle_sub_state @lifecycle_sub_state 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\"}}
119 120 121 |
# File 'lib/oci/disaster_recovery/models/automatic_dr_configuration_summary.rb', line 119 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
55 56 57 |
# File 'lib/oci/disaster_recovery/models/automatic_dr_configuration_summary.rb', line 55 def time_created @time_created 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
62 63 64 |
# File 'lib/oci/disaster_recovery/models/automatic_dr_configuration_summary.rb', line 62 def time_updated @time_updated end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 |
# File 'lib/oci/disaster_recovery/models/automatic_dr_configuration_summary.rb', line 122 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', 'default_switchover_dr_plan_id': :'defaultSwitchoverDrPlanId', 'default_failover_dr_plan_id': :'defaultFailoverDrPlanId', 'lifecycle_state': :'lifecycleState', 'lifecycle_sub_state': :'lifecycleSubState', 'lifecycle_details': :'lifecycleDetails', 'freeform_tags': :'freeformTags', 'defined_tags': :'definedTags', 'system_tags': :'systemTags' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 |
# File 'lib/oci/disaster_recovery/models/automatic_dr_configuration_summary.rb', line 144 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', 'default_switchover_dr_plan_id': :'String', 'default_failover_dr_plan_id': :'String', 'lifecycle_state': :'String', 'lifecycle_sub_state': :'String', 'lifecycle_details': :'String', '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.
305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 |
# File 'lib/oci/disaster_recovery/models/automatic_dr_configuration_summary.rb', line 305 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 && 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 && == other. && == other. && == other. end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 |
# File 'lib/oci/disaster_recovery/models/automatic_dr_configuration_summary.rb', line 348 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
328 329 330 |
# File 'lib/oci/disaster_recovery/models/automatic_dr_configuration_summary.rb', line 328 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
337 338 339 |
# File 'lib/oci/disaster_recovery/models/automatic_dr_configuration_summary.rb', line 337 def hash [id, display_name, compartment_id, time_created, time_updated, dr_protection_group_id, default_switchover_dr_plan_id, default_failover_dr_plan_id, lifecycle_state, lifecycle_sub_state, lifecycle_details, , , ].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
381 382 383 384 385 386 387 388 389 390 |
# File 'lib/oci/disaster_recovery/models/automatic_dr_configuration_summary.rb', line 381 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
375 376 377 |
# File 'lib/oci/disaster_recovery/models/automatic_dr_configuration_summary.rb', line 375 def to_s to_hash.to_s end |