Class: Retab::CreateExperimentRequest
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Retab::CreateExperimentRequest
- Defined in:
- lib/retab/workflow_experiments/create_experiment_request.rb
Constant Summary collapse
- HASH_ATTRS =
{ workflow_id: :workflow_id, block_id: :block_id, document_captures: :document_captures, documents: :documents, n_consensus: :n_consensus, name: :name, source_experiment_id: :source_experiment_id }.freeze
Instance Attribute Summary collapse
-
#block_id ⇒ Object
Returns the value of attribute block_id.
-
#document_captures ⇒ Object
Returns the value of attribute document_captures.
-
#documents ⇒ Object
Returns the value of attribute documents.
-
#n_consensus ⇒ Object
Returns the value of attribute n_consensus.
-
#name ⇒ Object
Returns the value of attribute name.
-
#source_experiment_id ⇒ Object
Returns the value of attribute source_experiment_id.
-
#workflow_id ⇒ Object
Returns the value of attribute workflow_id.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ CreateExperimentRequest
constructor
A new instance of CreateExperimentRequest.
Methods inherited from Types::BaseModel
#inspect, normalize, #to_h, #to_json
Constructor Details
#initialize(json) ⇒ CreateExperimentRequest
Returns a new instance of CreateExperimentRequest.
27 28 29 30 31 32 33 34 35 36 |
# File 'lib/retab/workflow_experiments/create_experiment_request.rb', line 27 def initialize(json) hash = self.class.normalize(json) @workflow_id = hash[:workflow_id] @block_id = hash[:block_id] @document_captures = (hash[:document_captures] || []).map { |item| item ? Retab::ExperimentDocumentCaptureRequest.new(item) : nil } @documents = (hash[:documents] || []).map { |item| item ? Retab::ExplicitExperimentDocumentRequest.new(item) : nil } @n_consensus = hash[:n_consensus] @name = hash[:name] @source_experiment_id = hash[:source_experiment_id] end |
Instance Attribute Details
#block_id ⇒ Object
Returns the value of attribute block_id.
18 19 20 |
# File 'lib/retab/workflow_experiments/create_experiment_request.rb', line 18 def block_id @block_id end |
#document_captures ⇒ Object
Returns the value of attribute document_captures.
18 19 20 |
# File 'lib/retab/workflow_experiments/create_experiment_request.rb', line 18 def document_captures @document_captures end |
#documents ⇒ Object
Returns the value of attribute documents.
18 19 20 |
# File 'lib/retab/workflow_experiments/create_experiment_request.rb', line 18 def documents @documents end |
#n_consensus ⇒ Object
Returns the value of attribute n_consensus.
18 19 20 |
# File 'lib/retab/workflow_experiments/create_experiment_request.rb', line 18 def n_consensus @n_consensus end |
#name ⇒ Object
Returns the value of attribute name.
18 19 20 |
# File 'lib/retab/workflow_experiments/create_experiment_request.rb', line 18 def name @name end |
#source_experiment_id ⇒ Object
Returns the value of attribute source_experiment_id.
18 19 20 |
# File 'lib/retab/workflow_experiments/create_experiment_request.rb', line 18 def source_experiment_id @source_experiment_id end |
#workflow_id ⇒ Object
Returns the value of attribute workflow_id.
18 19 20 |
# File 'lib/retab/workflow_experiments/create_experiment_request.rb', line 18 def workflow_id @workflow_id end |