Class KeyRecipe.Part.Builder (6.107.0)

public static final class KeyRecipe.Part.Builder extends GeneratedMessageV3.Builder<KeyRecipe.Part.Builder> implements KeyRecipe.PartOrBuilder

An ssformat key is composed of a sequence of tag numbers and key column values. Part represents a single tag or key column value.

Protobuf type google.spanner.v1.KeyRecipe.Part

Static Methods

getDescriptor()

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

Methods

addAllStructIdentifiers(Iterable<? extends Integer> values)

public KeyRecipe.Part.Builder addAllStructIdentifiers(Iterable<? extends Integer> values)

It is a repeated field to support fetching key columns from nested structs, such as STRUCT query parameters.

repeated int32 struct_identifiers = 7;

Parameter
Name Description
values Iterable<? extends java.lang.Integer>

The structIdentifiers to add.

Returns
Type Description
KeyRecipe.Part.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

addStructIdentifiers(int value)

public KeyRecipe.Part.Builder addStructIdentifiers(int value)

It is a repeated field to support fetching key columns from nested structs, such as STRUCT query parameters.

repeated int32 struct_identifiers = 7;

Parameter
Name Description
value int

The structIdentifiers to add.

Returns
Type Description
KeyRecipe.Part.Builder

This builder for chaining.

build()

public KeyRecipe.Part build()
Returns
Type Description
KeyRecipe.Part

buildPartial()

public KeyRecipe.Part buildPartial()
Returns
Type Description
KeyRecipe.Part

clear()

public KeyRecipe.Part.Builder clear()
Returns
Type Description
KeyRecipe.Part.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

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

clearIdentifier()

public KeyRecipe.Part.Builder clearIdentifier()

identifier is the name of the column or query parameter.

string identifier = 5;

Returns
Type Description
KeyRecipe.Part.Builder

This builder for chaining.

clearNullOrder()

public KeyRecipe.Part.Builder clearNullOrder()

How NULLs are represented in the encoded key part. Only present if tag is zero.

.google.spanner.v1.KeyRecipe.Part.NullOrder null_order = 3;

Returns
Type Description
KeyRecipe.Part.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearOrder()

public KeyRecipe.Part.Builder clearOrder()

Whether the key column is sorted ascending or descending. Only present if tag is zero.

.google.spanner.v1.KeyRecipe.Part.Order order = 2;

Returns
Type Description
KeyRecipe.Part.Builder

This builder for chaining.

clearRandom()

public KeyRecipe.Part.Builder clearRandom()

If true, the client is responsible to fill in the value randomly. It's relevant only for the INT64 type.

bool random = 8;

Returns
Type Description
KeyRecipe.Part.Builder

This builder for chaining.

clearStructIdentifiers()

public KeyRecipe.Part.Builder clearStructIdentifiers()

It is a repeated field to support fetching key columns from nested structs, such as STRUCT query parameters.

repeated int32 struct_identifiers = 7;

Returns
Type Description
KeyRecipe.Part.Builder

This builder for chaining.

clearTag()

public KeyRecipe.Part.Builder clearTag()

If non-zero, tag is the only field present in this Part. The part is encoded by appending tag to the ssformat key.

uint32 tag = 1;

Returns
Type Description
KeyRecipe.Part.Builder

This builder for chaining.

clearType()

public KeyRecipe.Part.Builder clearType()

The type of the key part. Only present if tag is zero.

.google.spanner.v1.Type type = 4;

Returns
Type Description
KeyRecipe.Part.Builder

clearValue()

public KeyRecipe.Part.Builder clearValue()

The constant value of the key part. It is present when query uses a constant as a part of the key.

.google.protobuf.Value value = 6;

Returns
Type Description
KeyRecipe.Part.Builder

clearValueType()

public KeyRecipe.Part.Builder clearValueType()
Returns
Type Description
KeyRecipe.Part.Builder

clone()

public KeyRecipe.Part.Builder clone()
Returns
Type Description
KeyRecipe.Part.Builder
Overrides

getDefaultInstanceForType()

public KeyRecipe.Part getDefaultInstanceForType()
Returns
Type Description
KeyRecipe.Part

getDescriptorForType()

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

getIdentifier()

public String getIdentifier()

identifier is the name of the column or query parameter.

string identifier = 5;

Returns
Type Description
String

The identifier.

getIdentifierBytes()

public ByteString getIdentifierBytes()

identifier is the name of the column or query parameter.

string identifier = 5;

Returns
Type Description
ByteString

The bytes for identifier.

getNullOrder()

public KeyRecipe.Part.NullOrder getNullOrder()

How NULLs are represented in the encoded key part. Only present if tag is zero.

.google.spanner.v1.KeyRecipe.Part.NullOrder null_order = 3;

Returns
Type Description
KeyRecipe.Part.NullOrder

The nullOrder.

getNullOrderValue()

public int getNullOrderValue()

How NULLs are represented in the encoded key part. Only present if tag is zero.

.google.spanner.v1.KeyRecipe.Part.NullOrder null_order = 3;

Returns
Type Description
int

The enum numeric value on the wire for nullOrder.

getOrder()

public KeyRecipe.Part.Order getOrder()

Whether the key column is sorted ascending or descending. Only present if tag is zero.

.google.spanner.v1.KeyRecipe.Part.Order order = 2;

Returns
Type Description
KeyRecipe.Part.Order

The order.

getOrderValue()

public int getOrderValue()

Whether the key column is sorted ascending or descending. Only present if tag is zero.

.google.spanner.v1.KeyRecipe.Part.Order order = 2;

Returns
Type Description
int

The enum numeric value on the wire for order.

getRandom()

public boolean getRandom()

If true, the client is responsible to fill in the value randomly. It's relevant only for the INT64 type.

bool random = 8;

Returns
Type Description
boolean

The random.

getStructIdentifiers(int index)

public int getStructIdentifiers(int index)

It is a repeated field to support fetching key columns from nested structs, such as STRUCT query parameters.

repeated int32 struct_identifiers = 7;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
int

The structIdentifiers at the given index.

getStructIdentifiersCount()

public int getStructIdentifiersCount()

It is a repeated field to support fetching key columns from nested structs, such as STRUCT query parameters.

repeated int32 struct_identifiers = 7;

Returns
Type Description
int

The count of structIdentifiers.

getStructIdentifiersList()

public List<Integer> getStructIdentifiersList()

It is a repeated field to support fetching key columns from nested structs, such as STRUCT query parameters.

repeated int32 struct_identifiers = 7;

Returns
Type Description
List<Integer>

A list containing the structIdentifiers.

getTag()

public int getTag()

If non-zero, tag is the only field present in this Part. The part is encoded by appending tag to the ssformat key.

uint32 tag = 1;

Returns
Type Description
int

The tag.

getType()

public Type getType()

The type of the key part. Only present if tag is zero.

.google.spanner.v1.Type type = 4;

Returns
Type Description
Type

The type.

getTypeBuilder()

public Type.Builder getTypeBuilder()

The type of the key part. Only present if tag is zero.

.google.spanner.v1.Type type = 4;

Returns
Type Description
Type.Builder

getTypeOrBuilder()

public TypeOrBuilder getTypeOrBuilder()

The type of the key part. Only present if tag is zero.

.google.spanner.v1.Type type = 4;

Returns
Type Description
TypeOrBuilder

getValue()

public Value getValue()

The constant value of the key part. It is present when query uses a constant as a part of the key.

.google.protobuf.Value value = 6;

Returns
Type Description
Value

The value.

getValueBuilder()

public Value.Builder getValueBuilder()

The constant value of the key part. It is present when query uses a constant as a part of the key.

.google.protobuf.Value value = 6;

Returns
Type Description
Builder

getValueOrBuilder()

public ValueOrBuilder getValueOrBuilder()

The constant value of the key part. It is present when query uses a constant as a part of the key.

.google.protobuf.Value value = 6;

Returns
Type Description
ValueOrBuilder

getValueTypeCase()

public KeyRecipe.Part.ValueTypeCase getValueTypeCase()
Returns
Type Description
KeyRecipe.Part.ValueTypeCase

hasIdentifier()

public boolean hasIdentifier()

identifier is the name of the column or query parameter.

string identifier = 5;

Returns
Type Description
boolean

Whether the identifier field is set.

hasRandom()

public boolean hasRandom()

If true, the client is responsible to fill in the value randomly. It's relevant only for the INT64 type.

bool random = 8;

Returns
Type Description
boolean

Whether the random field is set.

hasType()

public boolean hasType()

The type of the key part. Only present if tag is zero.

.google.spanner.v1.Type type = 4;

Returns
Type Description
boolean

Whether the type field is set.

hasValue()

public boolean hasValue()

The constant value of the key part. It is present when query uses a constant as a part of the key.

.google.protobuf.Value value = 6;

Returns
Type Description
boolean

Whether the value field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeFrom(KeyRecipe.Part other)

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

mergeType(Type value)

public KeyRecipe.Part.Builder mergeType(Type value)

The type of the key part. Only present if tag is zero.

.google.spanner.v1.Type type = 4;

Parameter
Name Description
value Type
Returns
Type Description
KeyRecipe.Part.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

mergeValue(Value value)

public KeyRecipe.Part.Builder mergeValue(Value value)

The constant value of the key part. It is present when query uses a constant as a part of the key.

.google.protobuf.Value value = 6;

Parameter
Name Description
value Value
Returns
Type Description
KeyRecipe.Part.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setIdentifier(String value)

public KeyRecipe.Part.Builder setIdentifier(String value)

identifier is the name of the column or query parameter.

string identifier = 5;

Parameter
Name Description
value String

The identifier to set.

Returns
Type Description
KeyRecipe.Part.Builder

This builder for chaining.

setIdentifierBytes(ByteString value)

public KeyRecipe.Part.Builder setIdentifierBytes(ByteString value)

identifier is the name of the column or query parameter.

string identifier = 5;

Parameter
Name Description
value ByteString

The bytes for identifier to set.

Returns
Type Description
KeyRecipe.Part.Builder

This builder for chaining.

setNullOrder(KeyRecipe.Part.NullOrder value)

public KeyRecipe.Part.Builder setNullOrder(KeyRecipe.Part.NullOrder value)

How NULLs are represented in the encoded key part. Only present if tag is zero.

.google.spanner.v1.KeyRecipe.Part.NullOrder null_order = 3;

Parameter
Name Description
value KeyRecipe.Part.NullOrder

The nullOrder to set.

Returns
Type Description
KeyRecipe.Part.Builder

This builder for chaining.

setNullOrderValue(int value)

public KeyRecipe.Part.Builder setNullOrderValue(int value)

How NULLs are represented in the encoded key part. Only present if tag is zero.

.google.spanner.v1.KeyRecipe.Part.NullOrder null_order = 3;

Parameter
Name Description
value int

The enum numeric value on the wire for nullOrder to set.

Returns
Type Description
KeyRecipe.Part.Builder

This builder for chaining.

setOrder(KeyRecipe.Part.Order value)

public KeyRecipe.Part.Builder setOrder(KeyRecipe.Part.Order value)

Whether the key column is sorted ascending or descending. Only present if tag is zero.

.google.spanner.v1.KeyRecipe.Part.Order order = 2;

Parameter
Name Description
value KeyRecipe.Part.Order

The order to set.

Returns
Type Description
KeyRecipe.Part.Builder

This builder for chaining.

setOrderValue(int value)

public KeyRecipe.Part.Builder setOrderValue(int value)

Whether the key column is sorted ascending or descending. Only present if tag is zero.

.google.spanner.v1.KeyRecipe.Part.Order order = 2;

Parameter
Name Description
value int

The enum numeric value on the wire for order to set.

Returns
Type Description
KeyRecipe.Part.Builder

This builder for chaining.

setRandom(boolean value)

public KeyRecipe.Part.Builder setRandom(boolean value)

If true, the client is responsible to fill in the value randomly. It's relevant only for the INT64 type.

bool random = 8;

Parameter
Name Description
value boolean

The random to set.

Returns
Type Description
KeyRecipe.Part.Builder

This builder for chaining.

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

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

setStructIdentifiers(int index, int value)

public KeyRecipe.Part.Builder setStructIdentifiers(int index, int value)

It is a repeated field to support fetching key columns from nested structs, such as STRUCT query parameters.

repeated int32 struct_identifiers = 7;

Parameters
Name Description
index int

The index to set the value at.

value int

The structIdentifiers to set.

Returns
Type Description
KeyRecipe.Part.Builder

This builder for chaining.

setTag(int value)

public KeyRecipe.Part.Builder setTag(int value)

If non-zero, tag is the only field present in this Part. The part is encoded by appending tag to the ssformat key.

uint32 tag = 1;

Parameter
Name Description
value int

The tag to set.

Returns
Type Description
KeyRecipe.Part.Builder

This builder for chaining.

setType(Type value)

public KeyRecipe.Part.Builder setType(Type value)

The type of the key part. Only present if tag is zero.

.google.spanner.v1.Type type = 4;

Parameter
Name Description
value Type
Returns
Type Description
KeyRecipe.Part.Builder

setType(Type.Builder builderForValue)

public KeyRecipe.Part.Builder setType(Type.Builder builderForValue)

The type of the key part. Only present if tag is zero.

.google.spanner.v1.Type type = 4;

Parameter
Name Description
builderForValue Type.Builder
Returns
Type Description
KeyRecipe.Part.Builder

setUnknownFields(UnknownFieldSet unknownFields)

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

setValue(Value value)

public KeyRecipe.Part.Builder setValue(Value value)

The constant value of the key part. It is present when query uses a constant as a part of the key.

.google.protobuf.Value value = 6;

Parameter
Name Description
value Value
Returns
Type Description
KeyRecipe.Part.Builder

setValue(Value.Builder builderForValue)

public KeyRecipe.Part.Builder setValue(Value.Builder builderForValue)

The constant value of the key part. It is present when query uses a constant as a part of the key.

.google.protobuf.Value value = 6;

Parameter
Name Description
builderForValue Builder
Returns
Type Description
KeyRecipe.Part.Builder