Class: Retab::WorkflowExperiment

Inherits:
Types::BaseModel show all
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,
  schema_drift: :schema_drift,
  schema_drift_detail: :schema_drift_detail
}.freeze

Instance Attribute Summary collapse

Attributes inherited from Types::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from Types::BaseModel

#inspect, normalize, #to_h, #to_json

Constructor Details

#initialize(json) ⇒ WorkflowExperiment

Returns a new instance of WorkflowExperiment.



43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'lib/retab/workflow_experiments/workflow_experiment.rb', line 43

def initialize(json)
  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]
  @block_type = hash[:block_type]
  @score = hash[:score]
  @is_stale = hash[:is_stale]
  @schema_drift = hash[:schema_drift]
  @schema_drift_detail = hash[:schema_drift_detail]
end

Instance Attribute Details

#block_idObject

Returns the value of attribute block_id.



26
27
28
# File 'lib/retab/workflow_experiments/workflow_experiment.rb', line 26

def block_id
  @block_id
end

#block_typeObject

Returns the value of attribute block_type.



26
27
28
# File 'lib/retab/workflow_experiments/workflow_experiment.rb', line 26

def block_type
  @block_type
end

#created_atObject

Returns the value of attribute created_at.



26
27
28
# File 'lib/retab/workflow_experiments/workflow_experiment.rb', line 26

def created_at
  @created_at
end

#document_countObject

Returns the value of attribute document_count.



26
27
28
# File 'lib/retab/workflow_experiments/workflow_experiment.rb', line 26

def document_count
  @document_count
end

#idObject

Returns the value of attribute id.



26
27
28
# File 'lib/retab/workflow_experiments/workflow_experiment.rb', line 26

def id
  @id
end

#is_staleObject

Returns the value of attribute is_stale.



26
27
28
# File 'lib/retab/workflow_experiments/workflow_experiment.rb', line 26

def is_stale
  @is_stale
end

#last_run_idObject

Returns the value of attribute last_run_id.



26
27
28
# File 'lib/retab/workflow_experiments/workflow_experiment.rb', line 26

def last_run_id
  @last_run_id
end

#n_consensusObject

Returns the value of attribute n_consensus.



26
27
28
# File 'lib/retab/workflow_experiments/workflow_experiment.rb', line 26

def n_consensus
  @n_consensus
end

#nameObject

Returns the value of attribute name.



26
27
28
# File 'lib/retab/workflow_experiments/workflow_experiment.rb', line 26

def name
  @name
end

#schema_driftObject

Returns the value of attribute schema_drift.



26
27
28
# File 'lib/retab/workflow_experiments/workflow_experiment.rb', line 26

def schema_drift
  @schema_drift
end

#schema_drift_detailObject

Returns the value of attribute schema_drift_detail.



26
27
28
# File 'lib/retab/workflow_experiments/workflow_experiment.rb', line 26

def schema_drift_detail
  @schema_drift_detail
end

#scoreObject

Returns the value of attribute score.



26
27
28
# File 'lib/retab/workflow_experiments/workflow_experiment.rb', line 26

def score
  @score
end

#statusObject

Returns the value of attribute status.



26
27
28
# File 'lib/retab/workflow_experiments/workflow_experiment.rb', line 26

def status
  @status
end

#updated_atObject

Returns the value of attribute updated_at.



26
27
28
# File 'lib/retab/workflow_experiments/workflow_experiment.rb', line 26

def updated_at
  @updated_at
end

#workflow_idObject

Returns the value of attribute workflow_id.



26
27
28
# File 'lib/retab/workflow_experiments/workflow_experiment.rb', line 26

def workflow_id
  @workflow_id
end