Class FormExtractionParams

  • All Implemented Interfaces:
    FormExtractionParamsOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

    public final class FormExtractionParams
    extends com.google.protobuf.GeneratedMessageV3
    implements FormExtractionParamsOrBuilder
     Parameters to control form extraction behavior.
     
    Protobuf type google.cloud.documentai.v1beta1.FormExtractionParams
    See Also:
    Serialized Form
    • Field Detail

      • KEY_VALUE_PAIR_HINTS_FIELD_NUMBER

        public static final int KEY_VALUE_PAIR_HINTS_FIELD_NUMBER
        See Also:
        Constant Field Values
      • MODEL_VERSION_FIELD_NUMBER

        public static final int MODEL_VERSION_FIELD_NUMBER
        See Also:
        Constant Field Values
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • 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.v1beta1.KeyValuePairHint key_value_pair_hints = 2;
        Specified by:
        getKeyValuePairHintsList in interface FormExtractionParamsOrBuilder
      • 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.v1beta1.KeyValuePairHint key_value_pair_hints = 2;
        Specified by:
        getKeyValuePairHintsOrBuilderList in interface FormExtractionParamsOrBuilder
      • 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.v1beta1.KeyValuePairHint key_value_pair_hints = 2;
        Specified by:
        getKeyValuePairHintsCount in interface FormExtractionParamsOrBuilder
      • getKeyValuePairHints

        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.v1beta1.KeyValuePairHint key_value_pair_hints = 2;
        Specified by:
        getKeyValuePairHints in interface FormExtractionParamsOrBuilder
      • getKeyValuePairHintsOrBuilder

        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.v1beta1.KeyValuePairHint key_value_pair_hints = 2;
        Specified by:
        getKeyValuePairHintsOrBuilder in interface FormExtractionParamsOrBuilder
      • getModelVersion

        public String getModelVersion()
         Model version of the form extraction system. Default is
         "builtin/stable". Specify "builtin/latest" for the latest model.
         
        string model_version = 3;
        Specified by:
        getModelVersion in interface FormExtractionParamsOrBuilder
        Returns:
        The modelVersion.
      • getModelVersionBytes

        public com.google.protobuf.ByteString getModelVersionBytes()
         Model version of the form extraction system. Default is
         "builtin/stable". Specify "builtin/latest" for the latest model.
         
        string model_version = 3;
        Specified by:
        getModelVersionBytes in interface FormExtractionParamsOrBuilder
        Returns:
        The bytes for modelVersion.
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static FormExtractionParams parseFrom​(ByteBuffer data)
                                              throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static FormExtractionParams parseFrom​(ByteBuffer data,
                                                     com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                              throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static FormExtractionParams parseFrom​(com.google.protobuf.ByteString data)
                                              throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static FormExtractionParams parseFrom​(com.google.protobuf.ByteString data,
                                                     com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                              throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static FormExtractionParams parseFrom​(byte[] data)
                                              throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static FormExtractionParams parseFrom​(byte[] data,
                                                     com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                              throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • newBuilderForType

        public FormExtractionParams.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public FormExtractionParams.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected FormExtractionParams.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getParserForType

        public com.google.protobuf.Parser<FormExtractionParams> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

        public FormExtractionParams getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder