public final class Key extends GeneratedMessageV3 implements KeyOrBuilder
A 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
Modifier and Type | Class and Description |
---|---|
static class |
Key.Builder
A unique identifier for an entity.
|
static class |
Key.PathElement
A (kind, ID/name) pair used to construct a key path.
|
static interface |
Key.PathElementOrBuilder |
GeneratedMessageV3.BuilderParent, GeneratedMessageV3.ExtendableBuilder<MessageType extends GeneratedMessageV3.ExtendableMessage,BuilderType extends GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, GeneratedMessageV3.ExtendableMessage<MessageType extends GeneratedMessageV3.ExtendableMessage>, GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends GeneratedMessageV3.ExtendableMessage>, GeneratedMessageV3.FieldAccessorTable
Modifier and Type | Field and Description |
---|---|
static int |
PARTITION_ID_FIELD_NUMBER |
static int |
PATH_FIELD_NUMBER |
alwaysUseFieldBuilders, unknownFields
memoizedSize
memoizedHashCode
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
static Key |
getDefaultInstance() |
Key |
getDefaultInstanceForType() |
static Descriptors.Descriptor |
getDescriptor() |
Parser<Key> |
getParserForType() |
PartitionId |
getPartitionId()
Entities are partitioned into subsets, currently identified by a project
ID and namespace ID.
|
PartitionIdOrBuilder |
getPartitionIdOrBuilder()
Entities are partitioned into subsets, currently identified by a project
ID and namespace ID.
|
Key.PathElement |
getPath(int index)
The entity path.
|
int |
getPathCount()
The entity path.
|
java.util.List<Key.PathElement> |
getPathList()
The entity path.
|
Key.PathElementOrBuilder |
getPathOrBuilder(int index)
The entity path.
|
java.util.List<? extends Key.PathElementOrBuilder> |
getPathOrBuilderList()
The entity path.
|
int |
getSerializedSize() |
UnknownFieldSet |
getUnknownFields() |
int |
hashCode() |
boolean |
hasPartitionId()
Entities are partitioned into subsets, currently identified by a project
ID and namespace ID.
|
protected GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static Key.Builder |
newBuilder() |
static Key.Builder |
newBuilder(Key prototype) |
Key.Builder |
newBuilderForType() |
protected Key.Builder |
newBuilderForType(GeneratedMessageV3.BuilderParent parent) |
static Key |
parseDelimitedFrom(java.io.InputStream input) |
static Key |
parseDelimitedFrom(java.io.InputStream input,
ExtensionRegistryLite extensionRegistry) |
static Key |
parseFrom(byte[] data) |
static Key |
parseFrom(byte[] data,
ExtensionRegistryLite extensionRegistry) |
static Key |
parseFrom(java.nio.ByteBuffer data) |
static Key |
parseFrom(java.nio.ByteBuffer data,
ExtensionRegistryLite extensionRegistry) |
static Key |
parseFrom(ByteString data) |
static Key |
parseFrom(ByteString data,
ExtensionRegistryLite extensionRegistry) |
static Key |
parseFrom(CodedInputStream input) |
static Key |
parseFrom(CodedInputStream input,
ExtensionRegistryLite extensionRegistry) |
static Key |
parseFrom(java.io.InputStream input) |
static Key |
parseFrom(java.io.InputStream input,
ExtensionRegistryLite extensionRegistry) |
static Parser<Key> |
parser() |
Key.Builder |
toBuilder() |
void |
writeTo(CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, makeExtensionsImmutable, newBuilderForType, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof
toByteArray, toByteString, writeDelimitedTo, writeTo
public static final int PARTITION_ID_FIELD_NUMBER
public static final int PATH_FIELD_NUMBER
public final UnknownFieldSet getUnknownFields()
getUnknownFields
in interface MessageOrBuilder
getUnknownFields
in class GeneratedMessageV3
public static final Descriptors.Descriptor getDescriptor()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable
in class GeneratedMessageV3
public boolean hasPartitionId()
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;
hasPartitionId
in interface KeyOrBuilder
public PartitionId getPartitionId()
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;
getPartitionId
in interface KeyOrBuilder
public PartitionIdOrBuilder getPartitionIdOrBuilder()
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;
getPartitionIdOrBuilder
in interface KeyOrBuilder
public java.util.List<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;
getPathList
in interface KeyOrBuilder
public java.util.List<? extends Key.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;
getPathOrBuilderList
in interface KeyOrBuilder
public int getPathCount()
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;
getPathCount
in interface KeyOrBuilder
public Key.PathElement getPath(int index)
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;
getPath
in interface KeyOrBuilder
public Key.PathElementOrBuilder getPathOrBuilder(int index)
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;
getPathOrBuilder
in interface KeyOrBuilder
public final boolean isInitialized()
isInitialized
in interface MessageLiteOrBuilder
isInitialized
in class GeneratedMessageV3
public void writeTo(CodedOutputStream output) throws java.io.IOException
writeTo
in interface MessageLite
writeTo
in class GeneratedMessageV3
java.io.IOException
public int getSerializedSize()
getSerializedSize
in interface MessageLite
getSerializedSize
in class GeneratedMessageV3
public boolean equals(java.lang.Object obj)
equals
in interface Message
equals
in class AbstractMessage
public int hashCode()
hashCode
in interface Message
hashCode
in class AbstractMessage
public static Key parseFrom(java.nio.ByteBuffer data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static Key parseFrom(java.nio.ByteBuffer data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static Key parseFrom(ByteString data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static Key parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static Key parseFrom(byte[] data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static Key parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static Key parseFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOException
public static Key parseFrom(java.io.InputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOException
public static Key parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOException
public static Key parseDelimitedFrom(java.io.InputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOException
public static Key parseFrom(CodedInputStream input) throws java.io.IOException
java.io.IOException
public static Key parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOException
public Key.Builder newBuilderForType()
newBuilderForType
in interface Message
newBuilderForType
in interface MessageLite
public static Key.Builder newBuilder()
public static Key.Builder newBuilder(Key prototype)
public Key.Builder toBuilder()
toBuilder
in interface Message
toBuilder
in interface MessageLite
protected Key.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
newBuilderForType
in class GeneratedMessageV3
public static Key getDefaultInstance()
public Parser<Key> getParserForType()
getParserForType
in interface Message
getParserForType
in interface MessageLite
getParserForType
in class GeneratedMessageV3
public Key getDefaultInstanceForType()
getDefaultInstanceForType
in interface MessageLiteOrBuilder
getDefaultInstanceForType
in interface MessageOrBuilder