Class: OCI::DisasterRecovery::Models::DrPlanExecutionStepStatusCounts
- Inherits:
-
Object
- Object
- OCI::DisasterRecovery::Models::DrPlanExecutionStepStatusCounts
- Defined in:
- lib/oci/disaster_recovery/models/dr_plan_execution_step_status_counts.rb
Overview
A categorized summary of step execution statuses and their corresponding counts.
Instance Attribute Summary collapse
-
#failed_steps ⇒ OCI::DisasterRecovery::Models::DrPlanExecutionFailedStepStatusCounts
This attribute is required.
-
#remaining_steps ⇒ OCI::DisasterRecovery::Models::DrPlanExecutionRemainingStepStatusCounts
This attribute is required.
-
#skipped_steps ⇒ OCI::DisasterRecovery::Models::DrPlanExecutionSkippedStepStatusCounts
This attribute is required.
-
#successful_steps ⇒ OCI::DisasterRecovery::Models::DrPlanExecutionSuccessfulStepStatusCounts
This attribute is required.
-
#total_steps ⇒ Integer
[Required] The total number of steps in a DR plan execution.
-
#warning_steps ⇒ OCI::DisasterRecovery::Models::DrPlanExecutionWarningStepStatusCounts
This attribute is required.
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 = {}) ⇒ DrPlanExecutionStepStatusCounts
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 = {}) ⇒ DrPlanExecutionStepStatusCounts
Initializes the object
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 |
# File 'lib/oci/disaster_recovery/models/dr_plan_execution_step_status_counts.rb', line 77 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.total_steps = attributes[:'totalSteps'] if attributes[:'totalSteps'] raise 'You cannot provide both :totalSteps and :total_steps' if attributes.key?(:'totalSteps') && attributes.key?(:'total_steps') self.total_steps = attributes[:'total_steps'] if attributes[:'total_steps'] self.remaining_steps = attributes[:'remainingSteps'] if attributes[:'remainingSteps'] raise 'You cannot provide both :remainingSteps and :remaining_steps' if attributes.key?(:'remainingSteps') && attributes.key?(:'remaining_steps') self.remaining_steps = attributes[:'remaining_steps'] if attributes[:'remaining_steps'] self.skipped_steps = attributes[:'skippedSteps'] if attributes[:'skippedSteps'] raise 'You cannot provide both :skippedSteps and :skipped_steps' if attributes.key?(:'skippedSteps') && attributes.key?(:'skipped_steps') self.skipped_steps = attributes[:'skipped_steps'] if attributes[:'skipped_steps'] self.successful_steps = attributes[:'successfulSteps'] if attributes[:'successfulSteps'] raise 'You cannot provide both :successfulSteps and :successful_steps' if attributes.key?(:'successfulSteps') && attributes.key?(:'successful_steps') self.successful_steps = attributes[:'successful_steps'] if attributes[:'successful_steps'] self.warning_steps = attributes[:'warningSteps'] if attributes[:'warningSteps'] raise 'You cannot provide both :warningSteps and :warning_steps' if attributes.key?(:'warningSteps') && attributes.key?(:'warning_steps') self.warning_steps = attributes[:'warning_steps'] if attributes[:'warning_steps'] self.failed_steps = attributes[:'failedSteps'] if attributes[:'failedSteps'] raise 'You cannot provide both :failedSteps and :failed_steps' if attributes.key?(:'failedSteps') && attributes.key?(:'failed_steps') self.failed_steps = attributes[:'failed_steps'] if attributes[:'failed_steps'] end |
Instance Attribute Details
#failed_steps ⇒ OCI::DisasterRecovery::Models::DrPlanExecutionFailedStepStatusCounts
This attribute is required.
35 36 37 |
# File 'lib/oci/disaster_recovery/models/dr_plan_execution_step_status_counts.rb', line 35 def failed_steps @failed_steps end |
#remaining_steps ⇒ OCI::DisasterRecovery::Models::DrPlanExecutionRemainingStepStatusCounts
This attribute is required.
19 20 21 |
# File 'lib/oci/disaster_recovery/models/dr_plan_execution_step_status_counts.rb', line 19 def remaining_steps @remaining_steps end |
#skipped_steps ⇒ OCI::DisasterRecovery::Models::DrPlanExecutionSkippedStepStatusCounts
This attribute is required.
23 24 25 |
# File 'lib/oci/disaster_recovery/models/dr_plan_execution_step_status_counts.rb', line 23 def skipped_steps @skipped_steps end |
#successful_steps ⇒ OCI::DisasterRecovery::Models::DrPlanExecutionSuccessfulStepStatusCounts
This attribute is required.
27 28 29 |
# File 'lib/oci/disaster_recovery/models/dr_plan_execution_step_status_counts.rb', line 27 def successful_steps @successful_steps end |
#total_steps ⇒ Integer
[Required] The total number of steps in a DR plan execution.
15 16 17 |
# File 'lib/oci/disaster_recovery/models/dr_plan_execution_step_status_counts.rb', line 15 def total_steps @total_steps end |
#warning_steps ⇒ OCI::DisasterRecovery::Models::DrPlanExecutionWarningStepStatusCounts
This attribute is required.
31 32 33 |
# File 'lib/oci/disaster_recovery/models/dr_plan_execution_step_status_counts.rb', line 31 def warning_steps @warning_steps end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/oci/disaster_recovery/models/dr_plan_execution_step_status_counts.rb', line 38 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'total_steps': :'totalSteps', 'remaining_steps': :'remainingSteps', 'skipped_steps': :'skippedSteps', 'successful_steps': :'successfulSteps', 'warning_steps': :'warningSteps', 'failed_steps': :'failedSteps' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/oci/disaster_recovery/models/dr_plan_execution_step_status_counts.rb', line 52 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'total_steps': :'Integer', 'remaining_steps': :'OCI::DisasterRecovery::Models::DrPlanExecutionRemainingStepStatusCounts', 'skipped_steps': :'OCI::DisasterRecovery::Models::DrPlanExecutionSkippedStepStatusCounts', 'successful_steps': :'OCI::DisasterRecovery::Models::DrPlanExecutionSuccessfulStepStatusCounts', 'warning_steps': :'OCI::DisasterRecovery::Models::DrPlanExecutionWarningStepStatusCounts', 'failed_steps': :'OCI::DisasterRecovery::Models::DrPlanExecutionFailedStepStatusCounts' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
127 128 129 130 131 132 133 134 135 136 137 |
# File 'lib/oci/disaster_recovery/models/dr_plan_execution_step_status_counts.rb', line 127 def ==(other) return true if equal?(other) self.class == other.class && total_steps == other.total_steps && remaining_steps == other.remaining_steps && skipped_steps == other.skipped_steps && successful_steps == other.successful_steps && warning_steps == other.warning_steps && failed_steps == other.failed_steps end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 |
# File 'lib/oci/disaster_recovery/models/dr_plan_execution_step_status_counts.rb', line 162 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
142 143 144 |
# File 'lib/oci/disaster_recovery/models/dr_plan_execution_step_status_counts.rb', line 142 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
151 152 153 |
# File 'lib/oci/disaster_recovery/models/dr_plan_execution_step_status_counts.rb', line 151 def hash [total_steps, remaining_steps, skipped_steps, successful_steps, warning_steps, failed_steps].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
195 196 197 198 199 200 201 202 203 204 |
# File 'lib/oci/disaster_recovery/models/dr_plan_execution_step_status_counts.rb', line 195 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
189 190 191 |
# File 'lib/oci/disaster_recovery/models/dr_plan_execution_step_status_counts.rb', line 189 def to_s to_hash.to_s end |