Class: Mindee::V2::Parsing::FailedInferenceResponse
- Inherits:
-
CommonResponse
- Object
- CommonResponse
- Mindee::V2::Parsing::FailedInferenceResponse
- Defined in:
- lib/mindee/v2/parsing/failed_inference_response.rb
Overview
"Webhook payload returned when an inference fails before producing a result.
Instance Attribute Summary collapse
-
#created_at ⇒ Time
readonly
Date and time when the inference was started.
-
#error ⇒ Mindee::V2::Parsing::ErrorResponse
readonly
Problem details for the failure, if available.
-
#file_alias ⇒ String, Nil
readonly
Alias sent for the file, if any.
-
#file_name ⇒ String
readonly
Name of the input file.
-
#inference_id ⇒ String
readonly
UUID of the failed inference.
-
#model_id ⇒ String
readonly
UUID of the model used.
Attributes inherited from CommonResponse
Instance Method Summary collapse
-
#initialize(server_response) ⇒ FailedInferenceResponse
constructor
A new instance of FailedInferenceResponse.
Constructor Details
#initialize(server_response) ⇒ FailedInferenceResponse
Returns a new instance of FailedInferenceResponse.
21 22 23 24 25 26 27 28 29 30 |
# File 'lib/mindee/v2/parsing/failed_inference_response.rb', line 21 def initialize(server_response) super @inference_id = server_response['inference_id'] @model_id = server_response['model_id'] @file_name = server_response['file_name'] @file_alias = server_response['file_alias'] @error = ErrorResponse.new(server_response['error']) @created_at = Time.iso8601(server_response['created_at']) end |
Instance Attribute Details
#created_at ⇒ Time (readonly)
Returns Date and time when the inference was started.
19 20 21 |
# File 'lib/mindee/v2/parsing/failed_inference_response.rb', line 19 def created_at @created_at end |
#error ⇒ Mindee::V2::Parsing::ErrorResponse (readonly)
Returns Problem details for the failure, if available.
17 18 19 |
# File 'lib/mindee/v2/parsing/failed_inference_response.rb', line 17 def error @error end |
#file_alias ⇒ String, Nil (readonly)
Returns Alias sent for the file, if any.
15 16 17 |
# File 'lib/mindee/v2/parsing/failed_inference_response.rb', line 15 def file_alias @file_alias end |
#file_name ⇒ String (readonly)
Returns Name of the input file.
13 14 15 |
# File 'lib/mindee/v2/parsing/failed_inference_response.rb', line 13 def file_name @file_name end |
#inference_id ⇒ String (readonly)
Returns UUID of the failed inference.
9 10 11 |
# File 'lib/mindee/v2/parsing/failed_inference_response.rb', line 9 def inference_id @inference_id end |
#model_id ⇒ String (readonly)
Returns UUID of the model used.
11 12 13 |
# File 'lib/mindee/v2/parsing/failed_inference_response.rb', line 11 def model_id @model_id end |