Class: CloudReactorAPIClient::WorkflowTaskInstance
- Inherits:
-
Object
- Object
- CloudReactorAPIClient::WorkflowTaskInstance
- Defined in:
- lib/cloudreactor_api_client/models/workflow_task_instance.rb
Overview
A WorkflowTaskInstance contains a Task that is configured to run in a Workflow.
Instance Attribute Summary collapse
-
#allocated_cpu_units ⇒ Object
Returns the value of attribute allocated_cpu_units.
-
#allocated_memory_mb ⇒ Object
Returns the value of attribute allocated_memory_mb.
-
#allow_workflow_execution_after_failure ⇒ Object
Returns the value of attribute allow_workflow_execution_after_failure.
-
#allow_workflow_execution_after_timeout ⇒ Object
Returns the value of attribute allow_workflow_execution_after_timeout.
-
#condition_count_threshold ⇒ Object
Returns the value of attribute condition_count_threshold.
-
#condition_ratio_threshold ⇒ Object
Returns the value of attribute condition_ratio_threshold.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#default_max_retries ⇒ Object
Returns the value of attribute default_max_retries.
-
#description ⇒ Object
Returns the value of attribute description.
-
#environment_variables_overrides ⇒ Object
Returns the value of attribute environment_variables_overrides.
-
#failure_behavior ⇒ Object
Returns the value of attribute failure_behavior.
-
#max_age_seconds ⇒ Object
Returns the value of attribute max_age_seconds.
-
#max_complete_executions ⇒ Object
Returns the value of attribute max_complete_executions.
-
#name ⇒ Object
Returns the value of attribute name.
-
#should_eval_transitions_after_first_execution ⇒ Object
Returns the value of attribute should_eval_transitions_after_first_execution.
-
#start_transition_condition ⇒ Object
Returns the value of attribute start_transition_condition.
-
#task ⇒ Object
Returns the value of attribute task.
-
#timeout_behavior ⇒ Object
Returns the value of attribute timeout_behavior.
-
#ui_center_margin_left ⇒ Object
Returns the value of attribute ui_center_margin_left.
-
#ui_center_margin_top ⇒ Object
Returns the value of attribute ui_center_margin_top.
-
#ui_color ⇒ Object
Returns the value of attribute ui_color.
-
#ui_icon_type ⇒ Object
Returns the value of attribute ui_icon_type.
-
#ui_scale ⇒ Object
Returns the value of attribute ui_scale.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
-
#url ⇒ Object
Returns the value of attribute url.
-
#use_task_alert_methods ⇒ Object
Returns the value of attribute use_task_alert_methods.
-
#uuid ⇒ Object
Returns the value of attribute uuid.
-
#workflow ⇒ Object
Returns the value of attribute workflow.
Class Method Summary collapse
-
.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 = {}) ⇒ WorkflowTaskInstance
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 = {}) ⇒ WorkflowTaskInstance
Initializes the object
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 265 266 267 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 |
# File 'lib/cloudreactor_api_client/models/workflow_task_instance.rb', line 166 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `CloudReactorAPIClient::WorkflowTaskInstance` 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.attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `CloudReactorAPIClient::WorkflowTaskInstance`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'url') self.url = attributes[:'url'] end if attributes.key?(:'uuid') self.uuid = attributes[:'uuid'] end if attributes.key?(:'name') self.name = attributes[:'name'] end if attributes.key?(:'description') self.description = attributes[:'description'] end if attributes.key?(:'workflow') self.workflow = attributes[:'workflow'] end if attributes.key?(:'task') self.task = attributes[:'task'] end if attributes.key?(:'start_transition_condition') self.start_transition_condition = attributes[:'start_transition_condition'] end if attributes.key?(:'max_complete_executions') self.max_complete_executions = attributes[:'max_complete_executions'] end if attributes.key?(:'should_eval_transitions_after_first_execution') self.should_eval_transitions_after_first_execution = attributes[:'should_eval_transitions_after_first_execution'] end if attributes.key?(:'condition_count_threshold') self.condition_count_threshold = attributes[:'condition_count_threshold'] end if attributes.key?(:'condition_ratio_threshold') self.condition_ratio_threshold = attributes[:'condition_ratio_threshold'] end if attributes.key?(:'max_age_seconds') self.max_age_seconds = attributes[:'max_age_seconds'] end if attributes.key?(:'default_max_retries') self.default_max_retries = attributes[:'default_max_retries'] end if attributes.key?(:'failure_behavior') self.failure_behavior = attributes[:'failure_behavior'] end if attributes.key?(:'allow_workflow_execution_after_failure') self.allow_workflow_execution_after_failure = attributes[:'allow_workflow_execution_after_failure'] end if attributes.key?(:'timeout_behavior') self.timeout_behavior = attributes[:'timeout_behavior'] end if attributes.key?(:'allow_workflow_execution_after_timeout') self.allow_workflow_execution_after_timeout = attributes[:'allow_workflow_execution_after_timeout'] end if attributes.key?(:'environment_variables_overrides') if (value = attributes[:'environment_variables_overrides']).is_a?(Hash) self.environment_variables_overrides = value end end if attributes.key?(:'allocated_cpu_units') self.allocated_cpu_units = attributes[:'allocated_cpu_units'] end if attributes.key?(:'allocated_memory_mb') self.allocated_memory_mb = attributes[:'allocated_memory_mb'] end if attributes.key?(:'use_task_alert_methods') self.use_task_alert_methods = attributes[:'use_task_alert_methods'] end if attributes.key?(:'ui_color') self.ui_color = attributes[:'ui_color'] end if attributes.key?(:'ui_icon_type') self.ui_icon_type = attributes[:'ui_icon_type'] end if attributes.key?(:'ui_scale') self.ui_scale = attributes[:'ui_scale'] end if attributes.key?(:'ui_center_margin_top') self.ui_center_margin_top = attributes[:'ui_center_margin_top'] end if attributes.key?(:'ui_center_margin_left') self.ui_center_margin_left = attributes[:'ui_center_margin_left'] end if attributes.key?(:'created_at') self.created_at = attributes[:'created_at'] end if attributes.key?(:'updated_at') self.updated_at = attributes[:'updated_at'] end end |
Instance Attribute Details
#allocated_cpu_units ⇒ Object
Returns the value of attribute allocated_cpu_units.
55 56 57 |
# File 'lib/cloudreactor_api_client/models/workflow_task_instance.rb', line 55 def allocated_cpu_units @allocated_cpu_units end |
#allocated_memory_mb ⇒ Object
Returns the value of attribute allocated_memory_mb.
57 58 59 |
# File 'lib/cloudreactor_api_client/models/workflow_task_instance.rb', line 57 def allocated_memory_mb @allocated_memory_mb end |
#allow_workflow_execution_after_failure ⇒ Object
Returns the value of attribute allow_workflow_execution_after_failure.
47 48 49 |
# File 'lib/cloudreactor_api_client/models/workflow_task_instance.rb', line 47 def allow_workflow_execution_after_failure @allow_workflow_execution_after_failure end |
#allow_workflow_execution_after_timeout ⇒ Object
Returns the value of attribute allow_workflow_execution_after_timeout.
51 52 53 |
# File 'lib/cloudreactor_api_client/models/workflow_task_instance.rb', line 51 def allow_workflow_execution_after_timeout @allow_workflow_execution_after_timeout end |
#condition_count_threshold ⇒ Object
Returns the value of attribute condition_count_threshold.
37 38 39 |
# File 'lib/cloudreactor_api_client/models/workflow_task_instance.rb', line 37 def condition_count_threshold @condition_count_threshold end |
#condition_ratio_threshold ⇒ Object
Returns the value of attribute condition_ratio_threshold.
39 40 41 |
# File 'lib/cloudreactor_api_client/models/workflow_task_instance.rb', line 39 def condition_ratio_threshold @condition_ratio_threshold end |
#created_at ⇒ Object
Returns the value of attribute created_at.
71 72 73 |
# File 'lib/cloudreactor_api_client/models/workflow_task_instance.rb', line 71 def created_at @created_at end |
#default_max_retries ⇒ Object
Returns the value of attribute default_max_retries.
43 44 45 |
# File 'lib/cloudreactor_api_client/models/workflow_task_instance.rb', line 43 def default_max_retries @default_max_retries end |
#description ⇒ Object
Returns the value of attribute description.
25 26 27 |
# File 'lib/cloudreactor_api_client/models/workflow_task_instance.rb', line 25 def description @description end |
#environment_variables_overrides ⇒ Object
Returns the value of attribute environment_variables_overrides.
53 54 55 |
# File 'lib/cloudreactor_api_client/models/workflow_task_instance.rb', line 53 def environment_variables_overrides @environment_variables_overrides end |
#failure_behavior ⇒ Object
Returns the value of attribute failure_behavior.
45 46 47 |
# File 'lib/cloudreactor_api_client/models/workflow_task_instance.rb', line 45 def failure_behavior @failure_behavior end |
#max_age_seconds ⇒ Object
Returns the value of attribute max_age_seconds.
41 42 43 |
# File 'lib/cloudreactor_api_client/models/workflow_task_instance.rb', line 41 def max_age_seconds @max_age_seconds end |
#max_complete_executions ⇒ Object
Returns the value of attribute max_complete_executions.
33 34 35 |
# File 'lib/cloudreactor_api_client/models/workflow_task_instance.rb', line 33 def max_complete_executions @max_complete_executions end |
#name ⇒ Object
Returns the value of attribute name.
23 24 25 |
# File 'lib/cloudreactor_api_client/models/workflow_task_instance.rb', line 23 def name @name end |
#should_eval_transitions_after_first_execution ⇒ Object
Returns the value of attribute should_eval_transitions_after_first_execution.
35 36 37 |
# File 'lib/cloudreactor_api_client/models/workflow_task_instance.rb', line 35 def should_eval_transitions_after_first_execution @should_eval_transitions_after_first_execution end |
#start_transition_condition ⇒ Object
Returns the value of attribute start_transition_condition.
31 32 33 |
# File 'lib/cloudreactor_api_client/models/workflow_task_instance.rb', line 31 def start_transition_condition @start_transition_condition end |
#task ⇒ Object
Returns the value of attribute task.
29 30 31 |
# File 'lib/cloudreactor_api_client/models/workflow_task_instance.rb', line 29 def task @task end |
#timeout_behavior ⇒ Object
Returns the value of attribute timeout_behavior.
49 50 51 |
# File 'lib/cloudreactor_api_client/models/workflow_task_instance.rb', line 49 def timeout_behavior @timeout_behavior end |
#ui_center_margin_left ⇒ Object
Returns the value of attribute ui_center_margin_left.
69 70 71 |
# File 'lib/cloudreactor_api_client/models/workflow_task_instance.rb', line 69 def ui_center_margin_left @ui_center_margin_left end |
#ui_center_margin_top ⇒ Object
Returns the value of attribute ui_center_margin_top.
67 68 69 |
# File 'lib/cloudreactor_api_client/models/workflow_task_instance.rb', line 67 def ui_center_margin_top @ui_center_margin_top end |
#ui_color ⇒ Object
Returns the value of attribute ui_color.
61 62 63 |
# File 'lib/cloudreactor_api_client/models/workflow_task_instance.rb', line 61 def ui_color @ui_color end |
#ui_icon_type ⇒ Object
Returns the value of attribute ui_icon_type.
63 64 65 |
# File 'lib/cloudreactor_api_client/models/workflow_task_instance.rb', line 63 def ui_icon_type @ui_icon_type end |
#ui_scale ⇒ Object
Returns the value of attribute ui_scale.
65 66 67 |
# File 'lib/cloudreactor_api_client/models/workflow_task_instance.rb', line 65 def ui_scale @ui_scale end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
73 74 75 |
# File 'lib/cloudreactor_api_client/models/workflow_task_instance.rb', line 73 def updated_at @updated_at end |
#url ⇒ Object
Returns the value of attribute url.
19 20 21 |
# File 'lib/cloudreactor_api_client/models/workflow_task_instance.rb', line 19 def url @url end |
#use_task_alert_methods ⇒ Object
Returns the value of attribute use_task_alert_methods.
59 60 61 |
# File 'lib/cloudreactor_api_client/models/workflow_task_instance.rb', line 59 def use_task_alert_methods @use_task_alert_methods end |
#uuid ⇒ Object
Returns the value of attribute uuid.
21 22 23 |
# File 'lib/cloudreactor_api_client/models/workflow_task_instance.rb', line 21 def uuid @uuid end |
#workflow ⇒ Object
Returns the value of attribute workflow.
27 28 29 |
# File 'lib/cloudreactor_api_client/models/workflow_task_instance.rb', line 27 def workflow @workflow end |
Class Method Details
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
110 111 112 |
# File 'lib/cloudreactor_api_client/models/workflow_task_instance.rb', line 110 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 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/cloudreactor_api_client/models/workflow_task_instance.rb', line 76 def self.attribute_map { :'url' => :'url', :'uuid' => :'uuid', :'name' => :'name', :'description' => :'description', :'workflow' => :'workflow', :'task' => :'task', :'start_transition_condition' => :'start_transition_condition', :'max_complete_executions' => :'max_complete_executions', :'should_eval_transitions_after_first_execution' => :'should_eval_transitions_after_first_execution', :'condition_count_threshold' => :'condition_count_threshold', :'condition_ratio_threshold' => :'condition_ratio_threshold', :'max_age_seconds' => :'max_age_seconds', :'default_max_retries' => :'default_max_retries', :'failure_behavior' => :'failure_behavior', :'allow_workflow_execution_after_failure' => :'allow_workflow_execution_after_failure', :'timeout_behavior' => :'timeout_behavior', :'allow_workflow_execution_after_timeout' => :'allow_workflow_execution_after_timeout', :'environment_variables_overrides' => :'environment_variables_overrides', :'allocated_cpu_units' => :'allocated_cpu_units', :'allocated_memory_mb' => :'allocated_memory_mb', :'use_task_alert_methods' => :'use_task_alert_methods', :'ui_color' => :'ui_color', :'ui_icon_type' => :'ui_icon_type', :'ui_scale' => :'ui_scale', :'ui_center_margin_top' => :'ui_center_margin_top', :'ui_center_margin_left' => :'ui_center_margin_left', :'created_at' => :'created_at', :'updated_at' => :'updated_at' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
580 581 582 |
# File 'lib/cloudreactor_api_client/models/workflow_task_instance.rb', line 580 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
149 150 151 152 153 154 155 156 157 158 159 160 161 162 |
# File 'lib/cloudreactor_api_client/models/workflow_task_instance.rb', line 149 def self.openapi_nullable Set.new([ :'max_complete_executions', :'condition_count_threshold', :'condition_ratio_threshold', :'max_age_seconds', :'environment_variables_overrides', :'allocated_cpu_units', :'allocated_memory_mb', :'ui_scale', :'ui_center_margin_top', :'ui_center_margin_left', ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 |
# File 'lib/cloudreactor_api_client/models/workflow_task_instance.rb', line 115 def self.openapi_types { :'url' => :'String', :'uuid' => :'String', :'name' => :'String', :'description' => :'String', :'workflow' => :'NameAndUuid', :'task' => :'NameAndUuid', :'start_transition_condition' => :'StartTransitionConditionEnum', :'max_complete_executions' => :'Integer', :'should_eval_transitions_after_first_execution' => :'Boolean', :'condition_count_threshold' => :'Integer', :'condition_ratio_threshold' => :'Float', :'max_age_seconds' => :'Integer', :'default_max_retries' => :'Integer', :'failure_behavior' => :'FailureBehaviorEnum', :'allow_workflow_execution_after_failure' => :'Boolean', :'timeout_behavior' => :'TimeoutBehaviorEnum', :'allow_workflow_execution_after_timeout' => :'Boolean', :'environment_variables_overrides' => :'Hash<String, Object>', :'allocated_cpu_units' => :'Integer', :'allocated_memory_mb' => :'Integer', :'use_task_alert_methods' => :'Boolean', :'ui_color' => :'String', :'ui_icon_type' => :'String', :'ui_scale' => :'Float', :'ui_center_margin_top' => :'Float', :'ui_center_margin_left' => :'Float', :'created_at' => :'Time', :'updated_at' => :'Time' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 |
# File 'lib/cloudreactor_api_client/models/workflow_task_instance.rb', line 532 def ==(o) return true if self.equal?(o) self.class == o.class && url == o.url && uuid == o.uuid && name == o.name && description == o.description && workflow == o.workflow && task == o.task && start_transition_condition == o.start_transition_condition && max_complete_executions == o.max_complete_executions && should_eval_transitions_after_first_execution == o.should_eval_transitions_after_first_execution && condition_count_threshold == o.condition_count_threshold && condition_ratio_threshold == o.condition_ratio_threshold && max_age_seconds == o.max_age_seconds && default_max_retries == o.default_max_retries && failure_behavior == o.failure_behavior && allow_workflow_execution_after_failure == o.allow_workflow_execution_after_failure && timeout_behavior == o.timeout_behavior && allow_workflow_execution_after_timeout == o.allow_workflow_execution_after_timeout && environment_variables_overrides == o.environment_variables_overrides && allocated_cpu_units == o.allocated_cpu_units && allocated_memory_mb == o.allocated_memory_mb && use_task_alert_methods == o.use_task_alert_methods && ui_color == o.ui_color && ui_icon_type == o.ui_icon_type && ui_scale == o.ui_scale && ui_center_margin_top == o.ui_center_margin_top && ui_center_margin_left == o.ui_center_margin_left && created_at == o.created_at && updated_at == o.updated_at end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 |
# File 'lib/cloudreactor_api_client/models/workflow_task_instance.rb', line 610 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 = CloudReactorAPIClient.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
681 682 683 684 685 686 687 688 689 690 691 692 693 |
# File 'lib/cloudreactor_api_client/models/workflow_task_instance.rb', line 681 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
587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 |
# File 'lib/cloudreactor_api_client/models/workflow_task_instance.rb', line 587 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.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[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 end self end |
#eql?(o) ⇒ Boolean
567 568 569 |
# File 'lib/cloudreactor_api_client/models/workflow_task_instance.rb', line 567 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
573 574 575 |
# File 'lib/cloudreactor_api_client/models/workflow_task_instance.rb', line 573 def hash [url, uuid, name, description, workflow, task, start_transition_condition, max_complete_executions, should_eval_transitions_after_first_execution, condition_count_threshold, condition_ratio_threshold, max_age_seconds, default_max_retries, failure_behavior, allow_workflow_execution_after_failure, timeout_behavior, allow_workflow_execution_after_timeout, environment_variables_overrides, allocated_cpu_units, allocated_memory_mb, use_task_alert_methods, ui_color, ui_icon_type, ui_scale, ui_center_margin_top, ui_center_margin_left, created_at, updated_at].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
296 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 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 |
# File 'lib/cloudreactor_api_client/models/workflow_task_instance.rb', line 296 def list_invalid_properties invalid_properties = Array.new if @name.nil? invalid_properties.push('invalid value for "name", name cannot be nil.') end if @name.to_s.length > 200 invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 200.') end if !@description.nil? && @description.to_s.length > 5000 invalid_properties.push('invalid value for "description", the character length must be smaller than or equal to 5000.') end if @workflow.nil? invalid_properties.push('invalid value for "workflow", workflow cannot be nil.') end if @task.nil? invalid_properties.push('invalid value for "task", task cannot be nil.') end if !@max_complete_executions.nil? && @max_complete_executions > 2147483647 invalid_properties.push('invalid value for "max_complete_executions", must be smaller than or equal to 2147483647.') end if !@max_complete_executions.nil? && @max_complete_executions < -2147483648 invalid_properties.push('invalid value for "max_complete_executions", must be greater than or equal to -2147483648.') end if !@condition_count_threshold.nil? && @condition_count_threshold > 2147483647 invalid_properties.push('invalid value for "condition_count_threshold", must be smaller than or equal to 2147483647.') end if !@condition_count_threshold.nil? && @condition_count_threshold < -2147483648 invalid_properties.push('invalid value for "condition_count_threshold", must be greater than or equal to -2147483648.') end if !@max_age_seconds.nil? && @max_age_seconds > 2147483647 invalid_properties.push('invalid value for "max_age_seconds", must be smaller than or equal to 2147483647.') end if !@max_age_seconds.nil? && @max_age_seconds < -2147483648 invalid_properties.push('invalid value for "max_age_seconds", must be greater than or equal to -2147483648.') end if !@default_max_retries.nil? && @default_max_retries > 2147483647 invalid_properties.push('invalid value for "default_max_retries", must be smaller than or equal to 2147483647.') end if !@default_max_retries.nil? && @default_max_retries < -2147483648 invalid_properties.push('invalid value for "default_max_retries", must be greater than or equal to -2147483648.') end if !@allocated_cpu_units.nil? && @allocated_cpu_units > 2147483647 invalid_properties.push('invalid value for "allocated_cpu_units", must be smaller than or equal to 2147483647.') end if !@allocated_cpu_units.nil? && @allocated_cpu_units < -2147483648 invalid_properties.push('invalid value for "allocated_cpu_units", must be greater than or equal to -2147483648.') end if !@allocated_memory_mb.nil? && @allocated_memory_mb > 2147483647 invalid_properties.push('invalid value for "allocated_memory_mb", must be smaller than or equal to 2147483647.') end if !@allocated_memory_mb.nil? && @allocated_memory_mb < -2147483648 invalid_properties.push('invalid value for "allocated_memory_mb", must be greater than or equal to -2147483648.') end if !@ui_color.nil? && @ui_color.to_s.length > 16 invalid_properties.push('invalid value for "ui_color", the character length must be smaller than or equal to 16.') end if !@ui_icon_type.nil? && @ui_icon_type.to_s.length > 50 invalid_properties.push('invalid value for "ui_icon_type", the character length must be smaller than or equal to 50.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
657 658 659 |
# File 'lib/cloudreactor_api_client/models/workflow_task_instance.rb', line 657 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
663 664 665 666 667 668 669 670 671 672 673 674 675 |
# File 'lib/cloudreactor_api_client/models/workflow_task_instance.rb', line 663 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.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
651 652 653 |
# File 'lib/cloudreactor_api_client/models/workflow_task_instance.rb', line 651 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 |
# File 'lib/cloudreactor_api_client/models/workflow_task_instance.rb', line 379 def valid? return false if @name.nil? return false if @name.to_s.length > 200 return false if !@description.nil? && @description.to_s.length > 5000 return false if @workflow.nil? return false if @task.nil? return false if !@max_complete_executions.nil? && @max_complete_executions > 2147483647 return false if !@max_complete_executions.nil? && @max_complete_executions < -2147483648 return false if !@condition_count_threshold.nil? && @condition_count_threshold > 2147483647 return false if !@condition_count_threshold.nil? && @condition_count_threshold < -2147483648 return false if !@max_age_seconds.nil? && @max_age_seconds > 2147483647 return false if !@max_age_seconds.nil? && @max_age_seconds < -2147483648 return false if !@default_max_retries.nil? && @default_max_retries > 2147483647 return false if !@default_max_retries.nil? && @default_max_retries < -2147483648 return false if !@allocated_cpu_units.nil? && @allocated_cpu_units > 2147483647 return false if !@allocated_cpu_units.nil? && @allocated_cpu_units < -2147483648 return false if !@allocated_memory_mb.nil? && @allocated_memory_mb > 2147483647 return false if !@allocated_memory_mb.nil? && @allocated_memory_mb < -2147483648 return false if !@ui_color.nil? && @ui_color.to_s.length > 16 return false if !@ui_icon_type.nil? && @ui_icon_type.to_s.length > 50 true end |