Class Processor (2.49.0)

public final class Processor extends GeneratedMessageV3 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 Fields

CREATE_TIME_FIELD_NUMBER

public static final int CREATE_TIME_FIELD_NUMBER
Field Value
Type Description
int

DEFAULT_PROCESSOR_VERSION_FIELD_NUMBER

public static final int DEFAULT_PROCESSOR_VERSION_FIELD_NUMBER
Field Value
Type Description
int

DISPLAY_NAME_FIELD_NUMBER

public static final int DISPLAY_NAME_FIELD_NUMBER
Field Value
Type Description
int

KMS_KEY_NAME_FIELD_NUMBER

public static final int KMS_KEY_NAME_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

PROCESSOR_VERSION_ALIASES_FIELD_NUMBER

public static final int PROCESSOR_VERSION_ALIASES_FIELD_NUMBER
Field Value
Type Description
int

PROCESS_ENDPOINT_FIELD_NUMBER

public static final int PROCESS_ENDPOINT_FIELD_NUMBER
Field Value
Type Description
int

SATISFIES_PZI_FIELD_NUMBER

public static final int SATISFIES_PZI_FIELD_NUMBER
Field Value
Type Description
int

SATISFIES_PZS_FIELD_NUMBER

public static final int SATISFIES_PZS_FIELD_NUMBER
Field Value
Type Description
int

STATE_FIELD_NUMBER

public static final int STATE_FIELD_NUMBER
Field Value
Type Description
int

TYPE_FIELD_NUMBER

public static final int TYPE_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static Processor getDefaultInstance()
Returns
Type Description
Processor

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static Processor.Builder newBuilder()
Returns
Type Description
Processor.Builder

newBuilder(Processor prototype)

public static Processor.Builder newBuilder(Processor prototype)
Parameter
Name Description
prototype Processor
Returns
Type Description
Processor.Builder

parseDelimitedFrom(InputStream input)

public static Processor parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Processor
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Processor parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Processor
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static Processor parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
Processor
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Processor parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Processor
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Processor parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
Processor
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Processor parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Processor
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Processor parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
Processor
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Processor parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Processor
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static Processor parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Processor
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Processor parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Processor
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static Processor parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Processor
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Processor parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Processor
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<Processor> parser()
Returns
Type Description
Parser<Processor>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getCreateTime()

public Timestamp getCreateTime()

The time the processor was created.

.google.protobuf.Timestamp create_time = 7;

Returns
Type Description
Timestamp

The createTime.

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

The time the processor was created.

.google.protobuf.Timestamp create_time = 7;

Returns
Type Description
TimestampOrBuilder

getDefaultInstanceForType()

public Processor getDefaultInstanceForType()
Returns
Type Description
Processor

getDefaultProcessorVersion()

public String getDefaultProcessorVersion()

The default processor version.

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

Returns
Type Description
String

The defaultProcessorVersion.

getDefaultProcessorVersionBytes()

public ByteString getDefaultProcessorVersionBytes()

The default processor version.

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

Returns
Type Description
ByteString

The bytes for defaultProcessorVersion.

getDisplayName()

public String getDisplayName()

The display name of the processor.

string display_name = 3;

Returns
Type Description
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

The display name of the processor.

string display_name = 3;

Returns
Type Description
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
Type Description
String

The kmsKeyName.

getKmsKeyNameBytes()

public ByteString getKmsKeyNameBytes()

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

string kms_key_name = 8;

Returns
Type Description
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
Type Description
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
Type Description
ByteString

The bytes for name.

getParserForType()

public Parser<Processor> getParserForType()
Returns
Type Description
Parser<Processor>
Overrides

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
Type Description
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
Type Description
ByteString

The bytes for processEndpoint.

getProcessorVersionAliases(int index)

public ProcessorVersionAlias getProcessorVersionAliases(int index)

Output only. The processor version aliases.

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

Parameter
Name Description
index int
Returns
Type Description
ProcessorVersionAlias

getProcessorVersionAliasesCount()

public int getProcessorVersionAliasesCount()

Output only. The processor version aliases.

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

Returns
Type Description
int

getProcessorVersionAliasesList()

public List<ProcessorVersionAlias> getProcessorVersionAliasesList()

Output only. The processor version aliases.

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

Returns
Type Description
List<ProcessorVersionAlias>

getProcessorVersionAliasesOrBuilder(int index)

public ProcessorVersionAliasOrBuilder getProcessorVersionAliasesOrBuilder(int index)

Output only. The processor version aliases.

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

Parameter
Name Description
index int
Returns
Type Description
ProcessorVersionAliasOrBuilder

getProcessorVersionAliasesOrBuilderList()

public List<? extends ProcessorVersionAliasOrBuilder> getProcessorVersionAliasesOrBuilderList()

Output only. The processor version aliases.

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

Returns
Type Description
List<? extends com.google.cloud.documentai.v1.ProcessorVersionAliasOrBuilder>

getSatisfiesPzi()

public boolean getSatisfiesPzi()

Output only. Reserved for future use.

bool satisfies_pzi = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

The satisfiesPzi.

getSatisfiesPzs()

public boolean getSatisfiesPzs()

Output only. Reserved for future use.

bool satisfies_pzs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

The satisfiesPzs.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

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
Type Description
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
Type Description
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
Type Description
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
Type Description
ByteString

The bytes for type.

hasCreateTime()

public boolean hasCreateTime()

The time the processor was created.

.google.protobuf.Timestamp create_time = 7;

Returns
Type Description
boolean

Whether the createTime field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public Processor.Builder newBuilderForType()
Returns
Type Description
Processor.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Processor.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Processor.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public Processor.Builder toBuilder()
Returns
Type Description
Processor.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException