Class: OCI::Devops::Models::DeployStageExecutionProgress
- Inherits:
-
Object
- Object
- OCI::Devops::Models::DeployStageExecutionProgress
- Defined in:
- lib/oci/devops/models/deploy_stage_execution_progress.rb
Overview
Details about the execution progress of a stage in a deployment. This class has direct subclasses. If you are using this class as input to a service operations then you should favor using a subclass over the base class
Direct Known Subclasses
ComputeInstanceGroupDeployStageExecutionProgress, FunctionDeployStageExecutionProgress, InvokeFunctionDeployStageExecutionProgress, LoadBalancerTrafficShiftDeployStageExecutionProgress, ManualApprovalDeployStageExecutionProgress, OkeDeployStageExecutionProgress, WaitDeployStageExecutionProgress
Constant Summary collapse
- STATUS_ENUM =
[ STATUS_ACCEPTED = 'ACCEPTED'.freeze, STATUS_IN_PROGRESS = 'IN_PROGRESS'.freeze, STATUS_FAILED = 'FAILED'.freeze, STATUS_SUCCEEDED = 'SUCCEEDED'.freeze, STATUS_CANCELING = 'CANCELING'.freeze, STATUS_CANCELED = 'CANCELED'.freeze, STATUS_ROLLBACK_IN_PROGRESS = 'ROLLBACK_IN_PROGRESS'.freeze, STATUS_ROLLBACK_SUCCEEDED = 'ROLLBACK_SUCCEEDED'.freeze, STATUS_ROLLBACK_FAILED = 'ROLLBACK_FAILED'.freeze, STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#deploy_stage_display_name ⇒ String
Stage display name.
-
#deploy_stage_execution_progress_details ⇒ Array<OCI::Devops::Models::DeployStageExecutionProgressDetails>
Details about stage execution for all the target environments.
-
#deploy_stage_id ⇒ String
The OCID of the stage.
- #deploy_stage_predecessors ⇒ OCI::Devops::Models::DeployStagePredecessorCollection
-
#deploy_stage_type ⇒ String
Deployment stage type.
-
#status ⇒ String
The current state of the stage.
-
#time_finished ⇒ DateTime
Time the stage finished executing.
-
#time_started ⇒ DateTime
Time the stage started executing.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.get_subtype(object_hash) ⇒ Object
Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.
-
.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 = {}) ⇒ DeployStageExecutionProgress
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 = {}) ⇒ DeployStageExecutionProgress
Initializes the object
123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 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 |
# File 'lib/oci/devops/models/deploy_stage_execution_progress.rb', line 123 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.deploy_stage_display_name = attributes[:'deployStageDisplayName'] if attributes[:'deployStageDisplayName'] raise 'You cannot provide both :deployStageDisplayName and :deploy_stage_display_name' if attributes.key?(:'deployStageDisplayName') && attributes.key?(:'deploy_stage_display_name') self.deploy_stage_display_name = attributes[:'deploy_stage_display_name'] if attributes[:'deploy_stage_display_name'] self.deploy_stage_type = attributes[:'deployStageType'] if attributes[:'deployStageType'] raise 'You cannot provide both :deployStageType and :deploy_stage_type' if attributes.key?(:'deployStageType') && attributes.key?(:'deploy_stage_type') self.deploy_stage_type = attributes[:'deploy_stage_type'] if attributes[:'deploy_stage_type'] self.deploy_stage_id = attributes[:'deployStageId'] if attributes[:'deployStageId'] raise 'You cannot provide both :deployStageId and :deploy_stage_id' if attributes.key?(:'deployStageId') && attributes.key?(:'deploy_stage_id') self.deploy_stage_id = attributes[:'deploy_stage_id'] if attributes[:'deploy_stage_id'] 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_finished = attributes[:'timeFinished'] if attributes[:'timeFinished'] raise 'You cannot provide both :timeFinished and :time_finished' if attributes.key?(:'timeFinished') && attributes.key?(:'time_finished') self.time_finished = attributes[:'time_finished'] if attributes[:'time_finished'] self.status = attributes[:'status'] if attributes[:'status'] self.deploy_stage_predecessors = attributes[:'deployStagePredecessors'] if attributes[:'deployStagePredecessors'] raise 'You cannot provide both :deployStagePredecessors and :deploy_stage_predecessors' if attributes.key?(:'deployStagePredecessors') && attributes.key?(:'deploy_stage_predecessors') self.deploy_stage_predecessors = attributes[:'deploy_stage_predecessors'] if attributes[:'deploy_stage_predecessors'] self.deploy_stage_execution_progress_details = attributes[:'deployStageExecutionProgressDetails'] if attributes[:'deployStageExecutionProgressDetails'] raise 'You cannot provide both :deployStageExecutionProgressDetails and :deploy_stage_execution_progress_details' if attributes.key?(:'deployStageExecutionProgressDetails') && attributes.key?(:'deploy_stage_execution_progress_details') self.deploy_stage_execution_progress_details = attributes[:'deploy_stage_execution_progress_details'] if attributes[:'deploy_stage_execution_progress_details'] end |
Instance Attribute Details
#deploy_stage_display_name ⇒ String
Stage display name. Avoid entering confidential information.
27 28 29 |
# File 'lib/oci/devops/models/deploy_stage_execution_progress.rb', line 27 def deploy_stage_display_name @deploy_stage_display_name end |
#deploy_stage_execution_progress_details ⇒ Array<OCI::Devops::Models::DeployStageExecutionProgressDetails>
Details about stage execution for all the target environments.
54 55 56 |
# File 'lib/oci/devops/models/deploy_stage_execution_progress.rb', line 54 def deploy_stage_execution_progress_details @deploy_stage_execution_progress_details end |
#deploy_stage_id ⇒ String
The OCID of the stage.
35 36 37 |
# File 'lib/oci/devops/models/deploy_stage_execution_progress.rb', line 35 def deploy_stage_id @deploy_stage_id end |
#deploy_stage_predecessors ⇒ OCI::Devops::Models::DeployStagePredecessorCollection
50 51 52 |
# File 'lib/oci/devops/models/deploy_stage_execution_progress.rb', line 50 def deploy_stage_predecessors @deploy_stage_predecessors end |
#deploy_stage_type ⇒ String
Deployment stage type.
31 32 33 |
# File 'lib/oci/devops/models/deploy_stage_execution_progress.rb', line 31 def deploy_stage_type @deploy_stage_type end |
#status ⇒ String
The current state of the stage.
47 48 49 |
# File 'lib/oci/devops/models/deploy_stage_execution_progress.rb', line 47 def status @status end |
#time_finished ⇒ DateTime
Time the stage finished executing. Format defined by [RFC3339](datatracker.ietf.org/doc/html/rfc3339).
43 44 45 |
# File 'lib/oci/devops/models/deploy_stage_execution_progress.rb', line 43 def time_finished @time_finished end |
#time_started ⇒ DateTime
Time the stage started executing. Format defined by [RFC3339](datatracker.ietf.org/doc/html/rfc3339).
39 40 41 |
# File 'lib/oci/devops/models/deploy_stage_execution_progress.rb', line 39 def time_started @time_started end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/oci/devops/models/deploy_stage_execution_progress.rb', line 57 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'deploy_stage_display_name': :'deployStageDisplayName', 'deploy_stage_type': :'deployStageType', 'deploy_stage_id': :'deployStageId', 'time_started': :'timeStarted', 'time_finished': :'timeFinished', 'status': :'status', 'deploy_stage_predecessors': :'deployStagePredecessors', 'deploy_stage_execution_progress_details': :'deployStageExecutionProgressDetails' # rubocop:enable Style/SymbolLiteral } end |
.get_subtype(object_hash) ⇒ Object
Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.
93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
# File 'lib/oci/devops/models/deploy_stage_execution_progress.rb', line 93 def self.get_subtype(object_hash) type = object_hash[:'deployStageType'] # rubocop:disable Style/SymbolLiteral return 'OCI::Devops::Models::ManualApprovalDeployStageExecutionProgress' if type == 'MANUAL_APPROVAL' return 'OCI::Devops::Models::ComputeInstanceGroupDeployStageExecutionProgress' if type == 'COMPUTE_INSTANCE_GROUP_ROLLING_DEPLOYMENT' return 'OCI::Devops::Models::OkeDeployStageExecutionProgress' if type == 'OKE_DEPLOYMENT' return 'OCI::Devops::Models::LoadBalancerTrafficShiftDeployStageExecutionProgress' if type == 'LOAD_BALANCER_TRAFFIC_SHIFT' return 'OCI::Devops::Models::FunctionDeployStageExecutionProgress' if type == 'DEPLOY_FUNCTION' return 'OCI::Devops::Models::InvokeFunctionDeployStageExecutionProgress' if type == 'INVOKE_FUNCTION' return 'OCI::Devops::Models::WaitDeployStageExecutionProgress' if type == 'WAIT' # TODO: Log a warning when the subtype is not found. 'OCI::Devops::Models::DeployStageExecutionProgress' end |
.swagger_types ⇒ Object
Attribute type mapping.
73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/oci/devops/models/deploy_stage_execution_progress.rb', line 73 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'deploy_stage_display_name': :'String', 'deploy_stage_type': :'String', 'deploy_stage_id': :'String', 'time_started': :'DateTime', 'time_finished': :'DateTime', 'status': :'String', 'deploy_stage_predecessors': :'OCI::Devops::Models::DeployStagePredecessorCollection', 'deploy_stage_execution_progress_details': :'Array<OCI::Devops::Models::DeployStageExecutionProgressDetails>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
194 195 196 197 198 199 200 201 202 203 204 205 206 |
# File 'lib/oci/devops/models/deploy_stage_execution_progress.rb', line 194 def ==(other) return true if equal?(other) self.class == other.class && deploy_stage_display_name == other.deploy_stage_display_name && deploy_stage_type == other.deploy_stage_type && deploy_stage_id == other.deploy_stage_id && time_started == other.time_started && time_finished == other.time_finished && status == other.status && deploy_stage_predecessors == other.deploy_stage_predecessors && deploy_stage_execution_progress_details == other.deploy_stage_execution_progress_details end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 |
# File 'lib/oci/devops/models/deploy_stage_execution_progress.rb', line 231 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
211 212 213 |
# File 'lib/oci/devops/models/deploy_stage_execution_progress.rb', line 211 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
220 221 222 |
# File 'lib/oci/devops/models/deploy_stage_execution_progress.rb', line 220 def hash [deploy_stage_display_name, deploy_stage_type, deploy_stage_id, time_started, time_finished, status, deploy_stage_predecessors, deploy_stage_execution_progress_details].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
264 265 266 267 268 269 270 271 272 273 |
# File 'lib/oci/devops/models/deploy_stage_execution_progress.rb', line 264 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
258 259 260 |
# File 'lib/oci/devops/models/deploy_stage_execution_progress.rb', line 258 def to_s to_hash.to_s end |