Class: IntersightClient::WorkflowWorkflowInfo

Inherits:
MoBaseMo
  • Object
show all
Defined in:
lib/intersight_client/models/workflow_workflow_info.rb

Overview

Contains information for a workflow execution which is a runtime instance of workflow.

Defined Under Namespace

Classes: EnumAttributeValidator

Instance Attribute Summary collapse

Attributes inherited from MoBaseMo

#account_moid, #ancestors, #create_time, #display_names, #domain_group_moid, #mod_time, #moid, #owners, #parent, #permission_resources, #shared_scope, #tags, #version_context

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ WorkflowWorkflowInfo

Initializes the object

Parameters:

  • (defaults to: {})

    Model attributes in the form of hash



280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
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
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
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
474
475
476
477
478
479
# File 'lib/intersight_client/models/workflow_workflow_info.rb', line 280

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `IntersightClient::WorkflowWorkflowInfo` 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
  }

  # call parent's initialize
  super(attributes)

  if attributes.key?(:'class_id')
    self.class_id = attributes[:'class_id']
  else
    self.class_id = 'workflow.WorkflowInfo'
  end

  if attributes.key?(:'object_type')
    self.object_type = attributes[:'object_type']
  else
    self.object_type = 'workflow.WorkflowInfo'
  end

  if attributes.key?(:'action')
    self.action = attributes[:'action']
  else
    self.action = 'None'
  end

  if attributes.key?(:'cleanup_time')
    self.cleanup_time = attributes[:'cleanup_time']
  end

  if attributes.key?(:'email')
    self.email = attributes[:'email']
  end

  if attributes.key?(:'end_time')
    self.end_time = attributes[:'end_time']
  end

  if attributes.key?(:'failed_workflow_cleanup_duration')
    self.failed_workflow_cleanup_duration = attributes[:'failed_workflow_cleanup_duration']
  else
    self.failed_workflow_cleanup_duration = 2160
  end

  if attributes.key?(:'input')
    self.input = attributes[:'input']
  end

  if attributes.key?(:'inst_id')
    self.inst_id = attributes[:'inst_id']
  end

  if attributes.key?(:'internal')
    self.internal = attributes[:'internal']
  end

  if attributes.key?(:'last_action')
    self.last_action = attributes[:'last_action']
  else
    self.last_action = 'None'
  end

  if attributes.key?(:'message')
    if (value = attributes[:'message']).is_a?(Array)
      self.message = value
    end
  end

  if attributes.key?(:'meta_version')
    self.meta_version = attributes[:'meta_version']
  end

  if attributes.key?(:'name')
    self.name = attributes[:'name']
  end

  if attributes.key?(:'output')
    self.output = attributes[:'output']
  end

  if attributes.key?(:'pause_reason')
    self.pause_reason = attributes[:'pause_reason']
  else
    self.pause_reason = 'None'
  end

  if attributes.key?(:'progress')
    self.progress = attributes[:'progress']
  end

  if attributes.key?(:'properties')
    self.properties = attributes[:'properties']
  end

  if attributes.key?(:'retry_from_task_name')
    self.retry_from_task_name = attributes[:'retry_from_task_name']
  end

  if attributes.key?(:'src')
    self.src = attributes[:'src']
  end

  if attributes.key?(:'start_time')
    self.start_time = attributes[:'start_time']
  end

  if attributes.key?(:'status')
    self.status = attributes[:'status']
  end

  if attributes.key?(:'success_workflow_cleanup_duration')
    self.success_workflow_cleanup_duration = attributes[:'success_workflow_cleanup_duration']
  else
    self.success_workflow_cleanup_duration = 2160
  end

  if attributes.key?(:'trace_id')
    self.trace_id = attributes[:'trace_id']
  end

  if attributes.key?(:'type')
    self.type = attributes[:'type']
  end

  if attributes.key?(:'user_action_required')
    self.user_action_required = attributes[:'user_action_required']
  else
    self.user_action_required = false
  end

  if attributes.key?(:'user_id')
    self.user_id = attributes[:'user_id']
  end

  if attributes.key?(:'wait_reason')
    self.wait_reason = attributes[:'wait_reason']
  else
    self.wait_reason = 'None'
  end

  if attributes.key?(:'workflow_ctx')
    self.workflow_ctx = attributes[:'workflow_ctx']
  end

  if attributes.key?(:'workflow_meta_type')
    self.workflow_meta_type = attributes[:'workflow_meta_type']
  else
    self.workflow_meta_type = 'SystemDefined'
  end

  if attributes.key?(:'workflow_task_count')
    self.workflow_task_count = attributes[:'workflow_task_count']
  end

  if attributes.key?(:'workflow_worker_task_count')
    self.workflow_worker_task_count = attributes[:'workflow_worker_task_count']
  end

  if attributes.key?(:'account')
    self. = attributes[:'account']
  end

  if attributes.key?(:'associated_object')
    self.associated_object = attributes[:'associated_object']
  end

  if attributes.key?(:'organization')
    self.organization = attributes[:'organization']
  end

  if attributes.key?(:'parent_task_info')
    self.parent_task_info = attributes[:'parent_task_info']
  end

  if attributes.key?(:'pending_dynamic_workflow_info')
    self.pending_dynamic_workflow_info = attributes[:'pending_dynamic_workflow_info']
  end

  if attributes.key?(:'permission')
    self.permission = attributes[:'permission']
  end

  if attributes.key?(:'task_infos')
    if (value = attributes[:'task_infos']).is_a?(Array)
      self.task_infos = value
    end
  end

  if attributes.key?(:'workflow_definition')
    self.workflow_definition = attributes[:'workflow_definition']
  end
end

Instance Attribute Details

#accountObject

Returns the value of attribute account.



112
113
114
# File 'lib/intersight_client/models/workflow_workflow_info.rb', line 112

def 
  @account
end

#actionObject

The action of the workflow such as start, cancel, retry, pause. * None - No action is set, this is the default value for action field. * Create - Create a new instance of the workflow but it does not start the execution of the workflow. Use the Start action to start execution of the workflow. * Start - Start a new execution of the workflow. * Pause - Pause the workflow, this can only be issued on workflows that are in running state. * Resume - Resume the workflow which was previously paused through pause action on the workflow. * Retry - Retry the workflow that has previously reached a final state and has the retryable property set to true. A running or waiting workflow cannot be retried. If the property retryFromTaskName is also passed along with this action, the workflow will be started from that specific task, otherwise the workflow will be restarted from the first task. The task name in retryFromTaskName must be one of the tasks that completed or failed in the previous run. It is not possible to retry a workflow from a task which wasn’t run in the previous iteration. * RetryFailed - Retry the workflow that has failed. A running or waiting workflow or a workflow that completed successfully cannot be retried. Only the tasks that failed in the previous run will be retried and the rest of workflow will be run. This action does not restart the workflow and also does not support retrying from a specific task. * Cancel - Cancel the workflow that is in running or waiting state.



26
27
28
# File 'lib/intersight_client/models/workflow_workflow_info.rb', line 26

def action
  @action
end

#associated_objectObject

Returns the value of attribute associated_object.



114
115
116
# File 'lib/intersight_client/models/workflow_workflow_info.rb', line 114

def associated_object
  @associated_object
end

#class_idObject

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_workflow_info.rb', line 20

def class_id
  @class_id
end

#cleanup_timeObject

The time when the workflow info will be removed from database.



29
30
31
# File 'lib/intersight_client/models/workflow_workflow_info.rb', line 29

def cleanup_time
  @cleanup_time
end

#emailObject

The email address of the user who started this workflow.



32
33
34
# File 'lib/intersight_client/models/workflow_workflow_info.rb', line 32

def email
  @email
end

#end_timeObject

The time when the workflow reached a final state.



35
36
37
# File 'lib/intersight_client/models/workflow_workflow_info.rb', line 35

def end_time
  @end_time
end

#failed_workflow_cleanup_durationObject

The duration in hours after which the workflow info for failed, terminated or timed out workflow will be removed from database.



38
39
40
# File 'lib/intersight_client/models/workflow_workflow_info.rb', line 38

def failed_workflow_cleanup_duration
  @failed_workflow_cleanup_duration
end

#inputObject

All the given inputs for the workflow.



41
42
43
# File 'lib/intersight_client/models/workflow_workflow_info.rb', line 41

def input
  @input
end

#inst_idObject

A workflow instance Id which is the unique identified for the workflow execution.



44
45
46
# File 'lib/intersight_client/models/workflow_workflow_info.rb', line 44

def inst_id
  @inst_id
end

#internalObject

Denotes if this workflow is internal and should be hidden from user view of running workflows.



47
48
49
# File 'lib/intersight_client/models/workflow_workflow_info.rb', line 47

def internal
  @internal
end

#last_actionObject

The last action that was issued on the workflow is saved in this field. * None - No action is set, this is the default value for action field. * Create - Create a new instance of the workflow but it does not start the execution of the workflow. Use the Start action to start execution of the workflow. * Start - Start a new execution of the workflow. * Pause - Pause the workflow, this can only be issued on workflows that are in running state. * Resume - Resume the workflow which was previously paused through pause action on the workflow. * Retry - Retry the workflow that has previously reached a final state and has the retryable property set to true. A running or waiting workflow cannot be retried. If the property retryFromTaskName is also passed along with this action, the workflow will be started from that specific task, otherwise the workflow will be restarted from the first task. The task name in retryFromTaskName must be one of the tasks that completed or failed in the previous run. It is not possible to retry a workflow from a task which wasn’t run in the previous iteration. * RetryFailed - Retry the workflow that has failed. A running or waiting workflow or a workflow that completed successfully cannot be retried. Only the tasks that failed in the previous run will be retried and the rest of workflow will be run. This action does not restart the workflow and also does not support retrying from a specific task. * Cancel - Cancel the workflow that is in running or waiting state.



50
51
52
# File 'lib/intersight_client/models/workflow_workflow_info.rb', line 50

def last_action
  @last_action
end

#messageObject

Returns the value of attribute message.



52
53
54
# File 'lib/intersight_client/models/workflow_workflow_info.rb', line 52

def message
  @message
end

#meta_versionObject

Version of the workflow metadata for which this workflow execution was started.



55
56
57
# File 'lib/intersight_client/models/workflow_workflow_info.rb', line 55

def meta_version
  @meta_version
end

#nameObject

A name of the workflow execution instance.



58
59
60
# File 'lib/intersight_client/models/workflow_workflow_info.rb', line 58

def name
  @name
end

#object_typeObject

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_workflow_info.rb', line 23

def object_type
  @object_type
end

#organizationObject

Returns the value of attribute organization.



116
117
118
# File 'lib/intersight_client/models/workflow_workflow_info.rb', line 116

def organization
  @organization
end

#outputObject

All the generated outputs for the workflow.



61
62
63
# File 'lib/intersight_client/models/workflow_workflow_info.rb', line 61

def output
  @output
end

#parent_task_infoObject

Returns the value of attribute parent_task_info.



118
119
120
# File 'lib/intersight_client/models/workflow_workflow_info.rb', line 118

def parent_task_info
  @parent_task_info
end

#pause_reasonObject

Denotes the reason workflow is in paused status. * None - Pause reason is none, which indicates there is no reason for the pause state. * TaskWithWarning - Pause reason indicates the workflow is in this state due to a task that has a status as completed with warnings. * SystemMaintenance - Pause reason indicates the workflow is in this state based on actions of system admin for maintenance.



64
65
66
# File 'lib/intersight_client/models/workflow_workflow_info.rb', line 64

def pause_reason
  @pause_reason
end

#pending_dynamic_workflow_infoObject

Returns the value of attribute pending_dynamic_workflow_info.



120
121
122
# File 'lib/intersight_client/models/workflow_workflow_info.rb', line 120

def pending_dynamic_workflow_info
  @pending_dynamic_workflow_info
end

#permissionObject

Returns the value of attribute permission.



122
123
124
# File 'lib/intersight_client/models/workflow_workflow_info.rb', line 122

def permission
  @permission
end

#progressObject

This field indicates percentage of workflow task execution.



67
68
69
# File 'lib/intersight_client/models/workflow_workflow_info.rb', line 67

def progress
  @progress
end

#propertiesObject

Returns the value of attribute properties.



69
70
71
# File 'lib/intersight_client/models/workflow_workflow_info.rb', line 69

def properties
  @properties
end

#retry_from_task_nameObject

This field is applicable when Retry action is issued for a workflow which is in ‘final’ state. When this field is not specified, the workflow will be retried from the start i.e., the first task. When this field is specified then the workflow will be retried from the specified task. This field should specify the task name which is the unique name of the task within the workflow. The task name must be one of the tasks that completed or failed in the previous run. It is not possible to retry a workflow from a task which wasn’t run in the previous iteration.



72
73
74
# File 'lib/intersight_client/models/workflow_workflow_info.rb', line 72

def retry_from_task_name
  @retry_from_task_name
end

#srcObject

The source microservice name which is the owner for this workflow.



75
76
77
# File 'lib/intersight_client/models/workflow_workflow_info.rb', line 75

def src
  @src
end

#start_timeObject

The time when the workflow was started for execution.



78
79
80
# File 'lib/intersight_client/models/workflow_workflow_info.rb', line 78

def start_time
  @start_time
end

#statusObject

A status of the workflow (RUNNING, WAITING, COMPLETED, TIME_OUT, FAILED).



81
82
83
# File 'lib/intersight_client/models/workflow_workflow_info.rb', line 81

def status
  @status
end

#success_workflow_cleanup_durationObject

The duration in hours after which the workflow info for successful workflow will be removed from database.



84
85
86
# File 'lib/intersight_client/models/workflow_workflow_info.rb', line 84

def success_workflow_cleanup_duration
  @success_workflow_cleanup_duration
end

#task_infosObject

An array of relationships to workflowTaskInfo resources.



125
126
127
# File 'lib/intersight_client/models/workflow_workflow_info.rb', line 125

def task_infos
  @task_infos
end

#trace_idObject

The trace id to keep track of workflow execution.



87
88
89
# File 'lib/intersight_client/models/workflow_workflow_info.rb', line 87

def trace_id
  @trace_id
end

#typeObject

A type of the workflow (serverconfig, ansible_monitoring).



90
91
92
# File 'lib/intersight_client/models/workflow_workflow_info.rb', line 90

def type
  @type
end

#user_action_requiredObject

Property will be set when an user action is required on the workflow. This can be because the workflow is waiting for a wait task to be updated, workflow is paused or workflow launched by a configuration object has failed and needs to be retried in order to complete successfully.



93
94
95
# File 'lib/intersight_client/models/workflow_workflow_info.rb', line 93

def user_action_required
  @user_action_required
end

#user_idObject

The user identifier which indicates the user that started this workflow.



96
97
98
# File 'lib/intersight_client/models/workflow_workflow_info.rb', line 96

def user_id
  @user_id
end

#wait_reasonObject

Denotes the reason workflow is in waiting status. * None - Wait reason is none, which indicates there is no reason for the waiting state. * GatherTasks - Wait reason is gathering tasks, which indicates the workflow is in this state in order to gather tasks. * Duplicate - Wait reason is duplicate, which indicates the workflow is a duplicate of current running workflow. * RateLimit - Wait reason is rate limit, which indicates the workflow is rate limited by account/instance level throttling threshold. * WaitTask - Wait reason when there are one or more wait tasks in the workflow which are yet to receive a task status update. * PendingRetryFailed - Wait reason when the workflow is pending a RetryFailed action. * WaitingToStart - Workflow is waiting to start on workflow engine.



99
100
101
# File 'lib/intersight_client/models/workflow_workflow_info.rb', line 99

def wait_reason
  @wait_reason
end

#workflow_ctxObject

Returns the value of attribute workflow_ctx.



101
102
103
# File 'lib/intersight_client/models/workflow_workflow_info.rb', line 101

def workflow_ctx
  @workflow_ctx
end

#workflow_definitionObject

Returns the value of attribute workflow_definition.



127
128
129
# File 'lib/intersight_client/models/workflow_workflow_info.rb', line 127

def workflow_definition
  @workflow_definition
end

#workflow_meta_typeObject

The type of workflow meta. Derived from the workflow meta that is used to launch this workflow instance. * SystemDefined - System defined workflow definition. * UserDefined - User defined workflow definition. * Dynamic - Dynamically defined workflow definition.



104
105
106
# File 'lib/intersight_client/models/workflow_workflow_info.rb', line 104

def workflow_meta_type
  @workflow_meta_type
end

#workflow_task_countObject

Total number of workflow tasks in this workflow.



107
108
109
# File 'lib/intersight_client/models/workflow_workflow_info.rb', line 107

def workflow_task_count
  @workflow_task_count
end

#workflow_worker_task_countObject

Total number of worker tasks in this workflow. This count doesn’t include the control tasks in the workflow.



110
111
112
# File 'lib/intersight_client/models/workflow_workflow_info.rb', line 110

def workflow_worker_task_count
  @workflow_worker_task_count
end

Class Method Details

.acceptable_attribute_mapObject

Returns the key-value map of all the JSON attributes this model knows about, including the ones defined in its parent(s)



203
204
205
# File 'lib/intersight_client/models/workflow_workflow_info.rb', line 203

def self.acceptable_attribute_map
  attribute_map.merge(superclass.acceptable_attribute_map)
end

.acceptable_attributesObject

Returns all the JSON keys this model knows about, including the ones defined in its parent(s)



198
199
200
# File 'lib/intersight_client/models/workflow_workflow_info.rb', line 198

def self.acceptable_attributes
  attribute_map.values.concat(superclass.acceptable_attributes)
end

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



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
# File 'lib/intersight_client/models/workflow_workflow_info.rb', line 152

def self.attribute_map
  {
    :'class_id' => :'ClassId',
    :'object_type' => :'ObjectType',
    :'action' => :'Action',
    :'cleanup_time' => :'CleanupTime',
    :'email' => :'Email',
    :'end_time' => :'EndTime',
    :'failed_workflow_cleanup_duration' => :'FailedWorkflowCleanupDuration',
    :'input' => :'Input',
    :'inst_id' => :'InstId',
    :'internal' => :'Internal',
    :'last_action' => :'LastAction',
    :'message' => :'Message',
    :'meta_version' => :'MetaVersion',
    :'name' => :'Name',
    :'output' => :'Output',
    :'pause_reason' => :'PauseReason',
    :'progress' => :'Progress',
    :'properties' => :'Properties',
    :'retry_from_task_name' => :'RetryFromTaskName',
    :'src' => :'Src',
    :'start_time' => :'StartTime',
    :'status' => :'Status',
    :'success_workflow_cleanup_duration' => :'SuccessWorkflowCleanupDuration',
    :'trace_id' => :'TraceId',
    :'type' => :'Type',
    :'user_action_required' => :'UserActionRequired',
    :'user_id' => :'UserId',
    :'wait_reason' => :'WaitReason',
    :'workflow_ctx' => :'WorkflowCtx',
    :'workflow_meta_type' => :'WorkflowMetaType',
    :'workflow_task_count' => :'WorkflowTaskCount',
    :'workflow_worker_task_count' => :'WorkflowWorkerTaskCount',
    :'account' => :'Account',
    :'associated_object' => :'AssociatedObject',
    :'organization' => :'Organization',
    :'parent_task_info' => :'ParentTaskInfo',
    :'pending_dynamic_workflow_info' => :'PendingDynamicWorkflowInfo',
    :'permission' => :'Permission',
    :'task_infos' => :'TaskInfos',
    :'workflow_definition' => :'WorkflowDefinition'
  }
end

.build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • Model attributes in the form of hash

Returns:

  • Returns the model itself



684
685
686
# File 'lib/intersight_client/models/workflow_workflow_info.rb', line 684

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

.openapi_all_ofObject

List of class defined in allOf (OpenAPI v3)



266
267
268
269
270
271
# File 'lib/intersight_client/models/workflow_workflow_info.rb', line 266

def self.openapi_all_of
  [
  :'MoBaseMo',
  :'WorkflowWorkflowInfoAllOf'
  ]
end

.openapi_discriminator_nameObject

discriminator’s property name in OpenAPI v3



274
275
276
# File 'lib/intersight_client/models/workflow_workflow_info.rb', line 274

def self.openapi_discriminator_name
  :'ClassId'
end

.openapi_nullableObject

List of attributes with nullable: true



254
255
256
257
258
259
260
261
262
263
# File 'lib/intersight_client/models/workflow_workflow_info.rb', line 254

def self.openapi_nullable
  Set.new([
    :'input',
    :'message',
    :'output',
    :'properties',
    :'workflow_ctx',
    :'task_infos',
  ])
end

.openapi_typesObject

Attribute type mapping.



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
# File 'lib/intersight_client/models/workflow_workflow_info.rb', line 208

def self.openapi_types
  {
    :'class_id' => :'String',
    :'object_type' => :'String',
    :'action' => :'String',
    :'cleanup_time' => :'Time',
    :'email' => :'String',
    :'end_time' => :'Time',
    :'failed_workflow_cleanup_duration' => :'Integer',
    :'input' => :'Object',
    :'inst_id' => :'String',
    :'internal' => :'Boolean',
    :'last_action' => :'String',
    :'message' => :'Array<WorkflowMessage>',
    :'meta_version' => :'Integer',
    :'name' => :'String',
    :'output' => :'Object',
    :'pause_reason' => :'String',
    :'progress' => :'Float',
    :'properties' => :'WorkflowWorkflowInfoProperties',
    :'retry_from_task_name' => :'String',
    :'src' => :'String',
    :'start_time' => :'Time',
    :'status' => :'String',
    :'success_workflow_cleanup_duration' => :'Integer',
    :'trace_id' => :'String',
    :'type' => :'String',
    :'user_action_required' => :'Boolean',
    :'user_id' => :'String',
    :'wait_reason' => :'String',
    :'workflow_ctx' => :'WorkflowWorkflowCtx',
    :'workflow_meta_type' => :'String',
    :'workflow_task_count' => :'Integer',
    :'workflow_worker_task_count' => :'Integer',
    :'account' => :'IamAccountRelationship',
    :'associated_object' => :'MoBaseMoRelationship',
    :'organization' => :'OrganizationOrganizationRelationship',
    :'parent_task_info' => :'WorkflowTaskInfoRelationship',
    :'pending_dynamic_workflow_info' => :'WorkflowPendingDynamicWorkflowInfoRelationship',
    :'permission' => :'IamPermissionRelationship',
    :'task_infos' => :'Array<WorkflowTaskInfoRelationship>',
    :'workflow_definition' => :'WorkflowWorkflowDefinitionRelationship'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • to be compared



624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
# File 'lib/intersight_client/models/workflow_workflow_info.rb', line 624

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      class_id == o.class_id &&
      object_type == o.object_type &&
      action == o.action &&
      cleanup_time == o.cleanup_time &&
      email == o.email &&
      end_time == o.end_time &&
      failed_workflow_cleanup_duration == o.failed_workflow_cleanup_duration &&
      input == o.input &&
      inst_id == o.inst_id &&
      internal == o.internal &&
      last_action == o.last_action &&
      message == o.message &&
      meta_version == o.meta_version &&
      name == o.name &&
      output == o.output &&
      pause_reason == o.pause_reason &&
      progress == o.progress &&
      properties == o.properties &&
      retry_from_task_name == o.retry_from_task_name &&
      src == o.src &&
      start_time == o.start_time &&
      status == o.status &&
      success_workflow_cleanup_duration == o.success_workflow_cleanup_duration &&
      trace_id == o.trace_id &&
      type == o.type &&
      user_action_required == o.user_action_required &&
      user_id == o.user_id &&
      wait_reason == o.wait_reason &&
      workflow_ctx == o.workflow_ctx &&
      workflow_meta_type == o.workflow_meta_type &&
      workflow_task_count == o.workflow_task_count &&
      workflow_worker_task_count == o.workflow_worker_task_count &&
       == o. &&
      associated_object == o.associated_object &&
      organization == o.organization &&
      parent_task_info == o.parent_task_info &&
      pending_dynamic_workflow_info == o.pending_dynamic_workflow_info &&
      permission == o.permission &&
      task_infos == o.task_infos &&
      workflow_definition == o.workflow_definition && super(o)
end

#_deserialize(type, value) ⇒ Object

Deserializes the data based on type

Parameters:

  • type Data type

  • value Value to be deserialized

Returns:

  • Deserialized data



715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
# File 'lib/intersight_client/models/workflow_workflow_info.rb', line 715

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

Parameters:

  • Any valid value

Returns:

  • Returns the value in the form of hash



786
787
788
789
790
791
792
793
794
795
796
797
798
# File 'lib/intersight_client/models/workflow_workflow_info.rb', line 786

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:

  • Model attributes in the form of hash

Returns:

  • Returns the model itself



691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
# File 'lib/intersight_client/models/workflow_workflow_info.rb', line 691

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  super(attributes)
  WorkflowWorkflowInfo.openapi_types.each_pair do |key, type|
    if attributes[WorkflowWorkflowInfo.attribute_map[key]].nil? && WorkflowWorkflowInfo.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[WorkflowWorkflowInfo.attribute_map[key]].is_a?(Array)
        self.send("#{key}=", attributes[WorkflowWorkflowInfo.attribute_map[key]].map { |v| _deserialize($1, v) })
      end
    elsif !attributes[WorkflowWorkflowInfo.attribute_map[key]].nil?
      self.send("#{key}=", _deserialize(type, attributes[WorkflowWorkflowInfo.attribute_map[key]]))
    end
  end

  self
end

#eql?(o) ⇒ Boolean

Parameters:

  • to be compared

Returns:

See Also:

  • `==` method


671
672
673
# File 'lib/intersight_client/models/workflow_workflow_info.rb', line 671

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • Hash code



677
678
679
# File 'lib/intersight_client/models/workflow_workflow_info.rb', line 677

def hash
  [class_id, object_type, action, cleanup_time, email, end_time, failed_workflow_cleanup_duration, input, inst_id, internal, last_action, message, meta_version, name, output, pause_reason, progress, properties, retry_from_task_name, src, start_time, status, success_workflow_cleanup_duration, trace_id, type, user_action_required, user_id, wait_reason, workflow_ctx, workflow_meta_type, workflow_task_count, workflow_worker_task_count, , associated_object, organization, parent_task_info, pending_dynamic_workflow_info, permission, task_infos, workflow_definition].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
# File 'lib/intersight_client/models/workflow_workflow_info.rb', line 483

def list_invalid_properties
  invalid_properties = super
  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.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?)*$/)
  if !@email.nil? && @email !~ pattern
    invalid_properties.push("invalid value for \"email\", must conform to the pattern #{pattern}.")
  end

  pattern = Regexp.new(/^[^:]{1,92}$/)
  if !@name.nil? && @name !~ pattern
    invalid_properties.push("invalid value for \"name\", must conform to the pattern #{pattern}.")
  end

  invalid_properties
end

#to_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • Returns the object in the form of hash



762
763
764
# File 'lib/intersight_client/models/workflow_workflow_info.rb', line 762

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • Returns the object in the form of hash



768
769
770
771
772
773
774
775
776
777
778
779
780
# File 'lib/intersight_client/models/workflow_workflow_info.rb', line 768

def to_hash
  hash = super
  WorkflowWorkflowInfo.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    if value.nil?
      is_nullable = WorkflowWorkflowInfo.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 presentation of the object



756
757
758
# File 'lib/intersight_client/models/workflow_workflow_info.rb', line 756

def to_s
  to_hash.to_s
end

#valid?Boolean

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

Returns:

  • true if the model is valid



508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
# File 'lib/intersight_client/models/workflow_workflow_info.rb', line 508

def valid?
  return false if @class_id.nil?
  class_id_validator = EnumAttributeValidator.new('String', ["workflow.WorkflowInfo"])
  return false unless class_id_validator.valid?(@class_id)
  return false if @object_type.nil?
  object_type_validator = EnumAttributeValidator.new('String', ["workflow.WorkflowInfo"])
  return false unless object_type_validator.valid?(@object_type)
  action_validator = EnumAttributeValidator.new('String', ["None", "Create", "Start", "Pause", "Resume", "Retry", "RetryFailed", "Cancel"])
  return false unless action_validator.valid?(@action)
  return false if !@email.nil? && @email !~ Regexp.new(/^$|^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?)*$/)
  last_action_validator = EnumAttributeValidator.new('String', ["None", "Create", "Start", "Pause", "Resume", "Retry", "RetryFailed", "Cancel"])
  return false unless last_action_validator.valid?(@last_action)
  return false if !@name.nil? && @name !~ Regexp.new(/^[^:]{1,92}$/)
  pause_reason_validator = EnumAttributeValidator.new('String', ["None", "TaskWithWarning", "SystemMaintenance"])
  return false unless pause_reason_validator.valid?(@pause_reason)
  wait_reason_validator = EnumAttributeValidator.new('String', ["None", "GatherTasks", "Duplicate", "RateLimit", "WaitTask", "PendingRetryFailed", "WaitingToStart"])
  return false unless wait_reason_validator.valid?(@wait_reason)
  workflow_meta_type_validator = EnumAttributeValidator.new('String', ["SystemDefined", "UserDefined", "Dynamic"])
  return false unless workflow_meta_type_validator.valid?(@workflow_meta_type)
  true && super
end