Class AnnotateFileRequest.Builder (2.1.4)

public static final class AnnotateFileRequest.Builder extends GeneratedMessageV3.Builder<AnnotateFileRequest.Builder> implements AnnotateFileRequestOrBuilder

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

Protobuf type google.cloud.vision.v1p4beta1.AnnotateFileRequest

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllFeatures(Iterable<? extends Feature> values)

public AnnotateFileRequest.Builder addAllFeatures(Iterable<? extends Feature> values)

Required. Requested features.

repeated .google.cloud.vision.v1p4beta1.Feature features = 2;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.vision.v1p4beta1.Feature>
Returns
TypeDescription
AnnotateFileRequest.Builder

addAllPages(Iterable<? extends Integer> values)

public AnnotateFileRequest.Builder addAllPages(Iterable<? extends Integer> values)

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.

repeated int32 pages = 4;

Parameter
NameDescription
valuesIterable<? extends java.lang.Integer>

The pages to add.

Returns
TypeDescription
AnnotateFileRequest.Builder

This builder for chaining.

addFeatures(Feature value)

public AnnotateFileRequest.Builder addFeatures(Feature value)

Required. Requested features.

repeated .google.cloud.vision.v1p4beta1.Feature features = 2;

Parameter
NameDescription
valueFeature
Returns
TypeDescription
AnnotateFileRequest.Builder

addFeatures(Feature.Builder builderForValue)

public AnnotateFileRequest.Builder addFeatures(Feature.Builder builderForValue)

Required. Requested features.

repeated .google.cloud.vision.v1p4beta1.Feature features = 2;

Parameter
NameDescription
builderForValueFeature.Builder
Returns
TypeDescription
AnnotateFileRequest.Builder

addFeatures(int index, Feature value)

public AnnotateFileRequest.Builder addFeatures(int index, Feature value)

Required. Requested features.

repeated .google.cloud.vision.v1p4beta1.Feature features = 2;

Parameters
NameDescription
indexint
value