Get desktop application:
View/edit binary Protocol Buffers messages
Each RPC normalizes the partition IDs of the keys in its input entities, and always returns entities with keys with normalized partition IDs. This applies to all keys and entities, including those in values, except keys with both an empty path and an empty or unset partition ID. Normalization of input keys sets the project ID (if not already set) to the project ID from the request.
Looks up entities by key.
The request for [Datastore.Lookup][google.datastore.v1.Datastore.Lookup].
The ID of the project against which to make the request.
The options for this lookup request.
Keys of entities to look up.
The response for [Datastore.Lookup][google.datastore.v1.Datastore.Lookup].
Entities found as `ResultType.FULL` entities. The order of results in this field is undefined and has no relation to the order of the keys in the input.
Entities not found as `ResultType.KEY_ONLY` entities. The order of results in this field is undefined and has no relation to the order of the keys in the input.
A list of keys that were not looked up due to resource constraints. The order of results in this field is undefined and has no relation to the order of the keys in the input.
Queries for entities.
The request for [Datastore.RunQuery][google.datastore.v1.Datastore.RunQuery].
The ID of the project against which to make the request.
Entities are partitioned into subsets, identified by a partition ID. Queries are scoped to a single partition. This partition ID is normalized with the standard default context partition ID.
The options for this query.
The type of query.
The query to run.
The GQL query to run.
The response for [Datastore.RunQuery][google.datastore.v1.Datastore.RunQuery].
A batch of query results (always present).
The parsed form of the `GqlQuery` from the request, if it was set.
Begins a new transaction.
The request for [Datastore.BeginTransaction][google.datastore.v1.Datastore.BeginTransaction].
The ID of the project against which to make the request.
Options for a new transaction.
The response for [Datastore.BeginTransaction][google.datastore.v1.Datastore.BeginTransaction].
The transaction identifier (always present).
Commits a transaction, optionally creating, deleting or modifying some entities.
The request for [Datastore.Commit][google.datastore.v1.Datastore.Commit].
The ID of the project against which to make the request.
The type of commit to perform. Defaults to `TRANSACTIONAL`.
Must be set when mode is `TRANSACTIONAL`.
The identifier of the transaction associated with the commit. A transaction identifier is returned by a call to [Datastore.BeginTransaction][google.datastore.v1.Datastore.BeginTransaction].
The mutations to perform. When mode is `TRANSACTIONAL`, mutations affecting a single entity are applied in order. The following sequences of mutations affecting a single entity are not permitted in a single `Commit` request: - `insert` followed by `insert` - `update` followed by `insert` - `upsert` followed by `insert` - `delete` followed by `update` When mode is `NON_TRANSACTIONAL`, no two mutations may affect a single entity.
The response for [Datastore.Commit][google.datastore.v1.Datastore.Commit].
The result of performing the mutations. The i-th mutation result corresponds to the i-th mutation in the request.
The number of index entries updated during the commit, or zero if none were updated.
Rolls back a transaction.
The request for [Datastore.Rollback][google.datastore.v1.Datastore.Rollback].
The ID of the project against which to make the request.
The transaction identifier, returned by a call to [Datastore.BeginTransaction][google.datastore.v1.Datastore.BeginTransaction].
The response for [Datastore.Rollback][google.datastore.v1.Datastore.Rollback]. (an empty message).
(message has no fields)
Allocates IDs for the given keys, which is useful for referencing an entity before it is inserted.
The request for [Datastore.AllocateIds][google.datastore.v1.Datastore.AllocateIds].
The ID of the project against which to make the request.
A list of keys with incomplete key paths for which to allocate IDs. No key may be reserved/read-only.
The response for [Datastore.AllocateIds][google.datastore.v1.Datastore.AllocateIds].
The keys specified in the request (in the same order), each with its key path completed with a newly allocated ID.
Prevents the supplied keys' IDs from being auto-allocated by Cloud Datastore.
The request for [Datastore.ReserveIds][google.datastore.v1.Datastore.ReserveIds].
The ID of the project against which to make the request.
If not empty, the ID of the database against which to make the request.
A list of keys with complete key paths whose numeric IDs should not be auto-allocated.
The response for [Datastore.ReserveIds][google.datastore.v1.Datastore.ReserveIds].
(message has no fields)
An array value.
Used in:
Values in the array. The order of this array may not be preserved if it contains a mix of indexed and unindexed values.
The modes available for commits.
Used in:
Unspecified. This value must not be used.
Transactional: The mutations are either all applied, or none are applied. Learn about transactions [here](https://cloud.google.com/datastore/docs/concepts/transactions).
Non-transactional: The mutations may not apply as all or none.
A filter that merges multiple other filters using the given operator.
Used in:
The operator for combining multiple filters.
The list of filters to combine. Must contain at least one filter.
A composite filter operator.
Used in:
Unspecified. This value must not be used.
The results are required to satisfy each of the combined filters.
A Datastore data object. An entity is limited to 1 megabyte when stored. That _roughly_ corresponds to a limit of 1 megabyte for the serialized form of this message.
Used in:
, ,The entity's key. An entity must have a key, unless otherwise documented (for example, an entity in `Value.entity_value` may have no key). An entity's kind is its key path's last element's kind, or null if it has no key.
The entity's properties. The map's keys are property names. A property name matching regex `__.*__` is reserved. A reserved property name is forbidden in certain documented contexts. The name must not contain more than 500 characters. The name cannot be `""`.
The result of fetching an entity from Datastore.
Used in:
,The resulting entity.
The version of the entity, a strictly positive number that monotonically increases with changes to the entity. This field is set for [`FULL`][google.datastore.v1.EntityResult.ResultType.FULL] entity results. For [missing][google.datastore.v1.LookupResponse.missing] entities in `LookupResponse`, this is the version of the snapshot that was used to look up the entity, and it is always set except for eventually consistent reads.
A cursor that points to the position after the result entity. Set only when the `EntityResult` is part of a `QueryResultBatch` message.
Specifies what data the 'entity' field contains. A `ResultType` is either implied (for example, in `LookupResponse.missing` from `datastore.proto`, it is always `KEY_ONLY`) or specified by context (for example, in message `QueryResultBatch`, field `entity_result_type` specifies a `ResultType` for all the values in field `entity_results`).
Used in:
Unspecified. This value is never used.
The key and properties.
A projected subset of properties. The entity may have no key.
Only the key.
A holder for any type of filter.
Used in:
,The type of filter.
A composite filter.
A filter on a property.
A [GQL query](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).
Used in:
A string of the format described [here](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).
When false, the query string must not contain any literals and instead must bind all values. For example, `SELECT * FROM Kind WHERE a = 'string literal'` is not allowed, while `SELECT * FROM Kind WHERE a = @value` is.
For each non-reserved named binding site in the query string, there must be a named parameter with that name, but not necessarily the inverse. Key must match regex `[A-Za-z_$][A-Za-z_$0-9]*`, must not match regex `__.*__`, and must not be `""`.
Numbered binding site @1 references the first numbered parameter, effectively using 1-based indexing, rather than the usual 0. For each binding site numbered i in `query_string`, there must be an i-th numbered parameter. The inverse must also be true.
A binding parameter for a GQL query.
Used in:
The type of parameter.
A value parameter.
A query cursor. Query cursors are returned in query result batches.
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.
Used in:
, , , , , , , ,Entities are partitioned into subsets, currently identified by a project ID and namespace ID. Queries are scoped to a single partition.
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.
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.
Used in:
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 `""`.
The type of ID.
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.
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 `""`.
A representation of a kind.
Used in:
The name of the kind.
A mutation to apply to an entity.
Used in:
The mutation operation. For `insert`, `update`, and `upsert`: - The entity's key must not be reserved/read-only. - No property in the entity may have a reserved name, not even a property in an entity in a value. - No value in the entity may have meaning 18, not even a value in an entity in another value.
The entity to insert. The entity must not already exist. The entity key's final path element may be incomplete.
The entity to update. The entity must already exist. Must have a complete key path.
The entity to upsert. The entity may or may not already exist. The entity key's final path element may be incomplete.
The key of the entity to delete. The entity may or may not already exist. Must have a complete key path and must not be reserved/read-only.
When set, the server will detect whether or not this mutation conflicts with the current version of the entity on the server. Conflicting mutations are not applied, and are marked as such in MutationResult.
The version of the entity that this mutation is being applied to. If this does not match the current version on the server, the mutation conflicts.
The result of applying a mutation.
Used in:
The automatically allocated key. Set only when the mutation allocated a key.
The version of the entity on the server after processing the mutation. If the mutation doesn't change anything on the server, then the version will be the version of the current entity or, if no entity is present, a version that is strictly greater than the version of any previous entity and less than the version of any possible future entity.
Whether a conflict was detected for this mutation. Always false when a conflict detection strategy field is not set in the mutation.
A partition ID identifies a grouping of entities. The grouping is always by project and namespace, however the namespace ID may be empty. A partition ID contains several dimensions: project ID and namespace ID. Partition dimensions: - May be `""`. - Must be valid UTF-8 bytes. - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}` If the value of any dimension matches regex `__.*__`, the partition is reserved/read-only. A reserved/read-only partition ID is forbidden in certain documented contexts. Foreign partition IDs (in which the project ID does not match the context project ID ) are discouraged. Reads and writes of foreign partition IDs may fail if the project is not in an active state.
Used in:
,The ID of the project to which the entities belong.
If not empty, the ID of the namespace to which the entities belong.
A representation of a property in a projection.
Used in:
The property to project.
A filter on a specific property.
Used in:
The property to filter by.
The operator to filter by.
The value to compare the property to.
A property filter operator.
Used in:
Unspecified. This value must not be used.
Less than.
Less than or equal.
Greater than.
Greater than or equal.
Equal.
Has ancestor.
The desired order for a specific property.
Used in:
The property to order by.
The direction to order by. Defaults to `ASCENDING`.
The sort direction.
Used in:
Unspecified. This value must not be used.
Ascending.
Descending.
A reference to a property relative to the kind expressions.
Used in:
, , ,The name of the property. If name includes "."s, it may be interpreted as a property name path.
A query for entities.
Used in:
,The projection to return. Defaults to returning all properties.
The kinds to query (if empty, returns entities of all kinds). Currently at most 1 kind may be specified.
The filter to apply.
The order to apply to the query results (if empty, order is unspecified).
The properties to make distinct. The query results will contain the first result for each distinct combination of values for the given properties (if empty, all results are returned).
A starting point for the query results. Query cursors are returned in query result batches and [can only be used to continue the same query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets).
An ending point for the query results. Query cursors are returned in query result batches and [can only be used to limit the same query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets).
The number of results to skip. Applies before limit, but after all other constraints. Optional. Must be >= 0 if specified.
The maximum number of results to return. Applies after all other constraints. Optional. Unspecified is interpreted as no limit. Must be >= 0 if specified.
A batch of results produced by a query.
Used in:
The number of results skipped, typically because of an offset.
A cursor that points to the position after the last skipped result. Will be set when `skipped_results` != 0.
The result type for every entity in `entity_results`.
The results for this batch.
A cursor that points to the position after the last result in the batch.
The state of the query after the current batch.
The version number of the snapshot this batch was returned from. This applies to the range of results from the query's `start_cursor` (or the beginning of the query if no cursor was given) to this batch's `end_cursor` (not the query's `end_cursor`). In a single transaction, subsequent query result batches for the same query can have a greater snapshot version number. Each batch's snapshot version is valid for all preceding batches. The value will be zero for eventually consistent queries.
The possible values for the `more_results` field.
Used in:
Unspecified. This value is never used.
There may be additional batches to fetch from this query.
The query is finished, but there may be more results after the limit.
The query is finished, but there may be more results after the end cursor.
The query is finished, and there are no more results.
The options shared by read requests.
Used in:
,If not specified, lookups and ancestor queries default to `read_consistency`=`STRONG`, global queries default to `read_consistency`=`EVENTUAL`.
The non-transactional read consistency to use. Cannot be set to `STRONG` for global queries.
The identifier of the transaction in which to read. A transaction identifier is returned by a call to [Datastore.BeginTransaction][google.datastore.v1.Datastore.BeginTransaction].
The possible values for read consistencies.
Used in:
Unspecified. This value must not be used.
Strong consistency.
Eventual consistency.
Options for beginning a new transaction. Transactions can be created explicitly with calls to [Datastore.BeginTransaction][google.datastore.v1.Datastore.BeginTransaction] or implicitly by setting [ReadOptions.new_transaction][google.datastore.v1.ReadOptions.new_transaction] in read requests.
Used in:
The `mode` of the transaction, indicating whether write operations are supported.
The transaction should allow both reads and writes.
The transaction should only allow reads.
Options specific to read-only transactions.
Used in:
(message has no fields)
Options specific to read / write transactions.
Used in:
The transaction identifier of the transaction being retried.
A message that can hold any of the supported value types and associated metadata.
Used in:
, , ,Must have a value set.
A null value.
A boolean value.
An integer value.
A double value.
A timestamp value. When stored in the Datastore, precise only to microseconds; any additional precision is rounded down.
A key value.
A UTF-8 encoded string value. When `exclude_from_indexes` is false (it is indexed) , may have at most 1500 bytes. Otherwise, may be set to at least 1,000,000 bytes.
A blob value. May have at most 1,000,000 bytes. When `exclude_from_indexes` is false, may have at most 1500 bytes. In JSON requests, must be base64-encoded.
A geo point value representing a point on the surface of Earth.
An entity value. - May have no key. - May have a key with an incomplete key path. - May have a reserved/read-only key.
An array value. Cannot contain another array value. A `Value` instance that sets field `array_value` must not set fields `meaning` or `exclude_from_indexes`.
The `meaning` field should only be populated for backwards compatibility.
If the value should be excluded from all indexes including those defined explicitly.