Class: ArgoWorkflows::IoArgoprojWorkflowV1alpha1Artifact
- Inherits:
-
Object
- Object
- ArgoWorkflows::IoArgoprojWorkflowV1alpha1Artifact
- Defined in:
- lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_artifact.rb
Overview
Artifact indicates an artifact to place at a specified path
Instance Attribute Summary collapse
-
#archive ⇒ Object
Archive controls how the artifact will be saved to the artifact repository.
-
#archive_logs ⇒ Object
ArchiveLogs indicates if the container logs should be archived.
-
#artifact_gc ⇒ Object
ArtifactGC describes the strategy to use when to deleting an artifact from completed or deleted workflows.
-
#artifactory ⇒ Object
Artifactory contains artifactory artifact location details.
-
#azure ⇒ Object
Azure contains Azure Storage artifact location details.
-
#deleted ⇒ Object
Has this been deleted?.
-
#from ⇒ Object
From allows an artifact to reference an artifact from a previous step.
-
#from_expression ⇒ Object
FromExpression, if defined, is evaluated to specify the value for the artifact.
-
#gcs ⇒ Object
GCS contains GCS artifact location details.
-
#git ⇒ Object
Git contains git artifact location details.
-
#global_name ⇒ Object
GlobalName exports an output artifact to the global scope, making it available as ‘{io{io.argoproj{io.argoproj.workflow{io.argoproj.workflow.v1alpha1{io.argoproj.workflow.v1alpha1.outputs{io.argoproj.workflow.v1alpha1.outputs.artifacts{io.argoproj.workflow.v1alpha1.outputs.artifacts.XXXX} and in workflow.status.outputs.artifacts.
-
#hdfs ⇒ Object
HDFS contains HDFS artifact location details.
-
#http ⇒ Object
HTTP contains HTTP artifact location details.
-
#mode ⇒ Object
mode bits to use on this file, must be a value between 0 and 0777 set when loading input artifacts.
-
#name ⇒ Object
name of the artifact.
-
#optional ⇒ Object
Make Artifacts optional, if Artifacts doesn’t generate or exist.
-
#oss ⇒ Object
OSS contains OSS artifact location details.
-
#path ⇒ Object
Path is the container path to the artifact.
-
#raw ⇒ Object
Raw contains raw artifact location details.
-
#recurse_mode ⇒ Object
If mode is set, apply the permission recursively into the artifact if it is a folder.
-
#s3 ⇒ Object
S3 contains S3 artifact location details.
-
#sub_path ⇒ Object
SubPath allows an artifact to be sourced from a subpath within the specified source.
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 = {}) ⇒ IoArgoprojWorkflowV1alpha1Artifact
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 = {}) ⇒ IoArgoprojWorkflowV1alpha1Artifact
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 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 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_artifact.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 } if attributes.has_key?(:'archive') self.archive = attributes[:'archive'] end if attributes.has_key?(:'archiveLogs') self.archive_logs = attributes[:'archiveLogs'] end if attributes.has_key?(:'artifactGC') self.artifact_gc = attributes[:'artifactGC'] end if attributes.has_key?(:'artifactory') self.artifactory = attributes[:'artifactory'] end if attributes.has_key?(:'azure') self.azure = attributes[:'azure'] end if attributes.has_key?(:'deleted') self.deleted = attributes[:'deleted'] end if attributes.has_key?(:'from') self.from = attributes[:'from'] end if attributes.has_key?(:'fromExpression') self.from_expression = attributes[:'fromExpression'] end if attributes.has_key?(:'gcs') self.gcs = attributes[:'gcs'] end if attributes.has_key?(:'git') self.git = attributes[:'git'] end if attributes.has_key?(:'globalName') self.global_name = attributes[:'globalName'] end if attributes.has_key?(:'hdfs') self.hdfs = attributes[:'hdfs'] end if attributes.has_key?(:'http') self.http = attributes[:'http'] end if attributes.has_key?(:'mode') self.mode = attributes[:'mode'] end if attributes.has_key?(:'name') self.name = attributes[:'name'] end if attributes.has_key?(:'optional') self.optional = attributes[:'optional'] end if attributes.has_key?(:'oss') self.oss = attributes[:'oss'] end if attributes.has_key?(:'path') self.path = attributes[:'path'] end if attributes.has_key?(:'raw') self.raw = attributes[:'raw'] end if attributes.has_key?(:'recurseMode') self.recurse_mode = attributes[:'recurseMode'] end if attributes.has_key?(:'s3') self.s3 = attributes[:'s3'] end if attributes.has_key?(:'subPath') self.sub_path = attributes[:'subPath'] end end |
Instance Attribute Details
#archive ⇒ Object
Archive controls how the artifact will be saved to the artifact repository.
19 20 21 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_artifact.rb', line 19 def archive @archive end |
#archive_logs ⇒ Object
ArchiveLogs indicates if the container logs should be archived
22 23 24 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_artifact.rb', line 22 def archive_logs @archive_logs end |
#artifact_gc ⇒ Object
ArtifactGC describes the strategy to use when to deleting an artifact from completed or deleted workflows
25 26 27 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_artifact.rb', line 25 def artifact_gc @artifact_gc end |
#artifactory ⇒ Object
Artifactory contains artifactory artifact location details
28 29 30 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_artifact.rb', line 28 def artifactory @artifactory end |
#azure ⇒ Object
Azure contains Azure Storage artifact location details
31 32 33 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_artifact.rb', line 31 def azure @azure end |
#deleted ⇒ Object
Has this been deleted?
34 35 36 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_artifact.rb', line 34 def deleted @deleted end |
#from ⇒ Object
From allows an artifact to reference an artifact from a previous step
37 38 39 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_artifact.rb', line 37 def from @from end |
#from_expression ⇒ Object
FromExpression, if defined, is evaluated to specify the value for the artifact
40 41 42 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_artifact.rb', line 40 def from_expression @from_expression end |
#gcs ⇒ Object
GCS contains GCS artifact location details
43 44 45 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_artifact.rb', line 43 def gcs @gcs end |
#git ⇒ Object
Git contains git artifact location details
46 47 48 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_artifact.rb', line 46 def git @git end |
#global_name ⇒ Object
GlobalName exports an output artifact to the global scope, making it available as ‘ArgoWorkflows::IoArgoprojWorkflowV1alpha1Artifact.{io{io.argoproj{io.argoproj.workflow{io.argoproj.workflow.v1alpha1{io.argoproj.workflow.v1alpha1.outputs{io.argoproj.workflow.v1alpha1.outputs.artifacts{io.argoproj.workflow.v1alpha1.outputs.artifacts.XXXX} and in workflow.status.outputs.artifacts
49 50 51 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_artifact.rb', line 49 def global_name @global_name end |
#hdfs ⇒ Object
HDFS contains HDFS artifact location details
52 53 54 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_artifact.rb', line 52 def hdfs @hdfs end |
#http ⇒ Object
HTTP contains HTTP artifact location details
55 56 57 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_artifact.rb', line 55 def http @http end |
#mode ⇒ Object
mode bits to use on this file, must be a value between 0 and 0777 set when loading input artifacts.
58 59 60 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_artifact.rb', line 58 def mode @mode end |
#name ⇒ Object
name of the artifact. must be unique within a template’s inputs/outputs.
61 62 63 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_artifact.rb', line 61 def name @name end |
#optional ⇒ Object
Make Artifacts optional, if Artifacts doesn’t generate or exist
64 65 66 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_artifact.rb', line 64 def optional @optional end |
#oss ⇒ Object
OSS contains OSS artifact location details
67 68 69 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_artifact.rb', line 67 def oss @oss end |
#path ⇒ Object
Path is the container path to the artifact
70 71 72 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_artifact.rb', line 70 def path @path end |
#raw ⇒ Object
Raw contains raw artifact location details
73 74 75 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_artifact.rb', line 73 def raw @raw end |
#recurse_mode ⇒ Object
If mode is set, apply the permission recursively into the artifact if it is a folder
76 77 78 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_artifact.rb', line 76 def recurse_mode @recurse_mode end |
#s3 ⇒ Object
S3 contains S3 artifact location details
79 80 81 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_artifact.rb', line 79 def s3 @s3 end |
#sub_path ⇒ Object
SubPath allows an artifact to be sourced from a subpath within the specified source
82 83 84 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_artifact.rb', line 82 def sub_path @sub_path end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_artifact.rb', line 85 def self.attribute_map { :'archive' => :'archive', :'archive_logs' => :'archiveLogs', :'artifact_gc' => :'artifactGC', :'artifactory' => :'artifactory', :'azure' => :'azure', :'deleted' => :'deleted', :'from' => :'from', :'from_expression' => :'fromExpression', :'gcs' => :'gcs', :'git' => :'git', :'global_name' => :'globalName', :'hdfs' => :'hdfs', :'http' => :'http', :'mode' => :'mode', :'name' => :'name', :'optional' => :'optional', :'oss' => :'oss', :'path' => :'path', :'raw' => :'raw', :'recurse_mode' => :'recurseMode', :'s3' => :'s3', :'sub_path' => :'subPath' } end |
.swagger_types ⇒ Object
Attribute type mapping.
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_artifact.rb', line 113 def self.swagger_types { :'archive' => :'IoArgoprojWorkflowV1alpha1ArchiveStrategy', :'archive_logs' => :'BOOLEAN', :'artifact_gc' => :'IoArgoprojWorkflowV1alpha1ArtifactGC', :'artifactory' => :'IoArgoprojWorkflowV1alpha1ArtifactoryArtifact', :'azure' => :'IoArgoprojWorkflowV1alpha1AzureArtifact', :'deleted' => :'BOOLEAN', :'from' => :'String', :'from_expression' => :'String', :'gcs' => :'IoArgoprojWorkflowV1alpha1GCSArtifact', :'git' => :'IoArgoprojWorkflowV1alpha1GitArtifact', :'global_name' => :'String', :'hdfs' => :'IoArgoprojWorkflowV1alpha1HDFSArtifact', :'http' => :'IoArgoprojWorkflowV1alpha1HTTPArtifact', :'mode' => :'Integer', :'name' => :'String', :'optional' => :'BOOLEAN', :'oss' => :'IoArgoprojWorkflowV1alpha1OSSArtifact', :'path' => :'String', :'raw' => :'IoArgoprojWorkflowV1alpha1RawArtifact', :'recurse_mode' => :'BOOLEAN', :'s3' => :'IoArgoprojWorkflowV1alpha1S3Artifact', :'sub_path' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_artifact.rb', line 257 def ==(o) return true if self.equal?(o) self.class == o.class && archive == o.archive && archive_logs == o.archive_logs && artifact_gc == o.artifact_gc && artifactory == o.artifactory && azure == o.azure && deleted == o.deleted && from == o.from && from_expression == o.from_expression && gcs == o.gcs && git == o.git && global_name == o.global_name && hdfs == o.hdfs && http == o.http && mode == o.mode && name == o.name && optional == o.optional && oss == o.oss && path == o.path && raw == o.raw && recurse_mode == o.recurse_mode && s3 == o.s3 && sub_path == o.sub_path end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_artifact.rb', line 320 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
386 387 388 389 390 391 392 393 394 395 396 397 398 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_artifact.rb', line 386 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
299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_artifact.rb', line 299 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
286 287 288 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_artifact.rb', line 286 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
292 293 294 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_artifact.rb', line 292 def hash [archive, archive_logs, artifact_gc, artifactory, azure, deleted, from, from_expression, gcs, git, global_name, hdfs, http, mode, name, optional, oss, path, raw, recurse_mode, s3, sub_path].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
239 240 241 242 243 244 245 246 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_artifact.rb', line 239 def list_invalid_properties invalid_properties = Array.new if @name.nil? invalid_properties.push('invalid value for "name", name cannot be nil.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
366 367 368 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_artifact.rb', line 366 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
372 373 374 375 376 377 378 379 380 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_artifact.rb', line 372 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
360 361 362 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_artifact.rb', line 360 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
250 251 252 253 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_artifact.rb', line 250 def valid? return false if @name.nil? true end |