Class: Retab::CancelWorkflowExperimentRunResponse
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Retab::CancelWorkflowExperimentRunResponse
- Defined in:
- lib/retab/experiment_runs/cancel_workflow_experiment_run_response.rb
Constant Summary collapse
- HASH_ATTRS =
{ id: :id, lifecycle: :lifecycle }.freeze
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#lifecycle ⇒ Object
Returns the value of attribute lifecycle.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ CancelWorkflowExperimentRunResponse
constructor
A new instance of CancelWorkflowExperimentRunResponse.
Methods inherited from Types::BaseModel
deep_symbolize, #inspect, normalize, #to_h, #to_json
Constructor Details
#initialize(json) ⇒ CancelWorkflowExperimentRunResponse
Returns a new instance of CancelWorkflowExperimentRunResponse.
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/retab/experiment_runs/cancel_workflow_experiment_run_response.rb', line 18 def initialize(json) super() hash = self.class.normalize(json) @id = hash[:id] @lifecycle = hash[:lifecycle] ? ( case hash[:lifecycle][:status] when "cancelled" Retab::CancelledWorkflowExperimentRun.new(hash[:lifecycle]) when "completed" Retab::CompletedWorkflowExperimentRun.new(hash[:lifecycle]) when "error" Retab::ErrorWorkflowExperimentRun.new(hash[:lifecycle]) when "pending" Retab::PendingWorkflowExperimentRun.new(hash[:lifecycle]) when "queued" Retab::QueuedWorkflowExperimentRun.new(hash[:lifecycle]) when "running" Retab::RunningWorkflowExperimentRun.new(hash[:lifecycle]) else hash[:lifecycle] end ) : nil end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
13 14 15 |
# File 'lib/retab/experiment_runs/cancel_workflow_experiment_run_response.rb', line 13 def id @id end |
#lifecycle ⇒ Object
Returns the value of attribute lifecycle.
13 14 15 |
# File 'lib/retab/experiment_runs/cancel_workflow_experiment_run_response.rb', line 13 def lifecycle @lifecycle end |