Class AnnotateFileRequest.Builder (3.30.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.v1.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.v1.Feature features = 2;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.vision.v1.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.v1.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.v1.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.v1.Feature features = 2;

Parameters
NameDescription
indexint
valueFeature
Returns
TypeDescription
AnnotateFileRequest.Builder

addFeatures(int index, Feature.Builder builderForValue)

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

Required. Requested features.

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

Parameters
NameDescription
indexint
builderForValueFeature.Builder
Returns
TypeDescription
AnnotateFileRequest.Builder

addFeaturesBuilder()

public Feature.Builder addFeaturesBuilder()

Required. Requested features.

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

Returns
TypeDescription
Feature.Builder

addFeaturesBuilder(int index)

public Feature.Builder addFeaturesBuilder(int index)

Required. Requested features.

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

Parameter
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
valueint

The pages to add.

Returns
TypeDescription
AnnotateFileRequest.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public AnnotateFileRequest.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
AnnotateFileRequest.Builder
Overrides

build()

public AnnotateFileRequest build()
Returns
TypeDescription
AnnotateFileRequest

buildPartial()

public AnnotateFileRequest buildPartial()
Returns
TypeDescription
AnnotateFileRequest

clear()

public AnnotateFileRequest.Builder clear()
Returns
TypeDescription
AnnotateFileRequest.Builder
Overrides

clearFeatures()

public AnnotateFileRequest.Builder clearFeatures()

Required. Requested features.

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

Returns
TypeDescription
AnnotateFileRequest.Builder

clearField(Descriptors.FieldDescriptor field)

public AnnotateFileRequest.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
AnnotateFileRequest.Builder
Overrides

clearImageContext()

public AnnotateFileRequest.Builder clearImageContext()

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

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

Returns
TypeDescription
AnnotateFileRequest.Builder

clearInputConfig()

public AnnotateFileRequest.Builder clearInputConfig()

Required. Information about the input file.

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

Returns
TypeDescription
AnnotateFileRequest.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public AnnotateFileRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
AnnotateFileRequest.Builder

This builder for chaining.

clone()

public AnnotateFileRequest.Builder clone()
Returns
TypeDescription
AnnotateFileRequest.Builder
Overrides

getDefaultInstanceForType()

public AnnotateFileRequest getDefaultInstanceForType()
Returns
TypeDescription
AnnotateFileRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getFeatures(int index)

public Feature getFeatures(int index)

Required. Requested features.

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

Parameter
NameDescription
indexint
Returns
TypeDescription
Feature

getFeaturesBuilder(int index)

public Feature.Builder getFeaturesBuilder(int index)

Required. Requested features.

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

Parameter
NameDescription
indexint
Returns
TypeDescription
Feature.Builder

getFeaturesBuilderList()

public List<Feature.Builder> getFeaturesBuilderList()

Required. Requested features.

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

Returns
TypeDescription
List<Builder>

getFeaturesCount()

public int getFeaturesCount()

Required. Requested features.

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

Returns
TypeDescription
int

getFeaturesList()

public List<Feature> getFeaturesList()

Required. Requested features.

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

Returns
TypeDescription
List<Feature>

getFeaturesOrBuilder(int index)

public FeatureOrBuilder getFeaturesOrBuilder(int index)

Required. Requested features.

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

Parameter
NameDescription
indexint
Returns
TypeDescription
FeatureOrBuilder

getFeaturesOrBuilderList()

public List<? extends FeatureOrBuilder> getFeaturesOrBuilderList()

Required. Requested features.

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

Returns
TypeDescription
List<? extends com.google.cloud.vision.v1.FeatureOrBuilder>

getImageContext()

public ImageContext getImageContext()

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

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

Returns
TypeDescription
ImageContext

The imageContext.

getImageContextBuilder()

public ImageContext.Builder getImageContextBuilder()

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

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

Returns
TypeDescription
ImageContext.Builder

getImageContextOrBuilder()

public ImageContextOrBuilder getImageContextOrBuilder()

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

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

Returns
TypeDescription
ImageContextOrBuilder

getInputConfig()

public InputConfig getInputConfig()

Required. Information about the input file.

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

Returns
TypeDescription
InputConfig

The inputConfig.

getInputConfigBuilder()

public InputConfig.Builder getInputConfigBuilder()

Required. Information about the input file.

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

Returns
TypeDescription
InputConfig.Builder

getInputConfigOrBuilder()

public InputConfigOrBuilder getInputConfigOrBuilder()

Required. Information about the input file.

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

Returns
TypeDescription
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
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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.v1.ImageContext image_context = 3;

Returns
TypeDescription
boolean

Whether the imageContext field is set.

hasInputConfig()

public boolean hasInputConfig()

Required. Information about the input file.

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

Returns
TypeDescription
boolean

Whether the inputConfig field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(AnnotateFileRequest other)

public AnnotateFileRequest.Builder mergeFrom(AnnotateFileRequest other)
Parameter
NameDescription
otherAnnotateFileRequest
Returns
TypeDescription
AnnotateFileRequest.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public AnnotateFileRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AnnotateFileRequest.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public AnnotateFileRequest.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
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.v1.ImageContext image_context = 3;

Parameter
NameDescription
valueImageContext
Returns
TypeDescription
AnnotateFileRequest.Builder

mergeInputConfig(InputConfig value)

public AnnotateFileRequest.Builder mergeInputConfig(InputConfig value)

Required. Information about the input file.

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

Parameter
NameDescription
valueInputConfig
Returns
TypeDescription
AnnotateFileRequest.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final AnnotateFileRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
AnnotateFileRequest.Builder
Overrides

removeFeatures(int index)

public AnnotateFileRequest.Builder removeFeatures(int index)

Required. Requested features.

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

Parameter
NameDescription
indexint
Returns
TypeDescription
AnnotateFileRequest.Builder

setFeatures(int index, Feature value)

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

Required. Requested features.

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

Parameters
NameDescription
indexint
valueFeature
Returns
TypeDescription
AnnotateFileRequest.Builder

setFeatures(int index, Feature.Builder builderForValue)

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

Required. Requested features.

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

Parameters
NameDescription
indexint
builderForValueFeature.Builder
Returns
TypeDescription
AnnotateFileRequest.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public AnnotateFileRequest.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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.v1.ImageContext image_context = 3;

Parameter
NameDescription
valueImageContext
Returns
TypeDescription
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.v1.ImageContext image_context = 3;

Parameter
NameDescription
builderForValueImageContext.Builder
Returns
TypeDescription
AnnotateFileRequest.Builder

setInputConfig(InputConfig value)

public AnnotateFileRequest.Builder setInputConfig(InputConfig value)

Required. Information about the input file.

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

Parameter
NameDescription
valueInputConfig
Returns
TypeDescription
AnnotateFileRequest.Builder

setInputConfig(InputConfig.Builder builderForValue)

public AnnotateFileRequest.Builder setInputConfig(InputConfig.Builder builderForValue)

Required. Information about the input file.

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

Parameter
NameDescription
builderForValueInputConfig.Builder
Returns
TypeDescription
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
NameDescription
indexint

The index to set the value at.

valueint

The pages to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
AnnotateFileRequest.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final AnnotateFileRequest.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
AnnotateFileRequest.Builder
Overrides