Class Key.PathElement.Builder (2.18.5)

public static final class Key.PathElement.Builder extends GeneratedMessageV3.Builder<Key.PathElement.Builder> implements Key.PathElementOrBuilder

A (kind, ID/name) pair used to construct a key path.

If either name or ID is set, the element is complete. If neither is set, the element is incomplete.

Protobuf type google.datastore.v1.Key.PathElement

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Key.PathElement.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Key.PathElement.Builder
Overrides

build()

public Key.PathElement build()
Returns
TypeDescription
Key.PathElement

buildPartial()

public Key.PathElement buildPartial()
Returns
TypeDescription
Key.PathElement

clear()

public Key.PathElement.Builder clear()
Returns
TypeDescription
Key.PathElement.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

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

clearId()

public Key.PathElement.Builder clearId()

The auto-allocated ID of the entity.

Never equal to zero. Values less than zero are discouraged and may not be supported in the future.

int64 id = 2;

Returns
TypeDescription
Key.PathElement.Builder

This builder for chaining.

clearIdType()

public Key.PathElement.Builder clearIdType()
Returns
TypeDescription
Key.PathElement.Builder

clearKind()

public Key.PathElement.Builder clearKind()

The kind of the entity.

A kind matching regex .* is reserved/read-only. A kind must not contain more than 1500 bytes when UTF-8 encoded. Cannot be "".

Must be valid UTF-8 bytes. Legacy values that are not valid UTF-8 are encoded as bytes<X> where <X> is the base-64 encoding of the bytes.

string kind = 1;

Returns
TypeDescription
Key.PathElement.Builder

This builder for chaining.

clearName()

public Key.PathElement.Builder clearName()

The name of the entity.

A name matching regex .* is reserved/read-only. A name must not be more than 1500 bytes when UTF-8 encoded. Cannot be "".

Must be valid UTF-8 bytes. Legacy values that are not valid UTF-8 are encoded as bytes<X> where <X> is the base-64 encoding of the bytes.

string name = 3;

Returns
TypeDescription
Key.PathElement.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Key.PathElement.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
Key.PathElement.Builder
Overrides

clone()

public Key.PathElement.Builder clone()
Returns
TypeDescription
Key.PathElement.Builder
Overrides

getDefaultInstanceForType()

public Key.PathElement getDefaultInstanceForType()
Returns
TypeDescription
Key.PathElement

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getId()

public long getId()

The auto-allocated ID of the entity.

Never equal to zero. Values less than zero are discouraged and may not be supported in the future.

int64 id = 2;

Returns
TypeDescription
long

The id.

getIdTypeCase()

public Key.PathElement.IdTypeCase getIdTypeCase()
Returns
TypeDescription
Key.PathElement.IdTypeCase

getKind()

public String getKind()

The kind of the entity.

A kind matching regex .* is reserved/read-only. A kind must not contain more than 1500 bytes when UTF-8 encoded. Cannot be "".

Must be valid UTF-8 bytes. Legacy values that are not valid UTF-8 are encoded as bytes<X> where <X> is the base-64 encoding of the bytes.

string kind = 1;

Returns
TypeDescription
String

The kind.

getKindBytes()

public ByteString getKindBytes()

The kind of the entity.

A kind matching regex .* is reserved/read-only. A kind must not contain more than 1500 bytes when UTF-8 encoded. Cannot be "".

Must be valid UTF-8 bytes. Legacy values that are not valid UTF-8 are encoded as bytes<X> where <X> is the base-64 encoding of the bytes.

string kind = 1;

Returns
TypeDescription
ByteString

The bytes for kind.

getName()

public String getName()

The name of the entity.

A name matching regex .* is reserved/read-only. A name must not be more than 1500 bytes when UTF-8 encoded. Cannot be "".

Must be valid UTF-8 bytes. Legacy values that are not valid UTF-8 are encoded as bytes<X> where <X> is the base-64 encoding of the bytes.

string name = 3;

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

The name of the entity.

A name matching regex .* is reserved/read-only. A name must not be more than 1500 bytes when UTF-8 encoded. Cannot be "".

Must be valid UTF-8 bytes. Legacy values that are not valid UTF-8 are encoded as bytes<X> where <X> is the base-64 encoding of the bytes.

string name = 3;

Returns
TypeDescription
ByteString

The bytes for name.

hasId()

public boolean hasId()

The auto-allocated ID of the entity.

Never equal to zero. Values less than zero are discouraged and may not be supported in the future.

int64 id = 2;

Returns
TypeDescription
boolean

Whether the id field is set.

hasName()

public boolean hasName()

The name of the entity.

A name matching regex .* is reserved/read-only. A name must not be more than 1500 bytes when UTF-8 encoded. Cannot be "".

Must be valid UTF-8 bytes. Legacy values that are not valid UTF-8 are encoded as bytes<X> where <X> is the base-64 encoding of the bytes.

string name = 3;

Returns
TypeDescription
boolean

Whether the name field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(Key.PathElement other)

public Key.PathElement.Builder mergeFrom(Key.PathElement other)
Parameter
NameDescription
otherKey.PathElement
Returns
TypeDescription
Key.PathElement.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

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

setId(long value)

public Key.PathElement.Builder setId(long value)

The auto-allocated ID of the entity.

Never equal to zero. Values less than zero are discouraged and may not be supported in the future.

int64 id = 2;

Parameter
NameDescription
valuelong

The id to set.

Returns
TypeDescription
Key.PathElement.Builder

This builder for chaining.

setKind(String value)

public Key.PathElement.Builder setKind(String value)

The kind of the entity.

A kind matching regex .* is reserved/read-only. A kind must not contain more than 1500 bytes when UTF-8 encoded. Cannot be "".

Must be valid UTF-8 bytes. Legacy values that are not valid UTF-8 are encoded as bytes<X> where <X> is the base-64 encoding of the bytes.

string kind = 1;

Parameter
NameDescription
valueString

The kind to set.

Returns
TypeDescription
Key.PathElement.Builder

This builder for chaining.

setKindBytes(ByteString value)

public Key.PathElement.Builder setKindBytes(ByteString value)

The kind of the entity.

A kind matching regex .* is reserved/read-only. A kind must not contain more than 1500 bytes when UTF-8 encoded. Cannot be "".

Must be valid UTF-8 bytes. Legacy values that are not valid UTF-8 are encoded as bytes<X> where <X> is the base-64 encoding of the bytes.

string kind = 1;

Parameter
NameDescription
valueByteString

The bytes for kind to set.

Returns
TypeDescription
Key.PathElement.Builder

This builder for chaining.

setName(String value)

public Key.PathElement.Builder setName(String value)

The name of the entity.

A name matching regex .* is reserved/read-only. A name must not be more than 1500 bytes when UTF-8 encoded. Cannot be "".

Must be valid UTF-8 bytes. Legacy values that are not valid UTF-8 are encoded as bytes<X> where <X> is the base-64 encoding of the bytes.

string name = 3;

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
Key.PathElement.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Key.PathElement.Builder setNameBytes(ByteString value)

The name of the entity.

A name matching regex .* is reserved/read-only. A name must not be more than 1500 bytes when UTF-8 encoded. Cannot be "".

Must be valid UTF-8 bytes. Legacy values that are not valid UTF-8 are encoded as bytes<X> where <X> is the base-64 encoding of the bytes.

string name = 3;

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
Key.PathElement.Builder

This builder for chaining.

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

public Key.PathElement.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
Key.PathElement.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final Key.PathElement.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Key.PathElement.Builder
Overrides