Class Processor.Builder (2.37.0)

public static final class Processor.Builder extends GeneratedMessageV3.Builder<Processor.Builder> implements ProcessorOrBuilder

The first-class citizen for Document AI. Each processor defines how to extract structural information from a document.

Protobuf type google.cloud.documentai.v1beta3.Processor

Implements

ProcessorOrBuilder

Static Methods

getDescriptor()

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

Methods

addAllProcessorVersionAliases(Iterable<? extends ProcessorVersionAlias> values)

public Processor.Builder addAllProcessorVersionAliases(Iterable<? extends ProcessorVersionAlias> values)

Output only. The processor version aliases.

repeated .google.cloud.documentai.v1beta3.ProcessorVersionAlias processor_version_aliases = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.documentai.v1beta3.ProcessorVersionAlias>
Returns
TypeDescription
Processor.Builder

addProcessorVersionAliases(ProcessorVersionAlias value)

public Processor.Builder addProcessorVersionAliases(ProcessorVersionAlias value)

Output only. The processor version aliases.

repeated .google.cloud.documentai.v1beta3.ProcessorVersionAlias processor_version_aliases = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueProcessorVersionAlias
Returns
TypeDescription
Processor.Builder

addProcessorVersionAliases(ProcessorVersionAlias.Builder builderForValue)

public Processor.Builder addProcessorVersionAliases(ProcessorVersionAlias.Builder builderForValue)

Output only. The processor version aliases.

repeated .google.cloud.documentai.v1beta3.ProcessorVersionAlias processor_version_aliases = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
builderForValueProcessorVersionAlias.Builder
Returns
TypeDescription
Processor.Builder

addProcessorVersionAliases(int index, ProcessorVersionAlias value)

public Processor.Builder addProcessorVersionAliases(int index, ProcessorVersionAlias value)

Output only. The processor version aliases.

repeated .google.cloud.documentai.v1beta3.ProcessorVersionAlias processor_version_aliases = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
NameDescription
indexint
valueProcessorVersionAlias
Returns
TypeDescription
Processor.Builder

addProcessorVersionAliases(int index, ProcessorVersionAlias.Builder builderForValue)

public Processor.Builder addProcessorVersionAliases(int index, ProcessorVersionAlias.Builder builderForValue)

Output only. The processor version aliases.

repeated .google.cloud.documentai.v1beta3.ProcessorVersionAlias processor_version_aliases = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
NameDescription
indexint
builderForValueProcessorVersionAlias.Builder
Returns
TypeDescription
Processor.Builder

addProcessorVersionAliasesBuilder()

public ProcessorVersionAlias.Builder addProcessorVersionAliasesBuilder()

Output only. The processor version aliases.

repeated .google.cloud.documentai.v1beta3.ProcessorVersionAlias processor_version_aliases = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
ProcessorVersionAlias.Builder

addProcessorVersionAliasesBuilder(int index)

public ProcessorVersionAlias.Builder addProcessorVersionAliasesBuilder(int index)

Output only. The processor version aliases.

repeated .google.cloud.documentai.v1beta3.ProcessorVersionAlias processor_version_aliases = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
indexint
Returns
TypeDescription
ProcessorVersionAlias.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Processor build()
Returns
TypeDescription
Processor

buildPartial()

public Processor buildPartial()
Returns
TypeDescription
Processor

clear()

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

clearCreateTime()

public Processor.Builder clearCreateTime()

The time the processor was created.

.google.protobuf.Timestamp create_time = 7;

Returns
TypeDescription
Processor.Builder

clearDefaultProcessorVersion()

public Processor.Builder clearDefaultProcessorVersion()

The default processor version.

string default_processor_version = 9 [(.google.api.resource_reference) = { ... }

Returns
TypeDescription
Processor.Builder

This builder for chaining.

clearDisplayName()

public Processor.Builder clearDisplayName()

The display name of the processor.

string display_name = 3;

Returns
TypeDescription
Processor.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearKmsKeyName()

public Processor.Builder clearKmsKeyName()

The KMS key used for encryption and decryption in CMEK scenarios.

string kms_key_name = 8;

Returns
TypeDescription
Processor.Builder

This builder for chaining.

clearName()

public Processor.Builder clearName()

Output only. Immutable. The resource name of the processor. Format: projects/{project}/locations/{location}/processors/{processor}

string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Processor.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearProcessEndpoint()

public Processor.Builder clearProcessEndpoint()

Output only. Immutable. The http endpoint that can be called to invoke processing.

string process_endpoint = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE];

Returns
TypeDescription
Processor.Builder

This builder for chaining.

clearProcessorVersionAliases()

public Processor.Builder clearProcessorVersionAliases()

Output only. The processor version aliases.

repeated .google.cloud.documentai.v1beta3.ProcessorVersionAlias processor_version_aliases = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Processor.Builder

clearState()

public Processor.Builder clearState()

Output only. The state of the processor.

.google.cloud.documentai.v1beta3.Processor.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Processor.Builder

This builder for chaining.

clearType()

public Processor.Builder clearType()

The processor type, such as: OCR_PROCESSOR, INVOICE_PROCESSOR. To get a list of processor types, see FetchProcessorTypes.

string type = 2;

Returns
TypeDescription
Processor.Builder

This builder for chaining.

clone()

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

getCreateTime()

public Timestamp getCreateTime()

The time the processor was created.

.google.protobuf.Timestamp create_time = 7;

Returns
TypeDescription
Timestamp

The createTime.

getCreateTimeBuilder()

public Timestamp.Builder getCreateTimeBuilder()

The time the processor was created.

.google.protobuf.Timestamp create_time = 7;

Returns
TypeDescription
Builder

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

The time the processor was created.

.google.protobuf.Timestamp create_time = 7;

Returns
TypeDescription
TimestampOrBuilder

getDefaultInstanceForType()

public Processor getDefaultInstanceForType()
Returns
TypeDescription
Processor

getDefaultProcessorVersion()

public String getDefaultProcessorVersion()

The default processor version.

string default_processor_version = 9 [(.google.api.resource_reference) = { ... }

Returns
TypeDescription
String

The defaultProcessorVersion.

getDefaultProcessorVersionBytes()

public ByteString getDefaultProcessorVersionBytes()

The default processor version.

string default_processor_version = 9 [(.google.api.resource_reference) = { ... }

Returns
TypeDescription
ByteString

The bytes for defaultProcessorVersion.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getDisplayName()

public String getDisplayName()

The display name of the processor.

string display_name = 3;

Returns
TypeDescription
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

The display name of the processor.

string display_name = 3;

Returns
TypeDescription
ByteString

The bytes for displayName.

getKmsKeyName()

public String getKmsKeyName()

The KMS key used for encryption and decryption in CMEK scenarios.

string kms_key_name = 8;

Returns
TypeDescription
String

The kmsKeyName.

getKmsKeyNameBytes()

public ByteString getKmsKeyNameBytes()

The KMS key used for encryption and decryption in CMEK scenarios.

string kms_key_name = 8;

Returns
TypeDescription
ByteString

The bytes for kmsKeyName.

getName()

public String getName()

Output only. Immutable. The resource name of the processor. Format: projects/{project}/locations/{location}/processors/{processor}

string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

Output only. Immutable. The resource name of the processor. Format: projects/{project}/locations/{location}/processors/{processor}

string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
ByteString

The bytes for name.

getProcessEndpoint()

public String getProcessEndpoint()

Output only. Immutable. The http endpoint that can be called to invoke processing.

string process_endpoint = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE];

Returns
TypeDescription
String

The processEndpoint.

getProcessEndpointBytes()

public ByteString getProcessEndpointBytes()

Output only. Immutable. The http endpoint that can be called to invoke processing.

string process_endpoint = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE];

Returns
TypeDescription
ByteString

The bytes for processEndpoint.

getProcessorVersionAliases(int index)

public ProcessorVersionAlias getProcessorVersionAliases(int index)

Output only. The processor version aliases.

repeated .google.cloud.documentai.v1beta3.ProcessorVersionAlias processor_version_aliases = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
indexint
Returns
TypeDescription
ProcessorVersionAlias

getProcessorVersionAliasesBuilder(int index)

public ProcessorVersionAlias.Builder getProcessorVersionAliasesBuilder(int index)

Output only. The processor version aliases.

repeated .google.cloud.documentai.v1beta3.ProcessorVersionAlias processor_version_aliases = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
indexint
Returns
TypeDescription
ProcessorVersionAlias.Builder

getProcessorVersionAliasesBuilderList()

public List<ProcessorVersionAlias.Builder> getProcessorVersionAliasesBuilderList()

Output only. The processor version aliases.

repeated .google.cloud.documentai.v1beta3.ProcessorVersionAlias processor_version_aliases = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
List<Builder>

getProcessorVersionAliasesCount()

public int getProcessorVersionAliasesCount()

Output only. The processor version aliases.

repeated .google.cloud.documentai.v1beta3.ProcessorVersionAlias processor_version_aliases = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
int

getProcessorVersionAliasesList()

public List<ProcessorVersionAlias> getProcessorVersionAliasesList()

Output only. The processor version aliases.

repeated .google.cloud.documentai.v1beta3.ProcessorVersionAlias processor_version_aliases = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
List<ProcessorVersionAlias>

getProcessorVersionAliasesOrBuilder(int index)

public ProcessorVersionAliasOrBuilder getProcessorVersionAliasesOrBuilder(int index)

Output only. The processor version aliases.

repeated .google.cloud.documentai.v1beta3.ProcessorVersionAlias processor_version_aliases = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
indexint
Returns
TypeDescription
ProcessorVersionAliasOrBuilder

getProcessorVersionAliasesOrBuilderList()

public List<? extends ProcessorVersionAliasOrBuilder> getProcessorVersionAliasesOrBuilderList()

Output only. The processor version aliases.

repeated .google.cloud.documentai.v1beta3.ProcessorVersionAlias processor_version_aliases = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
List<? extends com.google.cloud.documentai.v1beta3.ProcessorVersionAliasOrBuilder>

getState()

public Processor.State getState()

Output only. The state of the processor.

.google.cloud.documentai.v1beta3.Processor.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Processor.State

The state.

getStateValue()

public int getStateValue()

Output only. The state of the processor.

.google.cloud.documentai.v1beta3.Processor.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
int

The enum numeric value on the wire for state.

getType()

public String getType()

The processor type, such as: OCR_PROCESSOR, INVOICE_PROCESSOR. To get a list of processor types, see FetchProcessorTypes.

string type = 2;

Returns
TypeDescription
String

The type.

getTypeBytes()

public ByteString getTypeBytes()

The processor type, such as: OCR_PROCESSOR, INVOICE_PROCESSOR. To get a list of processor types, see FetchProcessorTypes.

string type = 2;

Returns
TypeDescription
ByteString

The bytes for type.

hasCreateTime()

public boolean hasCreateTime()

The time the processor was created.

.google.protobuf.Timestamp create_time = 7;

Returns
TypeDescription
boolean

Whether the createTime field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeCreateTime(Timestamp value)

public Processor.Builder mergeCreateTime(Timestamp value)

The time the processor was created.

.google.protobuf.Timestamp create_time = 7;

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
Processor.Builder

mergeFrom(Processor other)

public Processor.Builder mergeFrom(Processor other)
Parameter
NameDescription
otherProcessor
Returns
TypeDescription
Processor.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

removeProcessorVersionAliases(int index)

public Processor.Builder removeProcessorVersionAliases(int index)

Output only. The processor version aliases.

repeated .google.cloud.documentai.v1beta3.ProcessorVersionAlias processor_version_aliases = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
indexint
Returns
TypeDescription
Processor.Builder

setCreateTime(Timestamp value)

public Processor.Builder setCreateTime(Timestamp value)

The time the processor was created.

.google.protobuf.Timestamp create_time = 7;

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
Processor.Builder

setCreateTime(Timestamp.Builder builderForValue)

public Processor.Builder setCreateTime(Timestamp.Builder builderForValue)

The time the processor was created.

.google.protobuf.Timestamp create_time = 7;

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
Processor.Builder

setDefaultProcessorVersion(String value)

public Processor.Builder setDefaultProcessorVersion(String value)

The default processor version.

string default_processor_version = 9 [(.google.api.resource_reference) = { ... }

Parameter
NameDescription
valueString

The defaultProcessorVersion to set.

Returns
TypeDescription
Processor.Builder

This builder for chaining.

setDefaultProcessorVersionBytes(ByteString value)

public Processor.Builder setDefaultProcessorVersionBytes(ByteString value)

The default processor version.

string default_processor_version = 9 [(.google.api.resource_reference) = { ... }

Parameter
NameDescription
valueByteString

The bytes for defaultProcessorVersion to set.

Returns
TypeDescription
Processor.Builder

This builder for chaining.

setDisplayName(String value)

public Processor.Builder setDisplayName(String value)

The display name of the processor.

string display_name = 3;

Parameter
NameDescription
valueString

The displayName to set.

Returns
TypeDescription
Processor.Builder

This builder for chaining.

setDisplayNameBytes(ByteString value)

public Processor.Builder setDisplayNameBytes(ByteString value)

The display name of the processor.

string display_name = 3;

Parameter
NameDescription
valueByteString

The bytes for displayName to set.

Returns
TypeDescription
Processor.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setKmsKeyName(String value)

public Processor.Builder setKmsKeyName(String value)

The KMS key used for encryption and decryption in CMEK scenarios.

string kms_key_name = 8;

Parameter
NameDescription
valueString

The kmsKeyName to set.

Returns
TypeDescription
Processor.Builder

This builder for chaining.

setKmsKeyNameBytes(ByteString value)

public Processor.Builder setKmsKeyNameBytes(ByteString value)

The KMS key used for encryption and decryption in CMEK scenarios.

string kms_key_name = 8;

Parameter
NameDescription
valueByteString

The bytes for kmsKeyName to set.

Returns
TypeDescription
Processor.Builder

This builder for chaining.

setName(String value)

public Processor.Builder setName(String value)

Output only. Immutable. The resource name of the processor. Format: projects/{project}/locations/{location}/processors/{processor}

string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
Processor.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Processor.Builder setNameBytes(ByteString value)

Output only. Immutable. The resource name of the processor. Format: projects/{project}/locations/{location}/processors/{processor}

string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
Processor.Builder

This builder for chaining.

setProcessEndpoint(String value)

public Processor.Builder setProcessEndpoint(String value)

Output only. Immutable. The http endpoint that can be called to invoke processing.

string process_endpoint = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE];

Parameter
NameDescription
valueString

The processEndpoint to set.

Returns
TypeDescription
Processor.Builder

This builder for chaining.

setProcessEndpointBytes(ByteString value)

public Processor.Builder setProcessEndpointBytes(ByteString value)

Output only. Immutable. The http endpoint that can be called to invoke processing.

string process_endpoint = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE];

Parameter
NameDescription
valueByteString

The bytes for processEndpoint to set.

Returns
TypeDescription
Processor.Builder

This builder for chaining.

setProcessorVersionAliases(int index, ProcessorVersionAlias value)

public Processor.Builder setProcessorVersionAliases(int index, ProcessorVersionAlias value)

Output only. The processor version aliases.

repeated .google.cloud.documentai.v1beta3.ProcessorVersionAlias processor_version_aliases = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
NameDescription
indexint
valueProcessorVersionAlias
Returns
TypeDescription
Processor.Builder

setProcessorVersionAliases(int index, ProcessorVersionAlias.Builder builderForValue)

public Processor.Builder setProcessorVersionAliases(int index, ProcessorVersionAlias.Builder builderForValue)

Output only. The processor version aliases.

repeated .google.cloud.documentai.v1beta3.ProcessorVersionAlias processor_version_aliases = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
NameDescription
indexint
builderForValueProcessorVersionAlias.Builder
Returns
TypeDescription
Processor.Builder

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

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

setState(Processor.State value)

public Processor.Builder setState(Processor.State value)

Output only. The state of the processor.

.google.cloud.documentai.v1beta3.Processor.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueProcessor.State

The state to set.

Returns
TypeDescription
Processor.Builder

This builder for chaining.

setStateValue(int value)

public Processor.Builder setStateValue(int value)

Output only. The state of the processor.

.google.cloud.documentai.v1beta3.Processor.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueint

The enum numeric value on the wire for state to set.

Returns
TypeDescription
Processor.Builder

This builder for chaining.

setType(String value)

public Processor.Builder setType(String value)

The processor type, such as: OCR_PROCESSOR, INVOICE_PROCESSOR. To get a list of processor types, see FetchProcessorTypes.

string type = 2;

Parameter
NameDescription
valueString

The type to set.

Returns
TypeDescription
Processor.Builder

This builder for chaining.

setTypeBytes(ByteString value)

public Processor.Builder setTypeBytes(ByteString value)

The processor type, such as: OCR_PROCESSOR, INVOICE_PROCESSOR. To get a list of processor types, see FetchProcessorTypes.

string type = 2;

Parameter
NameDescription
valueByteString

The bytes for type to set.

Returns
TypeDescription
Processor.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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