Class ProcessRequest.Builder (2.41.0)

public static final class ProcessRequest.Builder extends GeneratedMessageV3.Builder<ProcessRequest.Builder> implements ProcessRequestOrBuilder

Request message for the ProcessDocument method.

Protobuf type google.cloud.documentai.v1.ProcessRequest

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public ProcessRequest build()
Returns
TypeDescription
ProcessRequest

buildPartial()

public ProcessRequest buildPartial()
Returns
TypeDescription
ProcessRequest

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearFieldMask()

public ProcessRequest.Builder clearFieldMask()

Specifies which fields to include in the ProcessResponse.document output. Only supports top-level document and pages field, so it must be in the form of {document_field_name} or pages.{page_field_name}.

.google.protobuf.FieldMask field_mask = 6;

Returns
TypeDescription
ProcessRequest.Builder

clearGcsDocument()

public ProcessRequest.Builder clearGcsDocument()

A raw document on Google Cloud Storage.

.google.cloud.documentai.v1.GcsDocument gcs_document = 8;

Returns
TypeDescription
ProcessRequest.Builder

clearInlineDocument()

public ProcessRequest.Builder clearInlineDocument()

An inline document proto.

.google.cloud.documentai.v1.Document inline_document = 4;

Returns
TypeDescription
ProcessRequest.Builder

clearLabels()

public ProcessRequest.Builder clearLabels()
Returns
TypeDescription
ProcessRequest.Builder

clearName()

public ProcessRequest.Builder clearName()

Required. The resource name of the Processor or ProcessorVersion to use for processing. If a Processor is specified, the server will use its default version. Format: projects/{project}/locations/{location}/processors/{processor}, or projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}

string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
TypeDescription
ProcessRequest.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearProcessOptions()

public ProcessRequest.Builder clearProcessOptions()

Inference-time options for the process API

.google.cloud.documentai.v1.ProcessOptions process_options = 7;

Returns
TypeDescription
ProcessRequest.Builder

clearRawDocument()

public ProcessRequest.Builder clearRawDocument()

A raw document content (bytes).

.google.cloud.documentai.v1.RawDocument raw_document = 5;

Returns
TypeDescription
ProcessRequest.Builder

clearSkipHumanReview()

public ProcessRequest.Builder clearSkipHumanReview()

Whether human review should be skipped for this request. Default to false.

bool skip_human_review = 3;

Returns
TypeDescription
ProcessRequest.Builder

This builder for chaining.

clearSource()

public ProcessRequest.Builder clearSource()
Returns
TypeDescription
ProcessRequest.Builder

clone()

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

containsLabels(String key)

public boolean containsLabels(String key)

Optional. The labels with user-defined metadata for the request.

Label keys and values can be no longer than 63 characters (Unicode codepoints) and can only contain lowercase letters, numeric characters, underscores, and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter.

map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

getDefaultInstanceForType()

public ProcessRequest getDefaultInstanceForType()
Returns
TypeDescription
ProcessRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getFieldMask()

public FieldMask getFieldMask()

Specifies which fields to include in the ProcessResponse.document output. Only supports top-level document and pages field, so it must be in the form of {document_field_name} or pages.{page_field_name}.

.google.protobuf.FieldMask field_mask = 6;

Returns
TypeDescription
FieldMask

The fieldMask.

getFieldMaskBuilder()

public FieldMask.Builder getFieldMaskBuilder()

Specifies which fields to include in the ProcessResponse.document output. Only supports top-level document and pages field, so it must be in the form of {document_field_name} or pages.{page_field_name}.

.google.protobuf.FieldMask field_mask = 6;

Returns
TypeDescription
Builder

getFieldMaskOrBuilder()

public FieldMaskOrBuilder getFieldMaskOrBuilder()

Specifies which fields to include in the ProcessResponse.document output. Only supports top-level document and pages field, so it must be in the form of {document_field_name} or pages.{page_field_name}.

.google.protobuf.FieldMask field_mask = 6;

Returns
TypeDescription
FieldMaskOrBuilder

getGcsDocument()

public GcsDocument getGcsDocument()

A raw document on Google Cloud Storage.

.google.cloud.documentai.v1.GcsDocument gcs_document = 8;

Returns
TypeDescription
GcsDocument

The gcsDocument.

getGcsDocumentBuilder()

public GcsDocument.Builder getGcsDocumentBuilder()

A raw document on Google Cloud Storage.

.google.cloud.documentai.v1.GcsDocument gcs_document = 8;

Returns
TypeDescription
GcsDocument.Builder

getGcsDocumentOrBuilder()

public GcsDocumentOrBuilder getGcsDocumentOrBuilder()

A raw document on Google Cloud Storage.

.google.cloud.documentai.v1.GcsDocument gcs_document = 8;

Returns
TypeDescription
GcsDocumentOrBuilder

getInlineDocument()

public Document getInlineDocument()

An inline document proto.

.google.cloud.documentai.v1.Document inline_document = 4;

Returns
TypeDescription
Document

The inlineDocument.

getInlineDocumentBuilder()

public Document.Builder getInlineDocumentBuilder()

An inline document proto.

.google.cloud.documentai.v1.Document inline_document = 4;

Returns
TypeDescription
Document.Builder

getInlineDocumentOrBuilder()

public DocumentOrBuilder getInlineDocumentOrBuilder()

An inline document proto.

.google.cloud.documentai.v1.Document inline_document = 4;

Returns
TypeDescription
DocumentOrBuilder

getLabels() (deprecated)

public Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
TypeDescription
Map<String,String>

getLabelsCount()

public int getLabelsCount()

Optional. The labels with user-defined metadata for the request.

Label keys and values can be no longer than 63 characters (Unicode codepoints) and can only contain lowercase letters, numeric characters, underscores, and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter.

map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
int

getLabelsMap()

public Map<String,String> getLabelsMap()

Optional. The labels with user-defined metadata for the request.

Label keys and values can be no longer than 63 characters (Unicode codepoints) and can only contain lowercase letters, numeric characters, underscores, and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter.

map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
Map<String,String>

getLabelsOrDefault(String key, String defaultValue)

public String getLabelsOrDefault(String key, String defaultValue)

Optional. The labels with user-defined metadata for the request.

Label keys and values can be no longer than 63 characters (Unicode codepoints) and can only contain lowercase letters, numeric characters, underscores, and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter.

map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL];

Parameters
NameDescription
keyString
defaultValueString
Returns
TypeDescription
String

getLabelsOrThrow(String key)

public String getLabelsOrThrow(String key)

Optional. The labels with user-defined metadata for the request.

Label keys and values can be no longer than 63 characters (Unicode codepoints) and can only contain lowercase letters, numeric characters, underscores, and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter.

map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
keyString
Returns
TypeDescription
String

getMutableLabels() (deprecated)

public Map<String,String> getMutableLabels()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,String>

getName()

public String getName()

Required. The resource name of the Processor or ProcessorVersion to use for processing. If a Processor is specified, the server will use its default version. Format: projects/{project}/locations/{location}/processors/{processor}, or projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}

string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

Required. The resource name of the Processor or ProcessorVersion to use for processing. If a Processor is specified, the server will use its default version. Format: projects/{project}/locations/{location}/processors/{processor}, or projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}

string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
TypeDescription
ByteString

The bytes for name.

getProcessOptions()

public ProcessOptions getProcessOptions()

Inference-time options for the process API

.google.cloud.documentai.v1.ProcessOptions process_options = 7;

Returns
TypeDescription
ProcessOptions

The processOptions.

getProcessOptionsBuilder()

public ProcessOptions.Builder getProcessOptionsBuilder()

Inference-time options for the process API

.google.cloud.documentai.v1.ProcessOptions process_options = 7;

Returns
TypeDescription
ProcessOptions.Builder

getProcessOptionsOrBuilder()

public ProcessOptionsOrBuilder getProcessOptionsOrBuilder()

Inference-time options for the process API

.google.cloud.documentai.v1.ProcessOptions process_options = 7;

Returns
TypeDescription
ProcessOptionsOrBuilder

getRawDocument()

public RawDocument getRawDocument()

A raw document content (bytes).

.google.cloud.documentai.v1.RawDocument raw_document = 5;

Returns
TypeDescription
RawDocument

The rawDocument.

getRawDocumentBuilder()

public RawDocument.Builder getRawDocumentBuilder()

A raw document content (bytes).

.google.cloud.documentai.v1.RawDocument raw_document = 5;

Returns
TypeDescription
RawDocument.Builder

getRawDocumentOrBuilder()

public RawDocumentOrBuilder getRawDocumentOrBuilder()

A raw document content (bytes).

.google.cloud.documentai.v1.RawDocument raw_document = 5;

Returns
TypeDescription
RawDocumentOrBuilder

getSkipHumanReview()

public boolean getSkipHumanReview()

Whether human review should be skipped for this request. Default to false.

bool skip_human_review = 3;

Returns
TypeDescription
boolean

The skipHumanReview.

getSourceCase()

public ProcessRequest.SourceCase getSourceCase()
Returns
TypeDescription
ProcessRequest.SourceCase

hasFieldMask()

public boolean hasFieldMask()

Specifies which fields to include in the ProcessResponse.document output. Only supports top-level document and pages field, so it must be in the form of {document_field_name} or pages.{page_field_name}.

.google.protobuf.FieldMask field_mask = 6;

Returns
TypeDescription
boolean

Whether the fieldMask field is set.

hasGcsDocument()

public boolean hasGcsDocument()

A raw document on Google Cloud Storage.

.google.cloud.documentai.v1.GcsDocument gcs_document = 8;

Returns
TypeDescription
boolean

Whether the gcsDocument field is set.

hasInlineDocument()

public boolean hasInlineDocument()

An inline document proto.

.google.cloud.documentai.v1.Document inline_document = 4;

Returns
TypeDescription
boolean

Whether the inlineDocument field is set.

hasProcessOptions()

public boolean hasProcessOptions()

Inference-time options for the process API

.google.cloud.documentai.v1.ProcessOptions process_options = 7;

Returns
TypeDescription
boolean

Whether the processOptions field is set.

hasRawDocument()

public boolean hasRawDocument()

A raw document content (bytes).

.google.cloud.documentai.v1.RawDocument raw_document = 5;

Returns
TypeDescription
boolean

Whether the rawDocument field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)

internalGetMutableMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFieldMask(FieldMask value)

public ProcessRequest.Builder mergeFieldMask(FieldMask value)

Specifies which fields to include in the ProcessResponse.document output. Only supports top-level document and pages field, so it must be in the form of {document_field_name} or pages.{page_field_name}.

.google.protobuf.FieldMask field_mask = 6;

Parameter
NameDescription
valueFieldMask
Returns
TypeDescription
ProcessRequest.Builder

mergeFrom(ProcessRequest other)

public ProcessRequest.Builder mergeFrom(ProcessRequest other)
Parameter
NameDescription
otherProcessRequest
Returns
TypeDescription
ProcessRequest.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeGcsDocument(GcsDocument value)

public ProcessRequest.Builder mergeGcsDocument(GcsDocument value)

A raw document on Google Cloud Storage.

.google.cloud.documentai.v1.GcsDocument gcs_document = 8;

Parameter
NameDescription
valueGcsDocument
Returns
TypeDescription
ProcessRequest.Builder

mergeInlineDocument(Document value)

public ProcessRequest.Builder mergeInlineDocument(Document value)

An inline document proto.

.google.cloud.documentai.v1.Document inline_document = 4;

Parameter
NameDescription
valueDocument
Returns
TypeDescription
ProcessRequest.Builder

mergeProcessOptions(ProcessOptions value)

public ProcessRequest.Builder mergeProcessOptions(ProcessOptions value)

Inference-time options for the process API

.google.cloud.documentai.v1.ProcessOptions process_options = 7;

Parameter
NameDescription
valueProcessOptions
Returns
TypeDescription
ProcessRequest.Builder

mergeRawDocument(RawDocument value)

public ProcessRequest.Builder mergeRawDocument(RawDocument value)

A raw document content (bytes).

.google.cloud.documentai.v1.RawDocument raw_document = 5;

Parameter
NameDescription
valueRawDocument
Returns
TypeDescription
ProcessRequest.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

putAllLabels(Map<String,String> values)

public ProcessRequest.Builder putAllLabels(Map<String,String> values)

Optional. The labels with user-defined metadata for the request.

Label keys and values can be no longer than 63 characters (Unicode codepoints) and can only contain lowercase letters, numeric characters, underscores, and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter.

map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valuesMap<String,String>
Returns
TypeDescription
ProcessRequest.Builder

putLabels(String key, String value)

public ProcessRequest.Builder putLabels(String key, String value)

Optional. The labels with user-defined metadata for the request.

Label keys and values can be no longer than 63 characters (Unicode codepoints) and can only contain lowercase letters, numeric characters, underscores, and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter.

map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL];

Parameters
NameDescription
keyString
valueString
Returns
TypeDescription
ProcessRequest.Builder

removeLabels(String key)

public ProcessRequest.Builder removeLabels(String key)

Optional. The labels with user-defined metadata for the request.

Label keys and values can be no longer than 63 characters (Unicode codepoints) and can only contain lowercase letters, numeric characters, underscores, and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter.

map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
keyString
Returns
TypeDescription
ProcessRequest.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setFieldMask(FieldMask value)

public ProcessRequest.Builder setFieldMask(FieldMask value)

Specifies which fields to include in the ProcessResponse.document output. Only supports top-level document and pages field, so it must be in the form of {document_field_name} or pages.{page_field_name}.

.google.protobuf.FieldMask field_mask = 6;

Parameter
NameDescription
valueFieldMask
Returns
TypeDescription
ProcessRequest.Builder

setFieldMask(FieldMask.Builder builderForValue)

public ProcessRequest.Builder setFieldMask(FieldMask.Builder builderForValue)

Specifies which fields to include in the ProcessResponse.document output. Only supports top-level document and pages field, so it must be in the form of {document_field_name} or pages.{page_field_name}.

.google.protobuf.FieldMask field_mask = 6;

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
ProcessRequest.Builder

setGcsDocument(GcsDocument value)

public ProcessRequest.Builder setGcsDocument(GcsDocument value)

A raw document on Google Cloud Storage.

.google.cloud.documentai.v1.GcsDocument gcs_document = 8;

Parameter
NameDescription
valueGcsDocument
Returns
TypeDescription
ProcessRequest.Builder

setGcsDocument(GcsDocument.Builder builderForValue)

public ProcessRequest.Builder setGcsDocument(GcsDocument.Builder builderForValue)

A raw document on Google Cloud Storage.

.google.cloud.documentai.v1.GcsDocument gcs_document = 8;

Parameter
NameDescription
builderForValueGcsDocument.Builder
Returns
TypeDescription
ProcessRequest.Builder

setInlineDocument(Document value)

public ProcessRequest.Builder setInlineDocument(Document value)

An inline document proto.

.google.cloud.documentai.v1.Document inline_document = 4;

Parameter
NameDescription
valueDocument
Returns
TypeDescription
ProcessRequest.Builder

setInlineDocument(Document.Builder builderForValue)

public ProcessRequest.Builder setInlineDocument(Document.Builder builderForValue)

An inline document proto.

.google.cloud.documentai.v1.Document inline_document = 4;

Parameter
NameDescription
builderForValueDocument.Builder
Returns
TypeDescription
ProcessRequest.Builder

setName(String value)

public ProcessRequest.Builder setName(String value)

Required. The resource name of the Processor or ProcessorVersion to use for processing. If a Processor is specified, the server will use its default version. Format: projects/{project}/locations/{location}/processors/{processor}, or projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}

string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
ProcessRequest.Builder

This builder for chaining.

setNameBytes(ByteString value)

public ProcessRequest.Builder setNameBytes(ByteString value)

Required. The resource name of the Processor or ProcessorVersion to use for processing. If a Processor is specified, the server will use its default version. Format: projects/{project}/locations/{location}/processors/{processor}, or projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}

string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
ProcessRequest.Builder

This builder for chaining.

setProcessOptions(ProcessOptions value)

public ProcessRequest.Builder setProcessOptions(ProcessOptions value)

Inference-time options for the process API

.google.cloud.documentai.v1.ProcessOptions process_options = 7;

Parameter
NameDescription
valueProcessOptions
Returns
TypeDescription
ProcessRequest.Builder

setProcessOptions(ProcessOptions.Builder builderForValue)

public ProcessRequest.Builder setProcessOptions(ProcessOptions.Builder builderForValue)

Inference-time options for the process API

.google.cloud.documentai.v1.ProcessOptions process_options = 7;

Parameter
NameDescription
builderForValueProcessOptions.Builder
Returns
TypeDescription
ProcessRequest.Builder

setRawDocument(RawDocument value)

public ProcessRequest.Builder setRawDocument(RawDocument value)

A raw document content (bytes).

.google.cloud.documentai.v1.RawDocument raw_document = 5;

Parameter
NameDescription
valueRawDocument
Returns
TypeDescription
ProcessRequest.Builder

setRawDocument(RawDocument.Builder builderForValue)

public ProcessRequest.Builder setRawDocument(RawDocument.Builder builderForValue)

A raw document content (bytes).

.google.cloud.documentai.v1.RawDocument raw_document = 5;

Parameter
NameDescription
builderForValueRawDocument.Builder
Returns
TypeDescription
ProcessRequest.Builder

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

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

setSkipHumanReview(boolean value)

public ProcessRequest.Builder setSkipHumanReview(boolean value)

Whether human review should be skipped for this request. Default to false.

bool skip_human_review = 3;

Parameter
NameDescription
valueboolean

The skipHumanReview to set.

Returns
TypeDescription
ProcessRequest.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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