Class AnnotateFileRequest (3.53.0)

public final class AnnotateFileRequest extends GeneratedMessageV3 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 Fields

FEATURES_FIELD_NUMBER

public static final int FEATURES_FIELD_NUMBER
Field Value
Type Description
int

IMAGE_CONTEXT_FIELD_NUMBER

public static final int IMAGE_CONTEXT_FIELD_NUMBER
Field Value
Type Description
int

INPUT_CONFIG_FIELD_NUMBER

public static final int INPUT_CONFIG_FIELD_NUMBER
Field Value
Type Description
int

PAGES_FIELD_NUMBER

public static final int PAGES_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static AnnotateFileRequest getDefaultInstance()
Returns
Type Description
AnnotateFileRequest

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static AnnotateFileRequest.Builder newBuilder()
Returns
Type Description
AnnotateFileRequest.Builder

newBuilder(AnnotateFileRequest prototype)

public static AnnotateFileRequest.Builder newBuilder(AnnotateFileRequest prototype)
Parameter
Name Description
prototype AnnotateFileRequest
Returns
Type Description
AnnotateFileRequest.Builder

parseDelimitedFrom(InputStream input)

public static AnnotateFileRequest parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
AnnotateFileRequest
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static AnnotateFileRequest parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AnnotateFileRequest
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static AnnotateFileRequest parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
AnnotateFileRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static AnnotateFileRequest parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AnnotateFileRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static AnnotateFileRequest parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
AnnotateFileRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static AnnotateFileRequest parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AnnotateFileRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static AnnotateFileRequest parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
AnnotateFileRequest
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static AnnotateFileRequest parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AnnotateFileRequest
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static AnnotateFileRequest parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
AnnotateFileRequest
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static AnnotateFileRequest parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AnnotateFileRequest
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static AnnotateFileRequest parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
AnnotateFileRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static AnnotateFileRequest parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AnnotateFileRequest
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<AnnotateFileRequest> parser()
Returns
Type Description
Parser<AnnotateFileRequest>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getDefaultInstanceForType()

public AnnotateFileRequest getDefaultInstanceForType()
Returns
Type Description
AnnotateFileRequest

getFeatures(int index)

public Feature getFeatures(int index)

Required. Requested features.

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

Parameter
Name Description
index int
Returns
Type Description
Feature

getFeaturesCount()

public int getFeaturesCount()

Required. Requested features.

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

Returns
Type Description
int

getFeaturesList()

public List<Feature> getFeaturesList()

Required. Requested features.

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

Returns
Type Description
List<Feature>

getFeaturesOrBuilder(int index)

public FeatureOrBuilder getFeaturesOrBuilder(int index)

Required. Requested features.

repeated .google.cloud.vision.v1.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.v1.Feature features = 2;

Returns
Type Description
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
Type Description
ImageContext

The imageContext.

getImageContextOrBuilder()

public ImageContextOrBuilder getImageContextOrBuilder()

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

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

Returns
Type Description
ImageContextOrBuilder

getInputConfig()

public InputConfig getInputConfig()

Required. Information about the input file.

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

Returns
Type Description
InputConfig

The inputConfig.

getInputConfigOrBuilder()

public InputConfigOrBuilder getInputConfigOrBuilder()

Required. Information about the input file.

.google.cloud.vision.v1.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.

getParserForType()

public Parser<AnnotateFileRequest> getParserForType()
Returns
Type Description
Parser<AnnotateFileRequest>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

hasImageContext()

public boolean hasImageContext()

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

.google.cloud.vision.v1.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.v1.InputConfig input_config = 1;

Returns
Type Description
boolean

Whether the inputConfig field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public AnnotateFileRequest.Builder newBuilderForType()
Returns
Type Description
AnnotateFileRequest.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected AnnotateFileRequest.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
AnnotateFileRequest.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public AnnotateFileRequest.Builder toBuilder()
Returns
Type Description
AnnotateFileRequest.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException