Class: OCI::DisasterRecovery::Models::DrPlanStepExecution

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/disaster_recovery/models/dr_plan_step_execution.rb

Overview

The details of a step execution in a DR plan execution.

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
STATUS_ENUM =
[
  STATUS_QUEUED = 'QUEUED'.freeze,
  STATUS_DISABLED = 'DISABLED'.freeze,
  STATUS_IN_PROGRESS = 'IN_PROGRESS'.freeze,
  STATUS_SUCCEEDED = 'SUCCEEDED'.freeze,
  STATUS_FAILED = 'FAILED'.freeze,
  STATUS_FAILED_IGNORED = 'FAILED_IGNORED'.freeze,
  STATUS_TIMED_OUT = 'TIMED_OUT'.freeze,
  STATUS_TIMED_OUT_IGNORED = 'TIMED_OUT_IGNORED'.freeze,
  STATUS_PAUSED = 'PAUSED'.freeze,
  STATUS_CANCELED = 'CANCELED'.freeze,
  STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ DrPlanStepExecution

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash

Options Hash (attributes):



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
271
# File 'lib/oci/disaster_recovery/models/dr_plan_step_execution.rb', line 214

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.step_id = attributes[:'stepId'] if attributes[:'stepId']

  raise 'You cannot provide both :stepId and :step_id' if attributes.key?(:'stepId') && attributes.key?(:'step_id')

  self.step_id = attributes[:'step_id'] if attributes[:'step_id']

  self.type = attributes[:'type'] if attributes[:'type']

  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.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.log_location = attributes[:'logLocation'] if attributes[:'logLocation']

  raise 'You cannot provide both :logLocation and :log_location' if attributes.key?(:'logLocation') && attributes.key?(:'log_location')

  self.log_location = attributes[:'log_location'] if attributes[:'log_location']

  self.status = attributes[:'status'] if attributes[:'status']

  self.status_details = attributes[:'statusDetails'] if attributes[:'statusDetails']

  raise 'You cannot provide both :statusDetails and :status_details' if attributes.key?(:'statusDetails') && attributes.key?(:'status_details')

  self.status_details = attributes[:'status_details'] if attributes[:'status_details']

  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_ended = attributes[:'timeEnded'] if attributes[:'timeEnded']

  raise 'You cannot provide both :timeEnded and :time_ended' if attributes.key?(:'timeEnded') && attributes.key?(:'time_ended')

  self.time_ended = attributes[:'time_ended'] if attributes[:'time_ended']

  self.execution_duration_in_sec = attributes[:'executionDurationInSec'] if attributes[:'executionDurationInSec']

  raise 'You cannot provide both :executionDurationInSec and :execution_duration_in_sec' if attributes.key?(:'executionDurationInSec') && attributes.key?(:'execution_duration_in_sec')

  self.execution_duration_in_sec = attributes[:'execution_duration_in_sec'] if attributes[:'execution_duration_in_sec']
end

Instance Attribute Details

#display_nameString

[Required] The display name of the step execution.

Example: DATABASE_SWITCHOVER

Returns:

  • (String)


123
124
125
# File 'lib/oci/disaster_recovery/models/dr_plan_step_execution.rb', line 123

def display_name
  @display_name
end

#execution_duration_in_secInteger

The total duration in seconds taken to complete the step execution.

Example: 35

Returns:

  • (Integer)


160
161
162
# File 'lib/oci/disaster_recovery/models/dr_plan_step_execution.rb', line 160

def execution_duration_in_sec
  @execution_duration_in_sec
end

#group_idString

[Required] The unique id of the group to which this step belongs. Must not be modified by user.

Example: sgid1.group..uniqueID

Returns:

  • (String)


116
117
118
# File 'lib/oci/disaster_recovery/models/dr_plan_step_execution.rb', line 116

def group_id
  @group_id
end

#log_locationOCI::DisasterRecovery::Models::ObjectStorageLogLocation

This attribute is required.



127
128
129
# File 'lib/oci/disaster_recovery/models/dr_plan_step_execution.rb', line 127

def log_location
  @log_location
end

#statusString

[Required] The status of the step execution.

Returns:

  • (String)


132
133
134
# File 'lib/oci/disaster_recovery/models/dr_plan_step_execution.rb', line 132

def status
  @status
end

#status_detailsString

Additional details on the step execution status.

Example: This step failed to complete due to a timeout

Returns:

  • (String)


139
140
141
# File 'lib/oci/disaster_recovery/models/dr_plan_step_execution.rb', line 139

def status_details
  @status_details
end

#step_idString

[Required] The unique id of the step. Must not be modified by user.

Example: sgid1.step..uniqueID

Returns:

  • (String)


104
105
106
# File 'lib/oci/disaster_recovery/models/dr_plan_step_execution.rb', line 104

def step_id
  @step_id
end

#time_endedDateTime

The time when execution ended. An RFC3339 formatted datetime string.

Example: 2019-03-29T09:36:42Z

Returns:

  • (DateTime)


153
154
155
# File 'lib/oci/disaster_recovery/models/dr_plan_step_execution.rb', line 153

def time_ended
  @time_ended
end

#time_startedDateTime

The time when step execution began. An RFC3339 formatted datetime string.

Example: 2019-03-29T09:36:42Z

Returns:

  • (DateTime)


146
147
148
# File 'lib/oci/disaster_recovery/models/dr_plan_step_execution.rb', line 146

def time_started
  @time_started
end

#typeString

[Required] The step type.

Returns:

  • (String)


109
110
111
# File 'lib/oci/disaster_recovery/models/dr_plan_step_execution.rb', line 109

def type
  @type
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
# File 'lib/oci/disaster_recovery/models/dr_plan_step_execution.rb', line 163

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'step_id': :'stepId',
    'type': :'type',
    'group_id': :'groupId',
    'display_name': :'displayName',
    'log_location': :'logLocation',
    'status': :'status',
    'status_details': :'statusDetails',
    'time_started': :'timeStarted',
    'time_ended': :'timeEnded',
    'execution_duration_in_sec': :'executionDurationInSec'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
# File 'lib/oci/disaster_recovery/models/dr_plan_step_execution.rb', line 181

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'step_id': :'String',
    'type': :'String',
    'group_id': :'String',
    'display_name': :'String',
    'log_location': :'OCI::DisasterRecovery::Models::ObjectStorageLogLocation',
    'status': :'String',
    'status_details': :'String',
    'time_started': :'DateTime',
    'time_ended': :'DateTime',
    'execution_duration_in_sec': :'Integer'
    # rubocop:enable Style/SymbolLiteral
  }
end

Instance Method Details

#==(other) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • other (Object)

    the other object to be compared



306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
# File 'lib/oci/disaster_recovery/models/dr_plan_step_execution.rb', line 306

def ==(other)
  return true if equal?(other)

  self.class == other.class &&
    step_id == other.step_id &&
    type == other.type &&
    group_id == other.group_id &&
    display_name == other.display_name &&
    log_location == other.log_location &&
    status == other.status &&
    status_details == other.status_details &&
    time_started == other.time_started &&
    time_ended == other.time_ended &&
    execution_duration_in_sec == other.execution_duration_in_sec
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
# File 'lib/oci/disaster_recovery/models/dr_plan_step_execution.rb', line 345

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

Parameters:

  • other (Object)

    the other object to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


325
326
327
# File 'lib/oci/disaster_recovery/models/dr_plan_step_execution.rb', line 325

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



334
335
336
# File 'lib/oci/disaster_recovery/models/dr_plan_step_execution.rb', line 334

def hash
  [step_id, type, group_id, display_name, log_location, status, status_details, time_started, time_ended, execution_duration_in_sec].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



378
379
380
381
382
383
384
385
386
387
# File 'lib/oci/disaster_recovery/models/dr_plan_step_execution.rb', line 378

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_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



372
373
374
# File 'lib/oci/disaster_recovery/models/dr_plan_step_execution.rb', line 372

def to_s
  to_hash.to_s
end