Class: OCI::DisasterRecovery::Models::DrPlanGroupExecution
- Inherits:
-
Object
- Object
- OCI::DisasterRecovery::Models::DrPlanGroupExecution
- Defined in:
- lib/oci/disaster_recovery/models/dr_plan_group_execution.rb
Overview
The details of a group execution in a DR plan execution.
Constant Summary collapse
- TYPE_ENUM =
[ TYPE_USER_DEFINED = 'USER_DEFINED'.freeze, TYPE_BUILT_IN = 'BUILT_IN'.freeze, TYPE_BUILT_IN_PRECHECK = 'BUILT_IN_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_SUCCEEDED_WITH_WARNING = 'SUCCEEDED_WITH_WARNING'.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
-
#display_name ⇒ String
[Required] The display name of the group execution.
-
#execution_duration_in_sec ⇒ Integer
The total duration in seconds taken to complete group execution.
-
#group_id ⇒ String
[Required] The unique id of the group.
-
#status ⇒ String
[Required] The status of the group execution.
-
#status_details ⇒ String
Additional details on the group execution status.
-
#step_executions ⇒ Array<OCI::DisasterRecovery::Models::DrPlanStepExecution>
[Required] A list of step executions in the group.
-
#time_ended ⇒ DateTime
The time when group execution ended.
-
#time_started ⇒ DateTime
The time when group execution began.
-
#type ⇒ String
[Required] The group type.
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 = {}) ⇒ DrPlanGroupExecution
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 = {}) ⇒ DrPlanGroupExecution
Initializes the object
142 143 144 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 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 |
# File 'lib/oci/disaster_recovery/models/dr_plan_group_execution.rb', line 142 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.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.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.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'] self.step_executions = attributes[:'stepExecutions'] if attributes[:'stepExecutions'] raise 'You cannot provide both :stepExecutions and :step_executions' if attributes.key?(:'stepExecutions') && attributes.key?(:'step_executions') self.step_executions = attributes[:'step_executions'] if attributes[:'step_executions'] end |
Instance Attribute Details
#display_name ⇒ String
[Required] The display name of the group execution.
Example: DATABASE_SWITCHOVER
53 54 55 |
# File 'lib/oci/disaster_recovery/models/dr_plan_group_execution.rb', line 53 def display_name @display_name end |
#execution_duration_in_sec ⇒ Integer
The total duration in seconds taken to complete group execution.
Example: 120
86 87 88 |
# File 'lib/oci/disaster_recovery/models/dr_plan_group_execution.rb', line 86 def execution_duration_in_sec @execution_duration_in_sec end |
#group_id ⇒ String
[Required] The unique id of the group. Must not be modified by user.
Example: sgid1.group..uniqueID
39 40 41 |
# File 'lib/oci/disaster_recovery/models/dr_plan_group_execution.rb', line 39 def group_id @group_id end |
#status ⇒ String
[Required] The status of the group execution.
58 59 60 |
# File 'lib/oci/disaster_recovery/models/dr_plan_group_execution.rb', line 58 def status @status end |
#status_details ⇒ String
Additional details on the group execution status.
Example: A total of [3] steps failed in the group
65 66 67 |
# File 'lib/oci/disaster_recovery/models/dr_plan_group_execution.rb', line 65 def status_details @status_details end |
#step_executions ⇒ Array<OCI::DisasterRecovery::Models::DrPlanStepExecution>
[Required] A list of step executions in the group.
91 92 93 |
# File 'lib/oci/disaster_recovery/models/dr_plan_group_execution.rb', line 91 def step_executions @step_executions end |
#time_ended ⇒ DateTime
The time when group execution ended. An RFC3339 formatted datetime string.
Example: 2019-03-29T09:36:42Z
79 80 81 |
# File 'lib/oci/disaster_recovery/models/dr_plan_group_execution.rb', line 79 def time_ended @time_ended end |
#time_started ⇒ DateTime
The time when group execution began. An RFC3339 formatted datetime string.
Example: 2019-03-29T09:36:42Z
72 73 74 |
# File 'lib/oci/disaster_recovery/models/dr_plan_group_execution.rb', line 72 def time_started @time_started end |
#type ⇒ String
[Required] The group type.
Example: BUILT_IN
46 47 48 |
# File 'lib/oci/disaster_recovery/models/dr_plan_group_execution.rb', line 46 def type @type end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
# File 'lib/oci/disaster_recovery/models/dr_plan_group_execution.rb', line 94 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'group_id': :'groupId', 'type': :'type', 'display_name': :'displayName', 'status': :'status', 'status_details': :'statusDetails', 'time_started': :'timeStarted', 'time_ended': :'timeEnded', 'execution_duration_in_sec': :'executionDurationInSec', 'step_executions': :'stepExecutions' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
# File 'lib/oci/disaster_recovery/models/dr_plan_group_execution.rb', line 111 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'group_id': :'String', 'type': :'String', 'display_name': :'String', 'status': :'String', 'status_details': :'String', 'time_started': :'DateTime', 'time_ended': :'DateTime', 'execution_duration_in_sec': :'Integer', 'step_executions': :'Array<OCI::DisasterRecovery::Models::DrPlanStepExecution>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
228 229 230 231 232 233 234 235 236 237 238 239 240 241 |
# File 'lib/oci/disaster_recovery/models/dr_plan_group_execution.rb', line 228 def ==(other) return true if equal?(other) self.class == other.class && group_id == other.group_id && type == other.type && display_name == other.display_name && 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 && step_executions == other.step_executions end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 |
# File 'lib/oci/disaster_recovery/models/dr_plan_group_execution.rb', line 266 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
246 247 248 |
# File 'lib/oci/disaster_recovery/models/dr_plan_group_execution.rb', line 246 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
255 256 257 |
# File 'lib/oci/disaster_recovery/models/dr_plan_group_execution.rb', line 255 def hash [group_id, type, display_name, status, status_details, time_started, time_ended, execution_duration_in_sec, step_executions].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
299 300 301 302 303 304 305 306 307 308 |
# File 'lib/oci/disaster_recovery/models/dr_plan_group_execution.rb', line 299 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
293 294 295 |
# File 'lib/oci/disaster_recovery/models/dr_plan_group_execution.rb', line 293 def to_s to_hash.to_s end |