Class: Mindee::Parsing::Common::Execution
- Inherits:
-
Object
- Object
- Mindee::Parsing::Common::Execution
- Defined in:
- lib/mindee/parsing/common/execution.rb
Overview
Identifier for the batch to which the execution belongs.
Instance Attribute Summary collapse
-
#available_at ⇒ Time?
readonly
The time at which the file was uploaded to a workflow.
-
#batch_name ⇒ String
readonly
Identifier for the batch to which the execution belongs.
-
#created_at ⇒ Time?
readonly
The time at which the execution started.
-
#file ⇒ ExecutionFile
readonly
File representation within a workflow execution.
-
#id ⇒ String
readonly
Identifier for the execution.
-
#inference ⇒ Mindee::Inference
readonly
Deserialized inference object.
-
#priority ⇒ ExecutionPriority
readonly
Priority of the execution.
-
#reviewed_at ⇒ Time?
readonly
The time at which the file was tagged as reviewed.
-
#reviewed_prediction ⇒ Mindee::Product::Generated::GeneratedV1Document
readonly
Reviewed fields and values.
-
#status ⇒ String
readonly
Execution Status.
-
#type ⇒ String
readonly
Execution type.
-
#uploaded_at ⇒ Time?
readonly
The time at which the file was uploaded to a workflow.
-
#workflow_id ⇒ String
readonly
Identifier for the workflow.
Instance Method Summary collapse
-
#initialize(product_class, http_response) ⇒ Execution
constructor
A new instance of Execution.
Constructor Details
#initialize(product_class, http_response) ⇒ Execution
Returns a new instance of Execution.
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/mindee/parsing/common/execution.rb', line 52 def initialize(product_class, http_response) @batch_name = http_response['batch_name'] @created_at = Time.iso8601(http_response['created_at']) if http_response['created_at'] @file = ExecutionFile.new(http_response['file']) if http_response['file'] @id = http_response['id'] @inference = product_class.new(http_response['inference']) if http_response['inference'] @priority = Mindee::Parsing::Common::ExecutionPriority.to_priority(http_response['priority']) @reviewed_at = Time.iso8601(http_response['reviewed_at']) if http_response['reviewed_at'] @available_at = Time.iso8601(http_response['available_at']) if http_response['available_at'] if http_response['reviewed_prediction'] @reviewed_prediction = GeneratedV1Document.new(http_response['reviewed_prediction']) end @status = http_response['status'] @type = http_response['type'] @uploaded_at = Time.iso8601(http_response['uploaded_at']) if http_response['uploaded_at'] @workflow_id = http_response['workflow_id'] end |
Instance Attribute Details
#available_at ⇒ Time? (readonly)
The time at which the file was uploaded to a workflow.
31 32 33 |
# File 'lib/mindee/parsing/common/execution.rb', line 31 def available_at @available_at end |
#batch_name ⇒ String (readonly)
Identifier for the batch to which the execution belongs.
10 11 12 |
# File 'lib/mindee/parsing/common/execution.rb', line 10 def batch_name @batch_name end |
#created_at ⇒ Time? (readonly)
The time at which the execution started.
13 14 15 |
# File 'lib/mindee/parsing/common/execution.rb', line 13 def created_at @created_at end |
#file ⇒ ExecutionFile (readonly)
File representation within a workflow execution.
16 17 18 |
# File 'lib/mindee/parsing/common/execution.rb', line 16 def file @file end |
#id ⇒ String (readonly)
Identifier for the execution.
19 20 21 |
# File 'lib/mindee/parsing/common/execution.rb', line 19 def id @id end |
#inference ⇒ Mindee::Inference (readonly)
Deserialized inference object.
22 23 24 |
# File 'lib/mindee/parsing/common/execution.rb', line 22 def inference @inference end |
#priority ⇒ ExecutionPriority (readonly)
Priority of the execution.
25 26 27 |
# File 'lib/mindee/parsing/common/execution.rb', line 25 def priority @priority end |
#reviewed_at ⇒ Time? (readonly)
The time at which the file was tagged as reviewed.
28 29 30 |
# File 'lib/mindee/parsing/common/execution.rb', line 28 def reviewed_at @reviewed_at end |
#reviewed_prediction ⇒ Mindee::Product::Generated::GeneratedV1Document (readonly)
Reviewed fields and values.
34 35 36 |
# File 'lib/mindee/parsing/common/execution.rb', line 34 def reviewed_prediction @reviewed_prediction end |
#status ⇒ String (readonly)
Execution Status.
37 38 39 |
# File 'lib/mindee/parsing/common/execution.rb', line 37 def status @status end |
#type ⇒ String (readonly)
Execution type.
40 41 42 |
# File 'lib/mindee/parsing/common/execution.rb', line 40 def type @type end |
#uploaded_at ⇒ Time? (readonly)
The time at which the file was uploaded to a workflow.
43 44 45 |
# File 'lib/mindee/parsing/common/execution.rb', line 43 def uploaded_at @uploaded_at end |
#workflow_id ⇒ String (readonly)
Identifier for the workflow.
46 47 48 |
# File 'lib/mindee/parsing/common/execution.rb', line 46 def workflow_id @workflow_id end |