Class Key.Builder (2.21.3)
Stay organized with collections
Save and categorize content based on your preferences.
publicstaticfinalclass Key.BuilderextendsGeneratedMessageV3.Builder<Key.Builder>implementsKeyOrBuilderA unique identifier for an entity. If a key's partition ID or any of its path kinds or names are reserved/read-only, the key is reserved/read-only. A reserved/read-only key is forbidden in certain documented contexts.
Protobuf type google.datastore.v1.Key
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > Key.BuilderImplements
KeyOrBuilderInherited Members
Static Methods
getDescriptor()
publicstaticfinalDescriptors.DescriptorgetDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
addAllPath(Iterable<? extends Key.PathElement> values)
publicKey.BuilderaddAllPath(Iterable<?extendsKey.PathElement>values)The entity path. An entity path consists of one or more elements composed of a kind and a string or numerical identifier, which identify entities. The first element identifies a root entity, the second element identifies a child of the root entity, the third element identifies a child of the second entity, and so forth. The entities identified by all prefixes of the path are called the element's ancestors.
An entity path is always fully complete: all of the entity's ancestors
are required to be in the path along with the entity identifier itself.
The only exception is that in some documented cases, the identifier in the
last path element (for the entity) itself may be omitted. For example,
the last path element of the key of Mutation.insert may have no
identifier.
A path can never be empty, and a path can have at most 100 elements.
repeated .google.datastore.v1.Key.PathElement path = 2;
| Parameter | |
|---|---|
| Name | Description |
values |
Iterable<? extends com.google.datastore.v1.Key.PathElement> |
| Returns | |
|---|---|
| Type | Description |
Key.Builder |
|
addPath(Key.PathElement value)
publicKey.BuilderaddPath(Key.PathElementvalue)The entity path. An entity path consists of one or more elements composed of a kind and a string or numerical identifier, which identify entities. The first element identifies a root entity, the second element identifies a child of the root entity, the third element identifies a child of the second entity, and so forth. The entities identified by all prefixes of the path are called the element's ancestors.
An entity path is always fully complete: all of the entity's ancestors
are required to be in the path along with the entity identifier itself.
The only exception is that in some documented cases, the identifier in the
last path element (for the entity) itself may be omitted. For example,
the last path element of the key of Mutation.insert may have no
identifier.
A path can never be empty, and a path can have at most 100 elements.
repeated .google.datastore.v1.Key.PathElement path = 2;
| Parameter | |
|---|---|
| Name | Description |
value |
Key.PathElement |
| Returns | |
|---|---|
| Type | Description |
Key.Builder |
|
addPath(Key.PathElement.Builder builderForValue)
publicKey.BuilderaddPath(Key.PathElement.BuilderbuilderForValue)The entity path. An entity path consists of one or more elements composed of a kind and a string or numerical identifier, which identify entities. The first element identifies a root entity, the second element identifies a child of the root entity, the third element identifies a child of the second entity, and so forth. The entities identified by all prefixes of the path are called the element's ancestors.
An entity path is always fully complete: all of the entity's ancestors
are required to be in the path along with the entity identifier itself.
The only exception is that in some documented cases, the identifier in the
last path element (for the entity) itself may be omitted. For example,
the last path element of the key of Mutation.insert may have no
identifier.
A path can never be empty, and a path can have at most 100 elements.
repeated .google.datastore.v1.Key.PathElement path = 2;
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
Key.PathElement.Builder |
| Returns | |
|---|---|
| Type | Description |
Key.Builder |
|
addPath(int index, Key.PathElement value)
publicKey.BuilderaddPath(intindex,Key.PathElementvalue)The entity path. An entity path consists of one or more elements composed of a kind and a string or numerical identifier, which identify entities. The first element identifies a root entity, the second element identifies a child of the root entity, the third element identifies a child of the second entity, and so forth. The entities identified by all prefixes of the path are called the element's ancestors.
An entity path is always fully complete: all of the entity's ancestors
are required to be in the path along with the entity identifier itself.
The only exception is that in some documented cases, the identifier in the
last path element (for the entity) itself may be omitted. For example,
the last path element of the key of Mutation.insert may have no
identifier.
A path can never be empty, and a path can have at most 100 elements.
repeated .google.datastore.v1.Key.PathElement path = 2;
| Parameters | |
|---|---|
| Name | Description |
index |
int |
value |
Key.PathElement |
| Returns | |
|---|---|
| Type | Description |
Key.Builder |
|
addPath(int index, Key.PathElement.Builder builderForValue)
publicKey.BuilderaddPath(intindex,Key.PathElement.BuilderbuilderForValue)The entity path. An entity path consists of one or more elements composed of a kind and a string or numerical identifier, which identify entities. The first element identifies a root entity, the second element identifies a child of the root entity, the third element identifies a child of the second entity, and so forth. The entities identified by all prefixes of the path are called the element's ancestors.
An entity path is always fully complete: all of the entity's ancestors
are required to be in the path along with the entity identifier itself.
The only exception is that in some documented cases, the identifier in the
last path element (for the entity) itself may be omitted. For example,
the last path element of the key of Mutation.insert may have no
identifier.
A path can never be empty, and a path can have at most 100 elements.
repeated .google.datastore.v1.Key.PathElement path = 2;
| Parameters | |
|---|---|
| Name | Description |
index |
int |
builderForValue |
Key.PathElement.Builder |
| Returns | |
|---|---|
| Type | Description |
Key.Builder |
|
addPathBuilder()
publicKey.PathElement.BuilderaddPathBuilder()The entity path. An entity path consists of one or more elements composed of a kind and a string or numerical identifier, which identify entities. The first element identifies a root entity, the second element identifies a child of the root entity, the third element identifies a child of the second entity, and so forth. The entities identified by all prefixes of the path are called the element's ancestors.
An entity path is always fully complete: all of the entity's ancestors
are required to be in the path along with the entity identifier itself.
The only exception is that in some documented cases, the identifier in the
last path element (for the entity) itself may be omitted. For example,
the last path element of the key of Mutation.insert may have no
identifier.
A path can never be empty, and a path can have at most 100 elements.
repeated .google.datastore.v1.Key.PathElement path = 2;
| Returns | |
|---|---|
| Type | Description |
Key.PathElement.Builder |
|
addPathBuilder(int index)
publicKey.PathElement.BuilderaddPathBuilder(intindex)The entity path. An entity path consists of one or more elements composed of a kind and a string or numerical identifier, which identify entities. The first element identifies a root entity, the second element identifies a child of the root entity, the third element identifies a child of the second entity, and so forth. The entities identified by all prefixes of the path are called the element's ancestors.
An entity path is always fully complete: all of the entity's ancestors
are required to be in the path along with the entity identifier itself.
The only exception is that in some documented cases, the identifier in the
last path element (for the entity) itself may be omitted. For example,
the last path element of the key of Mutation.insert may have no
identifier.
A path can never be empty, and a path can have at most 100 elements.
repeated .google.datastore.v1.Key.PathElement path = 2;
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
Key.PathElement.Builder |
|
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
publicKey.BuilderaddRepeatedField(Descriptors.FieldDescriptorfield,Objectvalue)| Parameters | |
|---|---|
| Name | Description |
field |
FieldDescriptor |
value |
Object |
| Returns | |
|---|---|
| Type | Description |
Key.Builder |
|
build()
publicKeybuild()| Returns | |
|---|---|
| Type | Description |
Key |
|
buildPartial()
publicKeybuildPartial()| Returns | |
|---|---|
| Type | Description |
Key |
|
clear()
publicKey.Builderclear()| Returns | |
|---|---|
| Type | Description |
Key.Builder |
|
clearField(Descriptors.FieldDescriptor field)
publicKey.BuilderclearField(Descriptors.FieldDescriptorfield)| Parameter | |
|---|---|
| Name | Description |
field |
FieldDescriptor |
| Returns | |
|---|---|
| Type | Description |
Key.Builder |
|
clearOneof(Descriptors.OneofDescriptor oneof)
publicKey.BuilderclearOneof(Descriptors.OneofDescriptoroneof)| Parameter | |
|---|---|
| Name | Description |
oneof |
OneofDescriptor |
| Returns | |
|---|---|
| Type | Description |
Key.Builder |
|
clearPartitionId()
publicKey.BuilderclearPartitionId()Entities are partitioned into subsets, currently identified by a project ID and namespace ID. Queries are scoped to a single partition.
.google.datastore.v1.PartitionId partition_id = 1;
| Returns | |
|---|---|
| Type | Description |
Key.Builder |
|
clearPath()
publicKey.BuilderclearPath()The entity path. An entity path consists of one or more elements composed of a kind and a string or numerical identifier, which identify entities. The first element identifies a root entity, the second element identifies a child of the root entity, the third element identifies a child of the second entity, and so forth. The entities identified by all prefixes of the path are called the element's ancestors.
An entity path is always fully complete: all of the entity's ancestors
are required to be in the path along with the entity identifier itself.
The only exception is that in some documented cases, the identifier in the
last path element (for the entity) itself may be omitted. For example,
the last path element of the key of Mutation.insert may have no
identifier.
A path can never be empty, and a path can have at most 100 elements.
repeated .google.datastore.v1.Key.PathElement path = 2;
| Returns | |
|---|---|
| Type | Description |
Key.Builder |
|
clone()
publicKey.Builderclone()| Returns | |
|---|---|
| Type | Description |
Key.Builder |
|
getDefaultInstanceForType()
publicKeygetDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
Key |
|
getDescriptorForType()
publicDescriptors.DescriptorgetDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
getPartitionId()
publicPartitionIdgetPartitionId()Entities are partitioned into subsets, currently identified by a project ID and namespace ID. Queries are scoped to a single partition.
.google.datastore.v1.PartitionId partition_id = 1;
| Returns | |
|---|---|
| Type | Description |
PartitionId |
The partitionId. |
getPartitionIdBuilder()
publicPartitionId.BuildergetPartitionIdBuilder()Entities are partitioned into subsets, currently identified by a project ID and namespace ID. Queries are scoped to a single partition.
.google.datastore.v1.PartitionId partition_id = 1;
| Returns | |
|---|---|
| Type | Description |
PartitionId.Builder |
|
getPartitionIdOrBuilder()
publicPartitionIdOrBuildergetPartitionIdOrBuilder()Entities are partitioned into subsets, currently identified by a project ID and namespace ID. Queries are scoped to a single partition.
.google.datastore.v1.PartitionId partition_id = 1;
| Returns | |
|---|---|
| Type | Description |
PartitionIdOrBuilder |
|
getPath(int index)
publicKey.PathElementgetPath(intindex)The entity path. An entity path consists of one or more elements composed of a kind and a string or numerical identifier, which identify entities. The first element identifies a root entity, the second element identifies a child of the root entity, the third element identifies a child of the second entity, and so forth. The entities identified by all prefixes of the path are called the element's ancestors.
An entity path is always fully complete: all of the entity's ancestors
are required to be in the path along with the entity identifier itself.
The only exception is that in some documented cases, the identifier in the
last path element (for the entity) itself may be omitted. For example,
the last path element of the key of Mutation.insert may have no
identifier.
A path can never be empty, and a path can have at most 100 elements.
repeated .google.datastore.v1.Key.PathElement path = 2;
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
Key.PathElement |
|
getPathBuilder(int index)
publicKey.PathElement.BuildergetPathBuilder(intindex)The entity path. An entity path consists of one or more elements composed of a kind and a string or numerical identifier, which identify entities. The first element identifies a root entity, the second element identifies a child of the root entity, the third element identifies a child of the second entity, and so forth. The entities identified by all prefixes of the path are called the element's ancestors.
An entity path is always fully complete: all of the entity's ancestors
are required to be in the path along with the entity identifier itself.
The only exception is that in some documented cases, the identifier in the
last path element (for the entity) itself may be omitted. For example,
the last path element of the key of Mutation.insert may have no
identifier.
A path can never be empty, and a path can have at most 100 elements.
repeated .google.datastore.v1.Key.PathElement path = 2;
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
Key.PathElement.Builder |
|
getPathBuilderList()
publicList<Key.PathElement.Builder>getPathBuilderList()The entity path. An entity path consists of one or more elements composed of a kind and a string or numerical identifier, which identify entities. The first element identifies a root entity, the second element identifies a child of the root entity, the third element identifies a child of the second entity, and so forth. The entities identified by all prefixes of the path are called the element's ancestors.
An entity path is always fully complete: all of the entity's ancestors
are required to be in the path along with the entity identifier itself.
The only exception is that in some documented cases, the identifier in the
last path element (for the entity) itself may be omitted. For example,
the last path element of the key of Mutation.insert may have no
identifier.
A path can never be empty, and a path can have at most 100 elements.
repeated .google.datastore.v1.Key.PathElement path = 2;
| Returns | |
|---|---|
| Type | Description |
List<Builder> |
|
getPathCount()
publicintgetPathCount()The entity path. An entity path consists of one or more elements composed of a kind and a string or numerical identifier, which identify entities. The first element identifies a root entity, the second element identifies a child of the root entity, the third element identifies a child of the second entity, and so forth. The entities identified by all prefixes of the path are called the element's ancestors.
An entity path is always fully complete: all of the entity's ancestors
are required to be in the path along with the entity identifier itself.
The only exception is that in some documented cases, the identifier in the
last path element (for the entity) itself may be omitted. For example,
the last path element of the key of Mutation.insert may have no
identifier.
A path can never be empty, and a path can have at most 100 elements.
repeated .google.datastore.v1.Key.PathElement path = 2;
| Returns | |
|---|---|
| Type | Description |
int |
|
getPathList()
publicList<Key.PathElement>getPathList()The entity path. An entity path consists of one or more elements composed of a kind and a string or numerical identifier, which identify entities. The first element identifies a root entity, the second element identifies a child of the root entity, the third element identifies a child of the second entity, and so forth. The entities identified by all prefixes of the path are called the element's ancestors.
An entity path is always fully complete: all of the entity's ancestors
are required to be in the path along with the entity identifier itself.
The only exception is that in some documented cases, the identifier in the
last path element (for the entity) itself may be omitted. For example,
the last path element of the key of Mutation.insert may have no
identifier.
A path can never be empty, and a path can have at most 100 elements.
repeated .google.datastore.v1.Key.PathElement path = 2;
| Returns | |
|---|---|
| Type | Description |
List<PathElement> |
|
getPathOrBuilder(int index)
publicKey.PathElementOrBuildergetPathOrBuilder(intindex)The entity path. An entity path consists of one or more elements composed of a kind and a string or numerical identifier, which identify entities. The first element identifies a root entity, the second element identifies a child of the root entity, the third element identifies a child of the second entity, and so forth. The entities identified by all prefixes of the path are called the element's ancestors.
An entity path is always fully complete: all of the entity's ancestors
are required to be in the path along with the entity identifier itself.
The only exception is that in some documented cases, the identifier in the
last path element (for the entity) itself may be omitted. For example,
the last path element of the key of Mutation.insert may have no
identifier.
A path can never be empty, and a path can have at most 100 elements.
repeated .google.datastore.v1.Key.PathElement path = 2;
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
Key.PathElementOrBuilder |
|
getPathOrBuilderList()
publicList<?extendsKey.PathElementOrBuilder>getPathOrBuilderList()The entity path. An entity path consists of one or more elements composed of a kind and a string or numerical identifier, which identify entities. The first element identifies a root entity, the second element identifies a child of the root entity, the third element identifies a child of the second entity, and so forth. The entities identified by all prefixes of the path are called the element's ancestors.
An entity path is always fully complete: all of the entity's ancestors
are required to be in the path along with the entity identifier itself.
The only exception is that in some documented cases, the identifier in the
last path element (for the entity) itself may be omitted. For example,
the last path element of the key of Mutation.insert may have no
identifier.
A path can never be empty, and a path can have at most 100 elements.
repeated .google.datastore.v1.Key.PathElement path = 2;
| Returns | |
|---|---|
| Type | Description |
List<? extends com.google.datastore.v1.Key.PathElementOrBuilder> |
|
hasPartitionId()
publicbooleanhasPartitionId()Entities are partitioned into subsets, currently identified by a project ID and namespace ID. Queries are scoped to a single partition.
.google.datastore.v1.PartitionId partition_id = 1;
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the partitionId field is set. |
internalGetFieldAccessorTable()
protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
publicfinalbooleanisInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeFrom(Key other)
publicKey.BuildermergeFrom(Keyother)| Parameter | |
|---|---|
| Name | Description |
other |
Key |
| Returns | |
|---|---|
| Type | Description |
Key.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
publicKey.BuildermergeFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
Key.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
publicKey.BuildermergeFrom(Messageother)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
Key.Builder |
|
mergePartitionId(PartitionId value)
publicKey.BuildermergePartitionId(PartitionIdvalue)Entities are partitioned into subsets, currently identified by a project ID and namespace ID. Queries are scoped to a single partition.
.google.datastore.v1.PartitionId partition_id = 1;
| Parameter | |
|---|---|
| Name | Description |
value |
PartitionId |
| Returns | |
|---|---|
| Type | Description |
Key.Builder |
|
mergeUnknownFields(UnknownFieldSet unknownFields)
publicfinalKey.BuildermergeUnknownFields(UnknownFieldSetunknownFields)| Parameter | |
|---|---|
| Name | Description |
unknownFields |
UnknownFieldSet |
| Returns | |
|---|---|
| Type | Description |
Key.Builder |
|
removePath(int index)
publicKey.BuilderremovePath(intindex)The entity path. An entity path consists of one or more elements composed of a kind and a string or numerical identifier, which identify entities. The first element identifies a root entity, the second element identifies a child of the root entity, the third element identifies a child of the second entity, and so forth. The entities identified by all prefixes of the path are called the element's ancestors.
An entity path is always fully complete: all of the entity's ancestors
are required to be in the path along with the entity identifier itself.
The only exception is that in some documented cases, the identifier in the
last path element (for the entity) itself may be omitted. For example,
the last path element of the key of Mutation.insert may have no
identifier.
A path can never be empty, and a path can have at most 100 elements.
repeated .google.datastore.v1.Key.PathElement path = 2;
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
Key.Builder |
|
setField(Descriptors.FieldDescriptor field, Object value)
publicKey.BuildersetField(Descriptors.FieldDescriptorfield,Objectvalue)| Parameters | |
|---|---|
| Name | Description |
field |
FieldDescriptor |
value |
Object |
| Returns | |
|---|---|
| Type | Description |
Key.Builder |
|
setPartitionId(PartitionId value)
publicKey.BuildersetPartitionId(PartitionIdvalue)Entities are partitioned into subsets, currently identified by a project ID and namespace ID. Queries are scoped to a single partition.
.google.datastore.v1.PartitionId partition_id = 1;
| Parameter | |
|---|---|
| Name | Description |
value |
PartitionId |
| Returns | |
|---|---|
| Type | Description |
Key.Builder |
|
setPartitionId(PartitionId.Builder builderForValue)
publicKey.BuildersetPartitionId(PartitionId.BuilderbuilderForValue)Entities are partitioned into subsets, currently identified by a project ID and namespace ID. Queries are scoped to a single partition.
.google.datastore.v1.PartitionId partition_id = 1;
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
PartitionId.Builder |
| Returns | |
|---|---|
| Type | Description |
Key.Builder |
|
setPath(int index, Key.PathElement value)
publicKey.BuildersetPath(intindex,Key.PathElementvalue)The entity path. An entity path consists of one or more elements composed of a kind and a string or numerical identifier, which identify entities. The first element identifies a root entity, the second element identifies a child of the root entity, the third element identifies a child of the second entity, and so forth. The entities identified by all prefixes of the path are called the element's ancestors.
An entity path is always fully complete: all of the entity's ancestors
are required to be in the path along with the entity identifier itself.
The only exception is that in some documented cases, the identifier in the
last path element (for the entity) itself may be omitted. For example,
the last path element of the key of Mutation.insert may have no
identifier.
A path can never be empty, and a path can have at most 100 elements.
repeated .google.datastore.v1.Key.PathElement path = 2;
| Parameters | |
|---|---|
| Name | Description |
index |
int |
value |
Key.PathElement |
| Returns | |
|---|---|
| Type | Description |
Key.Builder |
|
setPath(int index, Key.PathElement.Builder builderForValue)
publicKey.BuildersetPath(intindex,Key.PathElement.BuilderbuilderForValue)The entity path. An entity path consists of one or more elements composed of a kind and a string or numerical identifier, which identify entities. The first element identifies a root entity, the second element identifies a child of the root entity, the third element identifies a child of the second entity, and so forth. The entities identified by all prefixes of the path are called the element's ancestors.
An entity path is always fully complete: all of the entity's ancestors
are required to be in the path along with the entity identifier itself.
The only exception is that in some documented cases, the identifier in the
last path element (for the entity) itself may be omitted. For example,
the last path element of the key of Mutation.insert may have no
identifier.
A path can never be empty, and a path can have at most 100 elements.
repeated .google.datastore.v1.Key.PathElement path = 2;
| Parameters | |
|---|---|
| Name | Description |
index |
int |
builderForValue |
Key.PathElement.Builder |
| Returns | |
|---|---|
| Type | Description |
Key.Builder |
|
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
publicKey.BuildersetRepeatedField(Descriptors.FieldDescriptorfield,intindex,Objectvalue)| Parameters | |
|---|---|
| Name | Description |
field |
FieldDescriptor |
index |
int |
value |
Object |
| Returns | |
|---|---|
| Type | Description |
Key.Builder |
|
setUnknownFields(UnknownFieldSet unknownFields)
publicfinalKey.BuildersetUnknownFields(UnknownFieldSetunknownFields)| Parameter | |
|---|---|
| Name | Description |
unknownFields |
UnknownFieldSet |
| Returns | |
|---|---|
| Type | Description |
Key.Builder |
|