Class: IntersightClient::WorkflowSolutionActionDefinitionAllOf
- Inherits:
-
Object
- Object
- IntersightClient::WorkflowSolutionActionDefinitionAllOf
- Defined in:
- lib/intersight_client/models/workflow_solution_action_definition_all_of.rb
Overview
Definition of the list of properties defined in ‘workflow.SolutionActionDefinition’, excluding properties defined in parent classes.
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#action_type ⇒ Object
Type of actionDefinition which decides on how to trigger the action.
-
#allowed_instance_states ⇒ Object
Returns the value of attribute allowed_instance_states.
-
#class_id ⇒ Object
The fully-qualified name of the instantiated, concrete type.
-
#core_workflows ⇒ Object
Returns the value of attribute core_workflows.
-
#description ⇒ Object
The description for this action which provides information on what are the pre-requisites to use this action on the solution and what features are supported by this action.
-
#input_definition ⇒ Object
Returns the value of attribute input_definition.
-
#label ⇒ Object
A user friendly short name to identify the action.
-
#name ⇒ Object
The name for this action definition.
-
#object_type ⇒ Object
The fully-qualified name of the instantiated, concrete type.
-
#output_parameters ⇒ Object
The output mappings from workflows in the action definition to the solution output definition.
-
#periodicity ⇒ Object
Value in seconds to specify the periodicity of the workflows.
-
#post_core_workflows ⇒ Object
Returns the value of attribute post_core_workflows.
-
#pre_core_workflows ⇒ Object
Returns the value of attribute pre_core_workflows.
-
#solution_definition ⇒ Object
Returns the value of attribute solution_definition.
-
#stop_workflows ⇒ Object
Returns the value of attribute stop_workflows.
-
#validation_information ⇒ Object
Returns the value of attribute validation_information.
-
#validation_workflows ⇒ Object
Returns the value of attribute validation_workflows.
-
#workflow_definition ⇒ Object
Returns the value of attribute workflow_definition.
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 = {}) ⇒ WorkflowSolutionActionDefinitionAllOf
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 = {}) ⇒ WorkflowSolutionActionDefinitionAllOf
Initializes the object
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 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 |
# File 'lib/intersight_client/models/workflow_solution_action_definition_all_of.rb', line 160 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `IntersightClient::WorkflowSolutionActionDefinitionAllOf` 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.SolutionActionDefinition' end if attributes.key?(:'object_type') self.object_type = attributes[:'object_type'] else self.object_type = 'workflow.SolutionActionDefinition' end if attributes.key?(:'action_type') self.action_type = attributes[:'action_type'] else self.action_type = 'External' end if attributes.key?(:'allowed_instance_states') if (value = attributes[:'allowed_instance_states']).is_a?(Array) self.allowed_instance_states = value end end if attributes.key?(:'core_workflows') if (value = attributes[:'core_workflows']).is_a?(Array) self.core_workflows = value end end if attributes.key?(:'description') self.description = attributes[:'description'] end if attributes.key?(:'input_definition') if (value = attributes[:'input_definition']).is_a?(Array) self.input_definition = value end end if attributes.key?(:'label') self.label = attributes[:'label'] end if attributes.key?(:'name') self.name = attributes[:'name'] end if attributes.key?(:'output_parameters') self.output_parameters = attributes[:'output_parameters'] end if attributes.key?(:'periodicity') self.periodicity = attributes[:'periodicity'] end if attributes.key?(:'post_core_workflows') if (value = attributes[:'post_core_workflows']).is_a?(Array) self.post_core_workflows = value end end if attributes.key?(:'pre_core_workflows') if (value = attributes[:'pre_core_workflows']).is_a?(Array) self.pre_core_workflows = value end end if attributes.key?(:'stop_workflows') if (value = attributes[:'stop_workflows']).is_a?(Array) self.stop_workflows = value end end if attributes.key?(:'validation_information') self.validation_information = attributes[:'validation_information'] end if attributes.key?(:'validation_workflows') if (value = attributes[:'validation_workflows']).is_a?(Array) self.validation_workflows = value end end if attributes.key?(:'solution_definition') self.solution_definition = attributes[:'solution_definition'] end if attributes.key?(:'workflow_definition') self.workflow_definition = attributes[:'workflow_definition'] end end |
Instance Attribute Details
#action_type ⇒ Object
Type of actionDefinition which decides on how to trigger the action. * ‘External` - External actions definition can be triggered by enduser to perform actions on the solution. Once action is completed successfully (eg. create/deploy), user cannot re-trigger that action again. * `Internal` - Internal action definition is used to trigger periodic actions on the solution instance. * `Repetitive` - Repetitive action definition is an external action that can be triggered by enduser to perform repetitive actions (eg. Edit/Update/Perform health check) on the created solution.
26 27 28 |
# File 'lib/intersight_client/models/workflow_solution_action_definition_all_of.rb', line 26 def action_type @action_type end |
#allowed_instance_states ⇒ Object
Returns the value of attribute allowed_instance_states.
28 29 30 |
# File 'lib/intersight_client/models/workflow_solution_action_definition_all_of.rb', line 28 def allowed_instance_states @allowed_instance_states end |
#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_solution_action_definition_all_of.rb', line 20 def class_id @class_id end |
#core_workflows ⇒ Object
Returns the value of attribute core_workflows.
30 31 32 |
# File 'lib/intersight_client/models/workflow_solution_action_definition_all_of.rb', line 30 def core_workflows @core_workflows end |
#description ⇒ Object
The description for this action which provides information on what are the pre-requisites to use this action on the solution and what features are supported by this action.
33 34 35 |
# File 'lib/intersight_client/models/workflow_solution_action_definition_all_of.rb', line 33 def description @description end |
#input_definition ⇒ Object
Returns the value of attribute input_definition.
35 36 37 |
# File 'lib/intersight_client/models/workflow_solution_action_definition_all_of.rb', line 35 def input_definition @input_definition end |
#label ⇒ Object
A user friendly short name to identify the action. Name can only contain letters (a-z, A-Z), numbers (0-9), hyphen (-), period (.), colon (:), space ( ) or an underscore (_).
38 39 40 |
# File 'lib/intersight_client/models/workflow_solution_action_definition_all_of.rb', line 38 def label @label end |
#name ⇒ Object
The name for this action definition. Name can only contain letters (a-z, A-Z), numbers (0-9), hyphen (-), period (.), colon (:) or an underscore (_). Name of the action must be unique within a solution definition.
41 42 43 |
# File 'lib/intersight_client/models/workflow_solution_action_definition_all_of.rb', line 41 def name @name 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_solution_action_definition_all_of.rb', line 23 def object_type @object_type end |
#output_parameters ⇒ Object
The output mappings from workflows in the action definition to the solution output definition. Any output from core or post-core workflow can be mapped to solution output definition. The output can be referred using the name of the workflow definition and the output name in the following format ‘${<ActionWorkflowDefinition.Name>.output.<outputName>’.
44 45 46 |
# File 'lib/intersight_client/models/workflow_solution_action_definition_all_of.rb', line 44 def output_parameters @output_parameters end |
#periodicity ⇒ Object
Value in seconds to specify the periodicity of the workflows. A zero value indicate the workflow will not execute periodically. A non-zero value indicate, the workflow will be executed periodically with this periodicity.
47 48 49 |
# File 'lib/intersight_client/models/workflow_solution_action_definition_all_of.rb', line 47 def periodicity @periodicity end |
#post_core_workflows ⇒ Object
Returns the value of attribute post_core_workflows.
49 50 51 |
# File 'lib/intersight_client/models/workflow_solution_action_definition_all_of.rb', line 49 def post_core_workflows @post_core_workflows end |
#pre_core_workflows ⇒ Object
Returns the value of attribute pre_core_workflows.
51 52 53 |
# File 'lib/intersight_client/models/workflow_solution_action_definition_all_of.rb', line 51 def pre_core_workflows @pre_core_workflows end |
#solution_definition ⇒ Object
Returns the value of attribute solution_definition.
59 60 61 |
# File 'lib/intersight_client/models/workflow_solution_action_definition_all_of.rb', line 59 def solution_definition @solution_definition end |
#stop_workflows ⇒ Object
Returns the value of attribute stop_workflows.
53 54 55 |
# File 'lib/intersight_client/models/workflow_solution_action_definition_all_of.rb', line 53 def stop_workflows @stop_workflows end |
#validation_information ⇒ Object
Returns the value of attribute validation_information.
55 56 57 |
# File 'lib/intersight_client/models/workflow_solution_action_definition_all_of.rb', line 55 def validation_information @validation_information end |
#validation_workflows ⇒ Object
Returns the value of attribute validation_workflows.
57 58 59 |
# File 'lib/intersight_client/models/workflow_solution_action_definition_all_of.rb', line 57 def validation_workflows @validation_workflows end |
#workflow_definition ⇒ Object
Returns the value of attribute workflow_definition.
61 62 63 |
# File 'lib/intersight_client/models/workflow_solution_action_definition_all_of.rb', line 61 def workflow_definition @workflow_definition end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns the key-value map of all the JSON attributes this model knows about
115 116 117 |
# File 'lib/intersight_client/models/workflow_solution_action_definition_all_of.rb', line 115 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
110 111 112 |
# File 'lib/intersight_client/models/workflow_solution_action_definition_all_of.rb', line 110 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/intersight_client/models/workflow_solution_action_definition_all_of.rb', line 86 def self.attribute_map { :'class_id' => :'ClassId', :'object_type' => :'ObjectType', :'action_type' => :'ActionType', :'allowed_instance_states' => :'AllowedInstanceStates', :'core_workflows' => :'CoreWorkflows', :'description' => :'Description', :'input_definition' => :'InputDefinition', :'label' => :'Label', :'name' => :'Name', :'output_parameters' => :'OutputParameters', :'periodicity' => :'Periodicity', :'post_core_workflows' => :'PostCoreWorkflows', :'pre_core_workflows' => :'PreCoreWorkflows', :'stop_workflows' => :'StopWorkflows', :'validation_information' => :'ValidationInformation', :'validation_workflows' => :'ValidationWorkflows', :'solution_definition' => :'SolutionDefinition', :'workflow_definition' => :'WorkflowDefinition' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
423 424 425 |
# File 'lib/intersight_client/models/workflow_solution_action_definition_all_of.rb', line 423 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
144 145 146 147 148 149 150 151 152 153 154 155 156 |
# File 'lib/intersight_client/models/workflow_solution_action_definition_all_of.rb', line 144 def self.openapi_nullable Set.new([ :'allowed_instance_states', :'core_workflows', :'input_definition', :'output_parameters', :'post_core_workflows', :'pre_core_workflows', :'stop_workflows', :'validation_information', :'validation_workflows', ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 |
# File 'lib/intersight_client/models/workflow_solution_action_definition_all_of.rb', line 120 def self.openapi_types { :'class_id' => :'String', :'object_type' => :'String', :'action_type' => :'String', :'allowed_instance_states' => :'Array<String>', :'core_workflows' => :'Array<WorkflowActionWorkflowDefinition>', :'description' => :'String', :'input_definition' => :'Array<WorkflowBaseDataType>', :'label' => :'String', :'name' => :'String', :'output_parameters' => :'Object', :'periodicity' => :'Integer', :'post_core_workflows' => :'Array<WorkflowActionWorkflowDefinition>', :'pre_core_workflows' => :'Array<WorkflowActionWorkflowDefinition>', :'stop_workflows' => :'Array<WorkflowActionWorkflowDefinition>', :'validation_information' => :'WorkflowValidationInformation', :'validation_workflows' => :'Array<WorkflowActionWorkflowDefinition>', :'solution_definition' => :'WorkflowSolutionDefinitionRelationship', :'workflow_definition' => :'WorkflowWorkflowDefinitionRelationship' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 |
# File 'lib/intersight_client/models/workflow_solution_action_definition_all_of.rb', line 385 def ==(o) return true if self.equal?(o) self.class == o.class && class_id == o.class_id && object_type == o.object_type && action_type == o.action_type && allowed_instance_states == o.allowed_instance_states && core_workflows == o.core_workflows && description == o.description && input_definition == o.input_definition && label == o.label && name == o.name && output_parameters == o.output_parameters && periodicity == o.periodicity && post_core_workflows == o.post_core_workflows && pre_core_workflows == o.pre_core_workflows && stop_workflows == o.stop_workflows && validation_information == o.validation_information && validation_workflows == o.validation_workflows && solution_definition == o.solution_definition && workflow_definition == o.workflow_definition end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 |
# File 'lib/intersight_client/models/workflow_solution_action_definition_all_of.rb', line 453 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
524 525 526 527 528 529 530 531 532 533 534 535 536 |
# File 'lib/intersight_client/models/workflow_solution_action_definition_all_of.rb', line 524 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
430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 |
# File 'lib/intersight_client/models/workflow_solution_action_definition_all_of.rb', line 430 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) WorkflowSolutionActionDefinitionAllOf.openapi_types.each_pair do |key, type| if attributes[WorkflowSolutionActionDefinitionAllOf.attribute_map[key]].nil? && WorkflowSolutionActionDefinitionAllOf.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[WorkflowSolutionActionDefinitionAllOf.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[WorkflowSolutionActionDefinitionAllOf.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[WorkflowSolutionActionDefinitionAllOf.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[WorkflowSolutionActionDefinitionAllOf.attribute_map[key]])) end end self end |
#eql?(o) ⇒ Boolean
410 411 412 |
# File 'lib/intersight_client/models/workflow_solution_action_definition_all_of.rb', line 410 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
416 417 418 |
# File 'lib/intersight_client/models/workflow_solution_action_definition_all_of.rb', line 416 def hash [class_id, object_type, action_type, allowed_instance_states, core_workflows, description, input_definition, label, name, output_parameters, periodicity, post_core_workflows, pre_core_workflows, stop_workflows, validation_information, validation_workflows, solution_definition, workflow_definition].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 |
# File 'lib/intersight_client/models/workflow_solution_action_definition_all_of.rb', line 268 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 pattern = Regexp.new(/^[a-zA-Z0-9]+[\sa-zA-Z0-9_.:-]{1,92}$/) if !@label.nil? && @label !~ pattern invalid_properties.push("invalid value for \"label\", must conform to the pattern #{pattern}.") end pattern = Regexp.new(/^[a-zA-Z0-9_.:-]{1,64}$/) if !@name.nil? && @name !~ pattern invalid_properties.push("invalid value for \"name\", must conform to the pattern #{pattern}.") end if !@periodicity.nil? && @periodicity > 604800 invalid_properties.push('invalid value for "periodicity", must be smaller than or equal to 604800.') end if !@periodicity.nil? && @periodicity < 0 invalid_properties.push('invalid value for "periodicity", must be greater than or equal to 0.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
500 501 502 |
# File 'lib/intersight_client/models/workflow_solution_action_definition_all_of.rb', line 500 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
506 507 508 509 510 511 512 513 514 515 516 517 518 |
# File 'lib/intersight_client/models/workflow_solution_action_definition_all_of.rb', line 506 def to_hash hash = {} WorkflowSolutionActionDefinitionAllOf.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = WorkflowSolutionActionDefinitionAllOf.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
494 495 496 |
# File 'lib/intersight_client/models/workflow_solution_action_definition_all_of.rb', line 494 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 |
# File 'lib/intersight_client/models/workflow_solution_action_definition_all_of.rb', line 301 def valid? return false if @class_id.nil? class_id_validator = EnumAttributeValidator.new('String', ["workflow.SolutionActionDefinition"]) return false unless class_id_validator.valid?(@class_id) return false if @object_type.nil? object_type_validator = EnumAttributeValidator.new('String', ["workflow.SolutionActionDefinition"]) return false unless object_type_validator.valid?(@object_type) action_type_validator = EnumAttributeValidator.new('String', ["External", "Internal", "Repetitive"]) return false unless action_type_validator.valid?(@action_type) return false if !@label.nil? && @label !~ Regexp.new(/^[a-zA-Z0-9]+[\sa-zA-Z0-9_.:-]{1,92}$/) return false if !@name.nil? && @name !~ Regexp.new(/^[a-zA-Z0-9_.:-]{1,64}$/) return false if !@periodicity.nil? && @periodicity > 604800 return false if !@periodicity.nil? && @periodicity < 0 true end |