Class: Rafflesia::Episode
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::Episode
- Defined in:
- lib/rafflesia/episodes/episode.rb
Constant Summary collapse
- HASH_ATTRS =
{ active_seconds: :active_seconds, artifact_ids: :artifact_ids, attempt_count: :attempt_count, completed_at: :completed_at, created_at: :created_at, current_attempt_id: :current_attempt_id, environment_id: :environment_id, environment_release_id: :environment_release_id, environment_task_id: :environment_task_id, execution: :execution, grade: :grade, id: :id, is_cancel_requested: :is_cancel_requested, is_livemode: :is_livemode, last_error: :last_error, metadata: :metadata, object: :object, organization_id: :organization_id, origin: :origin, provider: :provider, rollout_group_id: :rollout_group_id, runtime_profile_id: :runtime_profile_id, seed: :seed, status: :status, timeout_seconds: :timeout_seconds, updated_at: :updated_at }.freeze
Instance Attribute Summary collapse
-
#active_seconds ⇒ Object
Returns the value of attribute active_seconds.
-
#artifact_ids ⇒ Object
Returns the value of attribute artifact_ids.
-
#attempt_count ⇒ Object
Returns the value of attribute attempt_count.
-
#completed_at ⇒ Object
Returns the value of attribute completed_at.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#current_attempt_id ⇒ Object
Returns the value of attribute current_attempt_id.
-
#environment_id ⇒ Object
Returns the value of attribute environment_id.
-
#environment_release_id ⇒ Object
Returns the value of attribute environment_release_id.
-
#environment_task_id ⇒ Object
Returns the value of attribute environment_task_id.
-
#execution ⇒ Object
Returns the value of attribute execution.
-
#grade ⇒ Object
Returns the value of attribute grade.
-
#id ⇒ Object
Returns the value of attribute id.
-
#is_cancel_requested ⇒ Object
Returns the value of attribute is_cancel_requested.
-
#is_livemode ⇒ Object
Returns the value of attribute is_livemode.
-
#last_error ⇒ Object
Returns the value of attribute last_error.
-
#metadata ⇒ Object
Returns the value of attribute metadata.
-
#object ⇒ Object
Returns the value of attribute object.
-
#organization_id ⇒ Object
Returns the value of attribute organization_id.
-
#origin ⇒ Object
Returns the value of attribute origin.
-
#provider ⇒ Object
Returns the value of attribute provider.
-
#rollout_group_id ⇒ Object
Returns the value of attribute rollout_group_id.
-
#runtime_profile_id ⇒ Object
Returns the value of attribute runtime_profile_id.
-
#seed ⇒ Object
Returns the value of attribute seed.
-
#status ⇒ Object
Returns the value of attribute status.
-
#timeout_seconds ⇒ Object
Returns the value of attribute timeout_seconds.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
Instance Method Summary collapse
-
#initialize(json) ⇒ Episode
constructor
A new instance of Episode.
Constructor Details
#initialize(json) ⇒ Episode
Returns a new instance of Episode.
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/rafflesia/episodes/episode.rb', line 65 def initialize(json) super() hash = self.class.normalize(json) @active_seconds = hash[:active_seconds] @artifact_ids = (hash[:artifact_ids] || []) @attempt_count = hash[:attempt_count] @completed_at = hash[:completed_at] @created_at = hash[:created_at] @current_attempt_id = hash[:current_attempt_id] @environment_id = hash[:environment_id] @environment_release_id = hash[:environment_release_id] @environment_task_id = hash[:environment_task_id] @execution = hash[:execution] ? Rafflesia::ExecutionSpec.new(hash[:execution]) : nil @grade = hash[:grade] ? Rafflesia::Grade.new(hash[:grade]) : nil @id = hash[:id] @is_cancel_requested = hash[:is_cancel_requested] @is_livemode = hash[:is_livemode] @last_error = hash[:last_error] @metadata = hash[:metadata] || {} @object = hash[:object] @organization_id = hash[:organization_id] @origin = hash[:origin] ? Rafflesia::EpisodeOrigin.new(hash[:origin]) : nil @provider = hash[:provider] @rollout_group_id = hash[:rollout_group_id] @runtime_profile_id = hash[:runtime_profile_id] @seed = hash[:seed] @status = hash[:status] @timeout_seconds = hash[:timeout_seconds] @updated_at = hash[:updated_at] end |
Instance Attribute Details
#active_seconds ⇒ Object
Returns the value of attribute active_seconds.
37 38 39 |
# File 'lib/rafflesia/episodes/episode.rb', line 37 def active_seconds @active_seconds end |
#artifact_ids ⇒ Object
Returns the value of attribute artifact_ids.
37 38 39 |
# File 'lib/rafflesia/episodes/episode.rb', line 37 def artifact_ids @artifact_ids end |
#attempt_count ⇒ Object
Returns the value of attribute attempt_count.
37 38 39 |
# File 'lib/rafflesia/episodes/episode.rb', line 37 def attempt_count @attempt_count end |
#completed_at ⇒ Object
Returns the value of attribute completed_at.
37 38 39 |
# File 'lib/rafflesia/episodes/episode.rb', line 37 def completed_at @completed_at end |
#created_at ⇒ Object
Returns the value of attribute created_at.
37 38 39 |
# File 'lib/rafflesia/episodes/episode.rb', line 37 def created_at @created_at end |
#current_attempt_id ⇒ Object
Returns the value of attribute current_attempt_id.
37 38 39 |
# File 'lib/rafflesia/episodes/episode.rb', line 37 def current_attempt_id @current_attempt_id end |
#environment_id ⇒ Object
Returns the value of attribute environment_id.
37 38 39 |
# File 'lib/rafflesia/episodes/episode.rb', line 37 def environment_id @environment_id end |
#environment_release_id ⇒ Object
Returns the value of attribute environment_release_id.
37 38 39 |
# File 'lib/rafflesia/episodes/episode.rb', line 37 def environment_release_id @environment_release_id end |
#environment_task_id ⇒ Object
Returns the value of attribute environment_task_id.
37 38 39 |
# File 'lib/rafflesia/episodes/episode.rb', line 37 def environment_task_id @environment_task_id end |
#execution ⇒ Object
Returns the value of attribute execution.
37 38 39 |
# File 'lib/rafflesia/episodes/episode.rb', line 37 def execution @execution end |
#grade ⇒ Object
Returns the value of attribute grade.
37 38 39 |
# File 'lib/rafflesia/episodes/episode.rb', line 37 def grade @grade end |
#id ⇒ Object
Returns the value of attribute id.
37 38 39 |
# File 'lib/rafflesia/episodes/episode.rb', line 37 def id @id end |
#is_cancel_requested ⇒ Object
Returns the value of attribute is_cancel_requested.
37 38 39 |
# File 'lib/rafflesia/episodes/episode.rb', line 37 def is_cancel_requested @is_cancel_requested end |
#is_livemode ⇒ Object
Returns the value of attribute is_livemode.
37 38 39 |
# File 'lib/rafflesia/episodes/episode.rb', line 37 def is_livemode @is_livemode end |
#last_error ⇒ Object
Returns the value of attribute last_error.
37 38 39 |
# File 'lib/rafflesia/episodes/episode.rb', line 37 def last_error @last_error end |
#metadata ⇒ Object
Returns the value of attribute metadata.
37 38 39 |
# File 'lib/rafflesia/episodes/episode.rb', line 37 def @metadata end |
#object ⇒ Object
Returns the value of attribute object.
37 38 39 |
# File 'lib/rafflesia/episodes/episode.rb', line 37 def object @object end |
#organization_id ⇒ Object
Returns the value of attribute organization_id.
37 38 39 |
# File 'lib/rafflesia/episodes/episode.rb', line 37 def organization_id @organization_id end |
#origin ⇒ Object
Returns the value of attribute origin.
37 38 39 |
# File 'lib/rafflesia/episodes/episode.rb', line 37 def origin @origin end |
#provider ⇒ Object
Returns the value of attribute provider.
37 38 39 |
# File 'lib/rafflesia/episodes/episode.rb', line 37 def provider @provider end |
#rollout_group_id ⇒ Object
Returns the value of attribute rollout_group_id.
37 38 39 |
# File 'lib/rafflesia/episodes/episode.rb', line 37 def rollout_group_id @rollout_group_id end |
#runtime_profile_id ⇒ Object
Returns the value of attribute runtime_profile_id.
37 38 39 |
# File 'lib/rafflesia/episodes/episode.rb', line 37 def runtime_profile_id @runtime_profile_id end |
#seed ⇒ Object
Returns the value of attribute seed.
37 38 39 |
# File 'lib/rafflesia/episodes/episode.rb', line 37 def seed @seed end |
#status ⇒ Object
Returns the value of attribute status.
37 38 39 |
# File 'lib/rafflesia/episodes/episode.rb', line 37 def status @status end |
#timeout_seconds ⇒ Object
Returns the value of attribute timeout_seconds.
37 38 39 |
# File 'lib/rafflesia/episodes/episode.rb', line 37 def timeout_seconds @timeout_seconds end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
37 38 39 |
# File 'lib/rafflesia/episodes/episode.rb', line 37 def updated_at @updated_at end |