Class: IntersightClient::WorkflowPropertiesAllOf
- Inherits:
-
Object
- Object
- IntersightClient::WorkflowPropertiesAllOf
- Defined in:
- lib/intersight_client/models/workflow_properties_all_of.rb
Overview
Definition of the list of properties defined in ‘workflow.Properties’, excluding properties defined in parent classes.
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#class_id ⇒ Object
The fully-qualified name of the instantiated, concrete type.
-
#cloneable ⇒ Object
When set to false task is not cloneable.
-
#external_meta ⇒ Object
When set to false the task definition can only be used by internal system workflows.
-
#input_definition ⇒ Object
Returns the value of attribute input_definition.
-
#object_type ⇒ Object
The fully-qualified name of the instantiated, concrete type.
-
#output_definition ⇒ Object
Returns the value of attribute output_definition.
-
#retry_count ⇒ Object
The number of times a task should be tried before marking as failed.
-
#retry_delay ⇒ Object
The delay in seconds after which the the task is re-tried.
-
#retry_policy ⇒ Object
The retry policy for the task.
-
#support_status ⇒ Object
Supported status of the definition.
-
#timeout ⇒ Object
The timeout value in seconds after which task will be marked as timed out.
-
#timeout_policy ⇒ Object
The timeout policy for the task.
Class Method Summary collapse
-
.acceptable_attribute_map ⇒ Object
Returns the key-value map of all the JSON attributes this model knows about.
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_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 ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ WorkflowPropertiesAllOf
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 = {}) ⇒ WorkflowPropertiesAllOf
Initializes the object
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 |
# File 'lib/intersight_client/models/workflow_properties_all_of.rb', line 131 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `IntersightClient::WorkflowPropertiesAllOf` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.acceptable_attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `#{self.class.name}`. Please check the name to make sure it's valid. List of attributes: " + self.class.acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'class_id') self.class_id = attributes[:'class_id'] else self.class_id = 'workflow.Properties' end if attributes.key?(:'object_type') self.object_type = attributes[:'object_type'] else self.object_type = 'workflow.Properties' end if attributes.key?(:'cloneable') self.cloneable = attributes[:'cloneable'] else self.cloneable = true end if attributes.key?(:'external_meta') self. = attributes[:'external_meta'] else self. = false end if attributes.key?(:'input_definition') if (value = attributes[:'input_definition']).is_a?(Array) self.input_definition = value end end if attributes.key?(:'output_definition') if (value = attributes[:'output_definition']).is_a?(Array) self.output_definition = value end end if attributes.key?(:'retry_count') self.retry_count = attributes[:'retry_count'] else self.retry_count = 3 end if attributes.key?(:'retry_delay') self.retry_delay = attributes[:'retry_delay'] else self.retry_delay = 60 end if attributes.key?(:'retry_policy') self.retry_policy = attributes[:'retry_policy'] else self.retry_policy = 'Fixed' end if attributes.key?(:'support_status') self.support_status = attributes[:'support_status'] else self.support_status = 'Supported' end if attributes.key?(:'timeout') self.timeout = attributes[:'timeout'] else self.timeout = 600 end if attributes.key?(:'timeout_policy') self.timeout_policy = attributes[:'timeout_policy'] else self.timeout_policy = 'Timeout' end end |
Instance Attribute Details
#class_id ⇒ Object
The fully-qualified name of the instantiated, concrete type. This property is used as a discriminator to identify the type of the payload when marshaling and unmarshaling data.
20 21 22 |
# File 'lib/intersight_client/models/workflow_properties_all_of.rb', line 20 def class_id @class_id end |
#cloneable ⇒ Object
When set to false task is not cloneable. It is set to true only if task is of ApiTask type and it is not system defined.
26 27 28 |
# File 'lib/intersight_client/models/workflow_properties_all_of.rb', line 26 def cloneable @cloneable end |
#external_meta ⇒ Object
When set to false the task definition can only be used by internal system workflows. When set to true then the task can be included in user defined workflows.
29 30 31 |
# File 'lib/intersight_client/models/workflow_properties_all_of.rb', line 29 def @external_meta end |
#input_definition ⇒ Object
Returns the value of attribute input_definition.
31 32 33 |
# File 'lib/intersight_client/models/workflow_properties_all_of.rb', line 31 def input_definition @input_definition end |
#object_type ⇒ Object
The fully-qualified name of the instantiated, concrete type. The value should be the same as the ‘ClassId’ property.
23 24 25 |
# File 'lib/intersight_client/models/workflow_properties_all_of.rb', line 23 def object_type @object_type end |
#output_definition ⇒ Object
Returns the value of attribute output_definition.
33 34 35 |
# File 'lib/intersight_client/models/workflow_properties_all_of.rb', line 33 def output_definition @output_definition end |
#retry_count ⇒ Object
The number of times a task should be tried before marking as failed.
36 37 38 |
# File 'lib/intersight_client/models/workflow_properties_all_of.rb', line 36 def retry_count @retry_count end |
#retry_delay ⇒ Object
The delay in seconds after which the the task is re-tried.
39 40 41 |
# File 'lib/intersight_client/models/workflow_properties_all_of.rb', line 39 def retry_delay @retry_delay end |
#retry_policy ⇒ Object
The retry policy for the task. * ‘Fixed` - The enum specifies the option as Fixed where the task retry happens after fixed time specified by RetryDelay.
42 43 44 |
# File 'lib/intersight_client/models/workflow_properties_all_of.rb', line 42 def retry_policy @retry_policy end |
#support_status ⇒ Object
Supported status of the definition. * ‘Supported` - The definition is a supported version and there will be no changes to the mandatory inputs or outputs. * `Beta` - The definition is a Beta version and this version can under go changes until the version is marked supported. * `Deprecated` - The version of definition is deprecated and typically there will be a higher version of the same definition that has been added.
45 46 47 |
# File 'lib/intersight_client/models/workflow_properties_all_of.rb', line 45 def support_status @support_status end |
#timeout ⇒ Object
The timeout value in seconds after which task will be marked as timed out. Max allowed value is 7 days.
48 49 50 |
# File 'lib/intersight_client/models/workflow_properties_all_of.rb', line 48 def timeout @timeout end |
#timeout_policy ⇒ Object
The timeout policy for the task. * ‘Timeout` - The enum specifies the option as Timeout where task will be timed out after the specified time in Timeout property. * `Retry` - The enum specifies the option as Retry where task will be re-tried.
51 52 53 |
# File 'lib/intersight_client/models/workflow_properties_all_of.rb', line 51 def timeout_policy @timeout_policy end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns the key-value map of all the JSON attributes this model knows about
99 100 101 |
# File 'lib/intersight_client/models/workflow_properties_all_of.rb', line 99 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
94 95 96 |
# File 'lib/intersight_client/models/workflow_properties_all_of.rb', line 94 def self.acceptable_attributes attribute_map.values end |
.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 |
# File 'lib/intersight_client/models/workflow_properties_all_of.rb', line 76 def self.attribute_map { :'class_id' => :'ClassId', :'object_type' => :'ObjectType', :'cloneable' => :'Cloneable', :'external_meta' => :'ExternalMeta', :'input_definition' => :'InputDefinition', :'output_definition' => :'OutputDefinition', :'retry_count' => :'RetryCount', :'retry_delay' => :'RetryDelay', :'retry_policy' => :'RetryPolicy', :'support_status' => :'SupportStatus', :'timeout' => :'Timeout', :'timeout_policy' => :'TimeoutPolicy' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
406 407 408 |
# File 'lib/intersight_client/models/workflow_properties_all_of.rb', line 406 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
122 123 124 125 126 127 |
# File 'lib/intersight_client/models/workflow_properties_all_of.rb', line 122 def self.openapi_nullable Set.new([ :'input_definition', :'output_definition', ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 |
# File 'lib/intersight_client/models/workflow_properties_all_of.rb', line 104 def self.openapi_types { :'class_id' => :'String', :'object_type' => :'String', :'cloneable' => :'Boolean', :'external_meta' => :'Boolean', :'input_definition' => :'Array<WorkflowBaseDataType>', :'output_definition' => :'Array<WorkflowBaseDataType>', :'retry_count' => :'Integer', :'retry_delay' => :'Integer', :'retry_policy' => :'String', :'support_status' => :'String', :'timeout' => :'Integer', :'timeout_policy' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 |
# File 'lib/intersight_client/models/workflow_properties_all_of.rb', line 374 def ==(o) return true if self.equal?(o) self.class == o.class && class_id == o.class_id && object_type == o.object_type && cloneable == o.cloneable && == o. && input_definition == o.input_definition && output_definition == o.output_definition && retry_count == o.retry_count && retry_delay == o.retry_delay && retry_policy == o.retry_policy && support_status == o.support_status && timeout == o.timeout && timeout_policy == o.timeout_policy end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 |
# File 'lib/intersight_client/models/workflow_properties_all_of.rb', line 436 def _deserialize(type, value) case type.to_sym when :Time Time.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 # models (e.g. Pet) or oneOf klass = IntersightClient.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.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
507 508 509 510 511 512 513 514 515 516 517 518 519 |
# File 'lib/intersight_client/models/workflow_properties_all_of.rb', line 507 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
413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 |
# File 'lib/intersight_client/models/workflow_properties_all_of.rb', line 413 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) WorkflowPropertiesAllOf.openapi_types.each_pair do |key, type| if attributes[WorkflowPropertiesAllOf.attribute_map[key]].nil? && WorkflowPropertiesAllOf.openapi_nullable.include?(key) self.send("#{key}=", nil) elsif 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[WorkflowPropertiesAllOf.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[WorkflowPropertiesAllOf.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[WorkflowPropertiesAllOf.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[WorkflowPropertiesAllOf.attribute_map[key]])) end end self end |
#eql?(o) ⇒ Boolean
393 394 395 |
# File 'lib/intersight_client/models/workflow_properties_all_of.rb', line 393 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
399 400 401 |
# File 'lib/intersight_client/models/workflow_properties_all_of.rb', line 399 def hash [class_id, object_type, cloneable, , input_definition, output_definition, retry_count, retry_delay, retry_policy, support_status, timeout, timeout_policy].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 |
# File 'lib/intersight_client/models/workflow_properties_all_of.rb', line 219 def list_invalid_properties invalid_properties = Array.new if @class_id.nil? invalid_properties.push('invalid value for "class_id", class_id cannot be nil.') end if @object_type.nil? invalid_properties.push('invalid value for "object_type", object_type cannot be nil.') end if !@retry_count.nil? && @retry_count > 256 invalid_properties.push('invalid value for "retry_count", must be smaller than or equal to 256.') end if !@retry_count.nil? && @retry_count < 0 invalid_properties.push('invalid value for "retry_count", must be greater than or equal to 0.') end if !@retry_delay.nil? && @retry_delay > 86400 invalid_properties.push('invalid value for "retry_delay", must be smaller than or equal to 86400.') end if !@retry_delay.nil? && @retry_delay < 10 invalid_properties.push('invalid value for "retry_delay", must be greater than or equal to 10.') end if !@timeout.nil? && @timeout > 604800 invalid_properties.push('invalid value for "timeout", must be smaller than or equal to 604800.') end if !@timeout.nil? && @timeout < 10 invalid_properties.push('invalid value for "timeout", must be greater than or equal to 10.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
483 484 485 |
# File 'lib/intersight_client/models/workflow_properties_all_of.rb', line 483 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
489 490 491 492 493 494 495 496 497 498 499 500 501 |
# File 'lib/intersight_client/models/workflow_properties_all_of.rb', line 489 def to_hash hash = {} WorkflowPropertiesAllOf.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = WorkflowPropertiesAllOf.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
477 478 479 |
# File 'lib/intersight_client/models/workflow_properties_all_of.rb', line 477 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 |
# File 'lib/intersight_client/models/workflow_properties_all_of.rb', line 258 def valid? return false if @class_id.nil? class_id_validator = EnumAttributeValidator.new('String', ["workflow.Properties"]) return false unless class_id_validator.valid?(@class_id) return false if @object_type.nil? object_type_validator = EnumAttributeValidator.new('String', ["workflow.Properties"]) return false unless object_type_validator.valid?(@object_type) return false if !@retry_count.nil? && @retry_count > 256 return false if !@retry_count.nil? && @retry_count < 0 return false if !@retry_delay.nil? && @retry_delay > 86400 return false if !@retry_delay.nil? && @retry_delay < 10 retry_policy_validator = EnumAttributeValidator.new('String', ["Fixed"]) return false unless retry_policy_validator.valid?(@retry_policy) support_status_validator = EnumAttributeValidator.new('String', ["Supported", "Beta", "Deprecated"]) return false unless support_status_validator.valid?(@support_status) return false if !@timeout.nil? && @timeout > 604800 return false if !@timeout.nil? && @timeout < 10 timeout_policy_validator = EnumAttributeValidator.new('String', ["Timeout", "Retry"]) return false unless timeout_policy_validator.valid?(@timeout_policy) true end |