Class AnnotateFileResponse.Builder (3.26.0)

public static final class AnnotateFileResponse.Builder extends GeneratedMessageV3.Builder<AnnotateFileResponse.Builder> implements AnnotateFileResponseOrBuilder

Response to a single file annotation request. A file may contain one or more images, which individually have their own responses.

Protobuf type google.cloud.vision.v1.AnnotateFileResponse

Static Methods

getDescriptor()

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

Methods

addAllResponses(Iterable<? extends AnnotateImageResponse> values)

public AnnotateFileResponse.Builder addAllResponses(Iterable<? extends AnnotateImageResponse> values)

Individual responses to images found within the file. This field will be empty if the error field is set.

repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.vision.v1.AnnotateImageResponse>
Returns
TypeDescription
AnnotateFileResponse.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

addResponses(AnnotateImageResponse value)

public AnnotateFileResponse.Builder addResponses(AnnotateImageResponse value)

Individual responses to images found within the file. This field will be empty if the error field is set.

repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2;

Parameter
NameDescription
valueAnnotateImageResponse
Returns
TypeDescription
AnnotateFileResponse.Builder

addResponses(AnnotateImageResponse.Builder builderForValue)

public AnnotateFileResponse.Builder addResponses(AnnotateImageResponse.Builder builderForValue)

Individual responses to images found within the file. This field will be empty if the error field is set.

repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2;

Parameter
NameDescription
builderForValueAnnotateImageResponse.Builder
Returns
TypeDescription
AnnotateFileResponse.Builder

addResponses(int index, AnnotateImageResponse value)

public AnnotateFileResponse.Builder addResponses(int index, AnnotateImageResponse value)

Individual responses to images found within the file. This field will be empty if the error field is set.

repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2;

Parameters
NameDescription
indexint
valueAnnotateImageResponse
Returns
TypeDescription
AnnotateFileResponse.Builder

addResponses(int index, AnnotateImageResponse.Builder builderForValue)

public AnnotateFileResponse.Builder addResponses(int index, AnnotateImageResponse.Builder builderForValue)

Individual responses to images found within the file. This field will be empty if the error field is set.

repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2;

Parameters
NameDescription
indexint
builderForValueAnnotateImageResponse.Builder
Returns
TypeDescription
AnnotateFileResponse.Builder

addResponsesBuilder()

public AnnotateImageResponse.Builder addResponsesBuilder()

Individual responses to images found within the file. This field will be empty if the error field is set.

repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2;

Returns
TypeDescription
AnnotateImageResponse.Builder

addResponsesBuilder(int index)

public AnnotateImageResponse.Builder addResponsesBuilder(int index)

Individual responses to images found within the file. This field will be empty if the error field is set.

repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
AnnotateImageResponse.Builder

build()

public AnnotateFileResponse build()
Returns
TypeDescription
AnnotateFileResponse

buildPartial()

public AnnotateFileResponse buildPartial()
Returns
TypeDescription
AnnotateFileResponse

clear()

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

clearError()

public AnnotateFileResponse.Builder clearError()

If set, represents the error message for the failed request. The responses field will not be set in this case.

.google.rpc.Status error = 4;

Returns
TypeDescription
AnnotateFileResponse.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearInputConfig()

public AnnotateFileResponse.Builder clearInputConfig()

Information about the file for which this response is generated.

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

Returns
TypeDescription
AnnotateFileResponse.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public AnnotateFileResponse.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
AnnotateFileResponse.Builder
Overrides

clearResponses()

public AnnotateFileResponse.Builder clearResponses()

Individual responses to images found within the file. This field will be empty if the error field is set.

repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2;

Returns
TypeDescription
AnnotateFileResponse.Builder

clearTotalPages()

public AnnotateFileResponse.Builder clearTotalPages()

This field gives the total number of pages in the file.

int32 total_pages = 3;

Returns
TypeDescription
AnnotateFileResponse.Builder

This builder for chaining.

clone()

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

getDefaultInstanceForType()

public AnnotateFileResponse getDefaultInstanceForType()
Returns
TypeDescription
AnnotateFileResponse

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getError()

public Status getError()

If set, represents the error message for the failed request. The responses field will not be set in this case.

.google.rpc.Status error = 4;

Returns
TypeDescription
com.google.rpc.Status

The error.

getErrorBuilder()

public Status.Builder getErrorBuilder()

If set, represents the error message for the failed request. The responses field will not be set in this case.

.google.rpc.Status error = 4;

Returns
TypeDescription
com.google.rpc.Status.Builder

getErrorOrBuilder()

public StatusOrBuilder getErrorOrBuilder()

If set, represents the error message for the failed request. The responses field will not be set in this case.

.google.rpc.Status error = 4;

Returns
TypeDescription
com.google.rpc.StatusOrBuilder

getInputConfig()

public InputConfig getInputConfig()

Information about the file for which this response is generated.

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

Returns
TypeDescription
InputConfig

The inputConfig.

getInputConfigBuilder()

public InputConfig.Builder getInputConfigBuilder()

Information about the file for which this response is generated.

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

Returns
TypeDescription
InputConfig.Builder

getInputConfigOrBuilder()

public InputConfigOrBuilder getInputConfigOrBuilder()

Information about the file for which this response is generated.

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

Returns
TypeDescription
InputConfigOrBuilder

getResponses(int index)

public AnnotateImageResponse getResponses(int index)

Individual responses to images found within the file. This field will be empty if the error field is set.

repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
AnnotateImageResponse

getResponsesBuilder(int index)

public AnnotateImageResponse.Builder getResponsesBuilder(int index)

Individual responses to images found within the file. This field will be empty if the error field is set.

repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
AnnotateImageResponse.Builder

getResponsesBuilderList()

public List<AnnotateImageResponse.Builder> getResponsesBuilderList()

Individual responses to images found within the file. This field will be empty if the error field is set.

repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2;

Returns
TypeDescription
List<Builder>

getResponsesCount()

public int getResponsesCount()

Individual responses to images found within the file. This field will be empty if the error field is set.

repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2;

Returns
TypeDescription
int

getResponsesList()

public List<AnnotateImageResponse> getResponsesList()

Individual responses to images found within the file. This field will be empty if the error field is set.

repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2;

Returns
TypeDescription
List<AnnotateImageResponse>

getResponsesOrBuilder(int index)

public AnnotateImageResponseOrBuilder getResponsesOrBuilder(int index)

Individual responses to images found within the file. This field will be empty if the error field is set.

repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
AnnotateImageResponseOrBuilder

getResponsesOrBuilderList()

public List<? extends AnnotateImageResponseOrBuilder> getResponsesOrBuilderList()

Individual responses to images found within the file. This field will be empty if the error field is set.

repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2;

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

getTotalPages()

public int getTotalPages()

This field gives the total number of pages in the file.

int32 total_pages = 3;

Returns
TypeDescription
int

The totalPages.

hasError()

public boolean hasError()

If set, represents the error message for the failed request. The responses field will not be set in this case.

.google.rpc.Status error = 4;

Returns
TypeDescription
boolean

Whether the error field is set.

hasInputConfig()

public boolean hasInputConfig()

Information about the file for which this response is generated.

.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

mergeError(Status value)

public AnnotateFileResponse.Builder mergeError(Status value)

If set, represents the error message for the failed request. The responses field will not be set in this case.

.google.rpc.Status error = 4;

Parameter
NameDescription
valuecom.google.rpc.Status
Returns
TypeDescription
AnnotateFileResponse.Builder

mergeFrom(AnnotateFileResponse other)

public AnnotateFileResponse.Builder mergeFrom(AnnotateFileResponse other)
Parameter
NameDescription
otherAnnotateFileResponse
Returns
TypeDescription
AnnotateFileResponse.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

public AnnotateFileResponse.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
AnnotateFileResponse.Builder
Overrides

mergeInputConfig(InputConfig value)

public AnnotateFileResponse.Builder mergeInputConfig(InputConfig value)

Information about the file for which this response is generated.

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

Parameter
NameDescription
valueInputConfig
Returns
TypeDescription
AnnotateFileResponse.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

removeResponses(int index)

public AnnotateFileResponse.Builder removeResponses(int index)

Individual responses to images found within the file. This field will be empty if the error field is set.

repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
AnnotateFileResponse.Builder

setError(Status value)

public AnnotateFileResponse.Builder setError(Status value)

If set, represents the error message for the failed request. The responses field will not be set in this case.

.google.rpc.Status error = 4;

Parameter
NameDescription
valuecom.google.rpc.Status
Returns
TypeDescription
AnnotateFileResponse.Builder

setError(Status.Builder builderForValue)

public AnnotateFileResponse.Builder setError(Status.Builder builderForValue)

If set, represents the error message for the failed request. The responses field will not be set in this case.

.google.rpc.Status error = 4;

Parameter
NameDescription
builderForValuecom.google.rpc.Status.Builder
Returns
TypeDescription
AnnotateFileResponse.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setInputConfig(InputConfig value)

public AnnotateFileResponse.Builder setInputConfig(InputConfig value)

Information about the file for which this response is generated.

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

Parameter
NameDescription
valueInputConfig
Returns
TypeDescription
AnnotateFileResponse.Builder

setInputConfig(InputConfig.Builder builderForValue)

public AnnotateFileResponse.Builder setInputConfig(InputConfig.Builder builderForValue)

Information about the file for which this response is generated.

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

Parameter
NameDescription
builderForValueInputConfig.Builder
Returns
TypeDescription
AnnotateFileResponse.Builder

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

public AnnotateFileResponse.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
AnnotateFileResponse.Builder
Overrides

setResponses(int index, AnnotateImageResponse value)

public AnnotateFileResponse.Builder setResponses(int index, AnnotateImageResponse value)

Individual responses to images found within the file. This field will be empty if the error field is set.

repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2;

Parameters
NameDescription
indexint
valueAnnotateImageResponse
Returns
TypeDescription
AnnotateFileResponse.Builder

setResponses(int index, AnnotateImageResponse.Builder builderForValue)

public AnnotateFileResponse.Builder setResponses(int index, AnnotateImageResponse.Builder builderForValue)

Individual responses to images found within the file. This field will be empty if the error field is set.

repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2;

Parameters
NameDescription
indexint
builderForValueAnnotateImageResponse.Builder
Returns
TypeDescription
AnnotateFileResponse.Builder

setTotalPages(int value)

public AnnotateFileResponse.Builder setTotalPages(int value)

This field gives the total number of pages in the file.

int32 total_pages = 3;

Parameter
NameDescription
valueint

The totalPages to set.

Returns
TypeDescription
AnnotateFileResponse.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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