Class: Google::Apis::VisionV1::AnnotateFileResponse

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/vision_v1/classes.rb,
generated/google/apis/vision_v1/representations.rb,
generated/google/apis/vision_v1/representations.rb

Overview

Response to a single file annotation request. A file may contain one or more images, which individually have their own responses.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ AnnotateFileResponse

Returns a new instance of AnnotateFileResponse.



123
124
125
# File 'generated/google/apis/vision_v1/classes.rb', line 123

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#errorGoogle::Apis::VisionV1::Status

The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC. Each Status message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the API Design Guide. Corresponds to the JSON property error



105
106
107
# File 'generated/google/apis/vision_v1/classes.rb', line 105

def error
  @error
end

#input_configGoogle::Apis::VisionV1::InputConfig

The desired input location and metadata. Corresponds to the JSON property inputConfig



110
111
112
# File 'generated/google/apis/vision_v1/classes.rb', line 110

def input_config
  @input_config
end

#responsesArray<Google::Apis::VisionV1::AnnotateImageResponse>

Individual responses to images found within the file. This field will be empty if the error field is set. Corresponds to the JSON property responses



116
117
118
# File 'generated/google/apis/vision_v1/classes.rb', line 116

def responses
  @responses
end

#total_pagesFixnum

This field gives the total number of pages in the file. Corresponds to the JSON property totalPages

Returns:

  • (Fixnum)


121
122
123
# File 'generated/google/apis/vision_v1/classes.rb', line 121

def total_pages
  @total_pages
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



128
129
130
131
132
133
# File 'generated/google/apis/vision_v1/classes.rb', line 128

def update!(**args)
  @error = args[:error] if args.key?(:error)
  @input_config = args[:input_config] if args.key?(:input_config)
  @responses = args[:responses] if args.key?(:responses)
  @total_pages = args[:total_pages] if args.key?(:total_pages)
end