Class: ArgoWorkflows::IoArgoprojWorkflowV1alpha1WorkflowStatus
- Inherits:
-
Object
- Object
- ArgoWorkflows::IoArgoprojWorkflowV1alpha1WorkflowStatus
- Defined in:
- lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_workflow_status.rb
Overview
WorkflowStatus contains overall status information about a workflow
Instance Attribute Summary collapse
-
#artifact_gc_status ⇒ Object
ArtifactGCStatus maintains the status of Artifact Garbage Collection.
-
#artifact_repository_ref ⇒ Object
ArtifactRepositoryRef is used to cache the repository to use so we do not need to determine it everytime we reconcile.
-
#compressed_nodes ⇒ Object
Compressed and base64 decoded Nodes map.
-
#conditions ⇒ Object
Conditions is a list of conditions the Workflow may have.
-
#estimated_duration ⇒ Object
EstimatedDuration in seconds.
-
#finished_at ⇒ Object
Time at which this workflow completed.
-
#message ⇒ Object
A human readable message indicating details about why the workflow is in this condition.
-
#nodes ⇒ Object
Nodes is a mapping between a node ID and the node’s status.
-
#offload_node_status_version ⇒ Object
Whether on not node status has been offloaded to a database.
-
#outputs ⇒ Object
Outputs captures output values and artifact locations produced by the workflow via global outputs.
-
#persistent_volume_claims ⇒ Object
PersistentVolumeClaims tracks all PVCs that were created as part of the io.argoproj.workflow.v1alpha1.
-
#phase ⇒ Object
Phase a simple, high-level summary of where the workflow is in its lifecycle.
-
#progress ⇒ Object
Progress to completion.
-
#resources_duration ⇒ Object
ResourcesDuration is the total for the workflow.
-
#started_at ⇒ Object
Time at which this workflow started.
-
#stored_templates ⇒ Object
StoredTemplates is a mapping between a template ref and the node’s status.
-
#stored_workflow_template_spec ⇒ Object
StoredWorkflowSpec stores the WorkflowTemplate spec for future execution.
-
#synchronization ⇒ Object
Synchronization stores the status of synchronization locks.
-
#task_results_completion_status ⇒ Object
TaskResultsCompletionStatus tracks task result completion status (mapped by node ID).
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
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ IoArgoprojWorkflowV1alpha1WorkflowStatus
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ IoArgoprojWorkflowV1alpha1WorkflowStatus
Initializes the object
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 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 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 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_workflow_status.rb', line 127 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 } if attributes.has_key?(:'artifactGCStatus') self.artifact_gc_status = attributes[:'artifactGCStatus'] end if attributes.has_key?(:'artifactRepositoryRef') self.artifact_repository_ref = attributes[:'artifactRepositoryRef'] end if attributes.has_key?(:'compressedNodes') self.compressed_nodes = attributes[:'compressedNodes'] end if attributes.has_key?(:'conditions') if (value = attributes[:'conditions']).is_a?(Array) self.conditions = value end end if attributes.has_key?(:'estimatedDuration') self.estimated_duration = attributes[:'estimatedDuration'] end if attributes.has_key?(:'finishedAt') self.finished_at = attributes[:'finishedAt'] end if attributes.has_key?(:'message') self. = attributes[:'message'] end if attributes.has_key?(:'nodes') if (value = attributes[:'nodes']).is_a?(Hash) self.nodes = value end end if attributes.has_key?(:'offloadNodeStatusVersion') self.offload_node_status_version = attributes[:'offloadNodeStatusVersion'] end if attributes.has_key?(:'outputs') self.outputs = attributes[:'outputs'] end if attributes.has_key?(:'persistentVolumeClaims') if (value = attributes[:'persistentVolumeClaims']).is_a?(Array) self.persistent_volume_claims = value end end if attributes.has_key?(:'phase') self.phase = attributes[:'phase'] end if attributes.has_key?(:'progress') self.progress = attributes[:'progress'] end if attributes.has_key?(:'resourcesDuration') if (value = attributes[:'resourcesDuration']).is_a?(Hash) self.resources_duration = value end end if attributes.has_key?(:'startedAt') self.started_at = attributes[:'startedAt'] end if attributes.has_key?(:'storedTemplates') if (value = attributes[:'storedTemplates']).is_a?(Hash) self.stored_templates = value end end if attributes.has_key?(:'storedWorkflowTemplateSpec') self.stored_workflow_template_spec = attributes[:'storedWorkflowTemplateSpec'] end if attributes.has_key?(:'synchronization') self.synchronization = attributes[:'synchronization'] end if attributes.has_key?(:'taskResultsCompletionStatus') if (value = attributes[:'taskResultsCompletionStatus']).is_a?(Hash) self.task_results_completion_status = value end end end |
Instance Attribute Details
#artifact_gc_status ⇒ Object
ArtifactGCStatus maintains the status of Artifact Garbage Collection
19 20 21 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_workflow_status.rb', line 19 def artifact_gc_status @artifact_gc_status end |
#artifact_repository_ref ⇒ Object
ArtifactRepositoryRef is used to cache the repository to use so we do not need to determine it everytime we reconcile.
22 23 24 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_workflow_status.rb', line 22 def artifact_repository_ref @artifact_repository_ref end |
#compressed_nodes ⇒ Object
Compressed and base64 decoded Nodes map
25 26 27 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_workflow_status.rb', line 25 def compressed_nodes @compressed_nodes end |
#conditions ⇒ Object
Conditions is a list of conditions the Workflow may have
28 29 30 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_workflow_status.rb', line 28 def conditions @conditions end |
#estimated_duration ⇒ Object
EstimatedDuration in seconds.
31 32 33 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_workflow_status.rb', line 31 def estimated_duration @estimated_duration end |
#finished_at ⇒ Object
Time at which this workflow completed
34 35 36 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_workflow_status.rb', line 34 def finished_at @finished_at end |
#message ⇒ Object
A human readable message indicating details about why the workflow is in this condition.
37 38 39 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_workflow_status.rb', line 37 def end |
#nodes ⇒ Object
Nodes is a mapping between a node ID and the node’s status.
40 41 42 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_workflow_status.rb', line 40 def nodes @nodes end |
#offload_node_status_version ⇒ Object
Whether on not node status has been offloaded to a database. If exists, then Nodes and CompressedNodes will be empty. This will actually be populated with a hash of the offloaded data.
43 44 45 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_workflow_status.rb', line 43 def offload_node_status_version @offload_node_status_version end |
#outputs ⇒ Object
Outputs captures output values and artifact locations produced by the workflow via global outputs
46 47 48 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_workflow_status.rb', line 46 def outputs @outputs end |
#persistent_volume_claims ⇒ Object
PersistentVolumeClaims tracks all PVCs that were created as part of the io.argoproj.workflow.v1alpha1. The contents of this list are drained at the end of the workflow.
49 50 51 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_workflow_status.rb', line 49 def persistent_volume_claims @persistent_volume_claims end |
#phase ⇒ Object
Phase a simple, high-level summary of where the workflow is in its lifecycle. Will be "" (Unknown), "Pending", or "Running" before the workflow is completed, and "Succeeded", "Failed" or "Error" once the workflow has completed.
52 53 54 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_workflow_status.rb', line 52 def phase @phase end |
#progress ⇒ Object
Progress to completion
55 56 57 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_workflow_status.rb', line 55 def progress @progress end |
#resources_duration ⇒ Object
ResourcesDuration is the total for the workflow
58 59 60 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_workflow_status.rb', line 58 def resources_duration @resources_duration end |
#started_at ⇒ Object
Time at which this workflow started
61 62 63 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_workflow_status.rb', line 61 def started_at @started_at end |
#stored_templates ⇒ Object
StoredTemplates is a mapping between a template ref and the node’s status.
64 65 66 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_workflow_status.rb', line 64 def stored_templates @stored_templates end |
#stored_workflow_template_spec ⇒ Object
StoredWorkflowSpec stores the WorkflowTemplate spec for future execution.
67 68 69 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_workflow_status.rb', line 67 def stored_workflow_template_spec @stored_workflow_template_spec end |
#synchronization ⇒ Object
Synchronization stores the status of synchronization locks
70 71 72 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_workflow_status.rb', line 70 def synchronization @synchronization end |
#task_results_completion_status ⇒ Object
TaskResultsCompletionStatus tracks task result completion status (mapped by node ID). Used to prevent premature archiving and garbage collection.
73 74 75 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_workflow_status.rb', line 73 def task_results_completion_status @task_results_completion_status end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_workflow_status.rb', line 76 def self.attribute_map { :'artifact_gc_status' => :'artifactGCStatus', :'artifact_repository_ref' => :'artifactRepositoryRef', :'compressed_nodes' => :'compressedNodes', :'conditions' => :'conditions', :'estimated_duration' => :'estimatedDuration', :'finished_at' => :'finishedAt', :'message' => :'message', :'nodes' => :'nodes', :'offload_node_status_version' => :'offloadNodeStatusVersion', :'outputs' => :'outputs', :'persistent_volume_claims' => :'persistentVolumeClaims', :'phase' => :'phase', :'progress' => :'progress', :'resources_duration' => :'resourcesDuration', :'started_at' => :'startedAt', :'stored_templates' => :'storedTemplates', :'stored_workflow_template_spec' => :'storedWorkflowTemplateSpec', :'synchronization' => :'synchronization', :'task_results_completion_status' => :'taskResultsCompletionStatus' } end |
.swagger_types ⇒ Object
Attribute type mapping.
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_workflow_status.rb', line 101 def self.swagger_types { :'artifact_gc_status' => :'IoArgoprojWorkflowV1alpha1ArtGCStatus', :'artifact_repository_ref' => :'IoArgoprojWorkflowV1alpha1ArtifactRepositoryRefStatus', :'compressed_nodes' => :'String', :'conditions' => :'Array<IoArgoprojWorkflowV1alpha1Condition>', :'estimated_duration' => :'Integer', :'finished_at' => :'IoK8sApimachineryPkgApisMetaV1Time', :'message' => :'String', :'nodes' => :'Hash<String, IoArgoprojWorkflowV1alpha1NodeStatus>', :'offload_node_status_version' => :'String', :'outputs' => :'IoArgoprojWorkflowV1alpha1Outputs', :'persistent_volume_claims' => :'Array<IoK8sApiCoreV1Volume>', :'phase' => :'String', :'progress' => :'String', :'resources_duration' => :'Hash<String, Integer>', :'started_at' => :'IoK8sApimachineryPkgApisMetaV1Time', :'stored_templates' => :'Hash<String, IoArgoprojWorkflowV1alpha1Template>', :'stored_workflow_template_spec' => :'IoArgoprojWorkflowV1alpha1WorkflowSpec', :'synchronization' => :'IoArgoprojWorkflowV1alpha1SynchronizationStatus', :'task_results_completion_status' => :'Hash<String, BOOLEAN>' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_workflow_status.rb', line 237 def ==(o) return true if self.equal?(o) self.class == o.class && artifact_gc_status == o.artifact_gc_status && artifact_repository_ref == o.artifact_repository_ref && compressed_nodes == o.compressed_nodes && conditions == o.conditions && estimated_duration == o.estimated_duration && finished_at == o.finished_at && == o. && nodes == o.nodes && offload_node_status_version == o.offload_node_status_version && outputs == o.outputs && persistent_volume_claims == o.persistent_volume_claims && phase == o.phase && progress == o.progress && resources_duration == o.resources_duration && started_at == o.started_at && stored_templates == o.stored_templates && stored_workflow_template_spec == o.stored_workflow_template_spec && synchronization == o.synchronization && task_results_completion_status == o.task_results_completion_status end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_workflow_status.rb', line 297 def _deserialize(type, value) case type.to_sym when :DateTime DateTime.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :BOOLEAN if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model temp_model = ArgoWorkflows.const_get(type).new temp_model.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
363 364 365 366 367 368 369 370 371 372 373 374 375 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_workflow_status.rb', line 363 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_workflow_status.rb', line 276 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(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?(o) ⇒ Boolean
263 264 265 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_workflow_status.rb', line 263 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
269 270 271 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_workflow_status.rb', line 269 def hash [artifact_gc_status, artifact_repository_ref, compressed_nodes, conditions, estimated_duration, finished_at, , nodes, offload_node_status_version, outputs, persistent_volume_claims, phase, progress, resources_duration, started_at, stored_templates, stored_workflow_template_spec, synchronization, task_results_completion_status].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
224 225 226 227 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_workflow_status.rb', line 224 def list_invalid_properties invalid_properties = Array.new invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
343 344 345 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_workflow_status.rb', line 343 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
349 350 351 352 353 354 355 356 357 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_workflow_status.rb', line 349 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) next if value.nil? hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
337 338 339 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_workflow_status.rb', line 337 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
231 232 233 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_workflow_status.rb', line 231 def valid? true end |