Class KeyValuePairHint.Builder (2.38.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
TypeDescription
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
NameDescription
valuesIterable<String>

The valueTypes to add.

Returns
TypeDescription
KeyValuePairHint.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public KeyValuePairHint.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The valueTypes to add.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes of the valueTypes to add.

Returns
TypeDescription
KeyValuePairHint.Builder

This builder for chaining.

build()

public KeyValuePairHint build()
Returns
TypeDescription
KeyValuePairHint

buildPartial()

public KeyValuePairHint buildPartial()
Returns
TypeDescription
KeyValuePairHint

clear()

public KeyValuePairHint.Builder clear()
Returns
TypeDescription
KeyValuePairHint.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public KeyValuePairHint.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
KeyValuePairHint.Builder
Overrides

clearKey()

public KeyValuePairHint.Builder clearKey()

The key text for the hint.

string key = 1;

Returns
TypeDescription
KeyValuePairHint.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public KeyValuePairHint.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
KeyValuePairHint.Builder

This builder for chaining.

clone()

public KeyValuePairHint.Builder clone()
Returns
TypeDescription
KeyValuePairHint.Builder
Overrides

getDefaultInstanceForType()

public KeyValuePairHint getDefaultInstanceForType()
Returns
TypeDescription
KeyValuePairHint

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getKey()

public String getKey()

The key text for the hint.

string key = 1;

Returns
TypeDescription
String

The key.

getKeyBytes()

public ByteString getKeyBytes()

The key text for the hint.

string key = 1;

Returns
TypeDescription
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
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
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
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ProtocolStringList

A list containing the valueTypes.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(KeyValuePairHint other)

public KeyValuePairHint.Builder mergeFrom(KeyValuePairHint other)
Parameter
NameDescription
otherKeyValuePairHint
Returns
TypeDescription
KeyValuePairHint.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public KeyValuePairHint.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
KeyValuePairHint.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public KeyValuePairHint.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
KeyValuePairHint.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final KeyValuePairHint.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
KeyValuePairHint.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public KeyValuePairHint.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
KeyValuePairHint.Builder
Overrides

setKey(String value)

public KeyValuePairHint.Builder setKey(String value)

The key text for the hint.

string key = 1;

Parameter
NameDescription
valueString

The key to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for key to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
KeyValuePairHint.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final KeyValuePairHint.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
indexint

The index to set the value at.

valueString

The valueTypes to set.

Returns
TypeDescription
KeyValuePairHint.Builder

This builder for chaining.