Class: CloudReactorAPIClient::PatchedWorkflowTaskInstance

Inherits:
Object
  • Object
show all
Defined in:
lib/cloudreactor_api_client/models/patched_workflow_task_instance.rb

Overview

A WorkflowTaskInstance contains a Task that is configured to run in a Workflow.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ PatchedWorkflowTaskInstance

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



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/patched_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::PatchedWorkflowTaskInstance` 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::PatchedWorkflowTaskInstance`. 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_unitsObject

Returns the value of attribute allocated_cpu_units.



55
56
57
# File 'lib/cloudreactor_api_client/models/patched_workflow_task_instance.rb', line 55

def allocated_cpu_units
  @allocated_cpu_units
end

#allocated_memory_mbObject

Returns the value of attribute allocated_memory_mb.



57
58
59
# File 'lib/cloudreactor_api_client/models/patched_workflow_task_instance.rb', line 57

def allocated_memory_mb
  @allocated_memory_mb
end

#allow_workflow_execution_after_failureObject

Returns the value of attribute allow_workflow_execution_after_failure.



47
48
49
# File 'lib/cloudreactor_api_client/models/patched_workflow_task_instance.rb', line 47

def allow_workflow_execution_after_failure
  @allow_workflow_execution_after_failure
end

#allow_workflow_execution_after_timeoutObject

Returns the value of attribute allow_workflow_execution_after_timeout.



51
52
53
# File 'lib/cloudreactor_api_client/models/patched_workflow_task_instance.rb', line 51

def allow_workflow_execution_after_timeout
  @allow_workflow_execution_after_timeout
end

#condition_count_thresholdObject

Returns the value of attribute condition_count_threshold.



37
38
39
# File 'lib/cloudreactor_api_client/models/patched_workflow_task_instance.rb', line 37

def condition_count_threshold
  @condition_count_threshold
end

#condition_ratio_thresholdObject

Returns the value of attribute condition_ratio_threshold.



39
40
41
# File 'lib/cloudreactor_api_client/models/patched_workflow_task_instance.rb', line 39

def condition_ratio_threshold
  @condition_ratio_threshold
end

#created_atObject

Returns the value of attribute created_at.



71
72
73
# File 'lib/cloudreactor_api_client/models/patched_workflow_task_instance.rb', line 71

def created_at
  @created_at
end

#default_max_retriesObject

Returns the value of attribute default_max_retries.



43
44
45
# File 'lib/cloudreactor_api_client/models/patched_workflow_task_instance.rb', line 43

def default_max_retries
  @default_max_retries
end

#descriptionObject

Returns the value of attribute description.



25
26
27
# File 'lib/cloudreactor_api_client/models/patched_workflow_task_instance.rb', line 25

def description
  @description
end

#environment_variables_overridesObject

Returns the value of attribute environment_variables_overrides.



53
54
55
# File 'lib/cloudreactor_api_client/models/patched_workflow_task_instance.rb', line 53

def environment_variables_overrides
  @environment_variables_overrides
end

#failure_behaviorObject

Returns the value of attribute failure_behavior.



45
46
47
# File 'lib/cloudreactor_api_client/models/patched_workflow_task_instance.rb', line 45

def failure_behavior
  @failure_behavior
end

#max_age_secondsObject

Returns the value of attribute max_age_seconds.



41
42
43
# File 'lib/cloudreactor_api_client/models/patched_workflow_task_instance.rb', line 41

def max_age_seconds
  @max_age_seconds
end

#max_complete_executionsObject

Returns the value of attribute max_complete_executions.



33
34
35
# File 'lib/cloudreactor_api_client/models/patched_workflow_task_instance.rb', line 33

def max_complete_executions
  @max_complete_executions
end

#nameObject

Returns the value of attribute name.



23
24
25
# File 'lib/cloudreactor_api_client/models/patched_workflow_task_instance.rb', line 23

def name
  @name
end

#should_eval_transitions_after_first_executionObject

Returns the value of attribute should_eval_transitions_after_first_execution.



35
36
37
# File 'lib/cloudreactor_api_client/models/patched_workflow_task_instance.rb', line 35

def should_eval_transitions_after_first_execution
  @should_eval_transitions_after_first_execution
end

#start_transition_conditionObject

Returns the value of attribute start_transition_condition.



31
32
33
# File 'lib/cloudreactor_api_client/models/patched_workflow_task_instance.rb', line 31

def start_transition_condition
  @start_transition_condition
end

#taskObject

Returns the value of attribute task.



29
30
31
# File 'lib/cloudreactor_api_client/models/patched_workflow_task_instance.rb', line 29

def task
  @task
end

#timeout_behaviorObject

Returns the value of attribute timeout_behavior.



49
50
51
# File 'lib/cloudreactor_api_client/models/patched_workflow_task_instance.rb', line 49

def timeout_behavior
  @timeout_behavior
end

#ui_center_margin_leftObject

Returns the value of attribute ui_center_margin_left.



69
70
71
# File 'lib/cloudreactor_api_client/models/patched_workflow_task_instance.rb', line 69

def ui_center_margin_left
  @ui_center_margin_left
end

#ui_center_margin_topObject

Returns the value of attribute ui_center_margin_top.



67
68
69
# File 'lib/cloudreactor_api_client/models/patched_workflow_task_instance.rb', line 67

def ui_center_margin_top
  @ui_center_margin_top
end

#ui_colorObject

Returns the value of attribute ui_color.



61
62
63
# File 'lib/cloudreactor_api_client/models/patched_workflow_task_instance.rb', line 61

def ui_color
  @ui_color
end

#ui_icon_typeObject

Returns the value of attribute ui_icon_type.



63
64
65
# File 'lib/cloudreactor_api_client/models/patched_workflow_task_instance.rb', line 63

def ui_icon_type
  @ui_icon_type
end

#ui_scaleObject

Returns the value of attribute ui_scale.



65
66
67
# File 'lib/cloudreactor_api_client/models/patched_workflow_task_instance.rb', line 65

def ui_scale
  @ui_scale
end

#updated_atObject

Returns the value of attribute updated_at.



73
74
75
# File 'lib/cloudreactor_api_client/models/patched_workflow_task_instance.rb', line 73

def updated_at
  @updated_at
end

#urlObject

Returns the value of attribute url.



19
20
21
# File 'lib/cloudreactor_api_client/models/patched_workflow_task_instance.rb', line 19

def url
  @url
end

#use_task_alert_methodsObject

Returns the value of attribute use_task_alert_methods.



59
60
61
# File 'lib/cloudreactor_api_client/models/patched_workflow_task_instance.rb', line 59

def use_task_alert_methods
  @use_task_alert_methods
end

#uuidObject

Returns the value of attribute uuid.



21
22
23
# File 'lib/cloudreactor_api_client/models/patched_workflow_task_instance.rb', line 21

def uuid
  @uuid
end

#workflowObject

Returns the value of attribute workflow.



27
28
29
# File 'lib/cloudreactor_api_client/models/patched_workflow_task_instance.rb', line 27

def workflow
  @workflow
end

Class Method Details

.acceptable_attributesObject

Returns all the JSON keys this model knows about



110
111
112
# File 'lib/cloudreactor_api_client/models/patched_workflow_task_instance.rb', line 110

def self.acceptable_attributes
  attribute_map.values
end

.attribute_mapObject

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/patched_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

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



561
562
563
# File 'lib/cloudreactor_api_client/models/patched_workflow_task_instance.rb', line 561

def self.build_from_hash(attributes)
  new.build_from_hash(attributes)
end

.openapi_nullableObject

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/patched_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_typesObject

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/patched_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.

Parameters:

  • Object (Object)

    to be compared



513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
# File 'lib/cloudreactor_api_client/models/patched_workflow_task_instance.rb', line 513

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

Parameters:

  • string

    type Data type

  • string

    value Value to be deserialized

Returns:

  • (Object)

    Deserialized data



591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
# File 'lib/cloudreactor_api_client/models/patched_workflow_task_instance.rb', line 591

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

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



662
663
664
665
666
667
668
669
670
671
672
673
674
# File 'lib/cloudreactor_api_client/models/patched_workflow_task_instance.rb', line 662

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

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
# File 'lib/cloudreactor_api_client/models/patched_workflow_task_instance.rb', line 568

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

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


548
549
550
# File 'lib/cloudreactor_api_client/models/patched_workflow_task_instance.rb', line 548

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



554
555
556
# File 'lib/cloudreactor_api_client/models/patched_workflow_task_instance.rb', line 554

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_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



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
# File 'lib/cloudreactor_api_client/models/patched_workflow_task_instance.rb', line 296

def list_invalid_properties
  invalid_properties = Array.new
  if !@name.nil? && @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 !@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_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • (Hash)

    Returns the object in the form of hash



638
639
640
# File 'lib/cloudreactor_api_client/models/patched_workflow_task_instance.rb', line 638

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



644
645
646
647
648
649
650
651
652
653
654
655
656
# File 'lib/cloudreactor_api_client/models/patched_workflow_task_instance.rb', line 644

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_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



632
633
634
# File 'lib/cloudreactor_api_client/models/patched_workflow_task_instance.rb', line 632

def to_s
  to_hash.to_s
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
# File 'lib/cloudreactor_api_client/models/patched_workflow_task_instance.rb', line 367

def valid?
  return false if !@name.nil? && @name.to_s.length > 200
  return false if !@description.nil? && @description.to_s.length > 5000
  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