Class Key.PathElement.Builder (2.23.0)

publicstaticfinalclass Key.PathElement.BuilderextendsGeneratedMessageV3.Builder<Key.PathElement.Builder>implementsKey.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

Inherited Members

com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)

Static Methods

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

publicKey.PathElement.BuilderaddRepeatedField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Key.PathElement.Builder
Overrides

build()

publicKey.PathElementbuild()
Returns
Type Description
Key.PathElement

buildPartial()

publicKey.PathElementbuildPartial()
Returns
Type Description
Key.PathElement

clear()

publicKey.PathElement.Builderclear()
Returns
Type Description
Key.PathElement.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

publicKey.PathElement.BuilderclearField(Descriptors.FieldDescriptorfield)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Key.PathElement.Builder
Overrides

clearId()

publicKey.PathElement.BuilderclearId()

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
Type Description
Key.PathElement.Builder

This builder for chaining.

clearIdType()

publicKey.PathElement.BuilderclearIdType()
Returns
Type Description
Key.PathElement.Builder

clearKind()

publicKey.PathElement.BuilderclearKind()

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
Type Description
Key.PathElement.Builder

This builder for chaining.

clearName()

publicKey.PathElement.BuilderclearName()

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
Type Description
Key.PathElement.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

publicKey.PathElement.BuilderclearOneof(Descriptors.OneofDescriptoroneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Key.PathElement.Builder
Overrides

clone()

publicKey.PathElement.Builderclone()
Returns
Type Description
Key.PathElement.Builder
Overrides

getDefaultInstanceForType()

publicKey.PathElementgetDefaultInstanceForType()
Returns
Type Description
Key.PathElement

getDescriptorForType()

publicDescriptors.DescriptorgetDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getId()

publiclonggetId()

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
Type Description
long

The id.

getIdTypeCase()

publicKey.PathElement.IdTypeCasegetIdTypeCase()
Returns
Type Description
Key.PathElement.IdTypeCase

getKind()

publicStringgetKind()

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
Type Description
String

The kind.

getKindBytes()

publicByteStringgetKindBytes()

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
Type Description
ByteString

The bytes for kind.

getName()

publicStringgetName()

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
Type Description
String

The name.

getNameBytes()

publicByteStringgetNameBytes()

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
Type Description
ByteString

The bytes for name.

hasId()

publicbooleanhasId()

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
Type Description
boolean

Whether the id field is set.

hasName()

publicbooleanhasName()

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
Type Description
boolean

Whether the name field is set.

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Key.PathElement other)

publicKey.PathElement.BuildermergeFrom(Key.PathElementother)
Parameter
Name Description
other Key.PathElement
Returns
Type Description
Key.PathElement.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicKey.PathElement.BuildermergeFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Key.PathElement.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

publicKey.PathElement.BuildermergeFrom(Messageother)
Parameter
Name Description
other Message
Returns
Type Description
Key.PathElement.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

publicfinalKey.PathElement.BuildermergeUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Key.PathElement.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

publicKey.PathElement.BuildersetField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Key.PathElement.Builder
Overrides

setId(long value)

publicKey.PathElement.BuildersetId(longvalue)

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
Name Description
value long

The id to set.

Returns
Type Description
Key.PathElement.Builder

This builder for chaining.

setKind(String value)

publicKey.PathElement.BuildersetKind(Stringvalue)

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
Name Description
value String

The kind to set.

Returns
Type Description
Key.PathElement.Builder

This builder for chaining.

setKindBytes(ByteString value)

publicKey.PathElement.BuildersetKindBytes(ByteStringvalue)

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
Name Description
value ByteString

The bytes for kind to set.

Returns
Type Description
Key.PathElement.Builder

This builder for chaining.

setName(String value)

publicKey.PathElement.BuildersetName(Stringvalue)

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
Name Description
value String

The name to set.

Returns
Type Description
Key.PathElement.Builder

This builder for chaining.

setNameBytes(ByteString value)

publicKey.PathElement.BuildersetNameBytes(ByteStringvalue)

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
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
Key.PathElement.Builder

This builder for chaining.

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

publicKey.PathElement.BuildersetRepeatedField(Descriptors.FieldDescriptorfield,intindex,Objectvalue)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Key.PathElement.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

publicfinalKey.PathElement.BuildersetUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Key.PathElement.Builder
Overrides

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年11月19日 UTC.