Class: OCI::DisasterRecovery::Models::DrPlanStep
- Inherits:
-
Object
- Object
- OCI::DisasterRecovery::Models::DrPlanStep
- Defined in:
- lib/oci/disaster_recovery/models/dr_plan_step.rb
Overview
Details of a step in a DR plan.
Constant Summary collapse
- TYPE_ENUM =
[ TYPE_COMPUTE_INSTANCE_STOP_PRECHECK = 'COMPUTE_INSTANCE_STOP_PRECHECK'.freeze, TYPE_COMPUTE_INSTANCE_LAUNCH_PRECHECK = 'COMPUTE_INSTANCE_LAUNCH_PRECHECK'.freeze, TYPE_COMPUTE_INSTANCE_TERMINATE_PRECHECK = 'COMPUTE_INSTANCE_TERMINATE_PRECHECK'.freeze, TYPE_COMPUTE_INSTANCE_REMOVE_PRECHECK = 'COMPUTE_INSTANCE_REMOVE_PRECHECK'.freeze, TYPE_VOLUME_GROUP_RESTORE_SWITCHOVER_PRECHECK = 'VOLUME_GROUP_RESTORE_SWITCHOVER_PRECHECK'.freeze, TYPE_VOLUME_GROUP_RESTORE_FAILOVER_PRECHECK = 'VOLUME_GROUP_RESTORE_FAILOVER_PRECHECK'.freeze, TYPE_DATABASE_SWITCHOVER_PRECHECK = 'DATABASE_SWITCHOVER_PRECHECK'.freeze, TYPE_DATABASE_FAILOVER_PRECHECK = 'DATABASE_FAILOVER_PRECHECK'.freeze, TYPE_AUTONOMOUS_DATABASE_SWITCHOVER_PRECHECK = 'AUTONOMOUS_DATABASE_SWITCHOVER_PRECHECK'.freeze, TYPE_AUTONOMOUS_DATABASE_FAILOVER_PRECHECK = 'AUTONOMOUS_DATABASE_FAILOVER_PRECHECK'.freeze, TYPE_USER_DEFINED_PRECHECK = 'USER_DEFINED_PRECHECK'.freeze, TYPE_COMPUTE_INSTANCE_LAUNCH = 'COMPUTE_INSTANCE_LAUNCH'.freeze, TYPE_COMPUTE_INSTANCE_STOP = 'COMPUTE_INSTANCE_STOP'.freeze, TYPE_COMPUTE_INSTANCE_TERMINATE = 'COMPUTE_INSTANCE_TERMINATE'.freeze, TYPE_COMPUTE_INSTANCE_REMOVE = 'COMPUTE_INSTANCE_REMOVE'.freeze, TYPE_DATABASE_SWITCHOVER = 'DATABASE_SWITCHOVER'.freeze, TYPE_DATABASE_FAILOVER = 'DATABASE_FAILOVER'.freeze, TYPE_AUTONOMOUS_DATABASE_SWITCHOVER = 'AUTONOMOUS_DATABASE_SWITCHOVER'.freeze, TYPE_AUTONOMOUS_DATABASE_FAILOVER = 'AUTONOMOUS_DATABASE_FAILOVER'.freeze, TYPE_VOLUME_GROUP_RESTORE_SWITCHOVER = 'VOLUME_GROUP_RESTORE_SWITCHOVER'.freeze, TYPE_VOLUME_GROUP_RESTORE_FAILOVER = 'VOLUME_GROUP_RESTORE_FAILOVER'.freeze, TYPE_VOLUME_GROUP_REVERSE = 'VOLUME_GROUP_REVERSE'.freeze, TYPE_VOLUME_GROUP_DELETE = 'VOLUME_GROUP_DELETE'.freeze, TYPE_VOLUME_GROUP_REMOVE = 'VOLUME_GROUP_REMOVE'.freeze, TYPE_VOLUME_GROUP_TERMINATE = 'VOLUME_GROUP_TERMINATE'.freeze, TYPE_USER_DEFINED = 'USER_DEFINED'.freeze, TYPE_VOLUME_GROUP_RESTORE_START_DRILL_PRECHECK = 'VOLUME_GROUP_RESTORE_START_DRILL_PRECHECK'.freeze, TYPE_VOLUME_GROUP_REMOVE_PRECHECK = 'VOLUME_GROUP_REMOVE_PRECHECK'.freeze, TYPE_VOLUME_GROUP_TERMINATE_PRECHECK = 'VOLUME_GROUP_TERMINATE_PRECHECK'.freeze, TYPE_VOLUME_GROUP_RESTORE_START_DRILL = 'VOLUME_GROUP_RESTORE_START_DRILL'.freeze, TYPE_AUTONOMOUS_DATABASE_CREATE_CLONE_PRECHECK = 'AUTONOMOUS_DATABASE_CREATE_CLONE_PRECHECK'.freeze, TYPE_AUTONOMOUS_DATABASE_DELETE_CLONE_PRECHECK = 'AUTONOMOUS_DATABASE_DELETE_CLONE_PRECHECK'.freeze, TYPE_LOAD_BALANCER_UPDATE_PRIMARY_BACKEND_SET_PRECHECK = 'LOAD_BALANCER_UPDATE_PRIMARY_BACKEND_SET_PRECHECK'.freeze, TYPE_LOAD_BALANCER_UPDATE_STANDBY_BACKEND_SET_PRECHECK = 'LOAD_BALANCER_UPDATE_STANDBY_BACKEND_SET_PRECHECK'.freeze, TYPE_FILE_SYSTEM_SWITCHOVER_PRECHECK = 'FILE_SYSTEM_SWITCHOVER_PRECHECK'.freeze, TYPE_FILE_SYSTEM_FAILOVER_PRECHECK = 'FILE_SYSTEM_FAILOVER_PRECHECK'.freeze, TYPE_FILE_SYSTEM_START_DRILL_PRECHECK = 'FILE_SYSTEM_START_DRILL_PRECHECK'.freeze, TYPE_FILE_SYSTEM_STOP_DRILL_PRECHECK = 'FILE_SYSTEM_STOP_DRILL_PRECHECK'.freeze, TYPE_FILE_SYSTEM_REMOVE_PRECHECK = 'FILE_SYSTEM_REMOVE_PRECHECK'.freeze, TYPE_FILE_SYSTEM_TERMINATE_PRECHECK = 'FILE_SYSTEM_TERMINATE_PRECHECK'.freeze, TYPE_FILE_SYSTEM_MOUNT_PRECHECK = 'FILE_SYSTEM_MOUNT_PRECHECK'.freeze, TYPE_FILE_SYSTEM_UNMOUNT_PRECHECK = 'FILE_SYSTEM_UNMOUNT_PRECHECK'.freeze, TYPE_COMPUTE_INSTANCE_START_PRECHECK = 'COMPUTE_INSTANCE_START_PRECHECK'.freeze, TYPE_COMPUTE_INSTANCE_ATTACH_BLOCK_VOLUMES_PRECHECK = 'COMPUTE_INSTANCE_ATTACH_BLOCK_VOLUMES_PRECHECK'.freeze, TYPE_COMPUTE_INSTANCE_DETACH_BLOCK_VOLUMES_PRECHECK = 'COMPUTE_INSTANCE_DETACH_BLOCK_VOLUMES_PRECHECK'.freeze, TYPE_COMPUTE_INSTANCE_MOUNT_BLOCK_VOLUMES_PRECHECK = 'COMPUTE_INSTANCE_MOUNT_BLOCK_VOLUMES_PRECHECK'.freeze, TYPE_COMPUTE_INSTANCE_UNMOUNT_BLOCK_VOLUMES_PRECHECK = 'COMPUTE_INSTANCE_UNMOUNT_BLOCK_VOLUMES_PRECHECK'.freeze, TYPE_COMPUTE_CAPACITY_RESERVATION_START_DRILL_PRECHECK = 'COMPUTE_CAPACITY_RESERVATION_START_DRILL_PRECHECK'.freeze, TYPE_COMPUTE_CAPACITY_AVAILABILITY_START_DRILL_PRECHECK = 'COMPUTE_CAPACITY_AVAILABILITY_START_DRILL_PRECHECK'.freeze, TYPE_AUTONOMOUS_DATABASE_CREATE_CLONE = 'AUTONOMOUS_DATABASE_CREATE_CLONE'.freeze, TYPE_AUTONOMOUS_DATABASE_DELETE_CLONE = 'AUTONOMOUS_DATABASE_DELETE_CLONE'.freeze, TYPE_LOAD_BALANCER_UPDATE_PRIMARY_BACKEND_SET = 'LOAD_BALANCER_UPDATE_PRIMARY_BACKEND_SET'.freeze, TYPE_LOAD_BALANCER_UPDATE_STANDBY_BACKEND_SET = 'LOAD_BALANCER_UPDATE_STANDBY_BACKEND_SET'.freeze, TYPE_FILE_SYSTEM_SWITCHOVER = 'FILE_SYSTEM_SWITCHOVER'.freeze, TYPE_FILE_SYSTEM_FAILOVER = 'FILE_SYSTEM_FAILOVER'.freeze, TYPE_FILE_SYSTEM_REMOVE = 'FILE_SYSTEM_REMOVE'.freeze, TYPE_FILE_SYSTEM_REVERSE = 'FILE_SYSTEM_REVERSE'.freeze, TYPE_FILE_SYSTEM_TERMINATE = 'FILE_SYSTEM_TERMINATE'.freeze, TYPE_FILE_SYSTEM_START_DRILL = 'FILE_SYSTEM_START_DRILL'.freeze, TYPE_FILE_SYSTEM_STOP_DRILL = 'FILE_SYSTEM_STOP_DRILL'.freeze, TYPE_COMPUTE_INSTANCE_START = 'COMPUTE_INSTANCE_START'.freeze, TYPE_COMPUTE_INSTANCE_ATTACH_BLOCK_VOLUMES = 'COMPUTE_INSTANCE_ATTACH_BLOCK_VOLUMES'.freeze, TYPE_COMPUTE_INSTANCE_DETACH_BLOCK_VOLUMES = 'COMPUTE_INSTANCE_DETACH_BLOCK_VOLUMES'.freeze, TYPE_FILE_SYSTEM_MOUNT = 'FILE_SYSTEM_MOUNT'.freeze, TYPE_FILE_SYSTEM_UNMOUNT = 'FILE_SYSTEM_UNMOUNT'.freeze, TYPE_COMPUTE_CAPACITY_RESERVATION_SWITCHOVER_PRECHECK = 'COMPUTE_CAPACITY_RESERVATION_SWITCHOVER_PRECHECK'.freeze, TYPE_COMPUTE_CAPACITY_RESERVATION_FAILOVER_PRECHECK = 'COMPUTE_CAPACITY_RESERVATION_FAILOVER_PRECHECK'.freeze, TYPE_COMPUTE_CAPACITY_AVAILABILITY_SWITCHOVER_PRECHECK = 'COMPUTE_CAPACITY_AVAILABILITY_SWITCHOVER_PRECHECK'.freeze, TYPE_COMPUTE_CAPACITY_AVAILABILITY_FAILOVER_PRECHECK = 'COMPUTE_CAPACITY_AVAILABILITY_FAILOVER_PRECHECK'.freeze, TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- ERROR_MODE_ENUM =
[ ERROR_MODE_STOP_ON_ERROR = 'STOP_ON_ERROR'.freeze, ERROR_MODE_CONTINUE_ON_ERROR = 'CONTINUE_ON_ERROR'.freeze, ERROR_MODE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#display_name ⇒ String
[Required] The display name of the group.
-
#error_mode ⇒ String
[Required] The error mode for this step.
-
#group_id ⇒ String
[Required] The unique id of the group to which this step belongs.
-
#id ⇒ String
[Required] The unique id of the step.
-
#is_enabled ⇒ BOOLEAN
[Required] A flag indicating whether this step should be enabled for execution.
-
#member_id ⇒ String
The OCID of the member associated with this step.
-
#timeout ⇒ Integer
[Required] The timeout in seconds for executing this step.
-
#type ⇒ String
[Required] The plan step type.
- #user_defined_step ⇒ OCI::DisasterRecovery::Models::DrPlanUserDefinedStep
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 = {}) ⇒ DrPlanStep
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 = {}) ⇒ DrPlanStep
Initializes the object
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 |
# File 'lib/oci/disaster_recovery/models/dr_plan_step.rb', line 195 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.group_id = attributes[:'groupId'] if attributes[:'groupId'] raise 'You cannot provide both :groupId and :group_id' if attributes.key?(:'groupId') && attributes.key?(:'group_id') self.group_id = attributes[:'group_id'] if attributes[:'group_id'] self.member_id = attributes[:'memberId'] if attributes[:'memberId'] raise 'You cannot provide both :memberId and :member_id' if attributes.key?(:'memberId') && attributes.key?(:'member_id') self.member_id = attributes[:'member_id'] if attributes[:'member_id'] self.type = attributes[:'type'] if attributes[:'type'] 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.error_mode = attributes[:'errorMode'] if attributes[:'errorMode'] raise 'You cannot provide both :errorMode and :error_mode' if attributes.key?(:'errorMode') && attributes.key?(:'error_mode') self.error_mode = attributes[:'error_mode'] if attributes[:'error_mode'] self.timeout = attributes[:'timeout'] if attributes[:'timeout'] self.is_enabled = attributes[:'isEnabled'] unless attributes[:'isEnabled'].nil? raise 'You cannot provide both :isEnabled and :is_enabled' if attributes.key?(:'isEnabled') && attributes.key?(:'is_enabled') self.is_enabled = attributes[:'is_enabled'] unless attributes[:'is_enabled'].nil? self.user_defined_step = attributes[:'userDefinedStep'] if attributes[:'userDefinedStep'] raise 'You cannot provide both :userDefinedStep and :user_defined_step' if attributes.key?(:'userDefinedStep') && attributes.key?(:'user_defined_step') self.user_defined_step = attributes[:'user_defined_step'] if attributes[:'user_defined_step'] end |
Instance Attribute Details
#display_name ⇒ String
[Required] The display name of the group.
Example: DATABASE_SWITCHOVER
122 123 124 |
# File 'lib/oci/disaster_recovery/models/dr_plan_step.rb', line 122 def display_name @display_name end |
#error_mode ⇒ String
[Required] The error mode for this step.
127 128 129 |
# File 'lib/oci/disaster_recovery/models/dr_plan_step.rb', line 127 def error_mode @error_mode end |
#group_id ⇒ String
[Required] The unique id of the group to which this step belongs. Must not be modified by user.
Example: sgid1.group..uniqueID
103 104 105 |
# File 'lib/oci/disaster_recovery/models/dr_plan_step.rb', line 103 def group_id @group_id end |
#id ⇒ String
[Required] The unique id of the step. Must not be modified by the user.
Example: sgid1.step..uniqueID
96 97 98 |
# File 'lib/oci/disaster_recovery/models/dr_plan_step.rb', line 96 def id @id end |
#is_enabled ⇒ BOOLEAN
[Required] A flag indicating whether this step should be enabled for execution.
Example: true
141 142 143 |
# File 'lib/oci/disaster_recovery/models/dr_plan_step.rb', line 141 def is_enabled @is_enabled end |
#member_id ⇒ String
The OCID of the member associated with this step.
Example: ocid1.database.oc1..uniqueID
110 111 112 |
# File 'lib/oci/disaster_recovery/models/dr_plan_step.rb', line 110 def member_id @member_id end |
#timeout ⇒ Integer
[Required] The timeout in seconds for executing this step.
Example: 600
134 135 136 |
# File 'lib/oci/disaster_recovery/models/dr_plan_step.rb', line 134 def timeout @timeout end |
#type ⇒ String
[Required] The plan step type.
115 116 117 |
# File 'lib/oci/disaster_recovery/models/dr_plan_step.rb', line 115 def type @type end |
#user_defined_step ⇒ OCI::DisasterRecovery::Models::DrPlanUserDefinedStep
144 145 146 |
# File 'lib/oci/disaster_recovery/models/dr_plan_step.rb', line 144 def user_defined_step @user_defined_step end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 |
# File 'lib/oci/disaster_recovery/models/dr_plan_step.rb', line 147 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'id': :'id', 'group_id': :'groupId', 'member_id': :'memberId', 'type': :'type', 'display_name': :'displayName', 'error_mode': :'errorMode', 'timeout': :'timeout', 'is_enabled': :'isEnabled', 'user_defined_step': :'userDefinedStep' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 |
# File 'lib/oci/disaster_recovery/models/dr_plan_step.rb', line 164 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'id': :'String', 'group_id': :'String', 'member_id': :'String', 'type': :'String', 'display_name': :'String', 'error_mode': :'String', 'timeout': :'Integer', 'is_enabled': :'BOOLEAN', 'user_defined_step': :'OCI::DisasterRecovery::Models::DrPlanUserDefinedStep' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
277 278 279 280 281 282 283 284 285 286 287 288 289 290 |
# File 'lib/oci/disaster_recovery/models/dr_plan_step.rb', line 277 def ==(other) return true if equal?(other) self.class == other.class && id == other.id && group_id == other.group_id && member_id == other.member_id && type == other.type && display_name == other.display_name && error_mode == other.error_mode && timeout == other.timeout && is_enabled == other.is_enabled && user_defined_step == other.user_defined_step end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 |
# File 'lib/oci/disaster_recovery/models/dr_plan_step.rb', line 315 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
295 296 297 |
# File 'lib/oci/disaster_recovery/models/dr_plan_step.rb', line 295 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
304 305 306 |
# File 'lib/oci/disaster_recovery/models/dr_plan_step.rb', line 304 def hash [id, group_id, member_id, type, display_name, error_mode, timeout, is_enabled, user_defined_step].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
348 349 350 351 352 353 354 355 356 357 |
# File 'lib/oci/disaster_recovery/models/dr_plan_step.rb', line 348 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
342 343 344 |
# File 'lib/oci/disaster_recovery/models/dr_plan_step.rb', line 342 def to_s to_hash.to_s end |