@@ -128,7 +128,7 @@ class Image; end
128128 # @!attribute [rw] bounding_poly
129129 # @return [Google::Cloud::Vision::V1::BoundingPoly]
130130 # The bounding polygon around the face. The coordinates of the bounding box
131- # are in the original image's scale, as returned in `ImageParams` .
131+ # are in the original image's scale.
132132 # The bounding box is computed to "frame" the face in accordance with human
133133 # expectations. It is based on the landmarker results.
134134 # Note that one or more x and/or y coordinates may not be generated in the
@@ -459,7 +459,7 @@ class ImageProperties; end
459459 # @!attribute [rw] bounding_poly
460460 # @return [Google::Cloud::Vision::V1::BoundingPoly]
461461 # The bounding polygon for the crop region. The coordinates of the bounding
462- # box are in the original image's scale, as returned in `ImageParams` .
462+ # box are in the original image's scale.
463463 # @!attribute [rw] confidence
464464 # @return [Float]
465465 # Confidence of this being a salient region. Range [0, 1].
@@ -518,7 +518,7 @@ class WebDetectionParams; end
518518 class ImageContext ; end
519519
520520 # Request for performing Google Cloud Vision API tasks over a user-provided
521- # image, with user-requested features.
521+ # image, with user-requested features, and with context information .
522522 # @!attribute [rw] image
523523 # @return [Google::Cloud::Vision::V1::Image]
524524 # The image to be processed.
@@ -601,6 +601,9 @@ class AnnotateImageResponse; end
601601 # @!attribute [rw] responses
602602 # @return [Array<Google::Cloud::Vision::V1::AnnotateImageResponse>]
603603 # Individual responses to images found within the file.
604+ # @!attribute [rw] total_pages
605+ # @return [Integer]
606+ # This field gives the total number of pages in the file.
604607 class AnnotateFileResponse ; end
605608
606609 # Multiple image annotation requests are batched into a single service call.
@@ -615,6 +618,48 @@ class BatchAnnotateImagesRequest; end
615618 # Individual responses to image annotation requests within the batch.
616619 class BatchAnnotateImagesResponse ; end
617620
621+ # A request to annotate one single file, e.g. a PDF, TIFF or GIF file.
622+ # @!attribute [rw] input_config
623+ # @return [Google::Cloud::Vision::V1::InputConfig]
624+ # Required. Information about the input file.
625+ # @!attribute [rw] features
626+ # @return [Array<Google::Cloud::Vision::V1::Feature>]
627+ # Required. Requested features.
628+ # @!attribute [rw] image_context
629+ # @return [Google::Cloud::Vision::V1::ImageContext]
630+ # Additional context that may accompany the image(s) in the file.
631+ # @!attribute [rw] pages
632+ # @return [Array<Integer>]
633+ # Pages of the file to perform image annotation.
634+ #
635+ # Pages starts from 1, we assume the first page of the file is page 1.
636+ # At most 5 pages are supported per request. Pages can be negative.
637+ #
638+ # Page 1 means the first page.
639+ # Page 2 means the second page.
640+ # Page -1 means the last page.
641+ # Page -2 means the second to the last page.
642+ #
643+ # If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
644+ #
645+ # If this field is empty, by default the service performs image annotation
646+ # for the first 5 pages of the file.
647+ class AnnotateFileRequest ; end
648+
649+ # A list of requests to annotate files using the BatchAnnotateFiles API.
650+ # @!attribute [rw] requests
651+ # @return [Array<Google::Cloud::Vision::V1::AnnotateFileRequest>]
652+ # The list of file annotation requests. Right now we support only one
653+ # AnnotateFileRequest in BatchAnnotateFilesRequest.
654+ class BatchAnnotateFilesRequest ; end
655+
656+ # A list of file annotation responses.
657+ # @!attribute [rw] responses
658+ # @return [Array<Google::Cloud::Vision::V1::AnnotateFileResponse>]
659+ # The list of file annotation responses, each response corresponding to each
660+ # AnnotateFileRequest in BatchAnnotateFilesRequest.
661+ class BatchAnnotateFilesResponse ; end
662+
618663 # An offline file annotation request.
619664 # @!attribute [rw] input_config
620665 # @return [Google::Cloud::Vision::V1::InputConfig]
@@ -636,6 +681,21 @@ class AsyncAnnotateFileRequest; end
636681 # The output location and metadata from AsyncAnnotateFileRequest.
637682 class AsyncAnnotateFileResponse ; end
638683
684+ # Request for async image annotation for a list of images.
685+ # @!attribute [rw] requests
686+ # @return [Array<Google::Cloud::Vision::V1::AnnotateImageRequest>]
687+ # Individual image annotation requests for this batch.
688+ # @!attribute [rw] output_config
689+ # @return [Google::Cloud::Vision::V1::OutputConfig]
690+ # Required. The desired output location and metadata (e.g. format).
691+ class AsyncBatchAnnotateImagesRequest ; end
692+
693+ # Response to an async batch image annotation request.
694+ # @!attribute [rw] output_config
695+ # @return [Google::Cloud::Vision::V1::OutputConfig]
696+ # The output location and metadata from AsyncBatchAnnotateImagesRequest.
697+ class AsyncBatchAnnotateImagesResponse ; end
698+
639699 # Multiple async file annotation requests are batched into a single service
640700 # call.
641701 # @!attribute [rw] requests
@@ -654,6 +714,14 @@ class AsyncBatchAnnotateFilesResponse; end
654714 # @!attribute [rw] gcs_source
655715 # @return [Google::Cloud::Vision::V1::GcsSource]
656716 # The Google Cloud Storage location to read the input from.
717+ # @!attribute [rw] content
718+ # @return [String]
719+ # File content, represented as a stream of bytes.
720+ # Note: As with all `bytes` fields, protobuffers use a pure binary
721+ # representation, whereas JSON representations use base64.
722+ #
723+ # Currently, this field only works for BatchAnnotateFiles requests. It does
724+ # not work for AsyncBatchAnnotateFiles requests.
657725 # @!attribute [rw] mime_type
658726 # @return [String]
659727 # The type of the file. Currently only "application/pdf" and "image/tiff"
@@ -689,16 +757,23 @@ class GcsSource; end
689757 # The Google Cloud Storage location where the output will be written to.
690758 # @!attribute [rw] uri
691759 # @return [String]
692- # Google Cloud Storage URI where the results will be stored. Results will
693- # be in JSON format and preceded by its corresponding input URI. This field
694- # can either represent a single file, or a prefix for multiple outputs.
695- # Prefixes must end in a `/`.
760+ # Google Cloud Storage URI prefix where the results will be stored. Results
761+ # will be in JSON format and preceded by its corresponding input URI prefix.
762+ # This field can either represent a gcs file prefix or gcs directory. In
763+ # either case, the uri should be unique because in order to get all of the
764+ # output files, you will need to do a wildcard gcs search on the uri prefix
765+ # you provide.
696766 #
697767 # Examples:
698768 #
699- # * File: gs://bucket-name/filename.json
700- # * Prefix: gs://bucket-name/prefix/here/
701- # * File: gs://bucket-name/prefix/here
769+ # * File Prefix: gs://bucket-name/here/filenameprefix The output files
770+ # will be created in gs://bucket-name/here/ and the names of the
771+ # output files will begin with "filenameprefix".
772+ #
773+ # * Directory Prefix: gs://bucket-name/some/location/ The output files
774+ # will be created in gs://bucket-name/some/location/ and the names of the
775+ # output files could be anything because there was no filename prefix
776+ # specified.
702777 #
703778 # If multiple outputs, each response is still AnnotateFileResponse, each of
704779 # which contains some subset of the full list of AnnotateImageResponse.
0 commit comments