Google Cloud Datastore API . datasets

Instance Methods

allocateIds(datasetId, body)

Allocate IDs for incomplete keys (useful for referencing an entity before it is inserted).

beginTransaction(datasetId, body)

Begin a new transaction.

blindWrite(datasetId, body)

Create, delete or modify some entities outside a transaction.

commit(datasetId, body)

Commit a transaction, optionally creating, deleting or modifying some entities.

lookup(datasetId, body)

Look up some entities by key.

rollback(datasetId, body)

Roll back a transaction.

runQuery(datasetId, body)

Query for entities.

Method Details

allocateIds(datasetId, body)
Allocate IDs for incomplete keys (useful for referencing an entity before it is inserted).

Args:
  datasetId: string, Identifies the dataset. (required)
  body: object, The request body. (required)
    The object takes the form of:

{
    "keys": [ # A list of keys with incomplete key paths to allocate IDs for. No key may be reserved/read-only.
      {
        "path": [ # 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 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. A path can never be empty.
          { # A (kind, ID/name) pair used to construct a key path.
              #
              # At most one of name or ID may be set. If either is set, the element is complete. If neither is set, the element is incomplete.
            "kind": "A String", # The kind of the entity. Kinds matching regex "__.*__" are reserved/read-only. Cannot be "".
            "id": "A String", # The ID of the entity. Always > 0.
            "name": "A String", # The name of the entity. Names matching regex "__.*__" are reserved/read-only. Cannot be "".
          },
        ],
        "partitionId": { # Entities are partitioned into subsets, currently identified by a dataset (usually implicitly specified by the project) and namespace ID. Queries are scoped to a single partition.
          "namespace": "A String", # The namespace.
          "datasetId": "A String", # The dataset ID.
        },
      },
    ],
  }


Returns:
  An object of the form:

    {
    "keys": [ # The keys specified in the request (in the same order), each with its key path completed with a newly allocated ID.
      {
        "path": [ # 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 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. A path can never be empty.
          { # A (kind, ID/name) pair used to construct a key path.
              #
              # At most one of name or ID may be set. If either is set, the element is complete. If neither is set, the element is incomplete.
            "kind": "A String", # The kind of the entity. Kinds matching regex "__.*__" are reserved/read-only. Cannot be "".
            "id": "A String", # The ID of the entity. Always > 0.
            "name": "A String", # The name of the entity. Names matching regex "__.*__" are reserved/read-only. Cannot be "".
          },
        ],
        "partitionId": { # Entities are partitioned into subsets, currently identified by a dataset (usually implicitly specified by the project) and namespace ID. Queries are scoped to a single partition.
          "namespace": "A String", # The namespace.
          "datasetId": "A String", # The dataset ID.
        },
      },
    ],
    "header": {
      "kind": "datastore#responseHeader", # The kind, fixed to "datastore#responseHeader".
    },
  }
beginTransaction(datasetId, body)
Begin a new transaction.

Args:
  datasetId: string, Identifies the dataset. (required)
  body: object, The request body. (required)
    The object takes the form of:

{
    "isolationLevel": "A String", # The transaction isolation level. Either snapshot or serializable. The default isolation level is snapshot isolation, which means that another transaction may not concurrently modify the data that is modified by this transaction. Optionally, a transaction can request to be made serializable which means that another transaction cannot concurrently modify the data that is read or modified by this transaction.
  }


Returns:
  An object of the form:

    {
    "header": {
      "kind": "datastore#responseHeader", # The kind, fixed to "datastore#responseHeader".
    },
    "transaction": "A String", # The transaction identifier (always present).
  }
blindWrite(datasetId, body)
Create, delete or modify some entities outside a transaction.

Args:
  datasetId: string, Identifies the dataset. (required)
  body: object, The request body. (required)
    The object takes the form of:

{
    "mutation": { # The mutation to perform.
      "insert": [ # Entities to insert. Each inserted entity's key must have a complete path and must not be reserved/read-only.
        {
          "properties": { # The entity's properties.
            "a_key": { # The name of the property. Properties with names matching regex "__.*__" are reserved. A reserved property name is forbidden in certain documented contexts. The name cannot be "".
              "multi": True or False, # If this property contains a list of values. Input values may explicitly set multi to false, but otherwise false is always represented by omitting multi.
              "values": [ # The value(s) of the property. When multi is false there is always exactly one value. When multi is true there are always one or more values. Each value can have only one value property populated. For example, you cannot have a values list of { values: [ { integerValue: 22, stringValue: "a" } ] }, but you can have { multi: true, values: [ { integerValue: 22 }, { stringValue: "a" } ] }.
                {
                  "entityValue": # Object with schema name: Entity # An entity value. May have no key. May have a key with an incomplete key path. May have a reserved/read-only key.
                  "doubleValue": 3.14, # A double value.
                  "integerValue": "A String", # An integer value.
                  "meaning": 42, # The meaning field is reserved and should not be used.
                  "dateTimeValue": "A String", # A timestamp value.
                  "keyValue": { # A key value.
                    "path": [ # 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 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. A path can never be empty.
                      { # A (kind, ID/name) pair used to construct a key path.
                          #
                          # At most one of name or ID may be set. If either is set, the element is complete. If neither is set, the element is incomplete.
                        "kind": "A String", # The kind of the entity. Kinds matching regex "__.*__" are reserved/read-only. Cannot be "".
                        "id": "A String", # The ID of the entity. Always > 0.
                        "name": "A String", # The name of the entity. Names matching regex "__.*__" are reserved/read-only. Cannot be "".
                      },
                    ],
                    "partitionId": { # Entities are partitioned into subsets, currently identified by a dataset (usually implicitly specified by the project) and namespace ID. Queries are scoped to a single partition.
                      "namespace": "A String", # The namespace.
                      "datasetId": "A String", # The dataset ID.
                    },
                  },
                  "stringValue": "A String", # A UTF-8 encoded string value.
                  "indexed": True or False, # If the value should be indexed.
                      #
                      # The indexed property may be set for a null value. When indexed is true, stringValue is limited to 500 characters and the blob value is limited to 500 bytes. Input values by default have indexed set to true; however, you can explicitly set indexed to true if you want. (An output value never has indexed explicitly set to true.) If a value is itself an entity, it cannot have indexed set to true.
                  "blobValue": "A String", # A blob value.
                  "booleanValue": True or False, # A boolean value.
                  "blobKeyValue": "A String", # A blob key value.
                },
              ],
            },
          },
          "key": { # The entity's key.
              #
              # An entity must have a key, unless otherwise documented (for example, an entity in Value.entityValue may have no key). An entity's kind is its key's path's last element's kind, or null if it has no key.
            "path": [ # 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 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. A path can never be empty.
              { # A (kind, ID/name) pair used to construct a key path.
                  #
                  # At most one of name or ID may be set. If either is set, the element is complete. If neither is set, the element is incomplete.
                "kind": "A String", # The kind of the entity. Kinds matching regex "__.*__" are reserved/read-only. Cannot be "".
                "id": "A String", # The ID of the entity. Always > 0.
                "name": "A String", # The name of the entity. Names matching regex "__.*__" are reserved/read-only. Cannot be "".
              },
            ],
            "partitionId": { # Entities are partitioned into subsets, currently identified by a dataset (usually implicitly specified by the project) and namespace ID. Queries are scoped to a single partition.
              "namespace": "A String", # The namespace.
              "datasetId": "A String", # The dataset ID.
            },
          },
        },
      ],
      "force": True or False, # Ignore a user specified read-only period. Optional.
      "insertAutoId": [ # Insert entities with a newly allocated ID. Each inserted entity's key must omit the final identifier in its path and must not be reserved/read-only.
        {
          "properties": { # The entity's properties.
            "a_key": { # The name of the property. Properties with names matching regex "__.*__" are reserved. A reserved property name is forbidden in certain documented contexts. The name cannot be "".
              "multi": True or False, # If this property contains a list of values. Input values may explicitly set multi to false, but otherwise false is always represented by omitting multi.
              "values": [ # The value(s) of the property. When multi is false there is always exactly one value. When multi is true there are always one or more values. Each value can have only one value property populated. For example, you cannot have a values list of { values: [ { integerValue: 22, stringValue: "a" } ] }, but you can have { multi: true, values: [ { integerValue: 22 }, { stringValue: "a" } ] }.
                {
                  "entityValue": # Object with schema name: Entity # An entity value. May have no key. May have a key with an incomplete key path. May have a reserved/read-only key.
                  "doubleValue": 3.14, # A double value.
                  "integerValue": "A String", # An integer value.
                  "meaning": 42, # The meaning field is reserved and should not be used.
                  "dateTimeValue": "A String", # A timestamp value.
                  "keyValue": { # A key value.
                    "path": [ # 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 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. A path can never be empty.
                      { # A (kind, ID/name) pair used to construct a key path.
                          #
                          # At most one of name or ID may be set. If either is set, the element is complete. If neither is set, the element is incomplete.
                        "kind": "A String", # The kind of the entity. Kinds matching regex "__.*__" are reserved/read-only. Cannot be "".
                        "id": "A String", # The ID of the entity. Always > 0.
                        "name": "A String", # The name of the entity. Names matching regex "__.*__" are reserved/read-only. Cannot be "".
                      },
                    ],
                    "partitionId": { # Entities are partitioned into subsets, currently identified by a dataset (usually implicitly specified by the project) and namespace ID. Queries are scoped to a single partition.
                      "namespace": "A String", # The namespace.
                      "datasetId": "A String", # The dataset ID.
                    },
                  },
                  "stringValue": "A String", # A UTF-8 encoded string value.
                  "indexed": True or False, # If the value should be indexed.
                      #
                      # The indexed property may be set for a null value. When indexed is true, stringValue is limited to 500 characters and the blob value is limited to 500 bytes. Input values by default have indexed set to true; however, you can explicitly set indexed to true if you want. (An output value never has indexed explicitly set to true.) If a value is itself an entity, it cannot have indexed set to true.
                  "blobValue": "A String", # A blob value.
                  "booleanValue": True or False, # A boolean value.
                  "blobKeyValue": "A String", # A blob key value.
                },
              ],
            },
          },
          "key": { # The entity's key.
              #
              # An entity must have a key, unless otherwise documented (for example, an entity in Value.entityValue may have no key). An entity's kind is its key's path's last element's kind, or null if it has no key.
            "path": [ # 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 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. A path can never be empty.
              { # A (kind, ID/name) pair used to construct a key path.
                  #
                  # At most one of name or ID may be set. If either is set, the element is complete. If neither is set, the element is incomplete.
                "kind": "A String", # The kind of the entity. Kinds matching regex "__.*__" are reserved/read-only. Cannot be "".
                "id": "A String", # The ID of the entity. Always > 0.
                "name": "A String", # The name of the entity. Names matching regex "__.*__" are reserved/read-only. Cannot be "".
              },
            ],
            "partitionId": { # Entities are partitioned into subsets, currently identified by a dataset (usually implicitly specified by the project) and namespace ID. Queries are scoped to a single partition.
              "namespace": "A String", # The namespace.
              "datasetId": "A String", # The dataset ID.
            },
          },
        },
      ],
      "update": [ # Entities to update. Each updated entity's key must have a complete path and must not be reserved/read-only.
        {
          "properties": { # The entity's properties.
            "a_key": { # The name of the property. Properties with names matching regex "__.*__" are reserved. A reserved property name is forbidden in certain documented contexts. The name cannot be "".
              "multi": True or False, # If this property contains a list of values. Input values may explicitly set multi to false, but otherwise false is always represented by omitting multi.
              "values": [ # The value(s) of the property. When multi is false there is always exactly one value. When multi is true there are always one or more values. Each value can have only one value property populated. For example, you cannot have a values list of { values: [ { integerValue: 22, stringValue: "a" } ] }, but you can have { multi: true, values: [ { integerValue: 22 }, { stringValue: "a" } ] }.
                {
                  "entityValue": # Object with schema name: Entity # An entity value. May have no key. May have a key with an incomplete key path. May have a reserved/read-only key.
                  "doubleValue": 3.14, # A double value.
                  "integerValue": "A String", # An integer value.
                  "meaning": 42, # The meaning field is reserved and should not be used.
                  "dateTimeValue": "A String", # A timestamp value.
                  "keyValue": { # A key value.
                    "path": [ # 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 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. A path can never be empty.
                      { # A (kind, ID/name) pair used to construct a key path.
                          #
                          # At most one of name or ID may be set. If either is set, the element is complete. If neither is set, the element is incomplete.
                        "kind": "A String", # The kind of the entity. Kinds matching regex "__.*__" are reserved/read-only. Cannot be "".
                        "id": "A String", # The ID of the entity. Always > 0.
                        "name": "A String", # The name of the entity. Names matching regex "__.*__" are reserved/read-only. Cannot be "".
                      },
                    ],
                    "partitionId": { # Entities are partitioned into subsets, currently identified by a dataset (usually implicitly specified by the project) and namespace ID. Queries are scoped to a single partition.
                      "namespace": "A String", # The namespace.
                      "datasetId": "A String", # The dataset ID.
                    },
                  },
                  "stringValue": "A String", # A UTF-8 encoded string value.
                  "indexed": True or False, # If the value should be indexed.
                      #
                      # The indexed property may be set for a null value. When indexed is true, stringValue is limited to 500 characters and the blob value is limited to 500 bytes. Input values by default have indexed set to true; however, you can explicitly set indexed to true if you want. (An output value never has indexed explicitly set to true.) If a value is itself an entity, it cannot have indexed set to true.
                  "blobValue": "A String", # A blob value.
                  "booleanValue": True or False, # A boolean value.
                  "blobKeyValue": "A String", # A blob key value.
                },
              ],
            },
          },
          "key": { # The entity's key.
              #
              # An entity must have a key, unless otherwise documented (for example, an entity in Value.entityValue may have no key). An entity's kind is its key's path's last element's kind, or null if it has no key.
            "path": [ # 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 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. A path can never be empty.
              { # A (kind, ID/name) pair used to construct a key path.
                  #
                  # At most one of name or ID may be set. If either is set, the element is complete. If neither is set, the element is incomplete.
                "kind": "A String", # The kind of the entity. Kinds matching regex "__.*__" are reserved/read-only. Cannot be "".
                "id": "A String", # The ID of the entity. Always > 0.
                "name": "A String", # The name of the entity. Names matching regex "__.*__" are reserved/read-only. Cannot be "".
              },
            ],
            "partitionId": { # Entities are partitioned into subsets, currently identified by a dataset (usually implicitly specified by the project) and namespace ID. Queries are scoped to a single partition.
              "namespace": "A String", # The namespace.
              "datasetId": "A String", # The dataset ID.
            },
          },
        },
      ],
      "delete": [ # Keys of entities to delete. Each key must have a complete key path and must not be reserved/read-only.
        {
          "path": [ # 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 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. A path can never be empty.
            { # A (kind, ID/name) pair used to construct a key path.
                #
                # At most one of name or ID may be set. If either is set, the element is complete. If neither is set, the element is incomplete.
              "kind": "A String", # The kind of the entity. Kinds matching regex "__.*__" are reserved/read-only. Cannot be "".
              "id": "A String", # The ID of the entity. Always > 0.
              "name": "A String", # The name of the entity. Names matching regex "__.*__" are reserved/read-only. Cannot be "".
            },
          ],
          "partitionId": { # Entities are partitioned into subsets, currently identified by a dataset (usually implicitly specified by the project) and namespace ID. Queries are scoped to a single partition.
            "namespace": "A String", # The namespace.
            "datasetId": "A String", # The dataset ID.
          },
        },
      ],
      "upsert": [ # Entities to upsert. Each upserted entity's key must have a complete path and must not be reserved/read-only.
        {
          "properties": { # The entity's properties.
            "a_key": { # The name of the property. Properties with names matching regex "__.*__" are reserved. A reserved property name is forbidden in certain documented contexts. The name cannot be "".
              "multi": True or False, # If this property contains a list of values. Input values may explicitly set multi to false, but otherwise false is always represented by omitting multi.
              "values": [ # The value(s) of the property. When multi is false there is always exactly one value. When multi is true there are always one or more values. Each value can have only one value property populated. For example, you cannot have a values list of { values: [ { integerValue: 22, stringValue: "a" } ] }, but you can have { multi: true, values: [ { integerValue: 22 }, { stringValue: "a" } ] }.
                {
                  "entityValue": # Object with schema name: Entity # An entity value. May have no key. May have a key with an incomplete key path. May have a reserved/read-only key.
                  "doubleValue": 3.14, # A double value.
                  "integerValue": "A String", # An integer value.
                  "meaning": 42, # The meaning field is reserved and should not be used.
                  "dateTimeValue": "A String", # A timestamp value.
                  "keyValue": { # A key value.
                    "path": [ # 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 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. A path can never be empty.
                      { # A (kind, ID/name) pair used to construct a key path.
                          #
                          # At most one of name or ID may be set. If either is set, the element is complete. If neither is set, the element is incomplete.
                        "kind": "A String", # The kind of the entity. Kinds matching regex "__.*__" are reserved/read-only. Cannot be "".
                        "id": "A String", # The ID of the entity. Always > 0.
                        "name": "A String", # The name of the entity. Names matching regex "__.*__" are reserved/read-only. Cannot be "".
                      },
                    ],
                    "partitionId": { # Entities are partitioned into subsets, currently identified by a dataset (usually implicitly specified by the project) and namespace ID. Queries are scoped to a single partition.
                      "namespace": "A String", # The namespace.
                      "datasetId": "A String", # The dataset ID.
                    },
                  },
                  "stringValue": "A String", # A UTF-8 encoded string value.
                  "indexed": True or False, # If the value should be indexed.
                      #
                      # The indexed property may be set for a null value. When indexed is true, stringValue is limited to 500 characters and the blob value is limited to 500 bytes. Input values by default have indexed set to true; however, you can explicitly set indexed to true if you want. (An output value never has indexed explicitly set to true.) If a value is itself an entity, it cannot have indexed set to true.
                  "blobValue": "A String", # A blob value.
                  "booleanValue": True or False, # A boolean value.
                  "blobKeyValue": "A String", # A blob key value.
                },
              ],
            },
          },
          "key": { # The entity's key.
              #
              # An entity must have a key, unless otherwise documented (for example, an entity in Value.entityValue may have no key). An entity's kind is its key's path's last element's kind, or null if it has no key.
            "path": [ # 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 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. A path can never be empty.
              { # A (kind, ID/name) pair used to construct a key path.
                  #
                  # At most one of name or ID may be set. If either is set, the element is complete. If neither is set, the element is incomplete.
                "kind": "A String", # The kind of the entity. Kinds matching regex "__.*__" are reserved/read-only. Cannot be "".
                "id": "A String", # The ID of the entity. Always > 0.
                "name": "A String", # The name of the entity. Names matching regex "__.*__" are reserved/read-only. Cannot be "".
              },
            ],
            "partitionId": { # Entities are partitioned into subsets, currently identified by a dataset (usually implicitly specified by the project) and namespace ID. Queries are scoped to a single partition.
              "namespace": "A String", # The namespace.
              "datasetId": "A String", # The dataset ID.
            },
          },
        },
      ],
    },
  }


Returns:
  An object of the form:

    {
    "header": {
      "kind": "datastore#responseHeader", # The kind, fixed to "datastore#responseHeader".
    },
    "mutationResult": { # The result of performing the mutation (always present).
      "insertAutoIdKeys": [ # Keys for insertAutoId entities. One per entity from the request, in the same order.
        {
          "path": [ # 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 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. A path can never be empty.
            { # A (kind, ID/name) pair used to construct a key path.
                #
                # At most one of name or ID may be set. If either is set, the element is complete. If neither is set, the element is incomplete.
              "kind": "A String", # The kind of the entity. Kinds matching regex "__.*__" are reserved/read-only. Cannot be "".
              "id": "A String", # The ID of the entity. Always > 0.
              "name": "A String", # The name of the entity. Names matching regex "__.*__" are reserved/read-only. Cannot be "".
            },
          ],
          "partitionId": { # Entities are partitioned into subsets, currently identified by a dataset (usually implicitly specified by the project) and namespace ID. Queries are scoped to a single partition.
            "namespace": "A String", # The namespace.
            "datasetId": "A String", # The dataset ID.
          },
        },
      ],
      "indexUpdates": 42, # Number of index writes.
    },
  }
commit(datasetId, body)
Commit a transaction, optionally creating, deleting or modifying some entities.

Args:
  datasetId: string, Identifies the dataset. (required)
  body: object, The request body. (required)
    The object takes the form of:

{
    "transaction": "A String", # The transaction identifier, returned by a call to beginTransaction.
    "mutation": { # The mutation to perform as part of this transaction. Optional.
      "insert": [ # Entities to insert. Each inserted entity's key must have a complete path and must not be reserved/read-only.
        {
          "properties": { # The entity's properties.
            "a_key": { # The name of the property. Properties with names matching regex "__.*__" are reserved. A reserved property name is forbidden in certain documented contexts. The name cannot be "".
              "multi": True or False, # If this property contains a list of values. Input values may explicitly set multi to false, but otherwise false is always represented by omitting multi.
              "values": [ # The value(s) of the property. When multi is false there is always exactly one value. When multi is true there are always one or more values. Each value can have only one value property populated. For example, you cannot have a values list of { values: [ { integerValue: 22, stringValue: "a" } ] }, but you can have { multi: true, values: [ { integerValue: 22 }, { stringValue: "a" } ] }.
                {
                  "entityValue": # Object with schema name: Entity # An entity value. May have no key. May have a key with an incomplete key path. May have a reserved/read-only key.
                  "doubleValue": 3.14, # A double value.
                  "integerValue": "A String", # An integer value.
                  "meaning": 42, # The meaning field is reserved and should not be used.
                  "dateTimeValue": "A String", # A timestamp value.
                  "keyValue": { # A key value.
                    "path": [ # 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 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. A path can never be empty.
                      { # A (kind, ID/name) pair used to construct a key path.
                          #
                          # At most one of name or ID may be set. If either is set, the element is complete. If neither is set, the element is incomplete.
                        "kind": "A String", # The kind of the entity. Kinds matching regex "__.*__" are reserved/read-only. Cannot be "".
                        "id": "A String", # The ID of the entity. Always > 0.
                        "name": "A String", # The name of the entity. Names matching regex "__.*__" are reserved/read-only. Cannot be "".
                      },
                    ],
                    "partitionId": { # Entities are partitioned into subsets, currently identified by a dataset (usually implicitly specified by the project) and namespace ID. Queries are scoped to a single partition.
                      "namespace": "A String", # The namespace.
                      "datasetId": "A String", # The dataset ID.
                    },
                  },
                  "stringValue": "A String", # A UTF-8 encoded string value.
                  "indexed": True or False, # If the value should be indexed.
                      #
                      # The indexed property may be set for a null value. When indexed is true, stringValue is limited to 500 characters and the blob value is limited to 500 bytes. Input values by default have indexed set to true; however, you can explicitly set indexed to true if you want. (An output value never has indexed explicitly set to true.) If a value is itself an entity, it cannot have indexed set to true.
                  "blobValue": "A String", # A blob value.
                  "booleanValue": True or False, # A boolean value.
                  "blobKeyValue": "A String", # A blob key value.
                },
              ],
            },
          },
          "key": { # The entity's key.
              #
              # An entity must have a key, unless otherwise documented (for example, an entity in Value.entityValue may have no key). An entity's kind is its key's path's last element's kind, or null if it has no key.
            "path": [ # 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 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. A path can never be empty.
              { # A (kind, ID/name) pair used to construct a key path.
                  #
                  # At most one of name or ID may be set. If either is set, the element is complete. If neither is set, the element is incomplete.
                "kind": "A String", # The kind of the entity. Kinds matching regex "__.*__" are reserved/read-only. Cannot be "".
                "id": "A String", # The ID of the entity. Always > 0.
                "name": "A String", # The name of the entity. Names matching regex "__.*__" are reserved/read-only. Cannot be "".
              },
            ],
            "partitionId": { # Entities are partitioned into subsets, currently identified by a dataset (usually implicitly specified by the project) and namespace ID. Queries are scoped to a single partition.
              "namespace": "A String", # The namespace.
              "datasetId": "A String", # The dataset ID.
            },
          },
        },
      ],
      "force": True or False, # Ignore a user specified read-only period. Optional.
      "insertAutoId": [ # Insert entities with a newly allocated ID. Each inserted entity's key must omit the final identifier in its path and must not be reserved/read-only.
        {
          "properties": { # The entity's properties.
            "a_key": { # The name of the property. Properties with names matching regex "__.*__" are reserved. A reserved property name is forbidden in certain documented contexts. The name cannot be "".
              "multi": True or False, # If this property contains a list of values. Input values may explicitly set multi to false, but otherwise false is always represented by omitting multi.
              "values": [ # The value(s) of the property. When multi is false there is always exactly one value. When multi is true there are always one or more values. Each value can have only one value property populated. For example, you cannot have a values list of { values: [ { integerValue: 22, stringValue: "a" } ] }, but you can have { multi: true, values: [ { integerValue: 22 }, { stringValue: "a" } ] }.
                {
                  "entityValue": # Object with schema name: Entity # An entity value. May have no key. May have a key with an incomplete key path. May have a reserved/read-only key.
                  "doubleValue": 3.14, # A double value.
                  "integerValue": "A String", # An integer value.
                  "meaning": 42, # The meaning field is reserved and should not be used.
                  "dateTimeValue": "A String", # A timestamp value.
                  "keyValue": { # A key value.
                    "path": [ # 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 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. A path can never be empty.
                      { # A (kind, ID/name) pair used to construct a key path.
                          #
                          # At most one of name or ID may be set. If either is set, the element is complete. If neither is set, the element is incomplete.
                        "kind": "A String", # The kind of the entity. Kinds matching regex "__.*__" are reserved/read-only. Cannot be "".
                        "id": "A String", # The ID of the entity. Always > 0.
                        "name": "A String", # The name of the entity. Names matching regex "__.*__" are reserved/read-only. Cannot be "".
                      },
                    ],
                    "partitionId": { # Entities are partitioned into subsets, currently identified by a dataset (usually implicitly specified by the project) and namespace ID. Queries are scoped to a single partition.
                      "namespace": "A String", # The namespace.
                      "datasetId": "A String", # The dataset ID.
                    },
                  },
                  "stringValue": "A String", # A UTF-8 encoded string value.
                  "indexed": True or False, # If the value should be indexed.
                      #
                      # The indexed property may be set for a null value. When indexed is true, stringValue is limited to 500 characters and the blob value is limited to 500 bytes. Input values by default have indexed set to true; however, you can explicitly set indexed to true if you want. (An output value never has indexed explicitly set to true.) If a value is itself an entity, it cannot have indexed set to true.
                  "blobValue": "A String", # A blob value.
                  "booleanValue": True or False, # A boolean value.
                  "blobKeyValue": "A String", # A blob key value.
                },
              ],
            },
          },
          "key": { # The entity's key.
              #
              # An entity must have a key, unless otherwise documented (for example, an entity in Value.entityValue may have no key). An entity's kind is its key's path's last element's kind, or null if it has no key.
            "path": [ # 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 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. A path can never be empty.
              { # A (kind, ID/name) pair used to construct a key path.
                  #
                  # At most one of name or ID may be set. If either is set, the element is complete. If neither is set, the element is incomplete.
                "kind": "A String", # The kind of the entity. Kinds matching regex "__.*__" are reserved/read-only. Cannot be "".
                "id": "A String", # The ID of the entity. Always > 0.
                "name": "A String", # The name of the entity. Names matching regex "__.*__" are reserved/read-only. Cannot be "".
              },
            ],
            "partitionId": { # Entities are partitioned into subsets, currently identified by a dataset (usually implicitly specified by the project) and namespace ID. Queries are scoped to a single partition.
              "namespace": "A String", # The namespace.
              "datasetId": "A String", # The dataset ID.
            },
          },
        },
      ],
      "update": [ # Entities to update. Each updated entity's key must have a complete path and must not be reserved/read-only.
        {
          "properties": { # The entity's properties.
            "a_key": { # The name of the property. Properties with names matching regex "__.*__" are reserved. A reserved property name is forbidden in certain documented contexts. The name cannot be "".
              "multi": True or False, # If this property contains a list of values. Input values may explicitly set multi to false, but otherwise false is always represented by omitting multi.
              "values": [ # The value(s) of the property. When multi is false there is always exactly one value. When multi is true there are always one or more values. Each value can have only one value property populated. For example, you cannot have a values list of { values: [ { integerValue: 22, stringValue: "a" } ] }, but you can have { multi: true, values: [ { integerValue: 22 }, { stringValue: "a" } ] }.
                {
                  "entityValue": # Object with schema name: Entity # An entity value. May have no key. May have a key with an incomplete key path. May have a reserved/read-only key.
                  "doubleValue": 3.14, # A double value.
                  "integerValue": "A String", # An integer value.
                  "meaning": 42, # The meaning field is reserved and should not be used.
                  "dateTimeValue": "A String", # A timestamp value.
                  "keyValue": { # A key value.
                    "path": [ # 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 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. A path can never be empty.
                      { # A (kind, ID/name) pair used to construct a key path.
                          #
                          # At most one of name or ID may be set. If either is set, the element is complete. If neither is set, the element is incomplete.
                        "kind": "A String", # The kind of the entity. Kinds matching regex "__.*__" are reserved/read-only. Cannot be "".
                        "id": "A String", # The ID of the entity. Always > 0.
                        "name": "A String", # The name of the entity. Names matching regex "__.*__" are reserved/read-only. Cannot be "".
                      },
                    ],
                    "partitionId": { # Entities are partitioned into subsets, currently identified by a dataset (usually implicitly specified by the project) and namespace ID. Queries are scoped to a single partition.
                      "namespace": "A String", # The namespace.
                      "datasetId": "A String", # The dataset ID.
                    },
                  },
                  "stringValue": "A String", # A UTF-8 encoded string value.
                  "indexed": True or False, # If the value should be indexed.
                      #
                      # The indexed property may be set for a null value. When indexed is true, stringValue is limited to 500 characters and the blob value is limited to 500 bytes. Input values by default have indexed set to true; however, you can explicitly set indexed to true if you want. (An output value never has indexed explicitly set to true.) If a value is itself an entity, it cannot have indexed set to true.
                  "blobValue": "A String", # A blob value.
                  "booleanValue": True or False, # A boolean value.
                  "blobKeyValue": "A String", # A blob key value.
                },
              ],
            },
          },
          "key": { # The entity's key.
              #
              # An entity must have a key, unless otherwise documented (for example, an entity in Value.entityValue may have no key). An entity's kind is its key's path's last element's kind, or null if it has no key.
            "path": [ # 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 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. A path can never be empty.
              { # A (kind, ID/name) pair used to construct a key path.
                  #
                  # At most one of name or ID may be set. If either is set, the element is complete. If neither is set, the element is incomplete.
                "kind": "A String", # The kind of the entity. Kinds matching regex "__.*__" are reserved/read-only. Cannot be "".
                "id": "A String", # The ID of the entity. Always > 0.
                "name": "A String", # The name of the entity. Names matching regex "__.*__" are reserved/read-only. Cannot be "".
              },
            ],
            "partitionId": { # Entities are partitioned into subsets, currently identified by a dataset (usually implicitly specified by the project) and namespace ID. Queries are scoped to a single partition.
              "namespace": "A String", # The namespace.
              "datasetId": "A String", # The dataset ID.
            },
          },
        },
      ],
      "delete": [ # Keys of entities to delete. Each key must have a complete key path and must not be reserved/read-only.
        {
          "path": [ # 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 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. A path can never be empty.
            { # A (kind, ID/name) pair used to construct a key path.
                #
                # At most one of name or ID may be set. If either is set, the element is complete. If neither is set, the element is incomplete.
              "kind": "A String", # The kind of the entity. Kinds matching regex "__.*__" are reserved/read-only. Cannot be "".
              "id": "A String", # The ID of the entity. Always > 0.
              "name": "A String", # The name of the entity. Names matching regex "__.*__" are reserved/read-only. Cannot be "".
            },
          ],
          "partitionId": { # Entities are partitioned into subsets, currently identified by a dataset (usually implicitly specified by the project) and namespace ID. Queries are scoped to a single partition.
            "namespace": "A String", # The namespace.
            "datasetId": "A String", # The dataset ID.
          },
        },
      ],
      "upsert": [ # Entities to upsert. Each upserted entity's key must have a complete path and must not be reserved/read-only.
        {
          "properties": { # The entity's properties.
            "a_key": { # The name of the property. Properties with names matching regex "__.*__" are reserved. A reserved property name is forbidden in certain documented contexts. The name cannot be "".
              "multi": True or False, # If this property contains a list of values. Input values may explicitly set multi to false, but otherwise false is always represented by omitting multi.
              "values": [ # The value(s) of the property. When multi is false there is always exactly one value. When multi is true there are always one or more values. Each value can have only one value property populated. For example, you cannot have a values list of { values: [ { integerValue: 22, stringValue: "a" } ] }, but you can have { multi: true, values: [ { integerValue: 22 }, { stringValue: "a" } ] }.
                {
                  "entityValue": # Object with schema name: Entity # An entity value. May have no key. May have a key with an incomplete key path. May have a reserved/read-only key.
                  "doubleValue": 3.14, # A double value.
                  "integerValue": "A String", # An integer value.
                  "meaning": 42, # The meaning field is reserved and should not be used.
                  "dateTimeValue": "A String", # A timestamp value.
                  "keyValue": { # A key value.
                    "path": [ # 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 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. A path can never be empty.
                      { # A (kind, ID/name) pair used to construct a key path.
                          #
                          # At most one of name or ID may be set. If either is set, the element is complete. If neither is set, the element is incomplete.
                        "kind": "A String", # The kind of the entity. Kinds matching regex "__.*__" are reserved/read-only. Cannot be "".
                        "id": "A String", # The ID of the entity. Always > 0.
                        "name": "A String", # The name of the entity. Names matching regex "__.*__" are reserved/read-only. Cannot be "".
                      },
                    ],
                    "partitionId": { # Entities are partitioned into subsets, currently identified by a dataset (usually implicitly specified by the project) and namespace ID. Queries are scoped to a single partition.
                      "namespace": "A String", # The namespace.
                      "datasetId": "A String", # The dataset ID.
                    },
                  },
                  "stringValue": "A String", # A UTF-8 encoded string value.
                  "indexed": True or False, # If the value should be indexed.
                      #
                      # The indexed property may be set for a null value. When indexed is true, stringValue is limited to 500 characters and the blob value is limited to 500 bytes. Input values by default have indexed set to true; however, you can explicitly set indexed to true if you want. (An output value never has indexed explicitly set to true.) If a value is itself an entity, it cannot have indexed set to true.
                  "blobValue": "A String", # A blob value.
                  "booleanValue": True or False, # A boolean value.
                  "blobKeyValue": "A String", # A blob key value.
                },
              ],
            },
          },
          "key": { # The entity's key.
              #
              # An entity must have a key, unless otherwise documented (for example, an entity in Value.entityValue may have no key). An entity's kind is its key's path's last element's kind, or null if it has no key.
            "path": [ # 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 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. A path can never be empty.
              { # A (kind, ID/name) pair used to construct a key path.
                  #
                  # At most one of name or ID may be set. If either is set, the element is complete. If neither is set, the element is incomplete.
                "kind": "A String", # The kind of the entity. Kinds matching regex "__.*__" are reserved/read-only. Cannot be "".
                "id": "A String", # The ID of the entity. Always > 0.
                "name": "A String", # The name of the entity. Names matching regex "__.*__" are reserved/read-only. Cannot be "".
              },
            ],
            "partitionId": { # Entities are partitioned into subsets, currently identified by a dataset (usually implicitly specified by the project) and namespace ID. Queries are scoped to a single partition.
              "namespace": "A String", # The namespace.
              "datasetId": "A String", # The dataset ID.
            },
          },
        },
      ],
    },
  }


Returns:
  An object of the form:

    {
    "header": {
      "kind": "datastore#responseHeader", # The kind, fixed to "datastore#responseHeader".
    },
    "mutationResult": { # The result of performing the mutation (if any).
      "insertAutoIdKeys": [ # Keys for insertAutoId entities. One per entity from the request, in the same order.
        {
          "path": [ # 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 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. A path can never be empty.
            { # A (kind, ID/name) pair used to construct a key path.
                #
                # At most one of name or ID may be set. If either is set, the element is complete. If neither is set, the element is incomplete.
              "kind": "A String", # The kind of the entity. Kinds matching regex "__.*__" are reserved/read-only. Cannot be "".
              "id": "A String", # The ID of the entity. Always > 0.
              "name": "A String", # The name of the entity. Names matching regex "__.*__" are reserved/read-only. Cannot be "".
            },
          ],
          "partitionId": { # Entities are partitioned into subsets, currently identified by a dataset (usually implicitly specified by the project) and namespace ID. Queries are scoped to a single partition.
            "namespace": "A String", # The namespace.
            "datasetId": "A String", # The dataset ID.
          },
        },
      ],
      "indexUpdates": 42, # Number of index writes.
    },
  }
lookup(datasetId, body)
Look up some entities by key.

Args:
  datasetId: string, Identifies the dataset. (required)
  body: object, The request body. (required)
    The object takes the form of:

{
    "keys": [ # Keys of entities to look up from the datastore.
      {
        "path": [ # 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 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. A path can never be empty.
          { # A (kind, ID/name) pair used to construct a key path.
              #
              # At most one of name or ID may be set. If either is set, the element is complete. If neither is set, the element is incomplete.
            "kind": "A String", # The kind of the entity. Kinds matching regex "__.*__" are reserved/read-only. Cannot be "".
            "id": "A String", # The ID of the entity. Always > 0.
            "name": "A String", # The name of the entity. Names matching regex "__.*__" are reserved/read-only. Cannot be "".
          },
        ],
        "partitionId": { # Entities are partitioned into subsets, currently identified by a dataset (usually implicitly specified by the project) and namespace ID. Queries are scoped to a single partition.
          "namespace": "A String", # The namespace.
          "datasetId": "A String", # The dataset ID.
        },
      },
    ],
    "readOptions": { # Options for this lookup request. Optional.
      "transaction": "A String", # The transaction to use. Optional.
      "readConsistency": "A String", # The read consistency to use. One of default, strong, or eventual. Cannot be set when transaction is set. Lookup and ancestor queries default to strong, global queries default to eventual and cannot be set to strong. Optional. Default is default.
    },
  }


Returns:
  An object of the form:

    {
    "deferred": [ # A list of keys that were not looked up due to resource constraints.
      {
        "path": [ # 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 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. A path can never be empty.
          { # A (kind, ID/name) pair used to construct a key path.
              #
              # At most one of name or ID may be set. If either is set, the element is complete. If neither is set, the element is incomplete.
            "kind": "A String", # The kind of the entity. Kinds matching regex "__.*__" are reserved/read-only. Cannot be "".
            "id": "A String", # The ID of the entity. Always > 0.
            "name": "A String", # The name of the entity. Names matching regex "__.*__" are reserved/read-only. Cannot be "".
          },
        ],
        "partitionId": { # Entities are partitioned into subsets, currently identified by a dataset (usually implicitly specified by the project) and namespace ID. Queries are scoped to a single partition.
          "namespace": "A String", # The namespace.
          "datasetId": "A String", # The dataset ID.
        },
      },
    ],
    "missing": [ # Entities not found, with only the key populated.
      {
        "entity": { # The resulting entity.
          "properties": { # The entity's properties.
            "a_key": { # The name of the property. Properties with names matching regex "__.*__" are reserved. A reserved property name is forbidden in certain documented contexts. The name cannot be "".
              "multi": True or False, # If this property contains a list of values. Input values may explicitly set multi to false, but otherwise false is always represented by omitting multi.
              "values": [ # The value(s) of the property. When multi is false there is always exactly one value. When multi is true there are always one or more values. Each value can have only one value property populated. For example, you cannot have a values list of { values: [ { integerValue: 22, stringValue: "a" } ] }, but you can have { multi: true, values: [ { integerValue: 22 }, { stringValue: "a" } ] }.
                {
                  "entityValue": # Object with schema name: Entity # An entity value. May have no key. May have a key with an incomplete key path. May have a reserved/read-only key.
                  "doubleValue": 3.14, # A double value.
                  "integerValue": "A String", # An integer value.
                  "meaning": 42, # The meaning field is reserved and should not be used.
                  "dateTimeValue": "A String", # A timestamp value.
                  "keyValue": { # A key value.
                    "path": [ # 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 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. A path can never be empty.
                      { # A (kind, ID/name) pair used to construct a key path.
                          #
                          # At most one of name or ID may be set. If either is set, the element is complete. If neither is set, the element is incomplete.
                        "kind": "A String", # The kind of the entity. Kinds matching regex "__.*__" are reserved/read-only. Cannot be "".
                        "id": "A String", # The ID of the entity. Always > 0.
                        "name": "A String", # The name of the entity. Names matching regex "__.*__" are reserved/read-only. Cannot be "".
                      },
                    ],
                    "partitionId": { # Entities are partitioned into subsets, currently identified by a dataset (usually implicitly specified by the project) and namespace ID. Queries are scoped to a single partition.
                      "namespace": "A String", # The namespace.
                      "datasetId": "A String", # The dataset ID.
                    },
                  },
                  "stringValue": "A String", # A UTF-8 encoded string value.
                  "indexed": True or False, # If the value should be indexed.
                      #
                      # The indexed property may be set for a null value. When indexed is true, stringValue is limited to 500 characters and the blob value is limited to 500 bytes. Input values by default have indexed set to true; however, you can explicitly set indexed to true if you want. (An output value never has indexed explicitly set to true.) If a value is itself an entity, it cannot have indexed set to true.
                  "blobValue": "A String", # A blob value.
                  "booleanValue": True or False, # A boolean value.
                  "blobKeyValue": "A String", # A blob key value.
                },
              ],
            },
          },
          "key": { # The entity's key.
              #
              # An entity must have a key, unless otherwise documented (for example, an entity in Value.entityValue may have no key). An entity's kind is its key's path's last element's kind, or null if it has no key.
            "path": [ # 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 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. A path can never be empty.
              { # A (kind, ID/name) pair used to construct a key path.
                  #
                  # At most one of name or ID may be set. If either is set, the element is complete. If neither is set, the element is incomplete.
                "kind": "A String", # The kind of the entity. Kinds matching regex "__.*__" are reserved/read-only. Cannot be "".
                "id": "A String", # The ID of the entity. Always > 0.
                "name": "A String", # The name of the entity. Names matching regex "__.*__" are reserved/read-only. Cannot be "".
              },
            ],
            "partitionId": { # Entities are partitioned into subsets, currently identified by a dataset (usually implicitly specified by the project) and namespace ID. Queries are scoped to a single partition.
              "namespace": "A String", # The namespace.
              "datasetId": "A String", # The dataset ID.
            },
          },
        },
      },
    ],
    "header": {
      "kind": "datastore#responseHeader", # The kind, fixed to "datastore#responseHeader".
    },
    "found": [ # Entities found.
      {
        "entity": { # The resulting entity.
          "properties": { # The entity's properties.
            "a_key": { # The name of the property. Properties with names matching regex "__.*__" are reserved. A reserved property name is forbidden in certain documented contexts. The name cannot be "".
              "multi": True or False, # If this property contains a list of values. Input values may explicitly set multi to false, but otherwise false is always represented by omitting multi.
              "values": [ # The value(s) of the property. When multi is false there is always exactly one value. When multi is true there are always one or more values. Each value can have only one value property populated. For example, you cannot have a values list of { values: [ { integerValue: 22, stringValue: "a" } ] }, but you can have { multi: true, values: [ { integerValue: 22 }, { stringValue: "a" } ] }.
                {
                  "entityValue": # Object with schema name: Entity # An entity value. May have no key. May have a key with an incomplete key path. May have a reserved/read-only key.
                  "doubleValue": 3.14, # A double value.
                  "integerValue": "A String", # An integer value.
                  "meaning": 42, # The meaning field is reserved and should not be used.
                  "dateTimeValue": "A String", # A timestamp value.
                  "keyValue": { # A key value.
                    "path": [ # 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 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. A path can never be empty.
                      { # A (kind, ID/name) pair used to construct a key path.
                          #
                          # At most one of name or ID may be set. If either is set, the element is complete. If neither is set, the element is incomplete.
                        "kind": "A String", # The kind of the entity. Kinds matching regex "__.*__" are reserved/read-only. Cannot be "".
                        "id": "A String", # The ID of the entity. Always > 0.
                        "name": "A String", # The name of the entity. Names matching regex "__.*__" are reserved/read-only. Cannot be "".
                      },
                    ],
                    "partitionId": { # Entities are partitioned into subsets, currently identified by a dataset (usually implicitly specified by the project) and namespace ID. Queries are scoped to a single partition.
                      "namespace": "A String", # The namespace.
                      "datasetId": "A String", # The dataset ID.
                    },
                  },
                  "stringValue": "A String", # A UTF-8 encoded string value.
                  "indexed": True or False, # If the value should be indexed.
                      #
                      # The indexed property may be set for a null value. When indexed is true, stringValue is limited to 500 characters and the blob value is limited to 500 bytes. Input values by default have indexed set to true; however, you can explicitly set indexed to true if you want. (An output value never has indexed explicitly set to true.) If a value is itself an entity, it cannot have indexed set to true.
                  "blobValue": "A String", # A blob value.
                  "booleanValue": True or False, # A boolean value.
                  "blobKeyValue": "A String", # A blob key value.
                },
              ],
            },
          },
          "key": { # The entity's key.
              #
              # An entity must have a key, unless otherwise documented (for example, an entity in Value.entityValue may have no key). An entity's kind is its key's path's last element's kind, or null if it has no key.
            "path": [ # 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 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. A path can never be empty.
              { # A (kind, ID/name) pair used to construct a key path.
                  #
                  # At most one of name or ID may be set. If either is set, the element is complete. If neither is set, the element is incomplete.
                "kind": "A String", # The kind of the entity. Kinds matching regex "__.*__" are reserved/read-only. Cannot be "".
                "id": "A String", # The ID of the entity. Always > 0.
                "name": "A String", # The name of the entity. Names matching regex "__.*__" are reserved/read-only. Cannot be "".
              },
            ],
            "partitionId": { # Entities are partitioned into subsets, currently identified by a dataset (usually implicitly specified by the project) and namespace ID. Queries are scoped to a single partition.
              "namespace": "A String", # The namespace.
              "datasetId": "A String", # The dataset ID.
            },
          },
        },
      },
    ],
  }
rollback(datasetId, body)
Roll back a transaction.

Args:
  datasetId: string, Identifies the dataset. (required)
  body: object, The request body. (required)
    The object takes the form of:

{
    "transaction": "A String", # The transaction identifier, returned by a call to beginTransaction.
  }


Returns:
  An object of the form:

    {
    "header": {
      "kind": "datastore#responseHeader", # The kind, fixed to "datastore#responseHeader".
    },
  }
runQuery(datasetId, body)
Query for entities.

Args:
  datasetId: string, Identifies the dataset. (required)
  body: object, The request body. (required)
    The object takes the form of:

{
    "query": { # The query to run. Either this field or field gql_query must be set, but not both.
      "startCursor": "A String", # A starting point for the query results. Optional. Query cursors are returned in query result batches.
      "kinds": [ # The kinds to query (if empty, returns entities from all kinds).
        {
          "name": "A String", # The name of the kind.
        },
      ],
      "projection": [ # The projection to return. If not set the entire entity is returned.
        {
          "aggregationFunction": "A String", # The aggregation function to apply to the property. Optional. Can only be used when grouping by at least one property. Must then be set on all properties in the projection that are not being grouped by. Aggregation functions: first selects the first result as determined by the query's order.
          "property": { # The property to project.
            "name": "A String", # The name of the property.
          },
        },
      ],
      "order": [ # The order to apply to the query results (if empty, order is unspecified).
        {
          "direction": "A String", # The direction to order by. One of ascending or descending. Optional, defaults to ascending.
          "property": { # The property to order by.
            "name": "A String", # The name of the property.
          },
        },
      ],
      "filter": { # The filter to apply (optional).
        "compositeFilter": { # A composite filter.
          "operator": "A String", # The operator for combining multiple filters. Only "and" is currently supported.
          "filters": [ # The list of filters to combine. Must contain at least one filter.
            # Object with schema name: Filter
          ],
        },
        "propertyFilter": { # A filter on a property.
          "operator": "A String", # The operator to filter by. One of lessThan, lessThanOrEqual, greaterThan, greaterThanOrEqual, equal, or hasAncestor.
          "property": { # The property to filter by.
            "name": "A String", # The name of the property.
          },
          "value": { # The value to compare the property to.
            "entityValue": # Object with schema name: Entity # An entity value. May have no key. May have a key with an incomplete key path. May have a reserved/read-only key.
            "doubleValue": 3.14, # A double value.
            "integerValue": "A String", # An integer value.
            "meaning": 42, # The meaning field is reserved and should not be used.
            "dateTimeValue": "A String", # A timestamp value.
            "keyValue": { # A key value.
              "path": [ # 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 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. A path can never be empty.
                { # A (kind, ID/name) pair used to construct a key path.
                    #
                    # At most one of name or ID may be set. If either is set, the element is complete. If neither is set, the element is incomplete.
                  "kind": "A String", # The kind of the entity. Kinds matching regex "__.*__" are reserved/read-only. Cannot be "".
                  "id": "A String", # The ID of the entity. Always > 0.
                  "name": "A String", # The name of the entity. Names matching regex "__.*__" are reserved/read-only. Cannot be "".
                },
              ],
              "partitionId": { # Entities are partitioned into subsets, currently identified by a dataset (usually implicitly specified by the project) and namespace ID. Queries are scoped to a single partition.
                "namespace": "A String", # The namespace.
                "datasetId": "A String", # The dataset ID.
              },
            },
            "stringValue": "A String", # A UTF-8 encoded string value.
            "indexed": True or False, # If the value should be indexed.
                #
                # The indexed property may be set for a null value. When indexed is true, stringValue is limited to 500 characters and the blob value is limited to 500 bytes. Input values by default have indexed set to true; however, you can explicitly set indexed to true if you want. (An output value never has indexed explicitly set to true.) If a value is itself an entity, it cannot have indexed set to true.
            "blobValue": "A String", # A blob value.
            "booleanValue": True or False, # A boolean value.
            "blobKeyValue": "A String", # A blob key value.
          },
        },
      },
      "limit": 42, # The maximum number of results to return. Applies after all other constraints. Optional.
      "offset": 42, # The number of results to skip. Applies before limit, but after all other constraints (optional, defaults to 0).
      "endCursor": "A String", # An ending point for the query results. Optional. Query cursors are returned in query result batches.
      "groupBy": [ # The properties to group by (if empty, no grouping is applied to the result set).
        {
          "name": "A String", # The name of the property.
        },
      ],
    },
    "partitionId": { # Entities are partitioned into subsets, identified by a dataset (usually implicitly specified by the project) and namespace ID. Queries are scoped to a single partition.
      "namespace": "A String", # The namespace.
      "datasetId": "A String", # The dataset ID.
    },
    "gqlQuery": { # The GQL query to run. Either this field or field query must be set, but not both.
      "queryString": "A String",
      "nameArgs": [ # A named argument must set field GqlQueryArg.name. No two named arguments may have the same name. For each non-reserved named binding site in the query string, there must be a named argument with that name, but not necessarily the inverse.
        {
          "cursor": "A String",
          "name": "A String", # Must match regex "[A-Za-z_$][A-Za-z_$0-9]*". Must not match regex "__.*__". Must not be "".
          "value": {
            "entityValue": # Object with schema name: Entity # An entity value. May have no key. May have a key with an incomplete key path. May have a reserved/read-only key.
            "doubleValue": 3.14, # A double value.
            "integerValue": "A String", # An integer value.
            "meaning": 42, # The meaning field is reserved and should not be used.
            "dateTimeValue": "A String", # A timestamp value.
            "keyValue": { # A key value.
              "path": [ # 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 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. A path can never be empty.
                { # A (kind, ID/name) pair used to construct a key path.
                    #
                    # At most one of name or ID may be set. If either is set, the element is complete. If neither is set, the element is incomplete.
                  "kind": "A String", # The kind of the entity. Kinds matching regex "__.*__" are reserved/read-only. Cannot be "".
                  "id": "A String", # The ID of the entity. Always > 0.
                  "name": "A String", # The name of the entity. Names matching regex "__.*__" are reserved/read-only. Cannot be "".
                },
              ],
              "partitionId": { # Entities are partitioned into subsets, currently identified by a dataset (usually implicitly specified by the project) and namespace ID. Queries are scoped to a single partition.
                "namespace": "A String", # The namespace.
                "datasetId": "A String", # The dataset ID.
              },
            },
            "stringValue": "A String", # A UTF-8 encoded string value.
            "indexed": True or False, # If the value should be indexed.
                #
                # The indexed property may be set for a null value. When indexed is true, stringValue is limited to 500 characters and the blob value is limited to 500 bytes. Input values by default have indexed set to true; however, you can explicitly set indexed to true if you want. (An output value never has indexed explicitly set to true.) If a value is itself an entity, it cannot have indexed set to true.
            "blobValue": "A String", # A blob value.
            "booleanValue": True or False, # A boolean value.
            "blobKeyValue": "A String", # A blob key value.
          },
        },
      ],
      "allowLiteral": True or False, # When false, the query string must not contain a literal.
      "numberArgs": [ # Numbered binding site @1 references the first numbered argument, effectively using 1-based indexing, rather than the usual 0. A numbered argument must NOT set field GqlQueryArg.name. For each binding site numbered i in query_string, there must be an ith numbered argument. The inverse must also be true.
        {
          "cursor": "A String",
          "name": "A String", # Must match regex "[A-Za-z_$][A-Za-z_$0-9]*". Must not match regex "__.*__". Must not be "".
          "value": {
            "entityValue": # Object with schema name: Entity # An entity value. May have no key. May have a key with an incomplete key path. May have a reserved/read-only key.
            "doubleValue": 3.14, # A double value.
            "integerValue": "A String", # An integer value.
            "meaning": 42, # The meaning field is reserved and should not be used.
            "dateTimeValue": "A String", # A timestamp value.
            "keyValue": { # A key value.
              "path": [ # 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 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. A path can never be empty.
                { # A (kind, ID/name) pair used to construct a key path.
                    #
                    # At most one of name or ID may be set. If either is set, the element is complete. If neither is set, the element is incomplete.
                  "kind": "A String", # The kind of the entity. Kinds matching regex "__.*__" are reserved/read-only. Cannot be "".
                  "id": "A String", # The ID of the entity. Always > 0.
                  "name": "A String", # The name of the entity. Names matching regex "__.*__" are reserved/read-only. Cannot be "".
                },
              ],
              "partitionId": { # Entities are partitioned into subsets, currently identified by a dataset (usually implicitly specified by the project) and namespace ID. Queries are scoped to a single partition.
                "namespace": "A String", # The namespace.
                "datasetId": "A String", # The dataset ID.
              },
            },
            "stringValue": "A String", # A UTF-8 encoded string value.
            "indexed": True or False, # If the value should be indexed.
                #
                # The indexed property may be set for a null value. When indexed is true, stringValue is limited to 500 characters and the blob value is limited to 500 bytes. Input values by default have indexed set to true; however, you can explicitly set indexed to true if you want. (An output value never has indexed explicitly set to true.) If a value is itself an entity, it cannot have indexed set to true.
            "blobValue": "A String", # A blob value.
            "booleanValue": True or False, # A boolean value.
            "blobKeyValue": "A String", # A blob key value.
          },
        },
      ],
    },
    "readOptions": { # The options for this query.
      "transaction": "A String", # The transaction to use. Optional.
      "readConsistency": "A String", # The read consistency to use. One of default, strong, or eventual. Cannot be set when transaction is set. Lookup and ancestor queries default to strong, global queries default to eventual and cannot be set to strong. Optional. Default is default.
    },
  }


Returns:
  An object of the form:

    {
    "header": {
      "kind": "datastore#responseHeader", # The kind, fixed to "datastore#responseHeader".
    },
    "batch": { # A batch of query results (always present).
      "moreResults": "A String", # The state of the query after the current batch. One of notFinished, moreResultsAfterLimit, noMoreResults.
      "entityResults": [ # The results for this batch.
        {
          "entity": { # The resulting entity.
            "properties": { # The entity's properties.
              "a_key": { # The name of the property. Properties with names matching regex "__.*__" are reserved. A reserved property name is forbidden in certain documented contexts. The name cannot be "".
                "multi": True or False, # If this property contains a list of values. Input values may explicitly set multi to false, but otherwise false is always represented by omitting multi.
                "values": [ # The value(s) of the property. When multi is false there is always exactly one value. When multi is true there are always one or more values. Each value can have only one value property populated. For example, you cannot have a values list of { values: [ { integerValue: 22, stringValue: "a" } ] }, but you can have { multi: true, values: [ { integerValue: 22 }, { stringValue: "a" } ] }.
                  {
                    "entityValue": # Object with schema name: Entity # An entity value. May have no key. May have a key with an incomplete key path. May have a reserved/read-only key.
                    "doubleValue": 3.14, # A double value.
                    "integerValue": "A String", # An integer value.
                    "meaning": 42, # The meaning field is reserved and should not be used.
                    "dateTimeValue": "A String", # A timestamp value.
                    "keyValue": { # A key value.
                      "path": [ # 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 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. A path can never be empty.
                        { # A (kind, ID/name) pair used to construct a key path.
                            #
                            # At most one of name or ID may be set. If either is set, the element is complete. If neither is set, the element is incomplete.
                          "kind": "A String", # The kind of the entity. Kinds matching regex "__.*__" are reserved/read-only. Cannot be "".
                          "id": "A String", # The ID of the entity. Always > 0.
                          "name": "A String", # The name of the entity. Names matching regex "__.*__" are reserved/read-only. Cannot be "".
                        },
                      ],
                      "partitionId": { # Entities are partitioned into subsets, currently identified by a dataset (usually implicitly specified by the project) and namespace ID. Queries are scoped to a single partition.
                        "namespace": "A String", # The namespace.
                        "datasetId": "A String", # The dataset ID.
                      },
                    },
                    "stringValue": "A String", # A UTF-8 encoded string value.
                    "indexed": True or False, # If the value should be indexed.
                        #
                        # The indexed property may be set for a null value. When indexed is true, stringValue is limited to 500 characters and the blob value is limited to 500 bytes. Input values by default have indexed set to true; however, you can explicitly set indexed to true if you want. (An output value never has indexed explicitly set to true.) If a value is itself an entity, it cannot have indexed set to true.
                    "blobValue": "A String", # A blob value.
                    "booleanValue": True or False, # A boolean value.
                    "blobKeyValue": "A String", # A blob key value.
                  },
                ],
              },
            },
            "key": { # The entity's key.
                #
                # An entity must have a key, unless otherwise documented (for example, an entity in Value.entityValue may have no key). An entity's kind is its key's path's last element's kind, or null if it has no key.
              "path": [ # 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 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. A path can never be empty.
                { # A (kind, ID/name) pair used to construct a key path.
                    #
                    # At most one of name or ID may be set. If either is set, the element is complete. If neither is set, the element is incomplete.
                  "kind": "A String", # The kind of the entity. Kinds matching regex "__.*__" are reserved/read-only. Cannot be "".
                  "id": "A String", # The ID of the entity. Always > 0.
                  "name": "A String", # The name of the entity. Names matching regex "__.*__" are reserved/read-only. Cannot be "".
                },
              ],
              "partitionId": { # Entities are partitioned into subsets, currently identified by a dataset (usually implicitly specified by the project) and namespace ID. Queries are scoped to a single partition.
                "namespace": "A String", # The namespace.
                "datasetId": "A String", # The dataset ID.
              },
            },
          },
        },
      ],
      "skippedResults": 42, # The number of results skipped because of Query.offset.
      "endCursor": "A String", # A cursor that points to the position after the last result in the batch. May be absent.
      "entityResultType": "A String", # The result type for every entity in entityResults. full for full entities, projection for entities with only projected properties, keyOnly for entities with only a key.
    },
  }