Class Processor.Builder (2.7.5)

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.v1.Processor

Implements

ProcessorOrBuilder

Static Methods

getDescriptor()

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

Methods

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/decryption in CMEK scenarios. See https://cloud.google.com/security-key-management.

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.

clearState()

public Processor.Builder clearState()

Output only. The state of the processor.

.google.cloud.documentai.v1.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, e.g., OCR_PROCESSOR, INVOICE_PROCESSOR, etc. To get a list of processors 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/decryption in CMEK scenarios. See https://cloud.google.com/security-key-management.

string kms_key_name = 8;

Returns
TypeDescription
String

The kmsKeyName.

getKmsKeyNameBytes()

public ByteString getKmsKeyNameBytes()

The KMS key used for encryption/decryption in CMEK scenarios. See https://cloud.google.com/security-key-management.

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.

getState()

public Processor.State getState()

Output only. The state of the processor.

.google.cloud.documentai.v1.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.v1.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, e.g., OCR_PROCESSOR, INVOICE_PROCESSOR, etc. To get a list of processors types, see FetchProcessorTypes.

string type = 2;

Returns
TypeDescription
String

The type.

getTypeBytes()

public ByteString getTypeBytes()

The processor type, e.g., OCR_PROCESSOR, INVOICE_PROCESSOR, etc. To get a list of processors 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

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/decryption in CMEK scenarios. See https://cloud.google.com/security-key-management.

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/decryption in CMEK scenarios. See https://cloud.google.com/security-key-management.

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.

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.v1.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.v1.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, e.g., OCR_PROCESSOR, INVOICE_PROCESSOR, etc. To get a list of processors 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, e.g., OCR_PROCESSOR, INVOICE_PROCESSOR, etc. To get a list of processors 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