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
IMAGE_CONTEXT_FIELD_NUMBER
public static final int IMAGE_CONTEXT_FIELD_NUMBER
Field Value
public static final int INPUT_CONFIG_FIELD_NUMBER
Field Value
PAGES_FIELD_NUMBER
public static final int PAGES_FIELD_NUMBER
Field Value
Static Methods
getDefaultInstance()
public static AnnotateFileRequest getDefaultInstance()
Returns
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
newBuilder()
public static AnnotateFileRequest.Builder newBuilder()
Returns
newBuilder(AnnotateFileRequest prototype)
public static AnnotateFileRequest.Builder newBuilder(AnnotateFileRequest prototype)
Parameter
Returns
public static AnnotateFileRequest parseDelimitedFrom(InputStream input)
Parameter
Returns
Exceptions
public static AnnotateFileRequest parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(byte[] data)
public static AnnotateFileRequest parseFrom(byte[] data)
Parameter
Name | Description |
data | byte[]
|
Returns
Exceptions
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static AnnotateFileRequest parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteString data)
public static AnnotateFileRequest parseFrom(ByteString data)
Parameter
Returns
Exceptions
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static AnnotateFileRequest parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static AnnotateFileRequest parseFrom(CodedInputStream input)
Parameter
Returns
Exceptions
public static AnnotateFileRequest parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static AnnotateFileRequest parseFrom(InputStream input)
Parameter
Returns
Exceptions
public static AnnotateFileRequest parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteBuffer data)
public static AnnotateFileRequest parseFrom(ByteBuffer data)
Parameter
Returns
Exceptions
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static AnnotateFileRequest parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parser()
public static Parser<AnnotateFileRequest> parser()
Returns
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter
Returns
Overrides
getDefaultInstanceForType()
public AnnotateFileRequest getDefaultInstanceForType()
Returns
getFeatures(int index)
public Feature getFeatures(int index)
Required. Requested features.
repeated .google.cloud.vision.v1.Feature features = 2;
Parameter
Returns
getFeaturesCount()
public int getFeaturesCount()
Required. Requested features.
repeated .google.cloud.vision.v1.Feature features = 2;
Returns
getFeaturesList()
public List<Feature> getFeaturesList()
Required. Requested features.
repeated .google.cloud.vision.v1.Feature features = 2;
Returns
getFeaturesOrBuilder(int index)
public FeatureOrBuilder getFeaturesOrBuilder(int index)
Required. Requested features.
repeated .google.cloud.vision.v1.Feature features = 2;
Parameter
Returns
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
getImageContextOrBuilder()
public ImageContextOrBuilder getImageContextOrBuilder()
Additional context that may accompany the image(s) in the file.
.google.cloud.vision.v1.ImageContext image_context = 3;
Returns
public InputConfig getInputConfig()
Required. Information about the input file.
.google.cloud.vision.v1.InputConfig input_config = 1;
Returns
public InputConfigOrBuilder getInputConfigOrBuilder()
Required. Information about the input file.
.google.cloud.vision.v1.InputConfig input_config = 1;
Returns
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
Overrides
getSerializedSize()
public int getSerializedSize()
Returns
Overrides
getUnknownFields()
public final UnknownFieldSet getUnknownFields()
Returns
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.
|
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()
Returns
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
newBuilderForType()
public AnnotateFileRequest.Builder newBuilderForType()
Returns
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected AnnotateFileRequest.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Returns
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Returns
Overrides
toBuilder()
public AnnotateFileRequest.Builder toBuilder()
Returns
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Parameter
Overrides
Exceptions