Class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AnnotateFileRequest

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

Overview

A request to annotate one single file, e.g. a PDF, TIFF or GIF file.

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) ⇒ GoogleCloudVisionV1p2beta1AnnotateFileRequest

Returns a new instance of GoogleCloudVisionV1p2beta1AnnotateFileRequest



2783
2784
2785
# File 'generated/google/apis/vision_v1p2beta1/classes.rb', line 2783

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

Instance Attribute Details

#featuresArray<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Feature>

Required. Requested features. Corresponds to the JSON property features



2757
2758
2759
# File 'generated/google/apis/vision_v1p2beta1/classes.rb', line 2757

def features
  @features
end

#image_contextGoogle::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1ImageContext

Image context and/or feature-specific parameters. Corresponds to the JSON property imageContext



2762
2763
2764
# File 'generated/google/apis/vision_v1p2beta1/classes.rb', line 2762

def image_context
  @image_context
end

#input_configGoogle::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1InputConfig

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



2767
2768
2769
# File 'generated/google/apis/vision_v1p2beta1/classes.rb', line 2767

def input_config
  @input_config
end

#pagesArray<Fixnum>

Pages of the file to perform image annotation. Pages starts from 1, we assume the first page of the file is page 1. At most 5 pages are supported per request. Pages can be negative. Page 1 means the first page. Page 2 means the second page. Page -1 means the last page. Page -2 means the second to the last page. If the file is GIF instead of PDF or TIFF, page refers to GIF frames. If this field is empty, by default the service performs image annotation for the first 5 pages of the file. Corresponds to the JSON property pages

Returns:

  • (Array<Fixnum>)


2781
2782
2783
# File 'generated/google/apis/vision_v1p2beta1/classes.rb', line 2781

def pages
  @pages
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2788
2789
2790
2791
2792
2793
# File 'generated/google/apis/vision_v1p2beta1/classes.rb', line 2788

def update!(**args)
  @features = args[:features] if args.key?(:features)
  @image_context = args[:image_context] if args.key?(:image_context)
  @input_config = args[:input_config] if args.key?(:input_config)
  @pages = args[:pages] if args.key?(:pages)
end