Class AnnotateFileRequest (3.2.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
TypeDescription
int

IMAGE_CONTEXT_FIELD_NUMBER

public static final int IMAGE_CONTEXT_FIELD_NUMBER
Field Value
TypeDescription
int

INPUT_CONFIG_FIELD_NUMBER

public static final int INPUT_CONFIG_FIELD_NUMBER
Field Value
TypeDescription
int

PAGES_FIELD_NUMBER

public static final int PAGES_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static AnnotateFileRequest getDefaultInstance()
Returns
TypeDescription
AnnotateFileRequest

getDescriptor()

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

newBuilder()

public static AnnotateFileRequest.Builder newBuilder()
Returns
TypeDescription
AnnotateFileRequest.Builder

newBuilder(AnnotateFileRequest prototype)

public static AnnotateFileRequest.Builder newBuilder(AnnotateFileRequest prototype)
Parameter
NameDescription
prototypeAnnotateFileRequest
Returns
TypeDescription
AnnotateFileRequest.Builder

parseDelimitedFrom(InputStream input)

public static AnnotateFileRequest parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
AnnotateFileRequest
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static AnnotateFileRequest parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AnnotateFileRequest
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static AnnotateFileRequest parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
AnnotateFileRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static AnnotateFileRequest parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AnnotateFileRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static AnnotateFileRequest parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
AnnotateFileRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static AnnotateFileRequest parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AnnotateFileRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static AnnotateFileRequest parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
AnnotateFileRequest
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static AnnotateFileRequest parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AnnotateFileRequest
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static AnnotateFileRequest parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
AnnotateFileRequest
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static AnnotateFileRequest parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AnnotateFileRequest
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static AnnotateFileRequest parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
AnnotateFileRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static AnnotateFileRequest parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AnnotateFileRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<AnnotateFileRequest> parser()
Returns
TypeDescription
Parser<AnnotateFileRequest>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

public AnnotateFileRequest getDefaultInstanceForType()
Returns
TypeDescription
AnnotateFileRequest

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

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.

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.

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.

getParserForType()

public Parser<AnnotateFileRequest> getParserForType()
Returns
TypeDescription
Parser<AnnotateFileRequest>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
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
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.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public AnnotateFileRequest.Builder newBuilderForType()
Returns
TypeDescription
AnnotateFileRequest.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected AnnotateFileRequest.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
AnnotateFileRequest.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public AnnotateFileRequest.Builder toBuilder()
Returns
TypeDescription
AnnotateFileRequest.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides Exceptions
TypeDescription
IOException