Class KeyValuePairHint.Builder (2.46.0)

public static final class KeyValuePairHint.Builder extends GeneratedMessageV3.Builder<KeyValuePairHint.Builder> implements KeyValuePairHintOrBuilder

User-provided hint for key value pair.

Protobuf type google.cloud.documentai.v1beta1.KeyValuePairHint

Static Methods

getDescriptor()

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

Methods

addAllValueTypes(Iterable<String> values)

public KeyValuePairHint.Builder addAllValueTypes(Iterable<String> values)

Type of the value. This is case-insensitive, and could be one of: ADDRESS, LOCATION, ORGANIZATION, PERSON, PHONE_NUMBER, ID, NUMBER, EMAIL, PRICE, TERMS, DATE, NAME. Types not in this list will be ignored.

repeated string value_types = 2;

Parameter
Name Description
values Iterable<String>

The valueTypes to add.

Returns
Type Description
KeyValuePairHint.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public KeyValuePairHint.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
KeyValuePairHint.Builder
Overrides

addValueTypes(String value)

public KeyValuePairHint.Builder addValueTypes(String value)

Type of the value. This is case-insensitive, and could be one of: ADDRESS, LOCATION, ORGANIZATION, PERSON, PHONE_NUMBER, ID, NUMBER, EMAIL, PRICE, TERMS, DATE, NAME. Types not in this list will be ignored.

repeated string value_types = 2;

Parameter
Name Description
value String

The valueTypes to add.

Returns
Type Description
KeyValuePairHint.Builder

This builder for chaining.

addValueTypesBytes(ByteString value)

public KeyValuePairHint.Builder addValueTypesBytes(ByteString value)

Type of the value. This is case-insensitive, and could be one of: ADDRESS, LOCATION, ORGANIZATION, PERSON, PHONE_NUMBER, ID, NUMBER, EMAIL, PRICE, TERMS, DATE, NAME. Types not in this list will be ignored.

repeated string value_types = 2;

Parameter
Name Description
value ByteString

The bytes of the valueTypes to add.

Returns
Type Description
KeyValuePairHint.Builder

This builder for chaining.

build()

public KeyValuePairHint build()
Returns
Type Description
KeyValuePairHint

buildPartial()

public KeyValuePairHint buildPartial()
Returns
Type Description
KeyValuePairHint

clear()

public KeyValuePairHint.Builder clear()
Returns
Type Description
KeyValuePairHint.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public KeyValuePairHint.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
KeyValuePairHint.Builder
Overrides

clearKey()

public KeyValuePairHint.Builder clearKey()

The key text for the hint.

string key = 1;

Returns
Type Description
KeyValuePairHint.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public KeyValuePairHint.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
KeyValuePairHint.Builder
Overrides

clearValueTypes()

public KeyValuePairHint.Builder clearValueTypes()

Type of the value. This is case-insensitive, and could be one of: ADDRESS, LOCATION, ORGANIZATION, PERSON, PHONE_NUMBER, ID, NUMBER, EMAIL, PRICE, TERMS, DATE, NAME. Types not in this list will be ignored.

repeated string value_types = 2;

Returns
Type Description
KeyValuePairHint.Builder

This builder for chaining.

clone()

public KeyValuePairHint.Builder clone()
Returns
Type Description
KeyValuePairHint.Builder
Overrides

getDefaultInstanceForType()

public KeyValuePairHint getDefaultInstanceForType()
Returns
Type Description
KeyValuePairHint

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getKey()

public String getKey()

The key text for the hint.

string key = 1;

Returns
Type Description
String

The key.

getKeyBytes()

public ByteString getKeyBytes()

The key text for the hint.

string key = 1;

Returns
Type Description
ByteString

The bytes for key.

getValueTypes(int index)

public String getValueTypes(int index)

Type of the value. This is case-insensitive, and could be one of: ADDRESS, LOCATION, ORGANIZATION, PERSON, PHONE_NUMBER, ID, NUMBER, EMAIL, PRICE, TERMS, DATE, NAME. Types not in this list will be ignored.

repeated string value_types = 2;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The valueTypes at the given index.

getValueTypesBytes(int index)

public ByteString getValueTypesBytes(int index)

Type of the value. This is case-insensitive, and could be one of: ADDRESS, LOCATION, ORGANIZATION, PERSON, PHONE_NUMBER, ID, NUMBER, EMAIL, PRICE, TERMS, DATE, NAME. Types not in this list will be ignored.

repeated string value_types = 2;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the valueTypes at the given index.

getValueTypesCount()

public int getValueTypesCount()

Type of the value. This is case-insensitive, and could be one of: ADDRESS, LOCATION, ORGANIZATION, PERSON, PHONE_NUMBER, ID, NUMBER, EMAIL, PRICE, TERMS, DATE, NAME. Types not in this list will be ignored.

repeated string value_types = 2;

Returns
Type Description
int

The count of valueTypes.

getValueTypesList()

public ProtocolStringList getValueTypesList()

Type of the value. This is case-insensitive, and could be one of: ADDRESS, LOCATION, ORGANIZATION, PERSON, PHONE_NUMBER, ID, NUMBER, EMAIL, PRICE, TERMS, DATE, NAME. Types not in this list will be ignored.

repeated string value_types = 2;

Returns
Type Description
ProtocolStringList

A list containing the valueTypes.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(KeyValuePairHint other)

public KeyValuePairHint.Builder mergeFrom(KeyValuePairHint other)
Parameter
Name Description
other KeyValuePairHint
Returns
Type Description
KeyValuePairHint.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public KeyValuePairHint.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
KeyValuePairHint.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public KeyValuePairHint.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
KeyValuePairHint.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final KeyValuePairHint.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
KeyValuePairHint.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public KeyValuePairHint.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
KeyValuePairHint.Builder
Overrides

setKey(String value)

public KeyValuePairHint.Builder setKey(String value)

The key text for the hint.

string key = 1;

Parameter
Name Description
value String

The key to set.

Returns
Type Description
KeyValuePairHint.Builder

This builder for chaining.

setKeyBytes(ByteString value)

public KeyValuePairHint.Builder setKeyBytes(ByteString value)

The key text for the hint.

string key = 1;

Parameter
Name Description
value ByteString

The bytes for key to set.

Returns
Type Description
KeyValuePairHint.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public KeyValuePairHint.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
KeyValuePairHint.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final KeyValuePairHint.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
KeyValuePairHint.Builder
Overrides

setValueTypes(int index, String value)

public KeyValuePairHint.Builder setValueTypes(int index, String value)

Type of the value. This is case-insensitive, and could be one of: ADDRESS, LOCATION, ORGANIZATION, PERSON, PHONE_NUMBER, ID, NUMBER, EMAIL, PRICE, TERMS, DATE, NAME. Types not in this list will be ignored.

repeated string value_types = 2;

Parameters
Name Description
index int

The index to set the value at.

value String

The valueTypes to set.

Returns
Type Description
KeyValuePairHint.Builder

This builder for chaining.