Class Processor (2.7.2)

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
TypeDescription
int

DEFAULT_PROCESSOR_VERSION_FIELD_NUMBER

public static final int DEFAULT_PROCESSOR_VERSION_FIELD_NUMBER
Field Value
TypeDescription
int

DISPLAY_NAME_FIELD_NUMBER

public static final int DISPLAY_NAME_FIELD_NUMBER
Field Value
TypeDescription
int

KMS_KEY_NAME_FIELD_NUMBER

public static final int KMS_KEY_NAME_FIELD_NUMBER
Field Value
TypeDescription
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
TypeDescription
int

PROCESS_ENDPOINT_FIELD_NUMBER

public static final int PROCESS_ENDPOINT_FIELD_NUMBER
Field Value
TypeDescription
int

STATE_FIELD_NUMBER

public static final int STATE_FIELD_NUMBER
Field Value
TypeDescription
int

TYPE_FIELD_NUMBER

public static final int TYPE_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static Processor getDefaultInstance()
Returns
TypeDescription
Processor

getDescriptor()

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

newBuilder()

public static Processor.Builder newBuilder()
Returns
TypeDescription
Processor.Builder

newBuilder(Processor prototype)

public static Processor.Builder newBuilder(Processor prototype)
Parameter
NameDescription
prototypeProcessor
Returns
TypeDescription
Processor.Builder

parseDelimitedFrom(InputStream input)

public static Processor parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Processor
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Processor parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Processor
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static Processor parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
Processor
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Processor parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Processor
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Processor parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
Processor
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Processor parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Processor
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Processor parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
Processor
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Processor parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Processor
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static Processor parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Processor
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Processor parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Processor
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static Processor parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
Processor
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Processor parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Processor
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<Processor> parser()
Returns
TypeDescription
Parser<Processor>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getCreateTime()

public Timestamp getCreateTime()

The time the processor was created.

.google.protobuf.Timestamp create_time = 7;

Returns
TypeDescription
Timestamp

The createTime.

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.

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.

getParserForType()

public Parser<Processor> getParserForType()
Returns
TypeDescription
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
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.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
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
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.

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

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.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public Processor.Builder newBuilderForType()
Returns
TypeDescription
Processor.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Processor.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
Processor.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public Processor.Builder toBuilder()
Returns
TypeDescription
Processor.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides Exceptions
TypeDescription
IOException