Class FormExtractionParams.Builder

    • Method Detail

      • 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.Builder<FormExtractionParams.Builder>
      • clear

        public FormExtractionParams.Builder clear()
        Specified by:
        clear in interface com.google.protobuf.Message.Builder
        Specified by:
        clear in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clear in class com.google.protobuf.GeneratedMessageV3.Builder<FormExtractionParams.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<FormExtractionParams.Builder>
      • getDefaultInstanceForType

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

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

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

        public FormExtractionParams.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<FormExtractionParams.Builder>
      • setField

        public FormExtractionParams.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                     Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<FormExtractionParams.Builder>
      • clearField

        public FormExtractionParams.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<FormExtractionParams.Builder>
      • clearOneof

        public FormExtractionParams.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<FormExtractionParams.Builder>
      • setRepeatedField

        public FormExtractionParams.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                             int index,
                                                             Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<FormExtractionParams.Builder>
      • addRepeatedField

        public FormExtractionParams.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                             Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<FormExtractionParams.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<FormExtractionParams.Builder>
      • mergeFrom

        public FormExtractionParams.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                                      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                               throws IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<FormExtractionParams.Builder>
        Throws:
        IOException
      • setEnabled

        public FormExtractionParams.Builder setEnabled​(boolean value)
         Whether to enable form extraction.
         
        bool enabled = 1;
        Parameters:
        value - The enabled to set.
        Returns:
        This builder for chaining.
      • clearEnabled

        public FormExtractionParams.Builder clearEnabled()
         Whether to enable form extraction.
         
        bool enabled = 1;
        Returns:
        This builder for chaining.
      • 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
      • 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
      • setKeyValuePairHints

        public FormExtractionParams.Builder setKeyValuePairHints​(int index,
                                                                 KeyValuePairHint value)
         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;
      • setKeyValuePairHints

        public FormExtractionParams.Builder setKeyValuePairHints​(int index,
                                                                 KeyValuePairHint.Builder builderForValue)
         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;
      • addKeyValuePairHints

        public FormExtractionParams.Builder addKeyValuePairHints​(KeyValuePairHint value)
         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;
      • addKeyValuePairHints

        public FormExtractionParams.Builder addKeyValuePairHints​(int index,
                                                                 KeyValuePairHint value)
         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;
      • addKeyValuePairHints

        public FormExtractionParams.Builder addKeyValuePairHints​(KeyValuePairHint.Builder builderForValue)
         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;
      • addKeyValuePairHints

        public FormExtractionParams.Builder addKeyValuePairHints​(int index,
                                                                 KeyValuePairHint.Builder builderForValue)
         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;
      • addAllKeyValuePairHints

        public FormExtractionParams.Builder addAllKeyValuePairHints​(Iterable<? extends KeyValuePairHint> values)
         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;
      • clearKeyValuePairHints

        public FormExtractionParams.Builder clearKeyValuePairHints()
         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;
      • removeKeyValuePairHints

        public FormExtractionParams.Builder removeKeyValuePairHints​(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;
      • getKeyValuePairHintsBuilder

        public KeyValuePairHint.Builder getKeyValuePairHintsBuilder​(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;
      • 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
      • 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
      • addKeyValuePairHintsBuilder

        public KeyValuePairHint.Builder addKeyValuePairHintsBuilder()
         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;
      • addKeyValuePairHintsBuilder

        public KeyValuePairHint.Builder addKeyValuePairHintsBuilder​(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;
      • getKeyValuePairHintsBuilderList

        public List<KeyValuePairHint.Builder> getKeyValuePairHintsBuilderList()
         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;
      • 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.
      • setModelVersion

        public FormExtractionParams.Builder setModelVersion​(String value)
         Model version of the form extraction system. Default is
         "builtin/stable". Specify "builtin/latest" for the latest model.
         
        string model_version = 3;
        Parameters:
        value - The modelVersion to set.
        Returns:
        This builder for chaining.
      • clearModelVersion

        public FormExtractionParams.Builder clearModelVersion()
         Model version of the form extraction system. Default is
         "builtin/stable". Specify "builtin/latest" for the latest model.
         
        string model_version = 3;
        Returns:
        This builder for chaining.
      • setModelVersionBytes

        public FormExtractionParams.Builder setModelVersionBytes​(com.google.protobuf.ByteString value)
         Model version of the form extraction system. Default is
         "builtin/stable". Specify "builtin/latest" for the latest model.
         
        string model_version = 3;
        Parameters:
        value - The bytes for modelVersion to set.
        Returns:
        This builder for chaining.
      • setUnknownFields

        public final FormExtractionParams.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<FormExtractionParams.Builder>
      • mergeUnknownFields

        public final FormExtractionParams.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<FormExtractionParams.Builder>