Class: Retab::WorkflowExperiment
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Retab::WorkflowExperiment
- Defined in:
- lib/retab/workflow_experiments/workflow_experiment.rb
Constant Summary collapse
- HASH_ATTRS =
{ id: :id, workflow_id: :workflow_id, block_id: :block_id, n_consensus: :n_consensus, document_count: :document_count, name: :name, last_run_id: :last_run_id, created_at: :created_at, updated_at: :updated_at, status: :status, block_type: :block_type, score: :score, is_stale: :is_stale, freshness: :freshness, freshness_state: :freshness_state, freshness_reasons: :freshness_reasons, run_plan_mode: :run_plan_mode, rerunnable_document_count: :rerunnable_document_count, schema_drift: :schema_drift, schema_drift_detail: :schema_drift_detail, drift: :drift }.freeze
Instance Attribute Summary collapse
-
#block_id ⇒ Object
Returns the value of attribute block_id.
-
#block_type ⇒ Object
Returns the value of attribute block_type.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#document_count ⇒ Object
Returns the value of attribute document_count.
-
#drift ⇒ Object
Returns the value of attribute drift.
-
#freshness ⇒ Object
Returns the value of attribute freshness.
-
#freshness_reasons ⇒ Object
Returns the value of attribute freshness_reasons.
-
#freshness_state ⇒ Object
Returns the value of attribute freshness_state.
-
#id ⇒ Object
Returns the value of attribute id.
-
#is_stale ⇒ Object
Returns the value of attribute is_stale.
-
#last_run_id ⇒ Object
Returns the value of attribute last_run_id.
-
#n_consensus ⇒ Object
Returns the value of attribute n_consensus.
-
#name ⇒ Object
Returns the value of attribute name.
-
#rerunnable_document_count ⇒ Object
Returns the value of attribute rerunnable_document_count.
-
#run_plan_mode ⇒ Object
Returns the value of attribute run_plan_mode.
-
#schema_drift ⇒ Object
Returns the value of attribute schema_drift.
-
#schema_drift_detail ⇒ Object
Returns the value of attribute schema_drift_detail.
-
#score ⇒ Object
Returns the value of attribute score.
-
#status ⇒ Object
Returns the value of attribute status.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
-
#workflow_id ⇒ Object
Returns the value of attribute workflow_id.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ WorkflowExperiment
constructor
A new instance of WorkflowExperiment.
Methods inherited from Types::BaseModel
deep_symbolize, #inspect, normalize, #to_h, #to_json
Constructor Details
#initialize(json) ⇒ WorkflowExperiment
Returns a new instance of WorkflowExperiment.
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/retab/workflow_experiments/workflow_experiment.rb', line 56 def initialize(json) super() hash = self.class.normalize(json) @id = hash[:id] @workflow_id = hash[:workflow_id] @block_id = hash[:block_id] @n_consensus = hash[:n_consensus] @document_count = hash[:document_count] @name = hash[:name] @last_run_id = hash[:last_run_id] @created_at = hash[:created_at] @updated_at = hash[:updated_at] @status = hash[:status].nil? ? "draft" : hash[:status] @block_type = hash[:block_type] @score = hash[:score] @is_stale = hash[:is_stale].nil? ? false : hash[:is_stale] @freshness = hash[:freshness] ? Retab::ArtifactFreshness.new(hash[:freshness]) : nil @freshness_state = hash[:freshness_state].nil? ? "unknown" : hash[:freshness_state] @freshness_reasons = (hash[:freshness_reasons] || []) @run_plan_mode = hash[:run_plan_mode].nil? ? "unknown" : hash[:run_plan_mode] @rerunnable_document_count = hash[:rerunnable_document_count] @schema_drift = hash[:schema_drift].nil? ? "unknown" : hash[:schema_drift] @schema_drift_detail = hash[:schema_drift_detail] @drift = hash[:drift] ? Retab::ArtifactDrift.new(hash[:drift]) : nil end |
Instance Attribute Details
#block_id ⇒ Object
Returns the value of attribute block_id.
32 33 34 |
# File 'lib/retab/workflow_experiments/workflow_experiment.rb', line 32 def block_id @block_id end |
#block_type ⇒ Object
Returns the value of attribute block_type.
32 33 34 |
# File 'lib/retab/workflow_experiments/workflow_experiment.rb', line 32 def block_type @block_type end |
#created_at ⇒ Object
Returns the value of attribute created_at.
32 33 34 |
# File 'lib/retab/workflow_experiments/workflow_experiment.rb', line 32 def created_at @created_at end |
#document_count ⇒ Object
Returns the value of attribute document_count.
32 33 34 |
# File 'lib/retab/workflow_experiments/workflow_experiment.rb', line 32 def document_count @document_count end |
#drift ⇒ Object
Returns the value of attribute drift.
32 33 34 |
# File 'lib/retab/workflow_experiments/workflow_experiment.rb', line 32 def drift @drift end |
#freshness ⇒ Object
Returns the value of attribute freshness.
32 33 34 |
# File 'lib/retab/workflow_experiments/workflow_experiment.rb', line 32 def freshness @freshness end |
#freshness_reasons ⇒ Object
Returns the value of attribute freshness_reasons.
32 33 34 |
# File 'lib/retab/workflow_experiments/workflow_experiment.rb', line 32 def freshness_reasons @freshness_reasons end |
#freshness_state ⇒ Object
Returns the value of attribute freshness_state.
32 33 34 |
# File 'lib/retab/workflow_experiments/workflow_experiment.rb', line 32 def freshness_state @freshness_state end |
#id ⇒ Object
Returns the value of attribute id.
32 33 34 |
# File 'lib/retab/workflow_experiments/workflow_experiment.rb', line 32 def id @id end |
#is_stale ⇒ Object
Returns the value of attribute is_stale.
32 33 34 |
# File 'lib/retab/workflow_experiments/workflow_experiment.rb', line 32 def is_stale @is_stale end |
#last_run_id ⇒ Object
Returns the value of attribute last_run_id.
32 33 34 |
# File 'lib/retab/workflow_experiments/workflow_experiment.rb', line 32 def last_run_id @last_run_id end |
#n_consensus ⇒ Object
Returns the value of attribute n_consensus.
32 33 34 |
# File 'lib/retab/workflow_experiments/workflow_experiment.rb', line 32 def n_consensus @n_consensus end |
#name ⇒ Object
Returns the value of attribute name.
32 33 34 |
# File 'lib/retab/workflow_experiments/workflow_experiment.rb', line 32 def name @name end |
#rerunnable_document_count ⇒ Object
Returns the value of attribute rerunnable_document_count.
32 33 34 |
# File 'lib/retab/workflow_experiments/workflow_experiment.rb', line 32 def rerunnable_document_count @rerunnable_document_count end |
#run_plan_mode ⇒ Object
Returns the value of attribute run_plan_mode.
32 33 34 |
# File 'lib/retab/workflow_experiments/workflow_experiment.rb', line 32 def run_plan_mode @run_plan_mode end |
#schema_drift ⇒ Object
Returns the value of attribute schema_drift.
32 33 34 |
# File 'lib/retab/workflow_experiments/workflow_experiment.rb', line 32 def schema_drift @schema_drift end |
#schema_drift_detail ⇒ Object
Returns the value of attribute schema_drift_detail.
32 33 34 |
# File 'lib/retab/workflow_experiments/workflow_experiment.rb', line 32 def schema_drift_detail @schema_drift_detail end |
#score ⇒ Object
Returns the value of attribute score.
32 33 34 |
# File 'lib/retab/workflow_experiments/workflow_experiment.rb', line 32 def score @score end |
#status ⇒ Object
Returns the value of attribute status.
32 33 34 |
# File 'lib/retab/workflow_experiments/workflow_experiment.rb', line 32 def status @status end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
32 33 34 |
# File 'lib/retab/workflow_experiments/workflow_experiment.rb', line 32 def updated_at @updated_at end |
#workflow_id ⇒ Object
Returns the value of attribute workflow_id.
32 33 34 |
# File 'lib/retab/workflow_experiments/workflow_experiment.rb', line 32 def workflow_id @workflow_id end |