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
#inspect, normalize, #to_h, #to_json
Constructor Details
#initialize(json) ⇒ CancelWorkflowExperimentRunResponse
Returns a new instance of CancelWorkflowExperimentRunResponse.
17 18 19 20 21 |
# File 'lib/retab/experiment_runs/cancel_workflow_experiment_run_response.rb', line 17 def initialize(json) hash = self.class.normalize(json) @id = hash[:id] @lifecycle = hash[:lifecycle] ? (case hash[:lifecycle][:status] when "cancelled" then Retab::CancelledWorkflowExperimentRun.new(hash[:lifecycle]) when "completed" then Retab::CompletedWorkflowExperimentRun.new(hash[:lifecycle]) when "error" then Retab::ErrorWorkflowExperimentRun.new(hash[:lifecycle]) when "pending" then Retab::PendingWorkflowExperimentRun.new(hash[:lifecycle]) when "queued" then Retab::QueuedWorkflowExperimentRun.new(hash[:lifecycle]) when "running" then 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 |