Home | History | Annotate | Download | only in dyn
      1 <html><body>
      2 <style>
      3 
      4 body, h1, h2, h3, div, span, p, pre, a {
      5   margin: 0;
      6   padding: 0;
      7   border: 0;
      8   font-weight: inherit;
      9   font-style: inherit;
     10   font-size: 100%;
     11   font-family: inherit;
     12   vertical-align: baseline;
     13 }
     14 
     15 body {
     16   font-size: 13px;
     17   padding: 1em;
     18 }
     19 
     20 h1 {
     21   font-size: 26px;
     22   margin-bottom: 1em;
     23 }
     24 
     25 h2 {
     26   font-size: 24px;
     27   margin-bottom: 1em;
     28 }
     29 
     30 h3 {
     31   font-size: 20px;
     32   margin-bottom: 1em;
     33   margin-top: 1em;
     34 }
     35 
     36 pre, code {
     37   line-height: 1.5;
     38   font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
     39 }
     40 
     41 pre {
     42   margin-top: 0.5em;
     43 }
     44 
     45 h1, h2, h3, p {
     46   font-family: Arial, sans serif;
     47 }
     48 
     49 h1, h2, h3 {
     50   border-bottom: solid #CCC 1px;
     51 }
     52 
     53 .toc_element {
     54   margin-top: 0.5em;
     55 }
     56 
     57 .firstline {
     58   margin-left: 2 em;
     59 }
     60 
     61 .method  {
     62   margin-top: 1em;
     63   border: solid 1px #CCC;
     64   padding: 1em;
     65   background: #EEE;
     66 }
     67 
     68 .details {
     69   font-weight: bold;
     70   font-size: 14px;
     71 }
     72 
     73 </style>
     74 
     75 <h1><a href="datastore_v1beta3.html">Google Cloud Datastore API</a> . <a href="datastore_v1beta3.projects.html">projects</a></h1>
     76 <h2>Instance Methods</h2>
     77 <p class="toc_element">
     78   <code><a href="#allocateIds">allocateIds(projectId, body, x__xgafv=None)</a></code></p>
     79 <p class="firstline">Allocates IDs for the given keys, which is useful for referencing an entity</p>
     80 <p class="toc_element">
     81   <code><a href="#beginTransaction">beginTransaction(projectId, body, x__xgafv=None)</a></code></p>
     82 <p class="firstline">Begins a new transaction.</p>
     83 <p class="toc_element">
     84   <code><a href="#commit">commit(projectId, body, x__xgafv=None)</a></code></p>
     85 <p class="firstline">Commits a transaction, optionally creating, deleting or modifying some</p>
     86 <p class="toc_element">
     87   <code><a href="#lookup">lookup(projectId, body, x__xgafv=None)</a></code></p>
     88 <p class="firstline">Looks up entities by key.</p>
     89 <p class="toc_element">
     90   <code><a href="#rollback">rollback(projectId, body, x__xgafv=None)</a></code></p>
     91 <p class="firstline">Rolls back a transaction.</p>
     92 <p class="toc_element">
     93   <code><a href="#runQuery">runQuery(projectId, body, x__xgafv=None)</a></code></p>
     94 <p class="firstline">Queries for entities.</p>
     95 <h3>Method Details</h3>
     96 <div class="method">
     97     <code class="details" id="allocateIds">allocateIds(projectId, body, x__xgafv=None)</code>
     98   <pre>Allocates IDs for the given keys, which is useful for referencing an entity
     99 before it is inserted.
    100 
    101 Args:
    102   projectId: string, The ID of the project against which to make the request. (required)
    103   body: object, The request body. (required)
    104     The object takes the form of:
    105 
    106 { # The request for Datastore.AllocateIds.
    107     "keys": [ # A list of keys with incomplete key paths for which to allocate IDs.
    108         # No key may be reserved/read-only.
    109       { # A unique identifier for an entity.
    110           # If a key's partition ID or any of its path kinds or names are
    111           # reserved/read-only, the key is reserved/read-only.
    112           # A reserved/read-only key is forbidden in certain documented contexts.
    113         "path": [ # The entity path.
    114             # An entity path consists of one or more elements composed of a kind and a
    115             # string or numerical identifier, which identify entities. The first
    116             # element identifies a _root entity_, the second element identifies
    117             # a _child_ of the root entity, the third element identifies a child of the
    118             # second entity, and so forth. The entities identified by all prefixes of
    119             # the path are called the element's _ancestors_.
    120             #
    121             # An entity path is always fully complete: *all* of the entity's ancestors
    122             # are required to be in the path along with the entity identifier itself.
    123             # The only exception is that in some documented cases, the identifier in the
    124             # last path element (for the entity) itself may be omitted. For example,
    125             # the last path element of the key of `Mutation.insert` may have no
    126             # identifier.
    127             #
    128             # A path can never be empty, and a path can have at most 100 elements.
    129           { # A (kind, ID/name) pair used to construct a key path.
    130               #
    131               # If either name or ID is set, the element is complete.
    132               # If neither is set, the element is incomplete.
    133             "kind": "A String", # The kind of the entity.
    134                 # A kind matching regex `__.*__` is reserved/read-only.
    135                 # A kind must not contain more than 1500 bytes when UTF-8 encoded.
    136                 # Cannot be `""`.
    137             "id": "A String", # The auto-allocated ID of the entity.
    138                 # Never equal to zero. Values less than zero are discouraged and may not
    139                 # be supported in the future.
    140             "name": "A String", # The name of the entity.
    141                 # A name matching regex `__.*__` is reserved/read-only.
    142                 # A name must not be more than 1500 bytes when UTF-8 encoded.
    143                 # Cannot be `""`.
    144           },
    145         ],
    146         "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project
    147             # ID and namespace ID.
    148             # Queries are scoped to a single partition.
    149             # by project and namespace, however the namespace ID may be empty.
    150             #
    151             # A partition ID contains several dimensions:
    152             # project ID and namespace ID.
    153             #
    154             # Partition dimensions:
    155             #
    156             # - May be `""`.
    157             # - Must be valid UTF-8 bytes.
    158             # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
    159             # If the value of any dimension matches regex `__.*__`, the partition is
    160             # reserved/read-only.
    161             # A reserved/read-only partition ID is forbidden in certain documented
    162             # contexts.
    163             #
    164             # Foreign partition IDs (in which the project ID does
    165             # not match the context project ID ) are discouraged.
    166             # Reads and writes of foreign partition IDs may fail if the project is not in an active state.
    167           "projectId": "A String", # The ID of the project to which the entities belong.
    168           "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong.
    169         },
    170       },
    171     ],
    172   }
    173 
    174   x__xgafv: string, V1 error format.
    175     Allowed values
    176       1 - v1 error format
    177       2 - v2 error format
    178 
    179 Returns:
    180   An object of the form:
    181 
    182     { # The response for Datastore.AllocateIds.
    183     "keys": [ # The keys specified in the request (in the same order), each with
    184         # its key path completed with a newly allocated ID.
    185       { # A unique identifier for an entity.
    186           # If a key's partition ID or any of its path kinds or names are
    187           # reserved/read-only, the key is reserved/read-only.
    188           # A reserved/read-only key is forbidden in certain documented contexts.
    189         "path": [ # The entity path.
    190             # An entity path consists of one or more elements composed of a kind and a
    191             # string or numerical identifier, which identify entities. The first
    192             # element identifies a _root entity_, the second element identifies
    193             # a _child_ of the root entity, the third element identifies a child of the
    194             # second entity, and so forth. The entities identified by all prefixes of
    195             # the path are called the element's _ancestors_.
    196             #
    197             # An entity path is always fully complete: *all* of the entity's ancestors
    198             # are required to be in the path along with the entity identifier itself.
    199             # The only exception is that in some documented cases, the identifier in the
    200             # last path element (for the entity) itself may be omitted. For example,
    201             # the last path element of the key of `Mutation.insert` may have no
    202             # identifier.
    203             #
    204             # A path can never be empty, and a path can have at most 100 elements.
    205           { # A (kind, ID/name) pair used to construct a key path.
    206               #
    207               # If either name or ID is set, the element is complete.
    208               # If neither is set, the element is incomplete.
    209             "kind": "A String", # The kind of the entity.
    210                 # A kind matching regex `__.*__` is reserved/read-only.
    211                 # A kind must not contain more than 1500 bytes when UTF-8 encoded.
    212                 # Cannot be `""`.
    213             "id": "A String", # The auto-allocated ID of the entity.
    214                 # Never equal to zero. Values less than zero are discouraged and may not
    215                 # be supported in the future.
    216             "name": "A String", # The name of the entity.
    217                 # A name matching regex `__.*__` is reserved/read-only.
    218                 # A name must not be more than 1500 bytes when UTF-8 encoded.
    219                 # Cannot be `""`.
    220           },
    221         ],
    222         "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project
    223             # ID and namespace ID.
    224             # Queries are scoped to a single partition.
    225             # by project and namespace, however the namespace ID may be empty.
    226             #
    227             # A partition ID contains several dimensions:
    228             # project ID and namespace ID.
    229             #
    230             # Partition dimensions:
    231             #
    232             # - May be `""`.
    233             # - Must be valid UTF-8 bytes.
    234             # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
    235             # If the value of any dimension matches regex `__.*__`, the partition is
    236             # reserved/read-only.
    237             # A reserved/read-only partition ID is forbidden in certain documented
    238             # contexts.
    239             #
    240             # Foreign partition IDs (in which the project ID does
    241             # not match the context project ID ) are discouraged.
    242             # Reads and writes of foreign partition IDs may fail if the project is not in an active state.
    243           "projectId": "A String", # The ID of the project to which the entities belong.
    244           "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong.
    245         },
    246       },
    247     ],
    248   }</pre>
    249 </div>
    250 
    251 <div class="method">
    252     <code class="details" id="beginTransaction">beginTransaction(projectId, body, x__xgafv=None)</code>
    253   <pre>Begins a new transaction.
    254 
    255 Args:
    256   projectId: string, The ID of the project against which to make the request. (required)
    257   body: object, The request body. (required)
    258     The object takes the form of:
    259 
    260 { # The request for Datastore.BeginTransaction.
    261   }
    262 
    263   x__xgafv: string, V1 error format.
    264     Allowed values
    265       1 - v1 error format
    266       2 - v2 error format
    267 
    268 Returns:
    269   An object of the form:
    270 
    271     { # The response for Datastore.BeginTransaction.
    272     "transaction": "A String", # The transaction identifier (always present).
    273   }</pre>
    274 </div>
    275 
    276 <div class="method">
    277     <code class="details" id="commit">commit(projectId, body, x__xgafv=None)</code>
    278   <pre>Commits a transaction, optionally creating, deleting or modifying some
    279 entities.
    280 
    281 Args:
    282   projectId: string, The ID of the project against which to make the request. (required)
    283   body: object, The request body. (required)
    284     The object takes the form of:
    285 
    286 { # The request for Datastore.Commit.
    287     "transaction": "A String", # The identifier of the transaction associated with the commit. A
    288         # transaction identifier is returned by a call to
    289         # Datastore.BeginTransaction.
    290     "mutations": [ # The mutations to perform.
    291         # 
    292         # When mode is `TRANSACTIONAL`, mutations affecting a single entity are
    293         # applied in order. The following sequences of mutations affecting a single
    294         # entity are not permitted in a single `Commit` request:
    295         # 
    296         # - `insert` followed by `insert`
    297         # - `update` followed by `insert`
    298         # - `upsert` followed by `insert`
    299         # - `delete` followed by `update`
    300         # 
    301         # When mode is `NON_TRANSACTIONAL`, no two mutations may affect a single
    302         # entity.
    303       { # A mutation to apply to an entity.
    304         "insert": { # A Datastore data object. # The entity to insert. The entity must not already exist.
    305             # The entity key's final path element may be incomplete.
    306             #
    307             # An entity is limited to 1 megabyte when stored. That _roughly_
    308             # corresponds to a limit of 1 megabyte for the serialized form of this
    309             # message.
    310           "properties": { # The entity's properties.
    311               # The map's keys are property names.
    312               # A property name matching regex `__.*__` is reserved.
    313               # A reserved property name is forbidden in certain documented contexts.
    314               # The name must not contain more than 500 characters.
    315               # The name cannot be `""`.
    316             "a_key": { # A message that can hold any of the supported value types and associated
    317                 # metadata.
    318               "entityValue": # Object with schema name: Entity # An entity value.
    319                   #
    320                   # - May have no key.
    321                   # - May have a key with an incomplete key path.
    322                   # - May have a reserved/read-only key.
    323               "timestampValue": "A String", # A timestamp value.
    324                   # When stored in the Datastore, precise only to microseconds;
    325                   # any additional precision is rounded down.
    326               "nullValue": "A String", # A null value.
    327               "excludeFromIndexes": True or False, # If the value should be excluded from all indexes including those defined
    328                   # explicitly.
    329               "doubleValue": 3.14, # A double value.
    330               "meaning": 42, # The `meaning` field should only be populated for backwards compatibility.
    331               "keyValue": { # A unique identifier for an entity. # A key value.
    332                   # If a key's partition ID or any of its path kinds or names are
    333                   # reserved/read-only, the key is reserved/read-only.
    334                   # A reserved/read-only key is forbidden in certain documented contexts.
    335                 "path": [ # The entity path.
    336                     # An entity path consists of one or more elements composed of a kind and a
    337                     # string or numerical identifier, which identify entities. The first
    338                     # element identifies a _root entity_, the second element identifies
    339                     # a _child_ of the root entity, the third element identifies a child of the
    340                     # second entity, and so forth. The entities identified by all prefixes of
    341                     # the path are called the element's _ancestors_.
    342                     #
    343                     # An entity path is always fully complete: *all* of the entity's ancestors
    344                     # are required to be in the path along with the entity identifier itself.
    345                     # The only exception is that in some documented cases, the identifier in the
    346                     # last path element (for the entity) itself may be omitted. For example,
    347                     # the last path element of the key of `Mutation.insert` may have no
    348                     # identifier.
    349                     #
    350                     # A path can never be empty, and a path can have at most 100 elements.
    351                   { # A (kind, ID/name) pair used to construct a key path.
    352                       #
    353                       # If either name or ID is set, the element is complete.
    354                       # If neither is set, the element is incomplete.
    355                     "kind": "A String", # The kind of the entity.
    356                         # A kind matching regex `__.*__` is reserved/read-only.
    357                         # A kind must not contain more than 1500 bytes when UTF-8 encoded.
    358                         # Cannot be `""`.
    359                     "id": "A String", # The auto-allocated ID of the entity.
    360                         # Never equal to zero. Values less than zero are discouraged and may not
    361                         # be supported in the future.
    362                     "name": "A String", # The name of the entity.
    363                         # A name matching regex `__.*__` is reserved/read-only.
    364                         # A name must not be more than 1500 bytes when UTF-8 encoded.
    365                         # Cannot be `""`.
    366                   },
    367                 ],
    368                 "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project
    369                     # ID and namespace ID.
    370                     # Queries are scoped to a single partition.
    371                     # by project and namespace, however the namespace ID may be empty.
    372                     #
    373                     # A partition ID contains several dimensions:
    374                     # project ID and namespace ID.
    375                     #
    376                     # Partition dimensions:
    377                     #
    378                     # - May be `""`.
    379                     # - Must be valid UTF-8 bytes.
    380                     # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
    381                     # If the value of any dimension matches regex `__.*__`, the partition is
    382                     # reserved/read-only.
    383                     # A reserved/read-only partition ID is forbidden in certain documented
    384                     # contexts.
    385                     #
    386                     # Foreign partition IDs (in which the project ID does
    387                     # not match the context project ID ) are discouraged.
    388                     # Reads and writes of foreign partition IDs may fail if the project is not in an active state.
    389                   "projectId": "A String", # The ID of the project to which the entities belong.
    390                   "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong.
    391                 },
    392               },
    393               "stringValue": "A String", # A UTF-8 encoded string value.
    394                   # When `exclude_from_indexes` is false (it is indexed) , may have at most 1500 bytes.
    395                   # Otherwise, may be set to at least 1,000,000 bytes.
    396               "blobValue": "A String", # A blob value.
    397                   # May have at most 1,000,000 bytes.
    398                   # When `exclude_from_indexes` is false, may have at most 1500 bytes.
    399                   # In JSON requests, must be base64-encoded.
    400               "booleanValue": True or False, # A boolean value.
    401               "arrayValue": { # An array value. # An array value.
    402                   # Cannot contain another array value.
    403                   # A `Value` instance that sets field `array_value` must not set fields
    404                   # `meaning` or `exclude_from_indexes`.
    405                 "values": [ # Values in the array.
    406                     # The order of this array may not be preserved if it contains a mix of
    407                     # indexed and unindexed values.
    408                   # Object with schema name: Value
    409                 ],
    410               },
    411               "integerValue": "A String", # An integer value.
    412               "geoPointValue": { # An object representing a latitude/longitude pair. This is expressed as a pair # A geo point value representing a point on the surface of Earth.
    413                   # of doubles representing degrees latitude and degrees longitude. Unless
    414                   # specified otherwise, this must conform to the
    415                   # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
    416                   # standard</a>. Values must be within normalized ranges.
    417                   #
    418                   # Example of normalization code in Python:
    419                   #
    420                   #     def NormalizeLongitude(longitude):
    421                   #       """Wraps decimal degrees longitude to [-180.0, 180.0]."""
    422                   #       q, r = divmod(longitude, 360.0)
    423                   #       if r > 180.0 or (r == 180.0 and q <= -1.0):
    424                   #         return r - 360.0
    425                   #       return r
    426                   #
    427                   #     def NormalizeLatLng(latitude, longitude):
    428                   #       """Wraps decimal degrees latitude and longitude to
    429                   #       [-90.0, 90.0] and [-180.0, 180.0], respectively."""
    430                   #       r = latitude % 360.0
    431                   #       if r <= 90.0:
    432                   #         return r, NormalizeLongitude(longitude)
    433                   #       elif r >= 270.0:
    434                   #         return r - 360, NormalizeLongitude(longitude)
    435                   #       else:
    436                   #         return 180 - r, NormalizeLongitude(longitude + 180.0)
    437                   #
    438                   #     assert 180.0 == NormalizeLongitude(180.0)
    439                   #     assert -180.0 == NormalizeLongitude(-180.0)
    440                   #     assert -179.0 == NormalizeLongitude(181.0)
    441                   #     assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)
    442                   #     assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)
    443                   #     assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)
    444                   #     assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)
    445                   #     assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)
    446                   #     assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)
    447                   #     assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)
    448                   #     assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)
    449                   #     assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)
    450                   #     assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)
    451                 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
    452                 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
    453               },
    454             },
    455           },
    456           "key": { # A unique identifier for an entity. # The entity's key.
    457               #
    458               # An entity must have a key, unless otherwise documented (for example,
    459               # an entity in `Value.entity_value` may have no key).
    460               # An entity's kind is its key path's last element's kind,
    461               # or null if it has no key.
    462               # If a key's partition ID or any of its path kinds or names are
    463               # reserved/read-only, the key is reserved/read-only.
    464               # A reserved/read-only key is forbidden in certain documented contexts.
    465             "path": [ # The entity path.
    466                 # An entity path consists of one or more elements composed of a kind and a
    467                 # string or numerical identifier, which identify entities. The first
    468                 # element identifies a _root entity_, the second element identifies
    469                 # a _child_ of the root entity, the third element identifies a child of the
    470                 # second entity, and so forth. The entities identified by all prefixes of
    471                 # the path are called the element's _ancestors_.
    472                 #
    473                 # An entity path is always fully complete: *all* of the entity's ancestors
    474                 # are required to be in the path along with the entity identifier itself.
    475                 # The only exception is that in some documented cases, the identifier in the
    476                 # last path element (for the entity) itself may be omitted. For example,
    477                 # the last path element of the key of `Mutation.insert` may have no
    478                 # identifier.
    479                 #
    480                 # A path can never be empty, and a path can have at most 100 elements.
    481               { # A (kind, ID/name) pair used to construct a key path.
    482                   #
    483                   # If either name or ID is set, the element is complete.
    484                   # If neither is set, the element is incomplete.
    485                 "kind": "A String", # The kind of the entity.
    486                     # A kind matching regex `__.*__` is reserved/read-only.
    487                     # A kind must not contain more than 1500 bytes when UTF-8 encoded.
    488                     # Cannot be `""`.
    489                 "id": "A String", # The auto-allocated ID of the entity.
    490                     # Never equal to zero. Values less than zero are discouraged and may not
    491                     # be supported in the future.
    492                 "name": "A String", # The name of the entity.
    493                     # A name matching regex `__.*__` is reserved/read-only.
    494                     # A name must not be more than 1500 bytes when UTF-8 encoded.
    495                     # Cannot be `""`.
    496               },
    497             ],
    498             "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project
    499                 # ID and namespace ID.
    500                 # Queries are scoped to a single partition.
    501                 # by project and namespace, however the namespace ID may be empty.
    502                 #
    503                 # A partition ID contains several dimensions:
    504                 # project ID and namespace ID.
    505                 #
    506                 # Partition dimensions:
    507                 #
    508                 # - May be `""`.
    509                 # - Must be valid UTF-8 bytes.
    510                 # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
    511                 # If the value of any dimension matches regex `__.*__`, the partition is
    512                 # reserved/read-only.
    513                 # A reserved/read-only partition ID is forbidden in certain documented
    514                 # contexts.
    515                 #
    516                 # Foreign partition IDs (in which the project ID does
    517                 # not match the context project ID ) are discouraged.
    518                 # Reads and writes of foreign partition IDs may fail if the project is not in an active state.
    519               "projectId": "A String", # The ID of the project to which the entities belong.
    520               "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong.
    521             },
    522           },
    523         },
    524         "upsert": { # A Datastore data object. # The entity to upsert. The entity may or may not already exist.
    525             # The entity key's final path element may be incomplete.
    526             #
    527             # An entity is limited to 1 megabyte when stored. That _roughly_
    528             # corresponds to a limit of 1 megabyte for the serialized form of this
    529             # message.
    530           "properties": { # The entity's properties.
    531               # The map's keys are property names.
    532               # A property name matching regex `__.*__` is reserved.
    533               # A reserved property name is forbidden in certain documented contexts.
    534               # The name must not contain more than 500 characters.
    535               # The name cannot be `""`.
    536             "a_key": { # A message that can hold any of the supported value types and associated
    537                 # metadata.
    538               "entityValue": # Object with schema name: Entity # An entity value.
    539                   #
    540                   # - May have no key.
    541                   # - May have a key with an incomplete key path.
    542                   # - May have a reserved/read-only key.
    543               "timestampValue": "A String", # A timestamp value.
    544                   # When stored in the Datastore, precise only to microseconds;
    545                   # any additional precision is rounded down.
    546               "nullValue": "A String", # A null value.
    547               "excludeFromIndexes": True or False, # If the value should be excluded from all indexes including those defined
    548                   # explicitly.
    549               "doubleValue": 3.14, # A double value.
    550               "meaning": 42, # The `meaning` field should only be populated for backwards compatibility.
    551               "keyValue": { # A unique identifier for an entity. # A key value.
    552                   # If a key's partition ID or any of its path kinds or names are
    553                   # reserved/read-only, the key is reserved/read-only.
    554                   # A reserved/read-only key is forbidden in certain documented contexts.
    555                 "path": [ # The entity path.
    556                     # An entity path consists of one or more elements composed of a kind and a
    557                     # string or numerical identifier, which identify entities. The first
    558                     # element identifies a _root entity_, the second element identifies
    559                     # a _child_ of the root entity, the third element identifies a child of the
    560                     # second entity, and so forth. The entities identified by all prefixes of
    561                     # the path are called the element's _ancestors_.
    562                     #
    563                     # An entity path is always fully complete: *all* of the entity's ancestors
    564                     # are required to be in the path along with the entity identifier itself.
    565                     # The only exception is that in some documented cases, the identifier in the
    566                     # last path element (for the entity) itself may be omitted. For example,
    567                     # the last path element of the key of `Mutation.insert` may have no
    568                     # identifier.
    569                     #
    570                     # A path can never be empty, and a path can have at most 100 elements.
    571                   { # A (kind, ID/name) pair used to construct a key path.
    572                       #
    573                       # If either name or ID is set, the element is complete.
    574                       # If neither is set, the element is incomplete.
    575                     "kind": "A String", # The kind of the entity.
    576                         # A kind matching regex `__.*__` is reserved/read-only.
    577                         # A kind must not contain more than 1500 bytes when UTF-8 encoded.
    578                         # Cannot be `""`.
    579                     "id": "A String", # The auto-allocated ID of the entity.
    580                         # Never equal to zero. Values less than zero are discouraged and may not
    581                         # be supported in the future.
    582                     "name": "A String", # The name of the entity.
    583                         # A name matching regex `__.*__` is reserved/read-only.
    584                         # A name must not be more than 1500 bytes when UTF-8 encoded.
    585                         # Cannot be `""`.
    586                   },
    587                 ],
    588                 "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project
    589                     # ID and namespace ID.
    590                     # Queries are scoped to a single partition.
    591                     # by project and namespace, however the namespace ID may be empty.
    592                     #
    593                     # A partition ID contains several dimensions:
    594                     # project ID and namespace ID.
    595                     #
    596                     # Partition dimensions:
    597                     #
    598                     # - May be `""`.
    599                     # - Must be valid UTF-8 bytes.
    600                     # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
    601                     # If the value of any dimension matches regex `__.*__`, the partition is
    602                     # reserved/read-only.
    603                     # A reserved/read-only partition ID is forbidden in certain documented
    604                     # contexts.
    605                     #
    606                     # Foreign partition IDs (in which the project ID does
    607                     # not match the context project ID ) are discouraged.
    608                     # Reads and writes of foreign partition IDs may fail if the project is not in an active state.
    609                   "projectId": "A String", # The ID of the project to which the entities belong.
    610                   "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong.
    611                 },
    612               },
    613               "stringValue": "A String", # A UTF-8 encoded string value.
    614                   # When `exclude_from_indexes` is false (it is indexed) , may have at most 1500 bytes.
    615                   # Otherwise, may be set to at least 1,000,000 bytes.
    616               "blobValue": "A String", # A blob value.
    617                   # May have at most 1,000,000 bytes.
    618                   # When `exclude_from_indexes` is false, may have at most 1500 bytes.
    619                   # In JSON requests, must be base64-encoded.
    620               "booleanValue": True or False, # A boolean value.
    621               "arrayValue": { # An array value. # An array value.
    622                   # Cannot contain another array value.
    623                   # A `Value` instance that sets field `array_value` must not set fields
    624                   # `meaning` or `exclude_from_indexes`.
    625                 "values": [ # Values in the array.
    626                     # The order of this array may not be preserved if it contains a mix of
    627                     # indexed and unindexed values.
    628                   # Object with schema name: Value
    629                 ],
    630               },
    631               "integerValue": "A String", # An integer value.
    632               "geoPointValue": { # An object representing a latitude/longitude pair. This is expressed as a pair # A geo point value representing a point on the surface of Earth.
    633                   # of doubles representing degrees latitude and degrees longitude. Unless
    634                   # specified otherwise, this must conform to the
    635                   # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
    636                   # standard</a>. Values must be within normalized ranges.
    637                   #
    638                   # Example of normalization code in Python:
    639                   #
    640                   #     def NormalizeLongitude(longitude):
    641                   #       """Wraps decimal degrees longitude to [-180.0, 180.0]."""
    642                   #       q, r = divmod(longitude, 360.0)
    643                   #       if r > 180.0 or (r == 180.0 and q <= -1.0):
    644                   #         return r - 360.0
    645                   #       return r
    646                   #
    647                   #     def NormalizeLatLng(latitude, longitude):
    648                   #       """Wraps decimal degrees latitude and longitude to
    649                   #       [-90.0, 90.0] and [-180.0, 180.0], respectively."""
    650                   #       r = latitude % 360.0
    651                   #       if r <= 90.0:
    652                   #         return r, NormalizeLongitude(longitude)
    653                   #       elif r >= 270.0:
    654                   #         return r - 360, NormalizeLongitude(longitude)
    655                   #       else:
    656                   #         return 180 - r, NormalizeLongitude(longitude + 180.0)
    657                   #
    658                   #     assert 180.0 == NormalizeLongitude(180.0)
    659                   #     assert -180.0 == NormalizeLongitude(-180.0)
    660                   #     assert -179.0 == NormalizeLongitude(181.0)
    661                   #     assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)
    662                   #     assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)
    663                   #     assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)
    664                   #     assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)
    665                   #     assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)
    666                   #     assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)
    667                   #     assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)
    668                   #     assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)
    669                   #     assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)
    670                   #     assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)
    671                 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
    672                 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
    673               },
    674             },
    675           },
    676           "key": { # A unique identifier for an entity. # The entity's key.
    677               #
    678               # An entity must have a key, unless otherwise documented (for example,
    679               # an entity in `Value.entity_value` may have no key).
    680               # An entity's kind is its key path's last element's kind,
    681               # or null if it has no key.
    682               # If a key's partition ID or any of its path kinds or names are
    683               # reserved/read-only, the key is reserved/read-only.
    684               # A reserved/read-only key is forbidden in certain documented contexts.
    685             "path": [ # The entity path.
    686                 # An entity path consists of one or more elements composed of a kind and a
    687                 # string or numerical identifier, which identify entities. The first
    688                 # element identifies a _root entity_, the second element identifies
    689                 # a _child_ of the root entity, the third element identifies a child of the
    690                 # second entity, and so forth. The entities identified by all prefixes of
    691                 # the path are called the element's _ancestors_.
    692                 #
    693                 # An entity path is always fully complete: *all* of the entity's ancestors
    694                 # are required to be in the path along with the entity identifier itself.
    695                 # The only exception is that in some documented cases, the identifier in the
    696                 # last path element (for the entity) itself may be omitted. For example,
    697                 # the last path element of the key of `Mutation.insert` may have no
    698                 # identifier.
    699                 #
    700                 # A path can never be empty, and a path can have at most 100 elements.
    701               { # A (kind, ID/name) pair used to construct a key path.
    702                   #
    703                   # If either name or ID is set, the element is complete.
    704                   # If neither is set, the element is incomplete.
    705                 "kind": "A String", # The kind of the entity.
    706                     # A kind matching regex `__.*__` is reserved/read-only.
    707                     # A kind must not contain more than 1500 bytes when UTF-8 encoded.
    708                     # Cannot be `""`.
    709                 "id": "A String", # The auto-allocated ID of the entity.
    710                     # Never equal to zero. Values less than zero are discouraged and may not
    711                     # be supported in the future.
    712                 "name": "A String", # The name of the entity.
    713                     # A name matching regex `__.*__` is reserved/read-only.
    714                     # A name must not be more than 1500 bytes when UTF-8 encoded.
    715                     # Cannot be `""`.
    716               },
    717             ],
    718             "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project
    719                 # ID and namespace ID.
    720                 # Queries are scoped to a single partition.
    721                 # by project and namespace, however the namespace ID may be empty.
    722                 #
    723                 # A partition ID contains several dimensions:
    724                 # project ID and namespace ID.
    725                 #
    726                 # Partition dimensions:
    727                 #
    728                 # - May be `""`.
    729                 # - Must be valid UTF-8 bytes.
    730                 # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
    731                 # If the value of any dimension matches regex `__.*__`, the partition is
    732                 # reserved/read-only.
    733                 # A reserved/read-only partition ID is forbidden in certain documented
    734                 # contexts.
    735                 #
    736                 # Foreign partition IDs (in which the project ID does
    737                 # not match the context project ID ) are discouraged.
    738                 # Reads and writes of foreign partition IDs may fail if the project is not in an active state.
    739               "projectId": "A String", # The ID of the project to which the entities belong.
    740               "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong.
    741             },
    742           },
    743         },
    744         "update": { # A Datastore data object. # The entity to update. The entity must already exist.
    745             # Must have a complete key path.
    746             #
    747             # An entity is limited to 1 megabyte when stored. That _roughly_
    748             # corresponds to a limit of 1 megabyte for the serialized form of this
    749             # message.
    750           "properties": { # The entity's properties.
    751               # The map's keys are property names.
    752               # A property name matching regex `__.*__` is reserved.
    753               # A reserved property name is forbidden in certain documented contexts.
    754               # The name must not contain more than 500 characters.
    755               # The name cannot be `""`.
    756             "a_key": { # A message that can hold any of the supported value types and associated
    757                 # metadata.
    758               "entityValue": # Object with schema name: Entity # An entity value.
    759                   #
    760                   # - May have no key.
    761                   # - May have a key with an incomplete key path.
    762                   # - May have a reserved/read-only key.
    763               "timestampValue": "A String", # A timestamp value.
    764                   # When stored in the Datastore, precise only to microseconds;
    765                   # any additional precision is rounded down.
    766               "nullValue": "A String", # A null value.
    767               "excludeFromIndexes": True or False, # If the value should be excluded from all indexes including those defined
    768                   # explicitly.
    769               "doubleValue": 3.14, # A double value.
    770               "meaning": 42, # The `meaning` field should only be populated for backwards compatibility.
    771               "keyValue": { # A unique identifier for an entity. # A key value.
    772                   # If a key's partition ID or any of its path kinds or names are
    773                   # reserved/read-only, the key is reserved/read-only.
    774                   # A reserved/read-only key is forbidden in certain documented contexts.
    775                 "path": [ # The entity path.
    776                     # An entity path consists of one or more elements composed of a kind and a
    777                     # string or numerical identifier, which identify entities. The first
    778                     # element identifies a _root entity_, the second element identifies
    779                     # a _child_ of the root entity, the third element identifies a child of the
    780                     # second entity, and so forth. The entities identified by all prefixes of
    781                     # the path are called the element's _ancestors_.
    782                     #
    783                     # An entity path is always fully complete: *all* of the entity's ancestors
    784                     # are required to be in the path along with the entity identifier itself.
    785                     # The only exception is that in some documented cases, the identifier in the
    786                     # last path element (for the entity) itself may be omitted. For example,
    787                     # the last path element of the key of `Mutation.insert` may have no
    788                     # identifier.
    789                     #
    790                     # A path can never be empty, and a path can have at most 100 elements.
    791                   { # A (kind, ID/name) pair used to construct a key path.
    792                       #
    793                       # If either name or ID is set, the element is complete.
    794                       # If neither is set, the element is incomplete.
    795                     "kind": "A String", # The kind of the entity.
    796                         # A kind matching regex `__.*__` is reserved/read-only.
    797                         # A kind must not contain more than 1500 bytes when UTF-8 encoded.
    798                         # Cannot be `""`.
    799                     "id": "A String", # The auto-allocated ID of the entity.
    800                         # Never equal to zero. Values less than zero are discouraged and may not
    801                         # be supported in the future.
    802                     "name": "A String", # The name of the entity.
    803                         # A name matching regex `__.*__` is reserved/read-only.
    804                         # A name must not be more than 1500 bytes when UTF-8 encoded.
    805                         # Cannot be `""`.
    806                   },
    807                 ],
    808                 "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project
    809                     # ID and namespace ID.
    810                     # Queries are scoped to a single partition.
    811                     # by project and namespace, however the namespace ID may be empty.
    812                     #
    813                     # A partition ID contains several dimensions:
    814                     # project ID and namespace ID.
    815                     #
    816                     # Partition dimensions:
    817                     #
    818                     # - May be `""`.
    819                     # - Must be valid UTF-8 bytes.
    820                     # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
    821                     # If the value of any dimension matches regex `__.*__`, the partition is
    822                     # reserved/read-only.
    823                     # A reserved/read-only partition ID is forbidden in certain documented
    824                     # contexts.
    825                     #
    826                     # Foreign partition IDs (in which the project ID does
    827                     # not match the context project ID ) are discouraged.
    828                     # Reads and writes of foreign partition IDs may fail if the project is not in an active state.
    829                   "projectId": "A String", # The ID of the project to which the entities belong.
    830                   "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong.
    831                 },
    832               },
    833               "stringValue": "A String", # A UTF-8 encoded string value.
    834                   # When `exclude_from_indexes` is false (it is indexed) , may have at most 1500 bytes.
    835                   # Otherwise, may be set to at least 1,000,000 bytes.
    836               "blobValue": "A String", # A blob value.
    837                   # May have at most 1,000,000 bytes.
    838                   # When `exclude_from_indexes` is false, may have at most 1500 bytes.
    839                   # In JSON requests, must be base64-encoded.
    840               "booleanValue": True or False, # A boolean value.
    841               "arrayValue": { # An array value. # An array value.
    842                   # Cannot contain another array value.
    843                   # A `Value` instance that sets field `array_value` must not set fields
    844                   # `meaning` or `exclude_from_indexes`.
    845                 "values": [ # Values in the array.
    846                     # The order of this array may not be preserved if it contains a mix of
    847                     # indexed and unindexed values.
    848                   # Object with schema name: Value
    849                 ],
    850               },
    851               "integerValue": "A String", # An integer value.
    852               "geoPointValue": { # An object representing a latitude/longitude pair. This is expressed as a pair # A geo point value representing a point on the surface of Earth.
    853                   # of doubles representing degrees latitude and degrees longitude. Unless
    854                   # specified otherwise, this must conform to the
    855                   # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
    856                   # standard</a>. Values must be within normalized ranges.
    857                   #
    858                   # Example of normalization code in Python:
    859                   #
    860                   #     def NormalizeLongitude(longitude):
    861                   #       """Wraps decimal degrees longitude to [-180.0, 180.0]."""
    862                   #       q, r = divmod(longitude, 360.0)
    863                   #       if r > 180.0 or (r == 180.0 and q <= -1.0):
    864                   #         return r - 360.0
    865                   #       return r
    866                   #
    867                   #     def NormalizeLatLng(latitude, longitude):
    868                   #       """Wraps decimal degrees latitude and longitude to
    869                   #       [-90.0, 90.0] and [-180.0, 180.0], respectively."""
    870                   #       r = latitude % 360.0
    871                   #       if r <= 90.0:
    872                   #         return r, NormalizeLongitude(longitude)
    873                   #       elif r >= 270.0:
    874                   #         return r - 360, NormalizeLongitude(longitude)
    875                   #       else:
    876                   #         return 180 - r, NormalizeLongitude(longitude + 180.0)
    877                   #
    878                   #     assert 180.0 == NormalizeLongitude(180.0)
    879                   #     assert -180.0 == NormalizeLongitude(-180.0)
    880                   #     assert -179.0 == NormalizeLongitude(181.0)
    881                   #     assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)
    882                   #     assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)
    883                   #     assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)
    884                   #     assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)
    885                   #     assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)
    886                   #     assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)
    887                   #     assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)
    888                   #     assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)
    889                   #     assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)
    890                   #     assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)
    891                 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
    892                 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
    893               },
    894             },
    895           },
    896           "key": { # A unique identifier for an entity. # The entity's key.
    897               #
    898               # An entity must have a key, unless otherwise documented (for example,
    899               # an entity in `Value.entity_value` may have no key).
    900               # An entity's kind is its key path's last element's kind,
    901               # or null if it has no key.
    902               # If a key's partition ID or any of its path kinds or names are
    903               # reserved/read-only, the key is reserved/read-only.
    904               # A reserved/read-only key is forbidden in certain documented contexts.
    905             "path": [ # The entity path.
    906                 # An entity path consists of one or more elements composed of a kind and a
    907                 # string or numerical identifier, which identify entities. The first
    908                 # element identifies a _root entity_, the second element identifies
    909                 # a _child_ of the root entity, the third element identifies a child of the
    910                 # second entity, and so forth. The entities identified by all prefixes of
    911                 # the path are called the element's _ancestors_.
    912                 #
    913                 # An entity path is always fully complete: *all* of the entity's ancestors
    914                 # are required to be in the path along with the entity identifier itself.
    915                 # The only exception is that in some documented cases, the identifier in the
    916                 # last path element (for the entity) itself may be omitted. For example,
    917                 # the last path element of the key of `Mutation.insert` may have no
    918                 # identifier.
    919                 #
    920                 # A path can never be empty, and a path can have at most 100 elements.
    921               { # A (kind, ID/name) pair used to construct a key path.
    922                   #
    923                   # If either name or ID is set, the element is complete.
    924                   # If neither is set, the element is incomplete.
    925                 "kind": "A String", # The kind of the entity.
    926                     # A kind matching regex `__.*__` is reserved/read-only.
    927                     # A kind must not contain more than 1500 bytes when UTF-8 encoded.
    928                     # Cannot be `""`.
    929                 "id": "A String", # The auto-allocated ID of the entity.
    930                     # Never equal to zero. Values less than zero are discouraged and may not
    931                     # be supported in the future.
    932                 "name": "A String", # The name of the entity.
    933                     # A name matching regex `__.*__` is reserved/read-only.
    934                     # A name must not be more than 1500 bytes when UTF-8 encoded.
    935                     # Cannot be `""`.
    936               },
    937             ],
    938             "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project
    939                 # ID and namespace ID.
    940                 # Queries are scoped to a single partition.
    941                 # by project and namespace, however the namespace ID may be empty.
    942                 #
    943                 # A partition ID contains several dimensions:
    944                 # project ID and namespace ID.
    945                 #
    946                 # Partition dimensions:
    947                 #
    948                 # - May be `""`.
    949                 # - Must be valid UTF-8 bytes.
    950                 # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
    951                 # If the value of any dimension matches regex `__.*__`, the partition is
    952                 # reserved/read-only.
    953                 # A reserved/read-only partition ID is forbidden in certain documented
    954                 # contexts.
    955                 #
    956                 # Foreign partition IDs (in which the project ID does
    957                 # not match the context project ID ) are discouraged.
    958                 # Reads and writes of foreign partition IDs may fail if the project is not in an active state.
    959               "projectId": "A String", # The ID of the project to which the entities belong.
    960               "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong.
    961             },
    962           },
    963         },
    964         "baseVersion": "A String", # The version of the entity that this mutation is being applied to. If this
    965             # does not match the current version on the server, the mutation conflicts.
    966         "delete": { # A unique identifier for an entity. # The key of the entity to delete. The entity may or may not already exist.
    967             # Must have a complete key path and must not be reserved/read-only.
    968             # If a key's partition ID or any of its path kinds or names are
    969             # reserved/read-only, the key is reserved/read-only.
    970             # A reserved/read-only key is forbidden in certain documented contexts.
    971           "path": [ # The entity path.
    972               # An entity path consists of one or more elements composed of a kind and a
    973               # string or numerical identifier, which identify entities. The first
    974               # element identifies a _root entity_, the second element identifies
    975               # a _child_ of the root entity, the third element identifies a child of the
    976               # second entity, and so forth. The entities identified by all prefixes of
    977               # the path are called the element's _ancestors_.
    978               #
    979               # An entity path is always fully complete: *all* of the entity's ancestors
    980               # are required to be in the path along with the entity identifier itself.
    981               # The only exception is that in some documented cases, the identifier in the
    982               # last path element (for the entity) itself may be omitted. For example,
    983               # the last path element of the key of `Mutation.insert` may have no
    984               # identifier.
    985               #
    986               # A path can never be empty, and a path can have at most 100 elements.
    987             { # A (kind, ID/name) pair used to construct a key path.
    988                 #
    989                 # If either name or ID is set, the element is complete.
    990                 # If neither is set, the element is incomplete.
    991               "kind": "A String", # The kind of the entity.
    992                   # A kind matching regex `__.*__` is reserved/read-only.
    993                   # A kind must not contain more than 1500 bytes when UTF-8 encoded.
    994                   # Cannot be `""`.
    995               "id": "A String", # The auto-allocated ID of the entity.
    996                   # Never equal to zero. Values less than zero are discouraged and may not
    997                   # be supported in the future.
    998               "name": "A String", # The name of the entity.
    999                   # A name matching regex `__.*__` is reserved/read-only.
   1000                   # A name must not be more than 1500 bytes when UTF-8 encoded.
   1001                   # Cannot be `""`.
   1002             },
   1003           ],
   1004           "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project
   1005               # ID and namespace ID.
   1006               # Queries are scoped to a single partition.
   1007               # by project and namespace, however the namespace ID may be empty.
   1008               #
   1009               # A partition ID contains several dimensions:
   1010               # project ID and namespace ID.
   1011               #
   1012               # Partition dimensions:
   1013               #
   1014               # - May be `""`.
   1015               # - Must be valid UTF-8 bytes.
   1016               # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
   1017               # If the value of any dimension matches regex `__.*__`, the partition is
   1018               # reserved/read-only.
   1019               # A reserved/read-only partition ID is forbidden in certain documented
   1020               # contexts.
   1021               #
   1022               # Foreign partition IDs (in which the project ID does
   1023               # not match the context project ID ) are discouraged.
   1024               # Reads and writes of foreign partition IDs may fail if the project is not in an active state.
   1025             "projectId": "A String", # The ID of the project to which the entities belong.
   1026             "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong.
   1027           },
   1028         },
   1029       },
   1030     ],
   1031     "mode": "A String", # The type of commit to perform. Defaults to `TRANSACTIONAL`.
   1032   }
   1033 
   1034   x__xgafv: string, V1 error format.
   1035     Allowed values
   1036       1 - v1 error format
   1037       2 - v2 error format
   1038 
   1039 Returns:
   1040   An object of the form:
   1041 
   1042     { # The response for Datastore.Commit.
   1043     "indexUpdates": 42, # The number of index entries updated during the commit, or zero if none were
   1044         # updated.
   1045     "mutationResults": [ # The result of performing the mutations.
   1046         # The i-th mutation result corresponds to the i-th mutation in the request.
   1047       { # The result of applying a mutation.
   1048         "version": "A String", # The version of the entity on the server after processing the mutation. If
   1049             # the mutation doesn't change anything on the server, then the version will
   1050             # be the version of the current entity or, if no entity is present, a version
   1051             # that is strictly greater than the version of any previous entity and less
   1052             # than the version of any possible future entity.
   1053         "conflictDetected": True or False, # Whether a conflict was detected for this mutation. Always false when a
   1054             # conflict detection strategy field is not set in the mutation.
   1055         "key": { # A unique identifier for an entity. # The automatically allocated key.
   1056             # Set only when the mutation allocated a key.
   1057             # If a key's partition ID or any of its path kinds or names are
   1058             # reserved/read-only, the key is reserved/read-only.
   1059             # A reserved/read-only key is forbidden in certain documented contexts.
   1060           "path": [ # The entity path.
   1061               # An entity path consists of one or more elements composed of a kind and a
   1062               # string or numerical identifier, which identify entities. The first
   1063               # element identifies a _root entity_, the second element identifies
   1064               # a _child_ of the root entity, the third element identifies a child of the
   1065               # second entity, and so forth. The entities identified by all prefixes of
   1066               # the path are called the element's _ancestors_.
   1067               #
   1068               # An entity path is always fully complete: *all* of the entity's ancestors
   1069               # are required to be in the path along with the entity identifier itself.
   1070               # The only exception is that in some documented cases, the identifier in the
   1071               # last path element (for the entity) itself may be omitted. For example,
   1072               # the last path element of the key of `Mutation.insert` may have no
   1073               # identifier.
   1074               #
   1075               # A path can never be empty, and a path can have at most 100 elements.
   1076             { # A (kind, ID/name) pair used to construct a key path.
   1077                 #
   1078                 # If either name or ID is set, the element is complete.
   1079                 # If neither is set, the element is incomplete.
   1080               "kind": "A String", # The kind of the entity.
   1081                   # A kind matching regex `__.*__` is reserved/read-only.
   1082                   # A kind must not contain more than 1500 bytes when UTF-8 encoded.
   1083                   # Cannot be `""`.
   1084               "id": "A String", # The auto-allocated ID of the entity.
   1085                   # Never equal to zero. Values less than zero are discouraged and may not
   1086                   # be supported in the future.
   1087               "name": "A String", # The name of the entity.
   1088                   # A name matching regex `__.*__` is reserved/read-only.
   1089                   # A name must not be more than 1500 bytes when UTF-8 encoded.
   1090                   # Cannot be `""`.
   1091             },
   1092           ],
   1093           "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project
   1094               # ID and namespace ID.
   1095               # Queries are scoped to a single partition.
   1096               # by project and namespace, however the namespace ID may be empty.
   1097               #
   1098               # A partition ID contains several dimensions:
   1099               # project ID and namespace ID.
   1100               #
   1101               # Partition dimensions:
   1102               #
   1103               # - May be `""`.
   1104               # - Must be valid UTF-8 bytes.
   1105               # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
   1106               # If the value of any dimension matches regex `__.*__`, the partition is
   1107               # reserved/read-only.
   1108               # A reserved/read-only partition ID is forbidden in certain documented
   1109               # contexts.
   1110               #
   1111               # Foreign partition IDs (in which the project ID does
   1112               # not match the context project ID ) are discouraged.
   1113               # Reads and writes of foreign partition IDs may fail if the project is not in an active state.
   1114             "projectId": "A String", # The ID of the project to which the entities belong.
   1115             "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong.
   1116           },
   1117         },
   1118       },
   1119     ],
   1120   }</pre>
   1121 </div>
   1122 
   1123 <div class="method">
   1124     <code class="details" id="lookup">lookup(projectId, body, x__xgafv=None)</code>
   1125   <pre>Looks up entities by key.
   1126 
   1127 Args:
   1128   projectId: string, The ID of the project against which to make the request. (required)
   1129   body: object, The request body. (required)
   1130     The object takes the form of:
   1131 
   1132 { # The request for Datastore.Lookup.
   1133     "keys": [ # Keys of entities to look up.
   1134       { # A unique identifier for an entity.
   1135           # If a key's partition ID or any of its path kinds or names are
   1136           # reserved/read-only, the key is reserved/read-only.
   1137           # A reserved/read-only key is forbidden in certain documented contexts.
   1138         "path": [ # The entity path.
   1139             # An entity path consists of one or more elements composed of a kind and a
   1140             # string or numerical identifier, which identify entities. The first
   1141             # element identifies a _root entity_, the second element identifies
   1142             # a _child_ of the root entity, the third element identifies a child of the
   1143             # second entity, and so forth. The entities identified by all prefixes of
   1144             # the path are called the element's _ancestors_.
   1145             #
   1146             # An entity path is always fully complete: *all* of the entity's ancestors
   1147             # are required to be in the path along with the entity identifier itself.
   1148             # The only exception is that in some documented cases, the identifier in the
   1149             # last path element (for the entity) itself may be omitted. For example,
   1150             # the last path element of the key of `Mutation.insert` may have no
   1151             # identifier.
   1152             #
   1153             # A path can never be empty, and a path can have at most 100 elements.
   1154           { # A (kind, ID/name) pair used to construct a key path.
   1155               #
   1156               # If either name or ID is set, the element is complete.
   1157               # If neither is set, the element is incomplete.
   1158             "kind": "A String", # The kind of the entity.
   1159                 # A kind matching regex `__.*__` is reserved/read-only.
   1160                 # A kind must not contain more than 1500 bytes when UTF-8 encoded.
   1161                 # Cannot be `""`.
   1162             "id": "A String", # The auto-allocated ID of the entity.
   1163                 # Never equal to zero. Values less than zero are discouraged and may not
   1164                 # be supported in the future.
   1165             "name": "A String", # The name of the entity.
   1166                 # A name matching regex `__.*__` is reserved/read-only.
   1167                 # A name must not be more than 1500 bytes when UTF-8 encoded.
   1168                 # Cannot be `""`.
   1169           },
   1170         ],
   1171         "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project
   1172             # ID and namespace ID.
   1173             # Queries are scoped to a single partition.
   1174             # by project and namespace, however the namespace ID may be empty.
   1175             #
   1176             # A partition ID contains several dimensions:
   1177             # project ID and namespace ID.
   1178             #
   1179             # Partition dimensions:
   1180             #
   1181             # - May be `""`.
   1182             # - Must be valid UTF-8 bytes.
   1183             # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
   1184             # If the value of any dimension matches regex `__.*__`, the partition is
   1185             # reserved/read-only.
   1186             # A reserved/read-only partition ID is forbidden in certain documented
   1187             # contexts.
   1188             #
   1189             # Foreign partition IDs (in which the project ID does
   1190             # not match the context project ID ) are discouraged.
   1191             # Reads and writes of foreign partition IDs may fail if the project is not in an active state.
   1192           "projectId": "A String", # The ID of the project to which the entities belong.
   1193           "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong.
   1194         },
   1195       },
   1196     ],
   1197     "readOptions": { # The options shared by read requests. # The options for this lookup request.
   1198       "transaction": "A String", # The identifier of the transaction in which to read. A
   1199           # transaction identifier is returned by a call to
   1200           # Datastore.BeginTransaction.
   1201       "readConsistency": "A String", # The non-transactional read consistency to use.
   1202           # Cannot be set to `STRONG` for global queries.
   1203     },
   1204   }
   1205 
   1206   x__xgafv: string, V1 error format.
   1207     Allowed values
   1208       1 - v1 error format
   1209       2 - v2 error format
   1210 
   1211 Returns:
   1212   An object of the form:
   1213 
   1214     { # The response for Datastore.Lookup.
   1215     "found": [ # Entities found as `ResultType.FULL` entities. The order of results in this
   1216         # field is undefined and has no relation to the order of the keys in the
   1217         # input.
   1218       { # The result of fetching an entity from Datastore.
   1219         "cursor": "A String", # A cursor that points to the position after the result entity.
   1220             # Set only when the `EntityResult` is part of a `QueryResultBatch` message.
   1221         "version": "A String", # The version of the entity, a strictly positive number that monotonically
   1222             # increases with changes to the entity.
   1223             #
   1224             # This field is set for `FULL` entity
   1225             # results.
   1226             #
   1227             # For missing entities in `LookupResponse`, this
   1228             # is the version of the snapshot that was used to look up the entity, and it
   1229             # is always set except for eventually consistent reads.
   1230         "entity": { # A Datastore data object. # The resulting entity.
   1231             #
   1232             # An entity is limited to 1 megabyte when stored. That _roughly_
   1233             # corresponds to a limit of 1 megabyte for the serialized form of this
   1234             # message.
   1235           "properties": { # The entity's properties.
   1236               # The map's keys are property names.
   1237               # A property name matching regex `__.*__` is reserved.
   1238               # A reserved property name is forbidden in certain documented contexts.
   1239               # The name must not contain more than 500 characters.
   1240               # The name cannot be `""`.
   1241             "a_key": { # A message that can hold any of the supported value types and associated
   1242                 # metadata.
   1243               "entityValue": # Object with schema name: Entity # An entity value.
   1244                   #
   1245                   # - May have no key.
   1246                   # - May have a key with an incomplete key path.
   1247                   # - May have a reserved/read-only key.
   1248               "timestampValue": "A String", # A timestamp value.
   1249                   # When stored in the Datastore, precise only to microseconds;
   1250                   # any additional precision is rounded down.
   1251               "nullValue": "A String", # A null value.
   1252               "excludeFromIndexes": True or False, # If the value should be excluded from all indexes including those defined
   1253                   # explicitly.
   1254               "doubleValue": 3.14, # A double value.
   1255               "meaning": 42, # The `meaning` field should only be populated for backwards compatibility.
   1256               "keyValue": { # A unique identifier for an entity. # A key value.
   1257                   # If a key's partition ID or any of its path kinds or names are
   1258                   # reserved/read-only, the key is reserved/read-only.
   1259                   # A reserved/read-only key is forbidden in certain documented contexts.
   1260                 "path": [ # The entity path.
   1261                     # An entity path consists of one or more elements composed of a kind and a
   1262                     # string or numerical identifier, which identify entities. The first
   1263                     # element identifies a _root entity_, the second element identifies
   1264                     # a _child_ of the root entity, the third element identifies a child of the
   1265                     # second entity, and so forth. The entities identified by all prefixes of
   1266                     # the path are called the element's _ancestors_.
   1267                     #
   1268                     # An entity path is always fully complete: *all* of the entity's ancestors
   1269                     # are required to be in the path along with the entity identifier itself.
   1270                     # The only exception is that in some documented cases, the identifier in the
   1271                     # last path element (for the entity) itself may be omitted. For example,
   1272                     # the last path element of the key of `Mutation.insert` may have no
   1273                     # identifier.
   1274                     #
   1275                     # A path can never be empty, and a path can have at most 100 elements.
   1276                   { # A (kind, ID/name) pair used to construct a key path.
   1277                       #
   1278                       # If either name or ID is set, the element is complete.
   1279                       # If neither is set, the element is incomplete.
   1280                     "kind": "A String", # The kind of the entity.
   1281                         # A kind matching regex `__.*__` is reserved/read-only.
   1282                         # A kind must not contain more than 1500 bytes when UTF-8 encoded.
   1283                         # Cannot be `""`.
   1284                     "id": "A String", # The auto-allocated ID of the entity.
   1285                         # Never equal to zero. Values less than zero are discouraged and may not
   1286                         # be supported in the future.
   1287                     "name": "A String", # The name of the entity.
   1288                         # A name matching regex `__.*__` is reserved/read-only.
   1289                         # A name must not be more than 1500 bytes when UTF-8 encoded.
   1290                         # Cannot be `""`.
   1291                   },
   1292                 ],
   1293                 "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project
   1294                     # ID and namespace ID.
   1295                     # Queries are scoped to a single partition.
   1296                     # by project and namespace, however the namespace ID may be empty.
   1297                     #
   1298                     # A partition ID contains several dimensions:
   1299                     # project ID and namespace ID.
   1300                     #
   1301                     # Partition dimensions:
   1302                     #
   1303                     # - May be `""`.
   1304                     # - Must be valid UTF-8 bytes.
   1305                     # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
   1306                     # If the value of any dimension matches regex `__.*__`, the partition is
   1307                     # reserved/read-only.
   1308                     # A reserved/read-only partition ID is forbidden in certain documented
   1309                     # contexts.
   1310                     #
   1311                     # Foreign partition IDs (in which the project ID does
   1312                     # not match the context project ID ) are discouraged.
   1313                     # Reads and writes of foreign partition IDs may fail if the project is not in an active state.
   1314                   "projectId": "A String", # The ID of the project to which the entities belong.
   1315                   "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong.
   1316                 },
   1317               },
   1318               "stringValue": "A String", # A UTF-8 encoded string value.
   1319                   # When `exclude_from_indexes` is false (it is indexed) , may have at most 1500 bytes.
   1320                   # Otherwise, may be set to at least 1,000,000 bytes.
   1321               "blobValue": "A String", # A blob value.
   1322                   # May have at most 1,000,000 bytes.
   1323                   # When `exclude_from_indexes` is false, may have at most 1500 bytes.
   1324                   # In JSON requests, must be base64-encoded.
   1325               "booleanValue": True or False, # A boolean value.
   1326               "arrayValue": { # An array value. # An array value.
   1327                   # Cannot contain another array value.
   1328                   # A `Value` instance that sets field `array_value` must not set fields
   1329                   # `meaning` or `exclude_from_indexes`.
   1330                 "values": [ # Values in the array.
   1331                     # The order of this array may not be preserved if it contains a mix of
   1332                     # indexed and unindexed values.
   1333                   # Object with schema name: Value
   1334                 ],
   1335               },
   1336               "integerValue": "A String", # An integer value.
   1337               "geoPointValue": { # An object representing a latitude/longitude pair. This is expressed as a pair # A geo point value representing a point on the surface of Earth.
   1338                   # of doubles representing degrees latitude and degrees longitude. Unless
   1339                   # specified otherwise, this must conform to the
   1340                   # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
   1341                   # standard</a>. Values must be within normalized ranges.
   1342                   #
   1343                   # Example of normalization code in Python:
   1344                   #
   1345                   #     def NormalizeLongitude(longitude):
   1346                   #       """Wraps decimal degrees longitude to [-180.0, 180.0]."""
   1347                   #       q, r = divmod(longitude, 360.0)
   1348                   #       if r > 180.0 or (r == 180.0 and q <= -1.0):
   1349                   #         return r - 360.0
   1350                   #       return r
   1351                   #
   1352                   #     def NormalizeLatLng(latitude, longitude):
   1353                   #       """Wraps decimal degrees latitude and longitude to
   1354                   #       [-90.0, 90.0] and [-180.0, 180.0], respectively."""
   1355                   #       r = latitude % 360.0
   1356                   #       if r <= 90.0:
   1357                   #         return r, NormalizeLongitude(longitude)
   1358                   #       elif r >= 270.0:
   1359                   #         return r - 360, NormalizeLongitude(longitude)
   1360                   #       else:
   1361                   #         return 180 - r, NormalizeLongitude(longitude + 180.0)
   1362                   #
   1363                   #     assert 180.0 == NormalizeLongitude(180.0)
   1364                   #     assert -180.0 == NormalizeLongitude(-180.0)
   1365                   #     assert -179.0 == NormalizeLongitude(181.0)
   1366                   #     assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)
   1367                   #     assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)
   1368                   #     assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)
   1369                   #     assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)
   1370                   #     assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)
   1371                   #     assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)
   1372                   #     assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)
   1373                   #     assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)
   1374                   #     assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)
   1375                   #     assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)
   1376                 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
   1377                 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
   1378               },
   1379             },
   1380           },
   1381           "key": { # A unique identifier for an entity. # The entity's key.
   1382               #
   1383               # An entity must have a key, unless otherwise documented (for example,
   1384               # an entity in `Value.entity_value` may have no key).
   1385               # An entity's kind is its key path's last element's kind,
   1386               # or null if it has no key.
   1387               # If a key's partition ID or any of its path kinds or names are
   1388               # reserved/read-only, the key is reserved/read-only.
   1389               # A reserved/read-only key is forbidden in certain documented contexts.
   1390             "path": [ # The entity path.
   1391                 # An entity path consists of one or more elements composed of a kind and a
   1392                 # string or numerical identifier, which identify entities. The first
   1393                 # element identifies a _root entity_, the second element identifies
   1394                 # a _child_ of the root entity, the third element identifies a child of the
   1395                 # second entity, and so forth. The entities identified by all prefixes of
   1396                 # the path are called the element's _ancestors_.
   1397                 #
   1398                 # An entity path is always fully complete: *all* of the entity's ancestors
   1399                 # are required to be in the path along with the entity identifier itself.
   1400                 # The only exception is that in some documented cases, the identifier in the
   1401                 # last path element (for the entity) itself may be omitted. For example,
   1402                 # the last path element of the key of `Mutation.insert` may have no
   1403                 # identifier.
   1404                 #
   1405                 # A path can never be empty, and a path can have at most 100 elements.
   1406               { # A (kind, ID/name) pair used to construct a key path.
   1407                   #
   1408                   # If either name or ID is set, the element is complete.
   1409                   # If neither is set, the element is incomplete.
   1410                 "kind": "A String", # The kind of the entity.
   1411                     # A kind matching regex `__.*__` is reserved/read-only.
   1412                     # A kind must not contain more than 1500 bytes when UTF-8 encoded.
   1413                     # Cannot be `""`.
   1414                 "id": "A String", # The auto-allocated ID of the entity.
   1415                     # Never equal to zero. Values less than zero are discouraged and may not
   1416                     # be supported in the future.
   1417                 "name": "A String", # The name of the entity.
   1418                     # A name matching regex `__.*__` is reserved/read-only.
   1419                     # A name must not be more than 1500 bytes when UTF-8 encoded.
   1420                     # Cannot be `""`.
   1421               },
   1422             ],
   1423             "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project
   1424                 # ID and namespace ID.
   1425                 # Queries are scoped to a single partition.
   1426                 # by project and namespace, however the namespace ID may be empty.
   1427                 #
   1428                 # A partition ID contains several dimensions:
   1429                 # project ID and namespace ID.
   1430                 #
   1431                 # Partition dimensions:
   1432                 #
   1433                 # - May be `""`.
   1434                 # - Must be valid UTF-8 bytes.
   1435                 # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
   1436                 # If the value of any dimension matches regex `__.*__`, the partition is
   1437                 # reserved/read-only.
   1438                 # A reserved/read-only partition ID is forbidden in certain documented
   1439                 # contexts.
   1440                 #
   1441                 # Foreign partition IDs (in which the project ID does
   1442                 # not match the context project ID ) are discouraged.
   1443                 # Reads and writes of foreign partition IDs may fail if the project is not in an active state.
   1444               "projectId": "A String", # The ID of the project to which the entities belong.
   1445               "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong.
   1446             },
   1447           },
   1448         },
   1449       },
   1450     ],
   1451     "deferred": [ # A list of keys that were not looked up due to resource constraints. The
   1452         # order of results in this field is undefined and has no relation to the
   1453         # order of the keys in the input.
   1454       { # A unique identifier for an entity.
   1455           # If a key's partition ID or any of its path kinds or names are
   1456           # reserved/read-only, the key is reserved/read-only.
   1457           # A reserved/read-only key is forbidden in certain documented contexts.
   1458         "path": [ # The entity path.
   1459             # An entity path consists of one or more elements composed of a kind and a
   1460             # string or numerical identifier, which identify entities. The first
   1461             # element identifies a _root entity_, the second element identifies
   1462             # a _child_ of the root entity, the third element identifies a child of the
   1463             # second entity, and so forth. The entities identified by all prefixes of
   1464             # the path are called the element's _ancestors_.
   1465             #
   1466             # An entity path is always fully complete: *all* of the entity's ancestors
   1467             # are required to be in the path along with the entity identifier itself.
   1468             # The only exception is that in some documented cases, the identifier in the
   1469             # last path element (for the entity) itself may be omitted. For example,
   1470             # the last path element of the key of `Mutation.insert` may have no
   1471             # identifier.
   1472             #
   1473             # A path can never be empty, and a path can have at most 100 elements.
   1474           { # A (kind, ID/name) pair used to construct a key path.
   1475               #
   1476               # If either name or ID is set, the element is complete.
   1477               # If neither is set, the element is incomplete.
   1478             "kind": "A String", # The kind of the entity.
   1479                 # A kind matching regex `__.*__` is reserved/read-only.
   1480                 # A kind must not contain more than 1500 bytes when UTF-8 encoded.
   1481                 # Cannot be `""`.
   1482             "id": "A String", # The auto-allocated ID of the entity.
   1483                 # Never equal to zero. Values less than zero are discouraged and may not
   1484                 # be supported in the future.
   1485             "name": "A String", # The name of the entity.
   1486                 # A name matching regex `__.*__` is reserved/read-only.
   1487                 # A name must not be more than 1500 bytes when UTF-8 encoded.
   1488                 # Cannot be `""`.
   1489           },
   1490         ],
   1491         "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project
   1492             # ID and namespace ID.
   1493             # Queries are scoped to a single partition.
   1494             # by project and namespace, however the namespace ID may be empty.
   1495             #
   1496             # A partition ID contains several dimensions:
   1497             # project ID and namespace ID.
   1498             #
   1499             # Partition dimensions:
   1500             #
   1501             # - May be `""`.
   1502             # - Must be valid UTF-8 bytes.
   1503             # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
   1504             # If the value of any dimension matches regex `__.*__`, the partition is
   1505             # reserved/read-only.
   1506             # A reserved/read-only partition ID is forbidden in certain documented
   1507             # contexts.
   1508             #
   1509             # Foreign partition IDs (in which the project ID does
   1510             # not match the context project ID ) are discouraged.
   1511             # Reads and writes of foreign partition IDs may fail if the project is not in an active state.
   1512           "projectId": "A String", # The ID of the project to which the entities belong.
   1513           "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong.
   1514         },
   1515       },
   1516     ],
   1517     "missing": [ # Entities not found as `ResultType.KEY_ONLY` entities. The order of results
   1518         # in this field is undefined and has no relation to the order of the keys
   1519         # in the input.
   1520       { # The result of fetching an entity from Datastore.
   1521         "cursor": "A String", # A cursor that points to the position after the result entity.
   1522             # Set only when the `EntityResult` is part of a `QueryResultBatch` message.
   1523         "version": "A String", # The version of the entity, a strictly positive number that monotonically
   1524             # increases with changes to the entity.
   1525             #
   1526             # This field is set for `FULL` entity
   1527             # results.
   1528             #
   1529             # For missing entities in `LookupResponse`, this
   1530             # is the version of the snapshot that was used to look up the entity, and it
   1531             # is always set except for eventually consistent reads.
   1532         "entity": { # A Datastore data object. # The resulting entity.
   1533             #
   1534             # An entity is limited to 1 megabyte when stored. That _roughly_
   1535             # corresponds to a limit of 1 megabyte for the serialized form of this
   1536             # message.
   1537           "properties": { # The entity's properties.
   1538               # The map's keys are property names.
   1539               # A property name matching regex `__.*__` is reserved.
   1540               # A reserved property name is forbidden in certain documented contexts.
   1541               # The name must not contain more than 500 characters.
   1542               # The name cannot be `""`.
   1543             "a_key": { # A message that can hold any of the supported value types and associated
   1544                 # metadata.
   1545               "entityValue": # Object with schema name: Entity # An entity value.
   1546                   #
   1547                   # - May have no key.
   1548                   # - May have a key with an incomplete key path.
   1549                   # - May have a reserved/read-only key.
   1550               "timestampValue": "A String", # A timestamp value.
   1551                   # When stored in the Datastore, precise only to microseconds;
   1552                   # any additional precision is rounded down.
   1553               "nullValue": "A String", # A null value.
   1554               "excludeFromIndexes": True or False, # If the value should be excluded from all indexes including those defined
   1555                   # explicitly.
   1556               "doubleValue": 3.14, # A double value.
   1557               "meaning": 42, # The `meaning` field should only be populated for backwards compatibility.
   1558               "keyValue": { # A unique identifier for an entity. # A key value.
   1559                   # If a key's partition ID or any of its path kinds or names are
   1560                   # reserved/read-only, the key is reserved/read-only.
   1561                   # A reserved/read-only key is forbidden in certain documented contexts.
   1562                 "path": [ # The entity path.
   1563                     # An entity path consists of one or more elements composed of a kind and a
   1564                     # string or numerical identifier, which identify entities. The first
   1565                     # element identifies a _root entity_, the second element identifies
   1566                     # a _child_ of the root entity, the third element identifies a child of the
   1567                     # second entity, and so forth. The entities identified by all prefixes of
   1568                     # the path are called the element's _ancestors_.
   1569                     #
   1570                     # An entity path is always fully complete: *all* of the entity's ancestors
   1571                     # are required to be in the path along with the entity identifier itself.
   1572                     # The only exception is that in some documented cases, the identifier in the
   1573                     # last path element (for the entity) itself may be omitted. For example,
   1574                     # the last path element of the key of `Mutation.insert` may have no
   1575                     # identifier.
   1576                     #
   1577                     # A path can never be empty, and a path can have at most 100 elements.
   1578                   { # A (kind, ID/name) pair used to construct a key path.
   1579                       #
   1580                       # If either name or ID is set, the element is complete.
   1581                       # If neither is set, the element is incomplete.
   1582                     "kind": "A String", # The kind of the entity.
   1583                         # A kind matching regex `__.*__` is reserved/read-only.
   1584                         # A kind must not contain more than 1500 bytes when UTF-8 encoded.
   1585                         # Cannot be `""`.
   1586                     "id": "A String", # The auto-allocated ID of the entity.
   1587                         # Never equal to zero. Values less than zero are discouraged and may not
   1588                         # be supported in the future.
   1589                     "name": "A String", # The name of the entity.
   1590                         # A name matching regex `__.*__` is reserved/read-only.
   1591                         # A name must not be more than 1500 bytes when UTF-8 encoded.
   1592                         # Cannot be `""`.
   1593                   },
   1594                 ],
   1595                 "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project
   1596                     # ID and namespace ID.
   1597                     # Queries are scoped to a single partition.
   1598                     # by project and namespace, however the namespace ID may be empty.
   1599                     #
   1600                     # A partition ID contains several dimensions:
   1601                     # project ID and namespace ID.
   1602                     #
   1603                     # Partition dimensions:
   1604                     #
   1605                     # - May be `""`.
   1606                     # - Must be valid UTF-8 bytes.
   1607                     # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
   1608                     # If the value of any dimension matches regex `__.*__`, the partition is
   1609                     # reserved/read-only.
   1610                     # A reserved/read-only partition ID is forbidden in certain documented
   1611                     # contexts.
   1612                     #
   1613                     # Foreign partition IDs (in which the project ID does
   1614                     # not match the context project ID ) are discouraged.
   1615                     # Reads and writes of foreign partition IDs may fail if the project is not in an active state.
   1616                   "projectId": "A String", # The ID of the project to which the entities belong.
   1617                   "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong.
   1618                 },
   1619               },
   1620               "stringValue": "A String", # A UTF-8 encoded string value.
   1621                   # When `exclude_from_indexes` is false (it is indexed) , may have at most 1500 bytes.
   1622                   # Otherwise, may be set to at least 1,000,000 bytes.
   1623               "blobValue": "A String", # A blob value.
   1624                   # May have at most 1,000,000 bytes.
   1625                   # When `exclude_from_indexes` is false, may have at most 1500 bytes.
   1626                   # In JSON requests, must be base64-encoded.
   1627               "booleanValue": True or False, # A boolean value.
   1628               "arrayValue": { # An array value. # An array value.
   1629                   # Cannot contain another array value.
   1630                   # A `Value` instance that sets field `array_value` must not set fields
   1631                   # `meaning` or `exclude_from_indexes`.
   1632                 "values": [ # Values in the array.
   1633                     # The order of this array may not be preserved if it contains a mix of
   1634                     # indexed and unindexed values.
   1635                   # Object with schema name: Value
   1636                 ],
   1637               },
   1638               "integerValue": "A String", # An integer value.
   1639               "geoPointValue": { # An object representing a latitude/longitude pair. This is expressed as a pair # A geo point value representing a point on the surface of Earth.
   1640                   # of doubles representing degrees latitude and degrees longitude. Unless
   1641                   # specified otherwise, this must conform to the
   1642                   # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
   1643                   # standard</a>. Values must be within normalized ranges.
   1644                   #
   1645                   # Example of normalization code in Python:
   1646                   #
   1647                   #     def NormalizeLongitude(longitude):
   1648                   #       """Wraps decimal degrees longitude to [-180.0, 180.0]."""
   1649                   #       q, r = divmod(longitude, 360.0)
   1650                   #       if r > 180.0 or (r == 180.0 and q <= -1.0):
   1651                   #         return r - 360.0
   1652                   #       return r
   1653                   #
   1654                   #     def NormalizeLatLng(latitude, longitude):
   1655                   #       """Wraps decimal degrees latitude and longitude to
   1656                   #       [-90.0, 90.0] and [-180.0, 180.0], respectively."""
   1657                   #       r = latitude % 360.0
   1658                   #       if r <= 90.0:
   1659                   #         return r, NormalizeLongitude(longitude)
   1660                   #       elif r >= 270.0:
   1661                   #         return r - 360, NormalizeLongitude(longitude)
   1662                   #       else:
   1663                   #         return 180 - r, NormalizeLongitude(longitude + 180.0)
   1664                   #
   1665                   #     assert 180.0 == NormalizeLongitude(180.0)
   1666                   #     assert -180.0 == NormalizeLongitude(-180.0)
   1667                   #     assert -179.0 == NormalizeLongitude(181.0)
   1668                   #     assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)
   1669                   #     assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)
   1670                   #     assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)
   1671                   #     assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)
   1672                   #     assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)
   1673                   #     assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)
   1674                   #     assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)
   1675                   #     assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)
   1676                   #     assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)
   1677                   #     assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)
   1678                 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
   1679                 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
   1680               },
   1681             },
   1682           },
   1683           "key": { # A unique identifier for an entity. # The entity's key.
   1684               #
   1685               # An entity must have a key, unless otherwise documented (for example,
   1686               # an entity in `Value.entity_value` may have no key).
   1687               # An entity's kind is its key path's last element's kind,
   1688               # or null if it has no key.
   1689               # If a key's partition ID or any of its path kinds or names are
   1690               # reserved/read-only, the key is reserved/read-only.
   1691               # A reserved/read-only key is forbidden in certain documented contexts.
   1692             "path": [ # The entity path.
   1693                 # An entity path consists of one or more elements composed of a kind and a
   1694                 # string or numerical identifier, which identify entities. The first
   1695                 # element identifies a _root entity_, the second element identifies
   1696                 # a _child_ of the root entity, the third element identifies a child of the
   1697                 # second entity, and so forth. The entities identified by all prefixes of
   1698                 # the path are called the element's _ancestors_.
   1699                 #
   1700                 # An entity path is always fully complete: *all* of the entity's ancestors
   1701                 # are required to be in the path along with the entity identifier itself.
   1702                 # The only exception is that in some documented cases, the identifier in the
   1703                 # last path element (for the entity) itself may be omitted. For example,
   1704                 # the last path element of the key of `Mutation.insert` may have no
   1705                 # identifier.
   1706                 #
   1707                 # A path can never be empty, and a path can have at most 100 elements.
   1708               { # A (kind, ID/name) pair used to construct a key path.
   1709                   #
   1710                   # If either name or ID is set, the element is complete.
   1711                   # If neither is set, the element is incomplete.
   1712                 "kind": "A String", # The kind of the entity.
   1713                     # A kind matching regex `__.*__` is reserved/read-only.
   1714                     # A kind must not contain more than 1500 bytes when UTF-8 encoded.
   1715                     # Cannot be `""`.
   1716                 "id": "A String", # The auto-allocated ID of the entity.
   1717                     # Never equal to zero. Values less than zero are discouraged and may not
   1718                     # be supported in the future.
   1719                 "name": "A String", # The name of the entity.
   1720                     # A name matching regex `__.*__` is reserved/read-only.
   1721                     # A name must not be more than 1500 bytes when UTF-8 encoded.
   1722                     # Cannot be `""`.
   1723               },
   1724             ],
   1725             "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project
   1726                 # ID and namespace ID.
   1727                 # Queries are scoped to a single partition.
   1728                 # by project and namespace, however the namespace ID may be empty.
   1729                 #
   1730                 # A partition ID contains several dimensions:
   1731                 # project ID and namespace ID.
   1732                 #
   1733                 # Partition dimensions:
   1734                 #
   1735                 # - May be `""`.
   1736                 # - Must be valid UTF-8 bytes.
   1737                 # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
   1738                 # If the value of any dimension matches regex `__.*__`, the partition is
   1739                 # reserved/read-only.
   1740                 # A reserved/read-only partition ID is forbidden in certain documented
   1741                 # contexts.
   1742                 #
   1743                 # Foreign partition IDs (in which the project ID does
   1744                 # not match the context project ID ) are discouraged.
   1745                 # Reads and writes of foreign partition IDs may fail if the project is not in an active state.
   1746               "projectId": "A String", # The ID of the project to which the entities belong.
   1747               "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong.
   1748             },
   1749           },
   1750         },
   1751       },
   1752     ],
   1753   }</pre>
   1754 </div>
   1755 
   1756 <div class="method">
   1757     <code class="details" id="rollback">rollback(projectId, body, x__xgafv=None)</code>
   1758   <pre>Rolls back a transaction.
   1759 
   1760 Args:
   1761   projectId: string, The ID of the project against which to make the request. (required)
   1762   body: object, The request body. (required)
   1763     The object takes the form of:
   1764 
   1765 { # The request for Datastore.Rollback.
   1766     "transaction": "A String", # The transaction identifier, returned by a call to
   1767         # Datastore.BeginTransaction.
   1768   }
   1769 
   1770   x__xgafv: string, V1 error format.
   1771     Allowed values
   1772       1 - v1 error format
   1773       2 - v2 error format
   1774 
   1775 Returns:
   1776   An object of the form:
   1777 
   1778     { # The response for Datastore.Rollback.
   1779       # (an empty message).
   1780   }</pre>
   1781 </div>
   1782 
   1783 <div class="method">
   1784     <code class="details" id="runQuery">runQuery(projectId, body, x__xgafv=None)</code>
   1785   <pre>Queries for entities.
   1786 
   1787 Args:
   1788   projectId: string, The ID of the project against which to make the request. (required)
   1789   body: object, The request body. (required)
   1790     The object takes the form of:
   1791 
   1792 { # The request for Datastore.RunQuery.
   1793     "query": { # A query for entities. # The query to run.
   1794       "startCursor": "A String", # A starting point for the query results. Query cursors are
   1795           # returned in query result batches and
   1796           # [can only be used to continue the same query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets).
   1797       "kind": [ # The kinds to query (if empty, returns entities of all kinds).
   1798           # Currently at most 1 kind may be specified.
   1799         { # A representation of a kind.
   1800           "name": "A String", # The name of the kind.
   1801         },
   1802       ],
   1803       "projection": [ # The projection to return. Defaults to returning all properties.
   1804         { # A representation of a property in a projection.
   1805           "property": { # A reference to a property relative to the kind expressions. # The property to project.
   1806             "name": "A String", # The name of the property.
   1807                 # If name includes "."s, it may be interpreted as a property name path.
   1808           },
   1809         },
   1810       ],
   1811       "distinctOn": [ # The properties to make distinct. The query results will contain the first
   1812           # result for each distinct combination of values for the given properties
   1813           # (if empty, all results are returned).
   1814         { # A reference to a property relative to the kind expressions.
   1815           "name": "A String", # The name of the property.
   1816               # If name includes "."s, it may be interpreted as a property name path.
   1817         },
   1818       ],
   1819       "filter": { # A holder for any type of filter. # The filter to apply.
   1820         "compositeFilter": { # A filter that merges multiple other filters using the given operator. # A composite filter.
   1821           "filters": [ # The list of filters to combine.
   1822               # Must contain at least one filter.
   1823             # Object with schema name: Filter
   1824           ],
   1825           "op": "A String", # The operator for combining multiple filters.
   1826         },
   1827         "propertyFilter": { # A filter on a specific property. # A filter on a property.
   1828           "property": { # A reference to a property relative to the kind expressions. # The property to filter by.
   1829             "name": "A String", # The name of the property.
   1830                 # If name includes "."s, it may be interpreted as a property name path.
   1831           },
   1832           "value": { # A message that can hold any of the supported value types and associated # The value to compare the property to.
   1833               # metadata.
   1834             "entityValue": # Object with schema name: Entity # An entity value.
   1835                 #
   1836                 # - May have no key.
   1837                 # - May have a key with an incomplete key path.
   1838                 # - May have a reserved/read-only key.
   1839             "timestampValue": "A String", # A timestamp value.
   1840                 # When stored in the Datastore, precise only to microseconds;
   1841                 # any additional precision is rounded down.
   1842             "nullValue": "A String", # A null value.
   1843             "excludeFromIndexes": True or False, # If the value should be excluded from all indexes including those defined
   1844                 # explicitly.
   1845             "doubleValue": 3.14, # A double value.
   1846             "meaning": 42, # The `meaning` field should only be populated for backwards compatibility.
   1847             "keyValue": { # A unique identifier for an entity. # A key value.
   1848                 # If a key's partition ID or any of its path kinds or names are
   1849                 # reserved/read-only, the key is reserved/read-only.
   1850                 # A reserved/read-only key is forbidden in certain documented contexts.
   1851               "path": [ # The entity path.
   1852                   # An entity path consists of one or more elements composed of a kind and a
   1853                   # string or numerical identifier, which identify entities. The first
   1854                   # element identifies a _root entity_, the second element identifies
   1855                   # a _child_ of the root entity, the third element identifies a child of the
   1856                   # second entity, and so forth. The entities identified by all prefixes of
   1857                   # the path are called the element's _ancestors_.
   1858                   #
   1859                   # An entity path is always fully complete: *all* of the entity's ancestors
   1860                   # are required to be in the path along with the entity identifier itself.
   1861                   # The only exception is that in some documented cases, the identifier in the
   1862                   # last path element (for the entity) itself may be omitted. For example,
   1863                   # the last path element of the key of `Mutation.insert` may have no
   1864                   # identifier.
   1865                   #
   1866                   # A path can never be empty, and a path can have at most 100 elements.
   1867                 { # A (kind, ID/name) pair used to construct a key path.
   1868                     #
   1869                     # If either name or ID is set, the element is complete.
   1870                     # If neither is set, the element is incomplete.
   1871                   "kind": "A String", # The kind of the entity.
   1872                       # A kind matching regex `__.*__` is reserved/read-only.
   1873                       # A kind must not contain more than 1500 bytes when UTF-8 encoded.
   1874                       # Cannot be `""`.
   1875                   "id": "A String", # The auto-allocated ID of the entity.
   1876                       # Never equal to zero. Values less than zero are discouraged and may not
   1877                       # be supported in the future.
   1878                   "name": "A String", # The name of the entity.
   1879                       # A name matching regex `__.*__` is reserved/read-only.
   1880                       # A name must not be more than 1500 bytes when UTF-8 encoded.
   1881                       # Cannot be `""`.
   1882                 },
   1883               ],
   1884               "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project
   1885                   # ID and namespace ID.
   1886                   # Queries are scoped to a single partition.
   1887                   # by project and namespace, however the namespace ID may be empty.
   1888                   #
   1889                   # A partition ID contains several dimensions:
   1890                   # project ID and namespace ID.
   1891                   #
   1892                   # Partition dimensions:
   1893                   #
   1894                   # - May be `""`.
   1895                   # - Must be valid UTF-8 bytes.
   1896                   # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
   1897                   # If the value of any dimension matches regex `__.*__`, the partition is
   1898                   # reserved/read-only.
   1899                   # A reserved/read-only partition ID is forbidden in certain documented
   1900                   # contexts.
   1901                   #
   1902                   # Foreign partition IDs (in which the project ID does
   1903                   # not match the context project ID ) are discouraged.
   1904                   # Reads and writes of foreign partition IDs may fail if the project is not in an active state.
   1905                 "projectId": "A String", # The ID of the project to which the entities belong.
   1906                 "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong.
   1907               },
   1908             },
   1909             "stringValue": "A String", # A UTF-8 encoded string value.
   1910                 # When `exclude_from_indexes` is false (it is indexed) , may have at most 1500 bytes.
   1911                 # Otherwise, may be set to at least 1,000,000 bytes.
   1912             "blobValue": "A String", # A blob value.
   1913                 # May have at most 1,000,000 bytes.
   1914                 # When `exclude_from_indexes` is false, may have at most 1500 bytes.
   1915                 # In JSON requests, must be base64-encoded.
   1916             "booleanValue": True or False, # A boolean value.
   1917             "arrayValue": { # An array value. # An array value.
   1918                 # Cannot contain another array value.
   1919                 # A `Value` instance that sets field `array_value` must not set fields
   1920                 # `meaning` or `exclude_from_indexes`.
   1921               "values": [ # Values in the array.
   1922                   # The order of this array may not be preserved if it contains a mix of
   1923                   # indexed and unindexed values.
   1924                 # Object with schema name: Value
   1925               ],
   1926             },
   1927             "integerValue": "A String", # An integer value.
   1928             "geoPointValue": { # An object representing a latitude/longitude pair. This is expressed as a pair # A geo point value representing a point on the surface of Earth.
   1929                 # of doubles representing degrees latitude and degrees longitude. Unless
   1930                 # specified otherwise, this must conform to the
   1931                 # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
   1932                 # standard</a>. Values must be within normalized ranges.
   1933                 #
   1934                 # Example of normalization code in Python:
   1935                 #
   1936                 #     def NormalizeLongitude(longitude):
   1937                 #       """Wraps decimal degrees longitude to [-180.0, 180.0]."""
   1938                 #       q, r = divmod(longitude, 360.0)
   1939                 #       if r > 180.0 or (r == 180.0 and q <= -1.0):
   1940                 #         return r - 360.0
   1941                 #       return r
   1942                 #
   1943                 #     def NormalizeLatLng(latitude, longitude):
   1944                 #       """Wraps decimal degrees latitude and longitude to
   1945                 #       [-90.0, 90.0] and [-180.0, 180.0], respectively."""
   1946                 #       r = latitude % 360.0
   1947                 #       if r <= 90.0:
   1948                 #         return r, NormalizeLongitude(longitude)
   1949                 #       elif r >= 270.0:
   1950                 #         return r - 360, NormalizeLongitude(longitude)
   1951                 #       else:
   1952                 #         return 180 - r, NormalizeLongitude(longitude + 180.0)
   1953                 #
   1954                 #     assert 180.0 == NormalizeLongitude(180.0)
   1955                 #     assert -180.0 == NormalizeLongitude(-180.0)
   1956                 #     assert -179.0 == NormalizeLongitude(181.0)
   1957                 #     assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)
   1958                 #     assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)
   1959                 #     assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)
   1960                 #     assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)
   1961                 #     assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)
   1962                 #     assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)
   1963                 #     assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)
   1964                 #     assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)
   1965                 #     assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)
   1966                 #     assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)
   1967               "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
   1968               "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
   1969             },
   1970           },
   1971           "op": "A String", # The operator to filter by.
   1972         },
   1973       },
   1974       "limit": 42, # The maximum number of results to return. Applies after all other
   1975           # constraints. Optional.
   1976           # Unspecified is interpreted as no limit.
   1977           # Must be >= 0 if specified.
   1978       "offset": 42, # The number of results to skip. Applies before limit, but after all other
   1979           # constraints. Optional. Must be >= 0 if specified.
   1980       "endCursor": "A String", # An ending point for the query results. Query cursors are
   1981           # returned in query result batches and
   1982           # [can only be used to limit the same query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets).
   1983       "order": [ # The order to apply to the query results (if empty, order is unspecified).
   1984         { # The desired order for a specific property.
   1985           "direction": "A String", # The direction to order by. Defaults to `ASCENDING`.
   1986           "property": { # A reference to a property relative to the kind expressions. # The property to order by.
   1987             "name": "A String", # The name of the property.
   1988                 # If name includes "."s, it may be interpreted as a property name path.
   1989           },
   1990         },
   1991       ],
   1992     },
   1993     "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, identified by a partition ID.
   1994         # Queries are scoped to a single partition.
   1995         # This partition ID is normalized with the standard default context
   1996         # partition ID.
   1997         # by project and namespace, however the namespace ID may be empty.
   1998         #
   1999         # A partition ID contains several dimensions:
   2000         # project ID and namespace ID.
   2001         #
   2002         # Partition dimensions:
   2003         #
   2004         # - May be `""`.
   2005         # - Must be valid UTF-8 bytes.
   2006         # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
   2007         # If the value of any dimension matches regex `__.*__`, the partition is
   2008         # reserved/read-only.
   2009         # A reserved/read-only partition ID is forbidden in certain documented
   2010         # contexts.
   2011         #
   2012         # Foreign partition IDs (in which the project ID does
   2013         # not match the context project ID ) are discouraged.
   2014         # Reads and writes of foreign partition IDs may fail if the project is not in an active state.
   2015       "projectId": "A String", # The ID of the project to which the entities belong.
   2016       "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong.
   2017     },
   2018     "gqlQuery": { # A [GQL query](https://cloud.google.com/datastore/docs/apis/gql/gql_reference). # The GQL query to run.
   2019       "namedBindings": { # For each non-reserved named binding site in the query string, there must be
   2020           # a named parameter with that name, but not necessarily the inverse.
   2021           #
   2022           # Key must match regex `A-Za-z_$*`, must not match regex
   2023           # `__.*__`, and must not be `""`.
   2024         "a_key": { # A binding parameter for a GQL query.
   2025           "cursor": "A String", # A query cursor. Query cursors are returned in query
   2026               # result batches.
   2027           "value": { # A message that can hold any of the supported value types and associated # A value parameter.
   2028               # metadata.
   2029             "entityValue": # Object with schema name: Entity # An entity value.
   2030                 #
   2031                 # - May have no key.
   2032                 # - May have a key with an incomplete key path.
   2033                 # - May have a reserved/read-only key.
   2034             "timestampValue": "A String", # A timestamp value.
   2035                 # When stored in the Datastore, precise only to microseconds;
   2036                 # any additional precision is rounded down.
   2037             "nullValue": "A String", # A null value.
   2038             "excludeFromIndexes": True or False, # If the value should be excluded from all indexes including those defined
   2039                 # explicitly.
   2040             "doubleValue": 3.14, # A double value.
   2041             "meaning": 42, # The `meaning` field should only be populated for backwards compatibility.
   2042             "keyValue": { # A unique identifier for an entity. # A key value.
   2043                 # If a key's partition ID or any of its path kinds or names are
   2044                 # reserved/read-only, the key is reserved/read-only.
   2045                 # A reserved/read-only key is forbidden in certain documented contexts.
   2046               "path": [ # The entity path.
   2047                   # An entity path consists of one or more elements composed of a kind and a
   2048                   # string or numerical identifier, which identify entities. The first
   2049                   # element identifies a _root entity_, the second element identifies
   2050                   # a _child_ of the root entity, the third element identifies a child of the
   2051                   # second entity, and so forth. The entities identified by all prefixes of
   2052                   # the path are called the element's _ancestors_.
   2053                   #
   2054                   # An entity path is always fully complete: *all* of the entity's ancestors
   2055                   # are required to be in the path along with the entity identifier itself.
   2056                   # The only exception is that in some documented cases, the identifier in the
   2057                   # last path element (for the entity) itself may be omitted. For example,
   2058                   # the last path element of the key of `Mutation.insert` may have no
   2059                   # identifier.
   2060                   #
   2061                   # A path can never be empty, and a path can have at most 100 elements.
   2062                 { # A (kind, ID/name) pair used to construct a key path.
   2063                     #
   2064                     # If either name or ID is set, the element is complete.
   2065                     # If neither is set, the element is incomplete.
   2066                   "kind": "A String", # The kind of the entity.
   2067                       # A kind matching regex `__.*__` is reserved/read-only.
   2068                       # A kind must not contain more than 1500 bytes when UTF-8 encoded.
   2069                       # Cannot be `""`.
   2070                   "id": "A String", # The auto-allocated ID of the entity.
   2071                       # Never equal to zero. Values less than zero are discouraged and may not
   2072                       # be supported in the future.
   2073                   "name": "A String", # The name of the entity.
   2074                       # A name matching regex `__.*__` is reserved/read-only.
   2075                       # A name must not be more than 1500 bytes when UTF-8 encoded.
   2076                       # Cannot be `""`.
   2077                 },
   2078               ],
   2079               "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project
   2080                   # ID and namespace ID.
   2081                   # Queries are scoped to a single partition.
   2082                   # by project and namespace, however the namespace ID may be empty.
   2083                   #
   2084                   # A partition ID contains several dimensions:
   2085                   # project ID and namespace ID.
   2086                   #
   2087                   # Partition dimensions:
   2088                   #
   2089                   # - May be `""`.
   2090                   # - Must be valid UTF-8 bytes.
   2091                   # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
   2092                   # If the value of any dimension matches regex `__.*__`, the partition is
   2093                   # reserved/read-only.
   2094                   # A reserved/read-only partition ID is forbidden in certain documented
   2095                   # contexts.
   2096                   #
   2097                   # Foreign partition IDs (in which the project ID does
   2098                   # not match the context project ID ) are discouraged.
   2099                   # Reads and writes of foreign partition IDs may fail if the project is not in an active state.
   2100                 "projectId": "A String", # The ID of the project to which the entities belong.
   2101                 "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong.
   2102               },
   2103             },
   2104             "stringValue": "A String", # A UTF-8 encoded string value.
   2105                 # When `exclude_from_indexes` is false (it is indexed) , may have at most 1500 bytes.
   2106                 # Otherwise, may be set to at least 1,000,000 bytes.
   2107             "blobValue": "A String", # A blob value.
   2108                 # May have at most 1,000,000 bytes.
   2109                 # When `exclude_from_indexes` is false, may have at most 1500 bytes.
   2110                 # In JSON requests, must be base64-encoded.
   2111             "booleanValue": True or False, # A boolean value.
   2112             "arrayValue": { # An array value. # An array value.
   2113                 # Cannot contain another array value.
   2114                 # A `Value` instance that sets field `array_value` must not set fields
   2115                 # `meaning` or `exclude_from_indexes`.
   2116               "values": [ # Values in the array.
   2117                   # The order of this array may not be preserved if it contains a mix of
   2118                   # indexed and unindexed values.
   2119                 # Object with schema name: Value
   2120               ],
   2121             },
   2122             "integerValue": "A String", # An integer value.
   2123             "geoPointValue": { # An object representing a latitude/longitude pair. This is expressed as a pair # A geo point value representing a point on the surface of Earth.
   2124                 # of doubles representing degrees latitude and degrees longitude. Unless
   2125                 # specified otherwise, this must conform to the
   2126                 # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
   2127                 # standard</a>. Values must be within normalized ranges.
   2128                 #
   2129                 # Example of normalization code in Python:
   2130                 #
   2131                 #     def NormalizeLongitude(longitude):
   2132                 #       """Wraps decimal degrees longitude to [-180.0, 180.0]."""
   2133                 #       q, r = divmod(longitude, 360.0)
   2134                 #       if r > 180.0 or (r == 180.0 and q <= -1.0):
   2135                 #         return r - 360.0
   2136                 #       return r
   2137                 #
   2138                 #     def NormalizeLatLng(latitude, longitude):
   2139                 #       """Wraps decimal degrees latitude and longitude to
   2140                 #       [-90.0, 90.0] and [-180.0, 180.0], respectively."""
   2141                 #       r = latitude % 360.0
   2142                 #       if r <= 90.0:
   2143                 #         return r, NormalizeLongitude(longitude)
   2144                 #       elif r >= 270.0:
   2145                 #         return r - 360, NormalizeLongitude(longitude)
   2146                 #       else:
   2147                 #         return 180 - r, NormalizeLongitude(longitude + 180.0)
   2148                 #
   2149                 #     assert 180.0 == NormalizeLongitude(180.0)
   2150                 #     assert -180.0 == NormalizeLongitude(-180.0)
   2151                 #     assert -179.0 == NormalizeLongitude(181.0)
   2152                 #     assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)
   2153                 #     assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)
   2154                 #     assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)
   2155                 #     assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)
   2156                 #     assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)
   2157                 #     assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)
   2158                 #     assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)
   2159                 #     assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)
   2160                 #     assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)
   2161                 #     assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)
   2162               "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
   2163               "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
   2164             },
   2165           },
   2166         },
   2167       },
   2168       "positionalBindings": [ # Numbered binding site @1 references the first numbered parameter,
   2169           # effectively using 1-based indexing, rather than the usual 0.
   2170           #
   2171           # For each binding site numbered i in `query_string`, there must be an i-th
   2172           # numbered parameter. The inverse must also be true.
   2173         { # A binding parameter for a GQL query.
   2174           "cursor": "A String", # A query cursor. Query cursors are returned in query
   2175               # result batches.
   2176           "value": { # A message that can hold any of the supported value types and associated # A value parameter.
   2177               # metadata.
   2178             "entityValue": # Object with schema name: Entity # An entity value.
   2179                 #
   2180                 # - May have no key.
   2181                 # - May have a key with an incomplete key path.
   2182                 # - May have a reserved/read-only key.
   2183             "timestampValue": "A String", # A timestamp value.
   2184                 # When stored in the Datastore, precise only to microseconds;
   2185                 # any additional precision is rounded down.
   2186             "nullValue": "A String", # A null value.
   2187             "excludeFromIndexes": True or False, # If the value should be excluded from all indexes including those defined
   2188                 # explicitly.
   2189             "doubleValue": 3.14, # A double value.
   2190             "meaning": 42, # The `meaning` field should only be populated for backwards compatibility.
   2191             "keyValue": { # A unique identifier for an entity. # A key value.
   2192                 # If a key's partition ID or any of its path kinds or names are
   2193                 # reserved/read-only, the key is reserved/read-only.
   2194                 # A reserved/read-only key is forbidden in certain documented contexts.
   2195               "path": [ # The entity path.
   2196                   # An entity path consists of one or more elements composed of a kind and a
   2197                   # string or numerical identifier, which identify entities. The first
   2198                   # element identifies a _root entity_, the second element identifies
   2199                   # a _child_ of the root entity, the third element identifies a child of the
   2200                   # second entity, and so forth. The entities identified by all prefixes of
   2201                   # the path are called the element's _ancestors_.
   2202                   #
   2203                   # An entity path is always fully complete: *all* of the entity's ancestors
   2204                   # are required to be in the path along with the entity identifier itself.
   2205                   # The only exception is that in some documented cases, the identifier in the
   2206                   # last path element (for the entity) itself may be omitted. For example,
   2207                   # the last path element of the key of `Mutation.insert` may have no
   2208                   # identifier.
   2209                   #
   2210                   # A path can never be empty, and a path can have at most 100 elements.
   2211                 { # A (kind, ID/name) pair used to construct a key path.
   2212                     #
   2213                     # If either name or ID is set, the element is complete.
   2214                     # If neither is set, the element is incomplete.
   2215                   "kind": "A String", # The kind of the entity.
   2216                       # A kind matching regex `__.*__` is reserved/read-only.
   2217                       # A kind must not contain more than 1500 bytes when UTF-8 encoded.
   2218                       # Cannot be `""`.
   2219                   "id": "A String", # The auto-allocated ID of the entity.
   2220                       # Never equal to zero. Values less than zero are discouraged and may not
   2221                       # be supported in the future.
   2222                   "name": "A String", # The name of the entity.
   2223                       # A name matching regex `__.*__` is reserved/read-only.
   2224                       # A name must not be more than 1500 bytes when UTF-8 encoded.
   2225                       # Cannot be `""`.
   2226                 },
   2227               ],
   2228               "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project
   2229                   # ID and namespace ID.
   2230                   # Queries are scoped to a single partition.
   2231                   # by project and namespace, however the namespace ID may be empty.
   2232                   #
   2233                   # A partition ID contains several dimensions:
   2234                   # project ID and namespace ID.
   2235                   #
   2236                   # Partition dimensions:
   2237                   #
   2238                   # - May be `""`.
   2239                   # - Must be valid UTF-8 bytes.
   2240                   # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
   2241                   # If the value of any dimension matches regex `__.*__`, the partition is
   2242                   # reserved/read-only.
   2243                   # A reserved/read-only partition ID is forbidden in certain documented
   2244                   # contexts.
   2245                   #
   2246                   # Foreign partition IDs (in which the project ID does
   2247                   # not match the context project ID ) are discouraged.
   2248                   # Reads and writes of foreign partition IDs may fail if the project is not in an active state.
   2249                 "projectId": "A String", # The ID of the project to which the entities belong.
   2250                 "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong.
   2251               },
   2252             },
   2253             "stringValue": "A String", # A UTF-8 encoded string value.
   2254                 # When `exclude_from_indexes` is false (it is indexed) , may have at most 1500 bytes.
   2255                 # Otherwise, may be set to at least 1,000,000 bytes.
   2256             "blobValue": "A String", # A blob value.
   2257                 # May have at most 1,000,000 bytes.
   2258                 # When `exclude_from_indexes` is false, may have at most 1500 bytes.
   2259                 # In JSON requests, must be base64-encoded.
   2260             "booleanValue": True or False, # A boolean value.
   2261             "arrayValue": { # An array value. # An array value.
   2262                 # Cannot contain another array value.
   2263                 # A `Value` instance that sets field `array_value` must not set fields
   2264                 # `meaning` or `exclude_from_indexes`.
   2265               "values": [ # Values in the array.
   2266                   # The order of this array may not be preserved if it contains a mix of
   2267                   # indexed and unindexed values.
   2268                 # Object with schema name: Value
   2269               ],
   2270             },
   2271             "integerValue": "A String", # An integer value.
   2272             "geoPointValue": { # An object representing a latitude/longitude pair. This is expressed as a pair # A geo point value representing a point on the surface of Earth.
   2273                 # of doubles representing degrees latitude and degrees longitude. Unless
   2274                 # specified otherwise, this must conform to the
   2275                 # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
   2276                 # standard</a>. Values must be within normalized ranges.
   2277                 #
   2278                 # Example of normalization code in Python:
   2279                 #
   2280                 #     def NormalizeLongitude(longitude):
   2281                 #       """Wraps decimal degrees longitude to [-180.0, 180.0]."""
   2282                 #       q, r = divmod(longitude, 360.0)
   2283                 #       if r > 180.0 or (r == 180.0 and q <= -1.0):
   2284                 #         return r - 360.0
   2285                 #       return r
   2286                 #
   2287                 #     def NormalizeLatLng(latitude, longitude):
   2288                 #       """Wraps decimal degrees latitude and longitude to
   2289                 #       [-90.0, 90.0] and [-180.0, 180.0], respectively."""
   2290                 #       r = latitude % 360.0
   2291                 #       if r <= 90.0:
   2292                 #         return r, NormalizeLongitude(longitude)
   2293                 #       elif r >= 270.0:
   2294                 #         return r - 360, NormalizeLongitude(longitude)
   2295                 #       else:
   2296                 #         return 180 - r, NormalizeLongitude(longitude + 180.0)
   2297                 #
   2298                 #     assert 180.0 == NormalizeLongitude(180.0)
   2299                 #     assert -180.0 == NormalizeLongitude(-180.0)
   2300                 #     assert -179.0 == NormalizeLongitude(181.0)
   2301                 #     assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)
   2302                 #     assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)
   2303                 #     assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)
   2304                 #     assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)
   2305                 #     assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)
   2306                 #     assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)
   2307                 #     assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)
   2308                 #     assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)
   2309                 #     assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)
   2310                 #     assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)
   2311               "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
   2312               "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
   2313             },
   2314           },
   2315         },
   2316       ],
   2317       "queryString": "A String", # A string of the format described
   2318           # [here](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).
   2319       "allowLiterals": True or False, # When false, the query string must not contain any literals and instead must
   2320           # bind all values. For example,
   2321           # `SELECT * FROM Kind WHERE a = 'string literal'` is not allowed, while
   2322           # `SELECT * FROM Kind WHERE a = @value` is.
   2323     },
   2324     "readOptions": { # The options shared by read requests. # The options for this query.
   2325       "transaction": "A String", # The identifier of the transaction in which to read. A
   2326           # transaction identifier is returned by a call to
   2327           # Datastore.BeginTransaction.
   2328       "readConsistency": "A String", # The non-transactional read consistency to use.
   2329           # Cannot be set to `STRONG` for global queries.
   2330     },
   2331   }
   2332 
   2333   x__xgafv: string, V1 error format.
   2334     Allowed values
   2335       1 - v1 error format
   2336       2 - v2 error format
   2337 
   2338 Returns:
   2339   An object of the form:
   2340 
   2341     { # The response for Datastore.RunQuery.
   2342     "query": { # A query for entities. # The parsed form of the `GqlQuery` from the request, if it was set.
   2343       "startCursor": "A String", # A starting point for the query results. Query cursors are
   2344           # returned in query result batches and
   2345           # [can only be used to continue the same query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets).
   2346       "kind": [ # The kinds to query (if empty, returns entities of all kinds).
   2347           # Currently at most 1 kind may be specified.
   2348         { # A representation of a kind.
   2349           "name": "A String", # The name of the kind.
   2350         },
   2351       ],
   2352       "projection": [ # The projection to return. Defaults to returning all properties.
   2353         { # A representation of a property in a projection.
   2354           "property": { # A reference to a property relative to the kind expressions. # The property to project.
   2355             "name": "A String", # The name of the property.
   2356                 # If name includes "."s, it may be interpreted as a property name path.
   2357           },
   2358         },
   2359       ],
   2360       "distinctOn": [ # The properties to make distinct. The query results will contain the first
   2361           # result for each distinct combination of values for the given properties
   2362           # (if empty, all results are returned).
   2363         { # A reference to a property relative to the kind expressions.
   2364           "name": "A String", # The name of the property.
   2365               # If name includes "."s, it may be interpreted as a property name path.
   2366         },
   2367       ],
   2368       "filter": { # A holder for any type of filter. # The filter to apply.
   2369         "compositeFilter": { # A filter that merges multiple other filters using the given operator. # A composite filter.
   2370           "filters": [ # The list of filters to combine.
   2371               # Must contain at least one filter.
   2372             # Object with schema name: Filter
   2373           ],
   2374           "op": "A String", # The operator for combining multiple filters.
   2375         },
   2376         "propertyFilter": { # A filter on a specific property. # A filter on a property.
   2377           "property": { # A reference to a property relative to the kind expressions. # The property to filter by.
   2378             "name": "A String", # The name of the property.
   2379                 # If name includes "."s, it may be interpreted as a property name path.
   2380           },
   2381           "value": { # A message that can hold any of the supported value types and associated # The value to compare the property to.
   2382               # metadata.
   2383             "entityValue": # Object with schema name: Entity # An entity value.
   2384                 #
   2385                 # - May have no key.
   2386                 # - May have a key with an incomplete key path.
   2387                 # - May have a reserved/read-only key.
   2388             "timestampValue": "A String", # A timestamp value.
   2389                 # When stored in the Datastore, precise only to microseconds;
   2390                 # any additional precision is rounded down.
   2391             "nullValue": "A String", # A null value.
   2392             "excludeFromIndexes": True or False, # If the value should be excluded from all indexes including those defined
   2393                 # explicitly.
   2394             "doubleValue": 3.14, # A double value.
   2395             "meaning": 42, # The `meaning` field should only be populated for backwards compatibility.
   2396             "keyValue": { # A unique identifier for an entity. # A key value.
   2397                 # If a key's partition ID or any of its path kinds or names are
   2398                 # reserved/read-only, the key is reserved/read-only.
   2399                 # A reserved/read-only key is forbidden in certain documented contexts.
   2400               "path": [ # The entity path.
   2401                   # An entity path consists of one or more elements composed of a kind and a
   2402                   # string or numerical identifier, which identify entities. The first
   2403                   # element identifies a _root entity_, the second element identifies
   2404                   # a _child_ of the root entity, the third element identifies a child of the
   2405                   # second entity, and so forth. The entities identified by all prefixes of
   2406                   # the path are called the element's _ancestors_.
   2407                   #
   2408                   # An entity path is always fully complete: *all* of the entity's ancestors
   2409                   # are required to be in the path along with the entity identifier itself.
   2410                   # The only exception is that in some documented cases, the identifier in the
   2411                   # last path element (for the entity) itself may be omitted. For example,
   2412                   # the last path element of the key of `Mutation.insert` may have no
   2413                   # identifier.
   2414                   #
   2415                   # A path can never be empty, and a path can have at most 100 elements.
   2416                 { # A (kind, ID/name) pair used to construct a key path.
   2417                     #
   2418                     # If either name or ID is set, the element is complete.
   2419                     # If neither is set, the element is incomplete.
   2420                   "kind": "A String", # The kind of the entity.
   2421                       # A kind matching regex `__.*__` is reserved/read-only.
   2422                       # A kind must not contain more than 1500 bytes when UTF-8 encoded.
   2423                       # Cannot be `""`.
   2424                   "id": "A String", # The auto-allocated ID of the entity.
   2425                       # Never equal to zero. Values less than zero are discouraged and may not
   2426                       # be supported in the future.
   2427                   "name": "A String", # The name of the entity.
   2428                       # A name matching regex `__.*__` is reserved/read-only.
   2429                       # A name must not be more than 1500 bytes when UTF-8 encoded.
   2430                       # Cannot be `""`.
   2431                 },
   2432               ],
   2433               "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project
   2434                   # ID and namespace ID.
   2435                   # Queries are scoped to a single partition.
   2436                   # by project and namespace, however the namespace ID may be empty.
   2437                   #
   2438                   # A partition ID contains several dimensions:
   2439                   # project ID and namespace ID.
   2440                   #
   2441                   # Partition dimensions:
   2442                   #
   2443                   # - May be `""`.
   2444                   # - Must be valid UTF-8 bytes.
   2445                   # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
   2446                   # If the value of any dimension matches regex `__.*__`, the partition is
   2447                   # reserved/read-only.
   2448                   # A reserved/read-only partition ID is forbidden in certain documented
   2449                   # contexts.
   2450                   #
   2451                   # Foreign partition IDs (in which the project ID does
   2452                   # not match the context project ID ) are discouraged.
   2453                   # Reads and writes of foreign partition IDs may fail if the project is not in an active state.
   2454                 "projectId": "A String", # The ID of the project to which the entities belong.
   2455                 "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong.
   2456               },
   2457             },
   2458             "stringValue": "A String", # A UTF-8 encoded string value.
   2459                 # When `exclude_from_indexes` is false (it is indexed) , may have at most 1500 bytes.
   2460                 # Otherwise, may be set to at least 1,000,000 bytes.
   2461             "blobValue": "A String", # A blob value.
   2462                 # May have at most 1,000,000 bytes.
   2463                 # When `exclude_from_indexes` is false, may have at most 1500 bytes.
   2464                 # In JSON requests, must be base64-encoded.
   2465             "booleanValue": True or False, # A boolean value.
   2466             "arrayValue": { # An array value. # An array value.
   2467                 # Cannot contain another array value.
   2468                 # A `Value` instance that sets field `array_value` must not set fields
   2469                 # `meaning` or `exclude_from_indexes`.
   2470               "values": [ # Values in the array.
   2471                   # The order of this array may not be preserved if it contains a mix of
   2472                   # indexed and unindexed values.
   2473                 # Object with schema name: Value
   2474               ],
   2475             },
   2476             "integerValue": "A String", # An integer value.
   2477             "geoPointValue": { # An object representing a latitude/longitude pair. This is expressed as a pair # A geo point value representing a point on the surface of Earth.
   2478                 # of doubles representing degrees latitude and degrees longitude. Unless
   2479                 # specified otherwise, this must conform to the
   2480                 # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
   2481                 # standard</a>. Values must be within normalized ranges.
   2482                 #
   2483                 # Example of normalization code in Python:
   2484                 #
   2485                 #     def NormalizeLongitude(longitude):
   2486                 #       """Wraps decimal degrees longitude to [-180.0, 180.0]."""
   2487                 #       q, r = divmod(longitude, 360.0)
   2488                 #       if r > 180.0 or (r == 180.0 and q <= -1.0):
   2489                 #         return r - 360.0
   2490                 #       return r
   2491                 #
   2492                 #     def NormalizeLatLng(latitude, longitude):
   2493                 #       """Wraps decimal degrees latitude and longitude to
   2494                 #       [-90.0, 90.0] and [-180.0, 180.0], respectively."""
   2495                 #       r = latitude % 360.0
   2496                 #       if r <= 90.0:
   2497                 #         return r, NormalizeLongitude(longitude)
   2498                 #       elif r >= 270.0:
   2499                 #         return r - 360, NormalizeLongitude(longitude)
   2500                 #       else:
   2501                 #         return 180 - r, NormalizeLongitude(longitude + 180.0)
   2502                 #
   2503                 #     assert 180.0 == NormalizeLongitude(180.0)
   2504                 #     assert -180.0 == NormalizeLongitude(-180.0)
   2505                 #     assert -179.0 == NormalizeLongitude(181.0)
   2506                 #     assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)
   2507                 #     assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)
   2508                 #     assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)
   2509                 #     assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)
   2510                 #     assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)
   2511                 #     assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)
   2512                 #     assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)
   2513                 #     assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)
   2514                 #     assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)
   2515                 #     assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)
   2516               "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
   2517               "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
   2518             },
   2519           },
   2520           "op": "A String", # The operator to filter by.
   2521         },
   2522       },
   2523       "limit": 42, # The maximum number of results to return. Applies after all other
   2524           # constraints. Optional.
   2525           # Unspecified is interpreted as no limit.
   2526           # Must be >= 0 if specified.
   2527       "offset": 42, # The number of results to skip. Applies before limit, but after all other
   2528           # constraints. Optional. Must be >= 0 if specified.
   2529       "endCursor": "A String", # An ending point for the query results. Query cursors are
   2530           # returned in query result batches and
   2531           # [can only be used to limit the same query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets).
   2532       "order": [ # The order to apply to the query results (if empty, order is unspecified).
   2533         { # The desired order for a specific property.
   2534           "direction": "A String", # The direction to order by. Defaults to `ASCENDING`.
   2535           "property": { # A reference to a property relative to the kind expressions. # The property to order by.
   2536             "name": "A String", # The name of the property.
   2537                 # If name includes "."s, it may be interpreted as a property name path.
   2538           },
   2539         },
   2540       ],
   2541     },
   2542     "batch": { # A batch of results produced by a query. # A batch of query results (always present).
   2543       "entityResultType": "A String", # The result type for every entity in `entity_results`.
   2544       "snapshotVersion": "A String", # The version number of the snapshot this batch was returned from.
   2545           # This applies to the range of results from the query's `start_cursor` (or
   2546           # the beginning of the query if no cursor was given) to this batch's
   2547           # `end_cursor` (not the query's `end_cursor`).
   2548           #
   2549           # In a single transaction, subsequent query result batches for the same query
   2550           # can have a greater snapshot version number. Each batch's snapshot version
   2551           # is valid for all preceding batches.
   2552           # The value will be zero for eventually consistent queries.
   2553       "skippedResults": 42, # The number of results skipped, typically because of an offset.
   2554       "entityResults": [ # The results for this batch.
   2555         { # The result of fetching an entity from Datastore.
   2556           "cursor": "A String", # A cursor that points to the position after the result entity.
   2557               # Set only when the `EntityResult` is part of a `QueryResultBatch` message.
   2558           "version": "A String", # The version of the entity, a strictly positive number that monotonically
   2559               # increases with changes to the entity.
   2560               #
   2561               # This field is set for `FULL` entity
   2562               # results.
   2563               #
   2564               # For missing entities in `LookupResponse`, this
   2565               # is the version of the snapshot that was used to look up the entity, and it
   2566               # is always set except for eventually consistent reads.
   2567           "entity": { # A Datastore data object. # The resulting entity.
   2568               #
   2569               # An entity is limited to 1 megabyte when stored. That _roughly_
   2570               # corresponds to a limit of 1 megabyte for the serialized form of this
   2571               # message.
   2572             "properties": { # The entity's properties.
   2573                 # The map's keys are property names.
   2574                 # A property name matching regex `__.*__` is reserved.
   2575                 # A reserved property name is forbidden in certain documented contexts.
   2576                 # The name must not contain more than 500 characters.
   2577                 # The name cannot be `""`.
   2578               "a_key": { # A message that can hold any of the supported value types and associated
   2579                   # metadata.
   2580                 "entityValue": # Object with schema name: Entity # An entity value.
   2581                     #
   2582                     # - May have no key.
   2583                     # - May have a key with an incomplete key path.
   2584                     # - May have a reserved/read-only key.
   2585                 "timestampValue": "A String", # A timestamp value.
   2586                     # When stored in the Datastore, precise only to microseconds;
   2587                     # any additional precision is rounded down.
   2588                 "nullValue": "A String", # A null value.
   2589                 "excludeFromIndexes": True or False, # If the value should be excluded from all indexes including those defined
   2590                     # explicitly.
   2591                 "doubleValue": 3.14, # A double value.
   2592                 "meaning": 42, # The `meaning` field should only be populated for backwards compatibility.
   2593                 "keyValue": { # A unique identifier for an entity. # A key value.
   2594                     # If a key's partition ID or any of its path kinds or names are
   2595                     # reserved/read-only, the key is reserved/read-only.
   2596                     # A reserved/read-only key is forbidden in certain documented contexts.
   2597                   "path": [ # The entity path.
   2598                       # An entity path consists of one or more elements composed of a kind and a
   2599                       # string or numerical identifier, which identify entities. The first
   2600                       # element identifies a _root entity_, the second element identifies
   2601                       # a _child_ of the root entity, the third element identifies a child of the
   2602                       # second entity, and so forth. The entities identified by all prefixes of
   2603                       # the path are called the element's _ancestors_.
   2604                       #
   2605                       # An entity path is always fully complete: *all* of the entity's ancestors
   2606                       # are required to be in the path along with the entity identifier itself.
   2607                       # The only exception is that in some documented cases, the identifier in the
   2608                       # last path element (for the entity) itself may be omitted. For example,
   2609                       # the last path element of the key of `Mutation.insert` may have no
   2610                       # identifier.
   2611                       #
   2612                       # A path can never be empty, and a path can have at most 100 elements.
   2613                     { # A (kind, ID/name) pair used to construct a key path.
   2614                         #
   2615                         # If either name or ID is set, the element is complete.
   2616                         # If neither is set, the element is incomplete.
   2617                       "kind": "A String", # The kind of the entity.
   2618                           # A kind matching regex `__.*__` is reserved/read-only.
   2619                           # A kind must not contain more than 1500 bytes when UTF-8 encoded.
   2620                           # Cannot be `""`.
   2621                       "id": "A String", # The auto-allocated ID of the entity.
   2622                           # Never equal to zero. Values less than zero are discouraged and may not
   2623                           # be supported in the future.
   2624                       "name": "A String", # The name of the entity.
   2625                           # A name matching regex `__.*__` is reserved/read-only.
   2626                           # A name must not be more than 1500 bytes when UTF-8 encoded.
   2627                           # Cannot be `""`.
   2628                     },
   2629                   ],
   2630                   "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project
   2631                       # ID and namespace ID.
   2632                       # Queries are scoped to a single partition.
   2633                       # by project and namespace, however the namespace ID may be empty.
   2634                       #
   2635                       # A partition ID contains several dimensions:
   2636                       # project ID and namespace ID.
   2637                       #
   2638                       # Partition dimensions:
   2639                       #
   2640                       # - May be `""`.
   2641                       # - Must be valid UTF-8 bytes.
   2642                       # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
   2643                       # If the value of any dimension matches regex `__.*__`, the partition is
   2644                       # reserved/read-only.
   2645                       # A reserved/read-only partition ID is forbidden in certain documented
   2646                       # contexts.
   2647                       #
   2648                       # Foreign partition IDs (in which the project ID does
   2649                       # not match the context project ID ) are discouraged.
   2650                       # Reads and writes of foreign partition IDs may fail if the project is not in an active state.
   2651                     "projectId": "A String", # The ID of the project to which the entities belong.
   2652                     "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong.
   2653                   },
   2654                 },
   2655                 "stringValue": "A String", # A UTF-8 encoded string value.
   2656                     # When `exclude_from_indexes` is false (it is indexed) , may have at most 1500 bytes.
   2657                     # Otherwise, may be set to at least 1,000,000 bytes.
   2658                 "blobValue": "A String", # A blob value.
   2659                     # May have at most 1,000,000 bytes.
   2660                     # When `exclude_from_indexes` is false, may have at most 1500 bytes.
   2661                     # In JSON requests, must be base64-encoded.
   2662                 "booleanValue": True or False, # A boolean value.
   2663                 "arrayValue": { # An array value. # An array value.
   2664                     # Cannot contain another array value.
   2665                     # A `Value` instance that sets field `array_value` must not set fields
   2666                     # `meaning` or `exclude_from_indexes`.
   2667                   "values": [ # Values in the array.
   2668                       # The order of this array may not be preserved if it contains a mix of
   2669                       # indexed and unindexed values.
   2670                     # Object with schema name: Value
   2671                   ],
   2672                 },
   2673                 "integerValue": "A String", # An integer value.
   2674                 "geoPointValue": { # An object representing a latitude/longitude pair. This is expressed as a pair # A geo point value representing a point on the surface of Earth.
   2675                     # of doubles representing degrees latitude and degrees longitude. Unless
   2676                     # specified otherwise, this must conform to the
   2677                     # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
   2678                     # standard</a>. Values must be within normalized ranges.
   2679                     #
   2680                     # Example of normalization code in Python:
   2681                     #
   2682                     #     def NormalizeLongitude(longitude):
   2683                     #       """Wraps decimal degrees longitude to [-180.0, 180.0]."""
   2684                     #       q, r = divmod(longitude, 360.0)
   2685                     #       if r > 180.0 or (r == 180.0 and q <= -1.0):
   2686                     #         return r - 360.0
   2687                     #       return r
   2688                     #
   2689                     #     def NormalizeLatLng(latitude, longitude):
   2690                     #       """Wraps decimal degrees latitude and longitude to
   2691                     #       [-90.0, 90.0] and [-180.0, 180.0], respectively."""
   2692                     #       r = latitude % 360.0
   2693                     #       if r <= 90.0:
   2694                     #         return r, NormalizeLongitude(longitude)
   2695                     #       elif r >= 270.0:
   2696                     #         return r - 360, NormalizeLongitude(longitude)
   2697                     #       else:
   2698                     #         return 180 - r, NormalizeLongitude(longitude + 180.0)
   2699                     #
   2700                     #     assert 180.0 == NormalizeLongitude(180.0)
   2701                     #     assert -180.0 == NormalizeLongitude(-180.0)
   2702                     #     assert -179.0 == NormalizeLongitude(181.0)
   2703                     #     assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)
   2704                     #     assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)
   2705                     #     assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)
   2706                     #     assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)
   2707                     #     assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)
   2708                     #     assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)
   2709                     #     assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)
   2710                     #     assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)
   2711                     #     assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)
   2712                     #     assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)
   2713                   "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
   2714                   "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
   2715                 },
   2716               },
   2717             },
   2718             "key": { # A unique identifier for an entity. # The entity's key.
   2719                 #
   2720                 # An entity must have a key, unless otherwise documented (for example,
   2721                 # an entity in `Value.entity_value` may have no key).
   2722                 # An entity's kind is its key path's last element's kind,
   2723                 # or null if it has no key.
   2724                 # If a key's partition ID or any of its path kinds or names are
   2725                 # reserved/read-only, the key is reserved/read-only.
   2726                 # A reserved/read-only key is forbidden in certain documented contexts.
   2727               "path": [ # The entity path.
   2728                   # An entity path consists of one or more elements composed of a kind and a
   2729                   # string or numerical identifier, which identify entities. The first
   2730                   # element identifies a _root entity_, the second element identifies
   2731                   # a _child_ of the root entity, the third element identifies a child of the
   2732                   # second entity, and so forth. The entities identified by all prefixes of
   2733                   # the path are called the element's _ancestors_.
   2734                   #
   2735                   # An entity path is always fully complete: *all* of the entity's ancestors
   2736                   # are required to be in the path along with the entity identifier itself.
   2737                   # The only exception is that in some documented cases, the identifier in the
   2738                   # last path element (for the entity) itself may be omitted. For example,
   2739                   # the last path element of the key of `Mutation.insert` may have no
   2740                   # identifier.
   2741                   #
   2742                   # A path can never be empty, and a path can have at most 100 elements.
   2743                 { # A (kind, ID/name) pair used to construct a key path.
   2744                     #
   2745                     # If either name or ID is set, the element is complete.
   2746                     # If neither is set, the element is incomplete.
   2747                   "kind": "A String", # The kind of the entity.
   2748                       # A kind matching regex `__.*__` is reserved/read-only.
   2749                       # A kind must not contain more than 1500 bytes when UTF-8 encoded.
   2750                       # Cannot be `""`.
   2751                   "id": "A String", # The auto-allocated ID of the entity.
   2752                       # Never equal to zero. Values less than zero are discouraged and may not
   2753                       # be supported in the future.
   2754                   "name": "A String", # The name of the entity.
   2755                       # A name matching regex `__.*__` is reserved/read-only.
   2756                       # A name must not be more than 1500 bytes when UTF-8 encoded.
   2757                       # Cannot be `""`.
   2758                 },
   2759               ],
   2760               "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project
   2761                   # ID and namespace ID.
   2762                   # Queries are scoped to a single partition.
   2763                   # by project and namespace, however the namespace ID may be empty.
   2764                   #
   2765                   # A partition ID contains several dimensions:
   2766                   # project ID and namespace ID.
   2767                   #
   2768                   # Partition dimensions:
   2769                   #
   2770                   # - May be `""`.
   2771                   # - Must be valid UTF-8 bytes.
   2772                   # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
   2773                   # If the value of any dimension matches regex `__.*__`, the partition is
   2774                   # reserved/read-only.
   2775                   # A reserved/read-only partition ID is forbidden in certain documented
   2776                   # contexts.
   2777                   #
   2778                   # Foreign partition IDs (in which the project ID does
   2779                   # not match the context project ID ) are discouraged.
   2780                   # Reads and writes of foreign partition IDs may fail if the project is not in an active state.
   2781                 "projectId": "A String", # The ID of the project to which the entities belong.
   2782                 "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong.
   2783               },
   2784             },
   2785           },
   2786         },
   2787       ],
   2788       "skippedCursor": "A String", # A cursor that points to the position after the last skipped result.
   2789           # Will be set when `skipped_results` != 0.
   2790       "moreResults": "A String", # The state of the query after the current batch.
   2791       "endCursor": "A String", # A cursor that points to the position after the last result in the batch.
   2792     },
   2793   }</pre>
   2794 </div>
   2795 
   2796 </body></html>