Class FormExtractionParams (2.22.0)

public final class FormExtractionParams extends GeneratedMessageV3 implements FormExtractionParamsOrBuilder

Parameters to control form extraction behavior.

Protobuf type google.cloud.documentai.v1beta2.FormExtractionParams

Static Fields

ENABLED_FIELD_NUMBER

public static final int ENABLED_FIELD_NUMBER
Field Value
TypeDescription
int

KEY_VALUE_PAIR_HINTS_FIELD_NUMBER

public static final int KEY_VALUE_PAIR_HINTS_FIELD_NUMBER
Field Value
TypeDescription
int

MODEL_VERSION_FIELD_NUMBER

public static final int MODEL_VERSION_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static FormExtractionParams getDefaultInstance()
Returns
TypeDescription
FormExtractionParams

getDescriptor()

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

newBuilder()

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

newBuilder(FormExtractionParams prototype)

public static FormExtractionParams.Builder newBuilder(FormExtractionParams prototype)
Parameter
NameDescription
prototypeFormExtractionParams
Returns
TypeDescription
FormExtractionParams.Builder

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

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

getDefaultInstanceForType()

public FormExtractionParams getDefaultInstanceForType()
Returns
TypeDescription
FormExtractionParams

getEnabled()

public boolean getEnabled()

Whether to enable form extraction.

bool enabled = 1;

Returns
TypeDescription
boolean

The enabled.

getKeyValuePairHints(int index)

public KeyValuePairHint getKeyValuePairHints(int index)

User can provide pairs of (key text, value type) to improve the parsing result. For example, if a document has a field called "Date" that holds a date value and a field called "Amount" that may hold either a currency value (e.g., "$500.00") or a simple number value (e.g., "20"), you could use the following hints: [ {"key": "Date", value_types: [ "DATE"]}, {"key": "Amount", "value_types": [ "PRICE", "NUMBER" ]} ] If the value type is unknown, but you want to provide hints for the keys, you can leave the value_types field blank. e.g. {"key": "Date", "value_types": []}

repeated .google.cloud.documentai.v1beta2.KeyValuePairHint key_value_pair_hints = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
KeyValuePairHint

getKeyValuePairHintsCount()

public int getKeyValuePairHintsCount()

User can provide pairs of (key text, value type) to improve the parsing result. For example, if a document has a field called "Date" that holds a date value and a field called "Amount" that may hold either a currency value (e.g., "$500.00") or a simple number value (e.g., "20"), you could use the following hints: [ {"key": "Date", value_types: [ "DATE"]}, {"key": "Amount", "value_types": [ "PRICE", "NUMBER" ]} ] If the value type is unknown, but you want to provide hints for the keys, you can leave the value_types field blank. e.g. {"key": "Date", "value_types": []}

repeated .google.cloud.documentai.v1beta2.KeyValuePairHint key_value_pair_hints = 2;

Returns
TypeDescription
int

getKeyValuePairHintsList()

public List<KeyValuePairHint> getKeyValuePairHintsList()

User can provide pairs of (key text, value type) to improve the parsing result. For example, if a document has a field called "Date" that holds a date value and a field called "Amount" that may hold either a currency value (e.g., "$500.00") or a simple number value (e.g., "20"), you could use the following hints: [ {"key": "Date", value_types: [ "DATE"]}, {"key": "Amount", "value_types": [ "PRICE", "NUMBER" ]} ] If the value type is unknown, but you want to provide hints for the keys, you can leave the value_types field blank. e.g. {"key": "Date", "value_types": []}

repeated .google.cloud.documentai.v1beta2.KeyValuePairHint key_value_pair_hints = 2;

Returns
TypeDescription
List<KeyValuePairHint>

getKeyValuePairHintsOrBuilder(int index)

public KeyValuePairHintOrBuilder getKeyValuePairHintsOrBuilder(int index)

User can provide pairs of (key text, value type) to improve the parsing result. For example, if a document has a field called "Date" that holds a date value and a field called "Amount" that may hold either a currency value (e.g., "$500.00") or a simple number value (e.g., "20"), you could use the following hints: [ {"key": "Date", value_types: [ "DATE"]}, {"key": "Amount", "value_types": [ "PRICE", "NUMBER" ]} ] If the value type is unknown, but you want to provide hints for the keys, you can leave the value_types field blank. e.g. {"key": "Date", "value_types": []}

repeated .google.cloud.documentai.v1beta2.KeyValuePairHint key_value_pair_hints = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
KeyValuePairHintOrBuilder

getKeyValuePairHintsOrBuilderList()

public List<? extends KeyValuePairHintOrBuilder> getKeyValuePairHintsOrBuilderList()

User can provide pairs of (key text, value type) to improve the parsing result. For example, if a document has a field called "Date" that holds a date value and a field called "Amount" that may hold either a currency value (e.g., "$500.00") or a simple number value (e.g., "20"), you could use the following hints: [ {"key": "Date", value_types: [ "DATE"]}, {"key": "Amount", "value_types": [ "PRICE", "NUMBER" ]} ] If the value type is unknown, but you want to provide hints for the keys, you can leave the value_types field blank. e.g. {"key": "Date", "value_types": []}

repeated .google.cloud.documentai.v1beta2.KeyValuePairHint key_value_pair_hints = 2;

Returns
TypeDescription
List<? extends com.google.cloud.documentai.v1beta2.KeyValuePairHintOrBuilder>

getModelVersion()

public String getModelVersion()

Model version of the form extraction system. Default is "builtin/stable". Specify "builtin/latest" for the latest model. For custom form models, specify: “custom/{model_name}". Model name format is "bucket_name/path/to/modeldir" corresponding to "gs://bucket_name/path/to/modeldir" where annotated examples are stored.

string model_version = 3;

Returns
TypeDescription
String

The modelVersion.

getModelVersionBytes()

public ByteString getModelVersionBytes()

Model version of the form extraction system. Default is "builtin/stable". Specify "builtin/latest" for the latest model. For custom form models, specify: “custom/{model_name}". Model name format is "bucket_name/path/to/modeldir" corresponding to "gs://bucket_name/path/to/modeldir" where annotated examples are stored.

string model_version = 3;

Returns
TypeDescription
ByteString

The bytes for modelVersion.

getParserForType()

public Parser<FormExtractionParams> getParserForType()
Returns
TypeDescription
Parser<FormExtractionParams>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

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 FormExtractionParams.Builder newBuilderForType()
Returns
TypeDescription
FormExtractionParams.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

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

writeTo(CodedOutputStream output)

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