Class AnnotateFileRequest.Builder (3.41.0)

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
Type Description
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
Name Description
values Iterable<? extends com.google.cloud.vision.v1p4beta1.Feature>
Returns
Type Description
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
Name Description
values Iterable<? extends java.lang.Integer>

The pages to add.

Returns
Type Description
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
Name Description
value Feature
Returns
Type Description
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
Name Description
builderForValue Feature.Builder
Returns
Type Description
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
Name Description
index int
value Feature
Returns
Type Description
AnnotateFileRequest.Builder

addFeatures(int index, Feature.Builder builderForValue)

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

Required. Requested features.

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

Parameters
Name Description
index int
builderForValue Feature.Builder
Returns
Type Description
AnnotateFileRequest.Builder

addFeaturesBuilder()

public Feature.Builder addFeaturesBuilder()

Required. Requested features.

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

Returns
Type Description
Feature.Builder

addFeaturesBuilder(int index)

public Feature.Builder addFeaturesBuilder(int index)

Required. Requested features.

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

Parameter
Name Description
index int
Returns
Type Description
Feature.Builder

addPages(int value)

public AnnotateFileRequest.Builder addPages(int value)

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
Name Description
value int

The pages to add.

Returns
Type Description
AnnotateFileRequest.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public AnnotateFileRequest.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
AnnotateFileRequest.Builder
Overrides

build()

public AnnotateFileRequest build()
Returns
Type Description
AnnotateFileRequest

buildPartial()

public AnnotateFileRequest buildPartial()
Returns
Type Description
AnnotateFileRequest

clear()

public AnnotateFileRequest.Builder clear()
Returns
Type Description
AnnotateFileRequest.Builder
Overrides

clearFeatures()

public AnnotateFileRequest.Builder clearFeatures()

Required. Requested features.

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

Returns
Type Description
AnnotateFileRequest.Builder

clearField(Descriptors.FieldDescriptor field)

public AnnotateFileRequest.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
AnnotateFileRequest.Builder
Overrides

clearImageContext()

public AnnotateFileRequest.Builder clearImageContext()

Additional context that may accompany the image(s) in the file.

.google.cloud.vision.v1p4beta1.ImageContext image_context = 3;

Returns
Type Description
AnnotateFileRequest.Builder

clearInputConfig()

public AnnotateFileRequest.Builder clearInputConfig()

Required. Information about the input file.

.google.cloud.vision.v1p4beta1.InputConfig input_config = 1;

Returns
Type Description
AnnotateFileRequest.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public AnnotateFileRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
AnnotateFileRequest.Builder
Overrides

clearPages()

public AnnotateFileRequest.Builder clearPages()

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;

Returns
Type Description
AnnotateFileRequest.Builder

This builder for chaining.

clone()

public AnnotateFileRequest.Builder clone()
Returns
Type Description
AnnotateFileRequest.Builder
Overrides

getDefaultInstanceForType()

public AnnotateFileRequest getDefaultInstanceForType()
Returns
Type Description
AnnotateFileRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getFeatures(int index)

public Feature getFeatures(int index)

Required. Requested features.

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

Parameter
Name Description
index int
Returns
Type Description
Feature

getFeaturesBuilder(int index)

public Feature.Builder getFeaturesBuilder(int index)

Required. Requested features.

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

Parameter
Name Description
index int
Returns
Type Description
Feature.Builder

getFeaturesBuilderList()

public List<Feature.Builder> getFeaturesBuilderList()

Required. Requested features.

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

Returns
Type Description
List<Builder>

getFeaturesCount()

public int getFeaturesCount()

Required. Requested features.

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

Returns
Type Description
int

getFeaturesList()

public List<Feature> getFeaturesList()

Required. Requested features.

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

Returns
Type Description
List<Feature>

getFeaturesOrBuilder(int index)

public FeatureOrBuilder getFeaturesOrBuilder(int index)

Required. Requested features.

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

Parameter
Name Description
index int
Returns
Type Description
FeatureOrBuilder

getFeaturesOrBuilderList()

public List<? extends FeatureOrBuilder> getFeaturesOrBuilderList()

Required. Requested features.

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

Returns
Type Description
List<? extends com.google.cloud.vision.v1p4beta1.FeatureOrBuilder>

getImageContext()

public ImageContext getImageContext()

Additional context that may accompany the image(s) in the file.

.google.cloud.vision.v1p4beta1.ImageContext image_context = 3;

Returns
Type Description
ImageContext

The imageContext.

getImageContextBuilder()

public ImageContext.Builder getImageContextBuilder()

Additional context that may accompany the image(s) in the file.

.google.cloud.vision.v1p4beta1.ImageContext image_context = 3;

Returns
Type Description
ImageContext.Builder

getImageContextOrBuilder()

public ImageContextOrBuilder getImageContextOrBuilder()

Additional context that may accompany the image(s) in the file.

.google.cloud.vision.v1p4beta1.ImageContext image_context = 3;

Returns
Type Description
ImageContextOrBuilder

getInputConfig()

public InputConfig getInputConfig()

Required. Information about the input file.

.google.cloud.vision.v1p4beta1.InputConfig input_config = 1;

Returns
Type Description
InputConfig

The inputConfig.

getInputConfigBuilder()

public InputConfig.Builder getInputConfigBuilder()

Required. Information about the input file.

.google.cloud.vision.v1p4beta1.InputConfig input_config = 1;

Returns
Type Description
InputConfig.Builder

getInputConfigOrBuilder()

public InputConfigOrBuilder getInputConfigOrBuilder()

Required. Information about the input file.

.google.cloud.vision.v1p4beta1.InputConfig input_config = 1;

Returns
Type Description
InputConfigOrBuilder

getPages(int index)

public int getPages(int index)

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
Name Description
index int

The index of the element to return.

Returns
Type Description
int

The pages at the given index.

getPagesCount()

public int getPagesCount()

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;

Returns
Type Description
int

The count of pages.

getPagesList()

public List<Integer> getPagesList()

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;

Returns
Type Description
List<Integer>

A list containing the pages.

hasImageContext()

public boolean hasImageContext()

Additional context that may accompany the image(s) in the file.

.google.cloud.vision.v1p4beta1.ImageContext image_context = 3;

Returns
Type Description
boolean

Whether the imageContext field is set.

hasInputConfig()

public boolean hasInputConfig()

Required. Information about the input file.

.google.cloud.vision.v1p4beta1.InputConfig input_config = 1;

Returns
Type Description
boolean

Whether the inputConfig field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(AnnotateFileRequest other)

public AnnotateFileRequest.Builder mergeFrom(AnnotateFileRequest other)
Parameter
Name Description
other AnnotateFileRequest
Returns
Type Description
AnnotateFileRequest.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public AnnotateFileRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AnnotateFileRequest.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public AnnotateFileRequest.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
AnnotateFileRequest.Builder
Overrides

mergeImageContext(ImageContext value)

public AnnotateFileRequest.Builder mergeImageContext(ImageContext value)

Additional context that may accompany the image(s) in the file.

.google.cloud.vision.v1p4beta1.ImageContext image_context = 3;

Parameter
Name Description
value ImageContext
Returns
Type Description
AnnotateFileRequest.Builder

mergeInputConfig(InputConfig value)

public AnnotateFileRequest.Builder mergeInputConfig(InputConfig value)

Required. Information about the input file.

.google.cloud.vision.v1p4beta1.InputConfig input_config = 1;

Parameter
Name Description
value InputConfig
Returns
Type Description
AnnotateFileRequest.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final AnnotateFileRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
AnnotateFileRequest.Builder
Overrides

removeFeatures(int index)

public AnnotateFileRequest.Builder removeFeatures(int index)

Required. Requested features.

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

Parameter
Name Description
index int
Returns
Type Description
AnnotateFileRequest.Builder

setFeatures(int index, Feature value)

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

Required. Requested features.

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

Parameters
Name Description
index int
value Feature
Returns
Type Description
AnnotateFileRequest.Builder

setFeatures(int index, Feature.Builder builderForValue)

public AnnotateFileRequest.Builder setFeatures(int index, Feature.Builder builderForValue)

Required. Requested features.

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

Parameters
Name Description
index int
builderForValue Feature.Builder
Returns
Type Description
AnnotateFileRequest.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public AnnotateFileRequest.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
AnnotateFileRequest.Builder
Overrides

setImageContext(ImageContext value)

public AnnotateFileRequest.Builder setImageContext(ImageContext value)

Additional context that may accompany the image(s) in the file.

.google.cloud.vision.v1p4beta1.ImageContext image_context = 3;

Parameter
Name Description
value ImageContext
Returns
Type Description
AnnotateFileRequest.Builder

setImageContext(ImageContext.Builder builderForValue)

public AnnotateFileRequest.Builder setImageContext(ImageContext.Builder builderForValue)

Additional context that may accompany the image(s) in the file.

.google.cloud.vision.v1p4beta1.ImageContext image_context = 3;

Parameter
Name Description
builderForValue ImageContext.Builder
Returns
Type Description
AnnotateFileRequest.Builder

setInputConfig(InputConfig value)

public AnnotateFileRequest.Builder setInputConfig(InputConfig value)

Required. Information about the input file.

.google.cloud.vision.v1p4beta1.InputConfig input_config = 1;

Parameter
Name Description
value InputConfig
Returns
Type Description
AnnotateFileRequest.Builder

setInputConfig(InputConfig.Builder builderForValue)

public AnnotateFileRequest.Builder setInputConfig(InputConfig.Builder builderForValue)

Required. Information about the input file.

.google.cloud.vision.v1p4beta1.InputConfig input_config = 1;

Parameter
Name Description
builderForValue InputConfig.Builder
Returns
Type Description
AnnotateFileRequest.Builder

setPages(int index, int value)

public AnnotateFileRequest.Builder setPages(int index, int value)

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;

Parameters
Name Description
index int

The index to set the value at.

value int

The pages to set.

Returns
Type Description
AnnotateFileRequest.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public AnnotateFileRequest.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
AnnotateFileRequest.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final AnnotateFileRequest.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
AnnotateFileRequest.Builder
Overrides