• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html><body>
2<style>
3
4body, 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
15body {
16  font-size: 13px;
17  padding: 1em;
18}
19
20h1 {
21  font-size: 26px;
22  margin-bottom: 1em;
23}
24
25h2 {
26  font-size: 24px;
27  margin-bottom: 1em;
28}
29
30h3 {
31  font-size: 20px;
32  margin-bottom: 1em;
33  margin-top: 1em;
34}
35
36pre, code {
37  line-height: 1.5;
38  font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42  margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46  font-family: Arial, sans serif;
47}
48
49h1, 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_v1.html">Google Cloud Datastore API</a> . <a href="datastore_v1.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
99before it is inserted.
100
101Args:
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
179Returns:
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
255Args:
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
268Returns:
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
279entities.
280
281Args:
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    "mode": "A String", # The type of commit to perform. Defaults to `TRANSACTIONAL`.
291    "mutations": [ # The mutations to perform.
292        #
293        # When mode is `TRANSACTIONAL`, mutations affecting a single entity are
294        # applied in order. The following sequences of mutations affecting a single
295        # entity are not permitted in a single `Commit` request:
296        #
297        # - `insert` followed by `insert`
298        # - `update` followed by `insert`
299        # - `upsert` followed by `insert`
300        # - `delete` followed by `update`
301        #
302        # When mode is `NON_TRANSACTIONAL`, no two mutations may affect a single
303        # entity.
304      { # A mutation to apply to an entity.
305        "insert": { # A Datastore data object. # The entity to insert. The entity must not already exist.
306            # The entity key's final path element may be incomplete.
307            #
308            # An entity is limited to 1 megabyte when stored. That _roughly_
309            # corresponds to a limit of 1 megabyte for the serialized form of this
310            # message.
311          "properties": { # The entity's properties.
312              # The map's keys are property names.
313              # A property name matching regex `__.*__` is reserved.
314              # A reserved property name is forbidden in certain documented contexts.
315              # The name must not contain more than 500 characters.
316              # The name cannot be `""`.
317            "a_key": { # A message that can hold any of the supported value types and associated
318                # metadata.
319              "entityValue": # Object with schema name: Entity # An entity value.
320                  #
321                  # - May have no key.
322                  # - May have a key with an incomplete key path.
323                  # - May have a reserved/read-only key.
324              "timestampValue": "A String", # A timestamp value.
325                  # When stored in the Datastore, precise only to microseconds;
326                  # any additional precision is rounded down.
327              "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.
328                  # of doubles representing degrees latitude and degrees longitude. Unless
329                  # specified otherwise, this must conform to the
330                  # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
331                  # standard</a>. Values must be within normalized ranges.
332                  #
333                  # Example of normalization code in Python:
334                  #
335                  #     def NormalizeLongitude(longitude):
336                  #       """Wraps decimal degrees longitude to [-180.0, 180.0]."""
337                  #       q, r = divmod(longitude, 360.0)
338                  #       if r > 180.0 or (r == 180.0 and q <= -1.0):
339                  #         return r - 360.0
340                  #       return r
341                  #
342                  #     def NormalizeLatLng(latitude, longitude):
343                  #       """Wraps decimal degrees latitude and longitude to
344                  #       [-90.0, 90.0] and [-180.0, 180.0], respectively."""
345                  #       r = latitude % 360.0
346                  #       if r <= 90.0:
347                  #         return r, NormalizeLongitude(longitude)
348                  #       elif r >= 270.0:
349                  #         return r - 360, NormalizeLongitude(longitude)
350                  #       else:
351                  #         return 180 - r, NormalizeLongitude(longitude + 180.0)
352                  #
353                  #     assert 180.0 == NormalizeLongitude(180.0)
354                  #     assert -180.0 == NormalizeLongitude(-180.0)
355                  #     assert -179.0 == NormalizeLongitude(181.0)
356                  #     assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)
357                  #     assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)
358                  #     assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)
359                  #     assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)
360                  #     assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)
361                  #     assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)
362                  #     assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)
363                  #     assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)
364                  #     assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)
365                  #     assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)
366                "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
367                "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
368              },
369              "doubleValue": 3.14, # A double value.
370              "meaning": 42, # The `meaning` field should only be populated for backwards compatibility.
371              "excludeFromIndexes": True or False, # If the value should be excluded from all indexes including those defined
372                  # explicitly.
373              "keyValue": { # A unique identifier for an entity. # A key value.
374                  # If a key's partition ID or any of its path kinds or names are
375                  # reserved/read-only, the key is reserved/read-only.
376                  # A reserved/read-only key is forbidden in certain documented contexts.
377                "path": [ # The entity path.
378                    # An entity path consists of one or more elements composed of a kind and a
379                    # string or numerical identifier, which identify entities. The first
380                    # element identifies a _root entity_, the second element identifies
381                    # a _child_ of the root entity, the third element identifies a child of the
382                    # second entity, and so forth. The entities identified by all prefixes of
383                    # the path are called the element's _ancestors_.
384                    #
385                    # An entity path is always fully complete: *all* of the entity's ancestors
386                    # are required to be in the path along with the entity identifier itself.
387                    # The only exception is that in some documented cases, the identifier in the
388                    # last path element (for the entity) itself may be omitted. For example,
389                    # the last path element of the key of `Mutation.insert` may have no
390                    # identifier.
391                    #
392                    # A path can never be empty, and a path can have at most 100 elements.
393                  { # A (kind, ID/name) pair used to construct a key path.
394                      #
395                      # If either name or ID is set, the element is complete.
396                      # If neither is set, the element is incomplete.
397                    "kind": "A String", # The kind of the entity.
398                        # A kind matching regex `__.*__` is reserved/read-only.
399                        # A kind must not contain more than 1500 bytes when UTF-8 encoded.
400                        # Cannot be `""`.
401                    "id": "A String", # The auto-allocated ID of the entity.
402                        # Never equal to zero. Values less than zero are discouraged and may not
403                        # be supported in the future.
404                    "name": "A String", # The name of the entity.
405                        # A name matching regex `__.*__` is reserved/read-only.
406                        # A name must not be more than 1500 bytes when UTF-8 encoded.
407                        # Cannot be `""`.
408                  },
409                ],
410                "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project
411                    # ID and namespace ID.
412                    # Queries are scoped to a single partition.
413                    # by project and namespace, however the namespace ID may be empty.
414                    #
415                    # A partition ID contains several dimensions:
416                    # project ID and namespace ID.
417                    #
418                    # Partition dimensions:
419                    #
420                    # - May be `""`.
421                    # - Must be valid UTF-8 bytes.
422                    # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
423                    # If the value of any dimension matches regex `__.*__`, the partition is
424                    # reserved/read-only.
425                    # A reserved/read-only partition ID is forbidden in certain documented
426                    # contexts.
427                    #
428                    # Foreign partition IDs (in which the project ID does
429                    # not match the context project ID ) are discouraged.
430                    # Reads and writes of foreign partition IDs may fail if the project is not in an active state.
431                  "projectId": "A String", # The ID of the project to which the entities belong.
432                  "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong.
433                },
434              },
435              "stringValue": "A String", # A UTF-8 encoded string value.
436                  # When `exclude_from_indexes` is false (it is indexed) , may have at most 1500 bytes.
437                  # Otherwise, may be set to at least 1,000,000 bytes.
438              "blobValue": "A String", # A blob value.
439                  # May have at most 1,000,000 bytes.
440                  # When `exclude_from_indexes` is false, may have at most 1500 bytes.
441                  # In JSON requests, must be base64-encoded.
442              "booleanValue": True or False, # A boolean value.
443              "arrayValue": { # An array value. # An array value.
444                  # Cannot contain another array value.
445                  # A `Value` instance that sets field `array_value` must not set fields
446                  # `meaning` or `exclude_from_indexes`.
447                "values": [ # Values in the array.
448                    # The order of this array may not be preserved if it contains a mix of
449                    # indexed and unindexed values.
450                  # Object with schema name: Value
451                ],
452              },
453              "integerValue": "A String", # An integer value.
454              "nullValue": "A String", # A null value.
455            },
456          },
457          "key": { # A unique identifier for an entity. # The entity's key.
458              #
459              # An entity must have a key, unless otherwise documented (for example,
460              # an entity in `Value.entity_value` may have no key).
461              # An entity's kind is its key path's last element's kind,
462              # or null if it has no key.
463              # If a key's partition ID or any of its path kinds or names are
464              # reserved/read-only, the key is reserved/read-only.
465              # A reserved/read-only key is forbidden in certain documented contexts.
466            "path": [ # The entity path.
467                # An entity path consists of one or more elements composed of a kind and a
468                # string or numerical identifier, which identify entities. The first
469                # element identifies a _root entity_, the second element identifies
470                # a _child_ of the root entity, the third element identifies a child of the
471                # second entity, and so forth. The entities identified by all prefixes of
472                # the path are called the element's _ancestors_.
473                #
474                # An entity path is always fully complete: *all* of the entity's ancestors
475                # are required to be in the path along with the entity identifier itself.
476                # The only exception is that in some documented cases, the identifier in the
477                # last path element (for the entity) itself may be omitted. For example,
478                # the last path element of the key of `Mutation.insert` may have no
479                # identifier.
480                #
481                # A path can never be empty, and a path can have at most 100 elements.
482              { # A (kind, ID/name) pair used to construct a key path.
483                  #
484                  # If either name or ID is set, the element is complete.
485                  # If neither is set, the element is incomplete.
486                "kind": "A String", # The kind of the entity.
487                    # A kind matching regex `__.*__` is reserved/read-only.
488                    # A kind must not contain more than 1500 bytes when UTF-8 encoded.
489                    # Cannot be `""`.
490                "id": "A String", # The auto-allocated ID of the entity.
491                    # Never equal to zero. Values less than zero are discouraged and may not
492                    # be supported in the future.
493                "name": "A String", # The name of the entity.
494                    # A name matching regex `__.*__` is reserved/read-only.
495                    # A name must not be more than 1500 bytes when UTF-8 encoded.
496                    # Cannot be `""`.
497              },
498            ],
499            "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project
500                # ID and namespace ID.
501                # Queries are scoped to a single partition.
502                # by project and namespace, however the namespace ID may be empty.
503                #
504                # A partition ID contains several dimensions:
505                # project ID and namespace ID.
506                #
507                # Partition dimensions:
508                #
509                # - May be `""`.
510                # - Must be valid UTF-8 bytes.
511                # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
512                # If the value of any dimension matches regex `__.*__`, the partition is
513                # reserved/read-only.
514                # A reserved/read-only partition ID is forbidden in certain documented
515                # contexts.
516                #
517                # Foreign partition IDs (in which the project ID does
518                # not match the context project ID ) are discouraged.
519                # Reads and writes of foreign partition IDs may fail if the project is not in an active state.
520              "projectId": "A String", # The ID of the project to which the entities belong.
521              "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong.
522            },
523          },
524        },
525        "upsert": { # A Datastore data object. # The entity to upsert. The entity may or may not already exist.
526            # The entity key's final path element may be incomplete.
527            #
528            # An entity is limited to 1 megabyte when stored. That _roughly_
529            # corresponds to a limit of 1 megabyte for the serialized form of this
530            # message.
531          "properties": { # The entity's properties.
532              # The map's keys are property names.
533              # A property name matching regex `__.*__` is reserved.
534              # A reserved property name is forbidden in certain documented contexts.
535              # The name must not contain more than 500 characters.
536              # The name cannot be `""`.
537            "a_key": { # A message that can hold any of the supported value types and associated
538                # metadata.
539              "entityValue": # Object with schema name: Entity # An entity value.
540                  #
541                  # - May have no key.
542                  # - May have a key with an incomplete key path.
543                  # - May have a reserved/read-only key.
544              "timestampValue": "A String", # A timestamp value.
545                  # When stored in the Datastore, precise only to microseconds;
546                  # any additional precision is rounded down.
547              "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.
548                  # of doubles representing degrees latitude and degrees longitude. Unless
549                  # specified otherwise, this must conform to the
550                  # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
551                  # standard</a>. Values must be within normalized ranges.
552                  #
553                  # Example of normalization code in Python:
554                  #
555                  #     def NormalizeLongitude(longitude):
556                  #       """Wraps decimal degrees longitude to [-180.0, 180.0]."""
557                  #       q, r = divmod(longitude, 360.0)
558                  #       if r > 180.0 or (r == 180.0 and q <= -1.0):
559                  #         return r - 360.0
560                  #       return r
561                  #
562                  #     def NormalizeLatLng(latitude, longitude):
563                  #       """Wraps decimal degrees latitude and longitude to
564                  #       [-90.0, 90.0] and [-180.0, 180.0], respectively."""
565                  #       r = latitude % 360.0
566                  #       if r <= 90.0:
567                  #         return r, NormalizeLongitude(longitude)
568                  #       elif r >= 270.0:
569                  #         return r - 360, NormalizeLongitude(longitude)
570                  #       else:
571                  #         return 180 - r, NormalizeLongitude(longitude + 180.0)
572                  #
573                  #     assert 180.0 == NormalizeLongitude(180.0)
574                  #     assert -180.0 == NormalizeLongitude(-180.0)
575                  #     assert -179.0 == NormalizeLongitude(181.0)
576                  #     assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)
577                  #     assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)
578                  #     assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)
579                  #     assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)
580                  #     assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)
581                  #     assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)
582                  #     assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)
583                  #     assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)
584                  #     assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)
585                  #     assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)
586                "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
587                "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
588              },
589              "doubleValue": 3.14, # A double value.
590              "meaning": 42, # The `meaning` field should only be populated for backwards compatibility.
591              "excludeFromIndexes": True or False, # If the value should be excluded from all indexes including those defined
592                  # explicitly.
593              "keyValue": { # A unique identifier for an entity. # A key value.
594                  # If a key's partition ID or any of its path kinds or names are
595                  # reserved/read-only, the key is reserved/read-only.
596                  # A reserved/read-only key is forbidden in certain documented contexts.
597                "path": [ # The entity path.
598                    # An entity path consists of one or more elements composed of a kind and a
599                    # string or numerical identifier, which identify entities. The first
600                    # element identifies a _root entity_, the second element identifies
601                    # a _child_ of the root entity, the third element identifies a child of the
602                    # second entity, and so forth. The entities identified by all prefixes of
603                    # the path are called the element's _ancestors_.
604                    #
605                    # An entity path is always fully complete: *all* of the entity's ancestors
606                    # are required to be in the path along with the entity identifier itself.
607                    # The only exception is that in some documented cases, the identifier in the
608                    # last path element (for the entity) itself may be omitted. For example,
609                    # the last path element of the key of `Mutation.insert` may have no
610                    # identifier.
611                    #
612                    # A path can never be empty, and a path can have at most 100 elements.
613                  { # A (kind, ID/name) pair used to construct a key path.
614                      #
615                      # If either name or ID is set, the element is complete.
616                      # If neither is set, the element is incomplete.
617                    "kind": "A String", # The kind of the entity.
618                        # A kind matching regex `__.*__` is reserved/read-only.
619                        # A kind must not contain more than 1500 bytes when UTF-8 encoded.
620                        # Cannot be `""`.
621                    "id": "A String", # The auto-allocated ID of the entity.
622                        # Never equal to zero. Values less than zero are discouraged and may not
623                        # be supported in the future.
624                    "name": "A String", # The name of the entity.
625                        # A name matching regex `__.*__` is reserved/read-only.
626                        # A name must not be more than 1500 bytes when UTF-8 encoded.
627                        # Cannot be `""`.
628                  },
629                ],
630                "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project
631                    # ID and namespace ID.
632                    # Queries are scoped to a single partition.
633                    # by project and namespace, however the namespace ID may be empty.
634                    #
635                    # A partition ID contains several dimensions:
636                    # project ID and namespace ID.
637                    #
638                    # Partition dimensions:
639                    #
640                    # - May be `""`.
641                    # - Must be valid UTF-8 bytes.
642                    # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
643                    # If the value of any dimension matches regex `__.*__`, the partition is
644                    # reserved/read-only.
645                    # A reserved/read-only partition ID is forbidden in certain documented
646                    # contexts.
647                    #
648                    # Foreign partition IDs (in which the project ID does
649                    # not match the context project ID ) are discouraged.
650                    # Reads and writes of foreign partition IDs may fail if the project is not in an active state.
651                  "projectId": "A String", # The ID of the project to which the entities belong.
652                  "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong.
653                },
654              },
655              "stringValue": "A String", # A UTF-8 encoded string value.
656                  # When `exclude_from_indexes` is false (it is indexed) , may have at most 1500 bytes.
657                  # Otherwise, may be set to at least 1,000,000 bytes.
658              "blobValue": "A String", # A blob value.
659                  # May have at most 1,000,000 bytes.
660                  # When `exclude_from_indexes` is false, may have at most 1500 bytes.
661                  # In JSON requests, must be base64-encoded.
662              "booleanValue": True or False, # A boolean value.
663              "arrayValue": { # An array value. # An array value.
664                  # Cannot contain another array value.
665                  # A `Value` instance that sets field `array_value` must not set fields
666                  # `meaning` or `exclude_from_indexes`.
667                "values": [ # Values in the array.
668                    # The order of this array may not be preserved if it contains a mix of
669                    # indexed and unindexed values.
670                  # Object with schema name: Value
671                ],
672              },
673              "integerValue": "A String", # An integer value.
674              "nullValue": "A String", # A null value.
675            },
676          },
677          "key": { # A unique identifier for an entity. # The entity's key.
678              #
679              # An entity must have a key, unless otherwise documented (for example,
680              # an entity in `Value.entity_value` may have no key).
681              # An entity's kind is its key path's last element's kind,
682              # or null if it has no key.
683              # If a key's partition ID or any of its path kinds or names are
684              # reserved/read-only, the key is reserved/read-only.
685              # A reserved/read-only key is forbidden in certain documented contexts.
686            "path": [ # The entity path.
687                # An entity path consists of one or more elements composed of a kind and a
688                # string or numerical identifier, which identify entities. The first
689                # element identifies a _root entity_, the second element identifies
690                # a _child_ of the root entity, the third element identifies a child of the
691                # second entity, and so forth. The entities identified by all prefixes of
692                # the path are called the element's _ancestors_.
693                #
694                # An entity path is always fully complete: *all* of the entity's ancestors
695                # are required to be in the path along with the entity identifier itself.
696                # The only exception is that in some documented cases, the identifier in the
697                # last path element (for the entity) itself may be omitted. For example,
698                # the last path element of the key of `Mutation.insert` may have no
699                # identifier.
700                #
701                # A path can never be empty, and a path can have at most 100 elements.
702              { # A (kind, ID/name) pair used to construct a key path.
703                  #
704                  # If either name or ID is set, the element is complete.
705                  # If neither is set, the element is incomplete.
706                "kind": "A String", # The kind of the entity.
707                    # A kind matching regex `__.*__` is reserved/read-only.
708                    # A kind must not contain more than 1500 bytes when UTF-8 encoded.
709                    # Cannot be `""`.
710                "id": "A String", # The auto-allocated ID of the entity.
711                    # Never equal to zero. Values less than zero are discouraged and may not
712                    # be supported in the future.
713                "name": "A String", # The name of the entity.
714                    # A name matching regex `__.*__` is reserved/read-only.
715                    # A name must not be more than 1500 bytes when UTF-8 encoded.
716                    # Cannot be `""`.
717              },
718            ],
719            "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project
720                # ID and namespace ID.
721                # Queries are scoped to a single partition.
722                # by project and namespace, however the namespace ID may be empty.
723                #
724                # A partition ID contains several dimensions:
725                # project ID and namespace ID.
726                #
727                # Partition dimensions:
728                #
729                # - May be `""`.
730                # - Must be valid UTF-8 bytes.
731                # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
732                # If the value of any dimension matches regex `__.*__`, the partition is
733                # reserved/read-only.
734                # A reserved/read-only partition ID is forbidden in certain documented
735                # contexts.
736                #
737                # Foreign partition IDs (in which the project ID does
738                # not match the context project ID ) are discouraged.
739                # Reads and writes of foreign partition IDs may fail if the project is not in an active state.
740              "projectId": "A String", # The ID of the project to which the entities belong.
741              "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong.
742            },
743          },
744        },
745        "update": { # A Datastore data object. # The entity to update. The entity must already exist.
746            # Must have a complete key path.
747            #
748            # An entity is limited to 1 megabyte when stored. That _roughly_
749            # corresponds to a limit of 1 megabyte for the serialized form of this
750            # message.
751          "properties": { # The entity's properties.
752              # The map's keys are property names.
753              # A property name matching regex `__.*__` is reserved.
754              # A reserved property name is forbidden in certain documented contexts.
755              # The name must not contain more than 500 characters.
756              # The name cannot be `""`.
757            "a_key": { # A message that can hold any of the supported value types and associated
758                # metadata.
759              "entityValue": # Object with schema name: Entity # An entity value.
760                  #
761                  # - May have no key.
762                  # - May have a key with an incomplete key path.
763                  # - May have a reserved/read-only key.
764              "timestampValue": "A String", # A timestamp value.
765                  # When stored in the Datastore, precise only to microseconds;
766                  # any additional precision is rounded down.
767              "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.
768                  # of doubles representing degrees latitude and degrees longitude. Unless
769                  # specified otherwise, this must conform to the
770                  # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
771                  # standard</a>. Values must be within normalized ranges.
772                  #
773                  # Example of normalization code in Python:
774                  #
775                  #     def NormalizeLongitude(longitude):
776                  #       """Wraps decimal degrees longitude to [-180.0, 180.0]."""
777                  #       q, r = divmod(longitude, 360.0)
778                  #       if r > 180.0 or (r == 180.0 and q <= -1.0):
779                  #         return r - 360.0
780                  #       return r
781                  #
782                  #     def NormalizeLatLng(latitude, longitude):
783                  #       """Wraps decimal degrees latitude and longitude to
784                  #       [-90.0, 90.0] and [-180.0, 180.0], respectively."""
785                  #       r = latitude % 360.0
786                  #       if r <= 90.0:
787                  #         return r, NormalizeLongitude(longitude)
788                  #       elif r >= 270.0:
789                  #         return r - 360, NormalizeLongitude(longitude)
790                  #       else:
791                  #         return 180 - r, NormalizeLongitude(longitude + 180.0)
792                  #
793                  #     assert 180.0 == NormalizeLongitude(180.0)
794                  #     assert -180.0 == NormalizeLongitude(-180.0)
795                  #     assert -179.0 == NormalizeLongitude(181.0)
796                  #     assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)
797                  #     assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)
798                  #     assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)
799                  #     assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)
800                  #     assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)
801                  #     assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)
802                  #     assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)
803                  #     assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)
804                  #     assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)
805                  #     assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)
806                "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
807                "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
808              },
809              "doubleValue": 3.14, # A double value.
810              "meaning": 42, # The `meaning` field should only be populated for backwards compatibility.
811              "excludeFromIndexes": True or False, # If the value should be excluded from all indexes including those defined
812                  # explicitly.
813              "keyValue": { # A unique identifier for an entity. # A key value.
814                  # If a key's partition ID or any of its path kinds or names are
815                  # reserved/read-only, the key is reserved/read-only.
816                  # A reserved/read-only key is forbidden in certain documented contexts.
817                "path": [ # The entity path.
818                    # An entity path consists of one or more elements composed of a kind and a
819                    # string or numerical identifier, which identify entities. The first
820                    # element identifies a _root entity_, the second element identifies
821                    # a _child_ of the root entity, the third element identifies a child of the
822                    # second entity, and so forth. The entities identified by all prefixes of
823                    # the path are called the element's _ancestors_.
824                    #
825                    # An entity path is always fully complete: *all* of the entity's ancestors
826                    # are required to be in the path along with the entity identifier itself.
827                    # The only exception is that in some documented cases, the identifier in the
828                    # last path element (for the entity) itself may be omitted. For example,
829                    # the last path element of the key of `Mutation.insert` may have no
830                    # identifier.
831                    #
832                    # A path can never be empty, and a path can have at most 100 elements.
833                  { # A (kind, ID/name) pair used to construct a key path.
834                      #
835                      # If either name or ID is set, the element is complete.
836                      # If neither is set, the element is incomplete.
837                    "kind": "A String", # The kind of the entity.
838                        # A kind matching regex `__.*__` is reserved/read-only.
839                        # A kind must not contain more than 1500 bytes when UTF-8 encoded.
840                        # Cannot be `""`.
841                    "id": "A String", # The auto-allocated ID of the entity.
842                        # Never equal to zero. Values less than zero are discouraged and may not
843                        # be supported in the future.
844                    "name": "A String", # The name of the entity.
845                        # A name matching regex `__.*__` is reserved/read-only.
846                        # A name must not be more than 1500 bytes when UTF-8 encoded.
847                        # Cannot be `""`.
848                  },
849                ],
850                "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project
851                    # ID and namespace ID.
852                    # Queries are scoped to a single partition.
853                    # by project and namespace, however the namespace ID may be empty.
854                    #
855                    # A partition ID contains several dimensions:
856                    # project ID and namespace ID.
857                    #
858                    # Partition dimensions:
859                    #
860                    # - May be `""`.
861                    # - Must be valid UTF-8 bytes.
862                    # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
863                    # If the value of any dimension matches regex `__.*__`, the partition is
864                    # reserved/read-only.
865                    # A reserved/read-only partition ID is forbidden in certain documented
866                    # contexts.
867                    #
868                    # Foreign partition IDs (in which the project ID does
869                    # not match the context project ID ) are discouraged.
870                    # Reads and writes of foreign partition IDs may fail if the project is not in an active state.
871                  "projectId": "A String", # The ID of the project to which the entities belong.
872                  "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong.
873                },
874              },
875              "stringValue": "A String", # A UTF-8 encoded string value.
876                  # When `exclude_from_indexes` is false (it is indexed) , may have at most 1500 bytes.
877                  # Otherwise, may be set to at least 1,000,000 bytes.
878              "blobValue": "A String", # A blob value.
879                  # May have at most 1,000,000 bytes.
880                  # When `exclude_from_indexes` is false, may have at most 1500 bytes.
881                  # In JSON requests, must be base64-encoded.
882              "booleanValue": True or False, # A boolean value.
883              "arrayValue": { # An array value. # An array value.
884                  # Cannot contain another array value.
885                  # A `Value` instance that sets field `array_value` must not set fields
886                  # `meaning` or `exclude_from_indexes`.
887                "values": [ # Values in the array.
888                    # The order of this array may not be preserved if it contains a mix of
889                    # indexed and unindexed values.
890                  # Object with schema name: Value
891                ],
892              },
893              "integerValue": "A String", # An integer value.
894              "nullValue": "A String", # A null value.
895            },
896          },
897          "key": { # A unique identifier for an entity. # The entity's key.
898              #
899              # An entity must have a key, unless otherwise documented (for example,
900              # an entity in `Value.entity_value` may have no key).
901              # An entity's kind is its key path's last element's kind,
902              # or null if it has no key.
903              # If a key's partition ID or any of its path kinds or names are
904              # reserved/read-only, the key is reserved/read-only.
905              # A reserved/read-only key is forbidden in certain documented contexts.
906            "path": [ # The entity path.
907                # An entity path consists of one or more elements composed of a kind and a
908                # string or numerical identifier, which identify entities. The first
909                # element identifies a _root entity_, the second element identifies
910                # a _child_ of the root entity, the third element identifies a child of the
911                # second entity, and so forth. The entities identified by all prefixes of
912                # the path are called the element's _ancestors_.
913                #
914                # An entity path is always fully complete: *all* of the entity's ancestors
915                # are required to be in the path along with the entity identifier itself.
916                # The only exception is that in some documented cases, the identifier in the
917                # last path element (for the entity) itself may be omitted. For example,
918                # the last path element of the key of `Mutation.insert` may have no
919                # identifier.
920                #
921                # A path can never be empty, and a path can have at most 100 elements.
922              { # A (kind, ID/name) pair used to construct a key path.
923                  #
924                  # If either name or ID is set, the element is complete.
925                  # If neither is set, the element is incomplete.
926                "kind": "A String", # The kind of the entity.
927                    # A kind matching regex `__.*__` is reserved/read-only.
928                    # A kind must not contain more than 1500 bytes when UTF-8 encoded.
929                    # Cannot be `""`.
930                "id": "A String", # The auto-allocated ID of the entity.
931                    # Never equal to zero. Values less than zero are discouraged and may not
932                    # be supported in the future.
933                "name": "A String", # The name of the entity.
934                    # A name matching regex `__.*__` is reserved/read-only.
935                    # A name must not be more than 1500 bytes when UTF-8 encoded.
936                    # Cannot be `""`.
937              },
938            ],
939            "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project
940                # ID and namespace ID.
941                # Queries are scoped to a single partition.
942                # by project and namespace, however the namespace ID may be empty.
943                #
944                # A partition ID contains several dimensions:
945                # project ID and namespace ID.
946                #
947                # Partition dimensions:
948                #
949                # - May be `""`.
950                # - Must be valid UTF-8 bytes.
951                # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
952                # If the value of any dimension matches regex `__.*__`, the partition is
953                # reserved/read-only.
954                # A reserved/read-only partition ID is forbidden in certain documented
955                # contexts.
956                #
957                # Foreign partition IDs (in which the project ID does
958                # not match the context project ID ) are discouraged.
959                # Reads and writes of foreign partition IDs may fail if the project is not in an active state.
960              "projectId": "A String", # The ID of the project to which the entities belong.
961              "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong.
962            },
963          },
964        },
965        "baseVersion": "A String", # The version of the entity that this mutation is being applied to. If this
966            # does not match the current version on the server, the mutation conflicts.
967        "delete": { # A unique identifier for an entity. # The key of the entity to delete. The entity may or may not already exist.
968            # Must have a complete key path and must not be reserved/read-only.
969            # If a key's partition ID or any of its path kinds or names are
970            # reserved/read-only, the key is reserved/read-only.
971            # A reserved/read-only key is forbidden in certain documented contexts.
972          "path": [ # The entity path.
973              # An entity path consists of one or more elements composed of a kind and a
974              # string or numerical identifier, which identify entities. The first
975              # element identifies a _root entity_, the second element identifies
976              # a _child_ of the root entity, the third element identifies a child of the
977              # second entity, and so forth. The entities identified by all prefixes of
978              # the path are called the element's _ancestors_.
979              #
980              # An entity path is always fully complete: *all* of the entity's ancestors
981              # are required to be in the path along with the entity identifier itself.
982              # The only exception is that in some documented cases, the identifier in the
983              # last path element (for the entity) itself may be omitted. For example,
984              # the last path element of the key of `Mutation.insert` may have no
985              # identifier.
986              #
987              # A path can never be empty, and a path can have at most 100 elements.
988            { # A (kind, ID/name) pair used to construct a key path.
989                #
990                # If either name or ID is set, the element is complete.
991                # If neither is set, the element is incomplete.
992              "kind": "A String", # The kind of the entity.
993                  # A kind matching regex `__.*__` is reserved/read-only.
994                  # A kind must not contain more than 1500 bytes when UTF-8 encoded.
995                  # Cannot be `""`.
996              "id": "A String", # The auto-allocated ID of the entity.
997                  # Never equal to zero. Values less than zero are discouraged and may not
998                  # be supported in the future.
999              "name": "A String", # The name of the entity.
1000                  # A name matching regex `__.*__` is reserved/read-only.
1001                  # A name must not be more than 1500 bytes when UTF-8 encoded.
1002                  # Cannot be `""`.
1003            },
1004          ],
1005          "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project
1006              # ID and namespace ID.
1007              # Queries are scoped to a single partition.
1008              # by project and namespace, however the namespace ID may be empty.
1009              #
1010              # A partition ID contains several dimensions:
1011              # project ID and namespace ID.
1012              #
1013              # Partition dimensions:
1014              #
1015              # - May be `""`.
1016              # - Must be valid UTF-8 bytes.
1017              # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
1018              # If the value of any dimension matches regex `__.*__`, the partition is
1019              # reserved/read-only.
1020              # A reserved/read-only partition ID is forbidden in certain documented
1021              # contexts.
1022              #
1023              # Foreign partition IDs (in which the project ID does
1024              # not match the context project ID ) are discouraged.
1025              # Reads and writes of foreign partition IDs may fail if the project is not in an active state.
1026            "projectId": "A String", # The ID of the project to which the entities belong.
1027            "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong.
1028          },
1029        },
1030      },
1031    ],
1032  }
1033
1034  x__xgafv: string, V1 error format.
1035    Allowed values
1036      1 - v1 error format
1037      2 - v2 error format
1038
1039Returns:
1040  An object of the form:
1041
1042    { # The response for Datastore.Commit.
1043    "mutationResults": [ # The result of performing the mutations.
1044        # The i-th mutation result corresponds to the i-th mutation in the request.
1045      { # The result of applying a mutation.
1046        "version": "A String", # The version of the entity on the server after processing the mutation. If
1047            # the mutation doesn't change anything on the server, then the version will
1048            # be the version of the current entity or, if no entity is present, a version
1049            # that is strictly greater than the version of any previous entity and less
1050            # than the version of any possible future entity.
1051        "conflictDetected": True or False, # Whether a conflict was detected for this mutation. Always false when a
1052            # conflict detection strategy field is not set in the mutation.
1053        "key": { # A unique identifier for an entity. # The automatically allocated key.
1054            # Set only when the mutation allocated a key.
1055            # If a key's partition ID or any of its path kinds or names are
1056            # reserved/read-only, the key is reserved/read-only.
1057            # A reserved/read-only key is forbidden in certain documented contexts.
1058          "path": [ # The entity path.
1059              # An entity path consists of one or more elements composed of a kind and a
1060              # string or numerical identifier, which identify entities. The first
1061              # element identifies a _root entity_, the second element identifies
1062              # a _child_ of the root entity, the third element identifies a child of the
1063              # second entity, and so forth. The entities identified by all prefixes of
1064              # the path are called the element's _ancestors_.
1065              #
1066              # An entity path is always fully complete: *all* of the entity's ancestors
1067              # are required to be in the path along with the entity identifier itself.
1068              # The only exception is that in some documented cases, the identifier in the
1069              # last path element (for the entity) itself may be omitted. For example,
1070              # the last path element of the key of `Mutation.insert` may have no
1071              # identifier.
1072              #
1073              # A path can never be empty, and a path can have at most 100 elements.
1074            { # A (kind, ID/name) pair used to construct a key path.
1075                #
1076                # If either name or ID is set, the element is complete.
1077                # If neither is set, the element is incomplete.
1078              "kind": "A String", # The kind of the entity.
1079                  # A kind matching regex `__.*__` is reserved/read-only.
1080                  # A kind must not contain more than 1500 bytes when UTF-8 encoded.
1081                  # Cannot be `""`.
1082              "id": "A String", # The auto-allocated ID of the entity.
1083                  # Never equal to zero. Values less than zero are discouraged and may not
1084                  # be supported in the future.
1085              "name": "A String", # The name of the entity.
1086                  # A name matching regex `__.*__` is reserved/read-only.
1087                  # A name must not be more than 1500 bytes when UTF-8 encoded.
1088                  # Cannot be `""`.
1089            },
1090          ],
1091          "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project
1092              # ID and namespace ID.
1093              # Queries are scoped to a single partition.
1094              # by project and namespace, however the namespace ID may be empty.
1095              #
1096              # A partition ID contains several dimensions:
1097              # project ID and namespace ID.
1098              #
1099              # Partition dimensions:
1100              #
1101              # - May be `""`.
1102              # - Must be valid UTF-8 bytes.
1103              # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
1104              # If the value of any dimension matches regex `__.*__`, the partition is
1105              # reserved/read-only.
1106              # A reserved/read-only partition ID is forbidden in certain documented
1107              # contexts.
1108              #
1109              # Foreign partition IDs (in which the project ID does
1110              # not match the context project ID ) are discouraged.
1111              # Reads and writes of foreign partition IDs may fail if the project is not in an active state.
1112            "projectId": "A String", # The ID of the project to which the entities belong.
1113            "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong.
1114          },
1115        },
1116      },
1117    ],
1118    "indexUpdates": 42, # The number of index entries updated during the commit, or zero if none were
1119        # updated.
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
1127Args:
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
1211Returns:
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              "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.
1252                  # of doubles representing degrees latitude and degrees longitude. Unless
1253                  # specified otherwise, this must conform to the
1254                  # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
1255                  # standard</a>. Values must be within normalized ranges.
1256                  #
1257                  # Example of normalization code in Python:
1258                  #
1259                  #     def NormalizeLongitude(longitude):
1260                  #       """Wraps decimal degrees longitude to [-180.0, 180.0]."""
1261                  #       q, r = divmod(longitude, 360.0)
1262                  #       if r > 180.0 or (r == 180.0 and q <= -1.0):
1263                  #         return r - 360.0
1264                  #       return r
1265                  #
1266                  #     def NormalizeLatLng(latitude, longitude):
1267                  #       """Wraps decimal degrees latitude and longitude to
1268                  #       [-90.0, 90.0] and [-180.0, 180.0], respectively."""
1269                  #       r = latitude % 360.0
1270                  #       if r <= 90.0:
1271                  #         return r, NormalizeLongitude(longitude)
1272                  #       elif r >= 270.0:
1273                  #         return r - 360, NormalizeLongitude(longitude)
1274                  #       else:
1275                  #         return 180 - r, NormalizeLongitude(longitude + 180.0)
1276                  #
1277                  #     assert 180.0 == NormalizeLongitude(180.0)
1278                  #     assert -180.0 == NormalizeLongitude(-180.0)
1279                  #     assert -179.0 == NormalizeLongitude(181.0)
1280                  #     assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)
1281                  #     assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)
1282                  #     assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)
1283                  #     assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)
1284                  #     assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)
1285                  #     assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)
1286                  #     assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)
1287                  #     assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)
1288                  #     assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)
1289                  #     assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)
1290                "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
1291                "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
1292              },
1293              "doubleValue": 3.14, # A double value.
1294              "meaning": 42, # The `meaning` field should only be populated for backwards compatibility.
1295              "excludeFromIndexes": True or False, # If the value should be excluded from all indexes including those defined
1296                  # explicitly.
1297              "keyValue": { # A unique identifier for an entity. # A key value.
1298                  # If a key's partition ID or any of its path kinds or names are
1299                  # reserved/read-only, the key is reserved/read-only.
1300                  # A reserved/read-only key is forbidden in certain documented contexts.
1301                "path": [ # The entity path.
1302                    # An entity path consists of one or more elements composed of a kind and a
1303                    # string or numerical identifier, which identify entities. The first
1304                    # element identifies a _root entity_, the second element identifies
1305                    # a _child_ of the root entity, the third element identifies a child of the
1306                    # second entity, and so forth. The entities identified by all prefixes of
1307                    # the path are called the element's _ancestors_.
1308                    #
1309                    # An entity path is always fully complete: *all* of the entity's ancestors
1310                    # are required to be in the path along with the entity identifier itself.
1311                    # The only exception is that in some documented cases, the identifier in the
1312                    # last path element (for the entity) itself may be omitted. For example,
1313                    # the last path element of the key of `Mutation.insert` may have no
1314                    # identifier.
1315                    #
1316                    # A path can never be empty, and a path can have at most 100 elements.
1317                  { # A (kind, ID/name) pair used to construct a key path.
1318                      #
1319                      # If either name or ID is set, the element is complete.
1320                      # If neither is set, the element is incomplete.
1321                    "kind": "A String", # The kind of the entity.
1322                        # A kind matching regex `__.*__` is reserved/read-only.
1323                        # A kind must not contain more than 1500 bytes when UTF-8 encoded.
1324                        # Cannot be `""`.
1325                    "id": "A String", # The auto-allocated ID of the entity.
1326                        # Never equal to zero. Values less than zero are discouraged and may not
1327                        # be supported in the future.
1328                    "name": "A String", # The name of the entity.
1329                        # A name matching regex `__.*__` is reserved/read-only.
1330                        # A name must not be more than 1500 bytes when UTF-8 encoded.
1331                        # Cannot be `""`.
1332                  },
1333                ],
1334                "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project
1335                    # ID and namespace ID.
1336                    # Queries are scoped to a single partition.
1337                    # by project and namespace, however the namespace ID may be empty.
1338                    #
1339                    # A partition ID contains several dimensions:
1340                    # project ID and namespace ID.
1341                    #
1342                    # Partition dimensions:
1343                    #
1344                    # - May be `""`.
1345                    # - Must be valid UTF-8 bytes.
1346                    # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
1347                    # If the value of any dimension matches regex `__.*__`, the partition is
1348                    # reserved/read-only.
1349                    # A reserved/read-only partition ID is forbidden in certain documented
1350                    # contexts.
1351                    #
1352                    # Foreign partition IDs (in which the project ID does
1353                    # not match the context project ID ) are discouraged.
1354                    # Reads and writes of foreign partition IDs may fail if the project is not in an active state.
1355                  "projectId": "A String", # The ID of the project to which the entities belong.
1356                  "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong.
1357                },
1358              },
1359              "stringValue": "A String", # A UTF-8 encoded string value.
1360                  # When `exclude_from_indexes` is false (it is indexed) , may have at most 1500 bytes.
1361                  # Otherwise, may be set to at least 1,000,000 bytes.
1362              "blobValue": "A String", # A blob value.
1363                  # May have at most 1,000,000 bytes.
1364                  # When `exclude_from_indexes` is false, may have at most 1500 bytes.
1365                  # In JSON requests, must be base64-encoded.
1366              "booleanValue": True or False, # A boolean value.
1367              "arrayValue": { # An array value. # An array value.
1368                  # Cannot contain another array value.
1369                  # A `Value` instance that sets field `array_value` must not set fields
1370                  # `meaning` or `exclude_from_indexes`.
1371                "values": [ # Values in the array.
1372                    # The order of this array may not be preserved if it contains a mix of
1373                    # indexed and unindexed values.
1374                  # Object with schema name: Value
1375                ],
1376              },
1377              "integerValue": "A String", # An integer value.
1378              "nullValue": "A String", # A null value.
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              "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.
1554                  # of doubles representing degrees latitude and degrees longitude. Unless
1555                  # specified otherwise, this must conform to the
1556                  # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
1557                  # standard</a>. Values must be within normalized ranges.
1558                  #
1559                  # Example of normalization code in Python:
1560                  #
1561                  #     def NormalizeLongitude(longitude):
1562                  #       """Wraps decimal degrees longitude to [-180.0, 180.0]."""
1563                  #       q, r = divmod(longitude, 360.0)
1564                  #       if r > 180.0 or (r == 180.0 and q <= -1.0):
1565                  #         return r - 360.0
1566                  #       return r
1567                  #
1568                  #     def NormalizeLatLng(latitude, longitude):
1569                  #       """Wraps decimal degrees latitude and longitude to
1570                  #       [-90.0, 90.0] and [-180.0, 180.0], respectively."""
1571                  #       r = latitude % 360.0
1572                  #       if r <= 90.0:
1573                  #         return r, NormalizeLongitude(longitude)
1574                  #       elif r >= 270.0:
1575                  #         return r - 360, NormalizeLongitude(longitude)
1576                  #       else:
1577                  #         return 180 - r, NormalizeLongitude(longitude + 180.0)
1578                  #
1579                  #     assert 180.0 == NormalizeLongitude(180.0)
1580                  #     assert -180.0 == NormalizeLongitude(-180.0)
1581                  #     assert -179.0 == NormalizeLongitude(181.0)
1582                  #     assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)
1583                  #     assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)
1584                  #     assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)
1585                  #     assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)
1586                  #     assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)
1587                  #     assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)
1588                  #     assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)
1589                  #     assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)
1590                  #     assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)
1591                  #     assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)
1592                "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
1593                "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
1594              },
1595              "doubleValue": 3.14, # A double value.
1596              "meaning": 42, # The `meaning` field should only be populated for backwards compatibility.
1597              "excludeFromIndexes": True or False, # If the value should be excluded from all indexes including those defined
1598                  # explicitly.
1599              "keyValue": { # A unique identifier for an entity. # A key value.
1600                  # If a key's partition ID or any of its path kinds or names are
1601                  # reserved/read-only, the key is reserved/read-only.
1602                  # A reserved/read-only key is forbidden in certain documented contexts.
1603                "path": [ # The entity path.
1604                    # An entity path consists of one or more elements composed of a kind and a
1605                    # string or numerical identifier, which identify entities. The first
1606                    # element identifies a _root entity_, the second element identifies
1607                    # a _child_ of the root entity, the third element identifies a child of the
1608                    # second entity, and so forth. The entities identified by all prefixes of
1609                    # the path are called the element's _ancestors_.
1610                    #
1611                    # An entity path is always fully complete: *all* of the entity's ancestors
1612                    # are required to be in the path along with the entity identifier itself.
1613                    # The only exception is that in some documented cases, the identifier in the
1614                    # last path element (for the entity) itself may be omitted. For example,
1615                    # the last path element of the key of `Mutation.insert` may have no
1616                    # identifier.
1617                    #
1618                    # A path can never be empty, and a path can have at most 100 elements.
1619                  { # A (kind, ID/name) pair used to construct a key path.
1620                      #
1621                      # If either name or ID is set, the element is complete.
1622                      # If neither is set, the element is incomplete.
1623                    "kind": "A String", # The kind of the entity.
1624                        # A kind matching regex `__.*__` is reserved/read-only.
1625                        # A kind must not contain more than 1500 bytes when UTF-8 encoded.
1626                        # Cannot be `""`.
1627                    "id": "A String", # The auto-allocated ID of the entity.
1628                        # Never equal to zero. Values less than zero are discouraged and may not
1629                        # be supported in the future.
1630                    "name": "A String", # The name of the entity.
1631                        # A name matching regex `__.*__` is reserved/read-only.
1632                        # A name must not be more than 1500 bytes when UTF-8 encoded.
1633                        # Cannot be `""`.
1634                  },
1635                ],
1636                "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project
1637                    # ID and namespace ID.
1638                    # Queries are scoped to a single partition.
1639                    # by project and namespace, however the namespace ID may be empty.
1640                    #
1641                    # A partition ID contains several dimensions:
1642                    # project ID and namespace ID.
1643                    #
1644                    # Partition dimensions:
1645                    #
1646                    # - May be `""`.
1647                    # - Must be valid UTF-8 bytes.
1648                    # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
1649                    # If the value of any dimension matches regex `__.*__`, the partition is
1650                    # reserved/read-only.
1651                    # A reserved/read-only partition ID is forbidden in certain documented
1652                    # contexts.
1653                    #
1654                    # Foreign partition IDs (in which the project ID does
1655                    # not match the context project ID ) are discouraged.
1656                    # Reads and writes of foreign partition IDs may fail if the project is not in an active state.
1657                  "projectId": "A String", # The ID of the project to which the entities belong.
1658                  "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong.
1659                },
1660              },
1661              "stringValue": "A String", # A UTF-8 encoded string value.
1662                  # When `exclude_from_indexes` is false (it is indexed) , may have at most 1500 bytes.
1663                  # Otherwise, may be set to at least 1,000,000 bytes.
1664              "blobValue": "A String", # A blob value.
1665                  # May have at most 1,000,000 bytes.
1666                  # When `exclude_from_indexes` is false, may have at most 1500 bytes.
1667                  # In JSON requests, must be base64-encoded.
1668              "booleanValue": True or False, # A boolean value.
1669              "arrayValue": { # An array value. # An array value.
1670                  # Cannot contain another array value.
1671                  # A `Value` instance that sets field `array_value` must not set fields
1672                  # `meaning` or `exclude_from_indexes`.
1673                "values": [ # Values in the array.
1674                    # The order of this array may not be preserved if it contains a mix of
1675                    # indexed and unindexed values.
1676                  # Object with schema name: Value
1677                ],
1678              },
1679              "integerValue": "A String", # An integer value.
1680              "nullValue": "A String", # A null value.
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
1760Args:
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
1775Returns:
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
1787Args:
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            "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.
1843                # of doubles representing degrees latitude and degrees longitude. Unless
1844                # specified otherwise, this must conform to the
1845                # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
1846                # standard</a>. Values must be within normalized ranges.
1847                #
1848                # Example of normalization code in Python:
1849                #
1850                #     def NormalizeLongitude(longitude):
1851                #       """Wraps decimal degrees longitude to [-180.0, 180.0]."""
1852                #       q, r = divmod(longitude, 360.0)
1853                #       if r > 180.0 or (r == 180.0 and q <= -1.0):
1854                #         return r - 360.0
1855                #       return r
1856                #
1857                #     def NormalizeLatLng(latitude, longitude):
1858                #       """Wraps decimal degrees latitude and longitude to
1859                #       [-90.0, 90.0] and [-180.0, 180.0], respectively."""
1860                #       r = latitude % 360.0
1861                #       if r <= 90.0:
1862                #         return r, NormalizeLongitude(longitude)
1863                #       elif r >= 270.0:
1864                #         return r - 360, NormalizeLongitude(longitude)
1865                #       else:
1866                #         return 180 - r, NormalizeLongitude(longitude + 180.0)
1867                #
1868                #     assert 180.0 == NormalizeLongitude(180.0)
1869                #     assert -180.0 == NormalizeLongitude(-180.0)
1870                #     assert -179.0 == NormalizeLongitude(181.0)
1871                #     assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)
1872                #     assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)
1873                #     assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)
1874                #     assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)
1875                #     assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)
1876                #     assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)
1877                #     assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)
1878                #     assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)
1879                #     assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)
1880                #     assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)
1881              "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
1882              "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
1883            },
1884            "doubleValue": 3.14, # A double value.
1885            "meaning": 42, # The `meaning` field should only be populated for backwards compatibility.
1886            "excludeFromIndexes": True or False, # If the value should be excluded from all indexes including those defined
1887                # explicitly.
1888            "keyValue": { # A unique identifier for an entity. # A key value.
1889                # If a key's partition ID or any of its path kinds or names are
1890                # reserved/read-only, the key is reserved/read-only.
1891                # A reserved/read-only key is forbidden in certain documented contexts.
1892              "path": [ # The entity path.
1893                  # An entity path consists of one or more elements composed of a kind and a
1894                  # string or numerical identifier, which identify entities. The first
1895                  # element identifies a _root entity_, the second element identifies
1896                  # a _child_ of the root entity, the third element identifies a child of the
1897                  # second entity, and so forth. The entities identified by all prefixes of
1898                  # the path are called the element's _ancestors_.
1899                  #
1900                  # An entity path is always fully complete: *all* of the entity's ancestors
1901                  # are required to be in the path along with the entity identifier itself.
1902                  # The only exception is that in some documented cases, the identifier in the
1903                  # last path element (for the entity) itself may be omitted. For example,
1904                  # the last path element of the key of `Mutation.insert` may have no
1905                  # identifier.
1906                  #
1907                  # A path can never be empty, and a path can have at most 100 elements.
1908                { # A (kind, ID/name) pair used to construct a key path.
1909                    #
1910                    # If either name or ID is set, the element is complete.
1911                    # If neither is set, the element is incomplete.
1912                  "kind": "A String", # The kind of the entity.
1913                      # A kind matching regex `__.*__` is reserved/read-only.
1914                      # A kind must not contain more than 1500 bytes when UTF-8 encoded.
1915                      # Cannot be `""`.
1916                  "id": "A String", # The auto-allocated ID of the entity.
1917                      # Never equal to zero. Values less than zero are discouraged and may not
1918                      # be supported in the future.
1919                  "name": "A String", # The name of the entity.
1920                      # A name matching regex `__.*__` is reserved/read-only.
1921                      # A name must not be more than 1500 bytes when UTF-8 encoded.
1922                      # Cannot be `""`.
1923                },
1924              ],
1925              "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project
1926                  # ID and namespace ID.
1927                  # Queries are scoped to a single partition.
1928                  # by project and namespace, however the namespace ID may be empty.
1929                  #
1930                  # A partition ID contains several dimensions:
1931                  # project ID and namespace ID.
1932                  #
1933                  # Partition dimensions:
1934                  #
1935                  # - May be `""`.
1936                  # - Must be valid UTF-8 bytes.
1937                  # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
1938                  # If the value of any dimension matches regex `__.*__`, the partition is
1939                  # reserved/read-only.
1940                  # A reserved/read-only partition ID is forbidden in certain documented
1941                  # contexts.
1942                  #
1943                  # Foreign partition IDs (in which the project ID does
1944                  # not match the context project ID ) are discouraged.
1945                  # Reads and writes of foreign partition IDs may fail if the project is not in an active state.
1946                "projectId": "A String", # The ID of the project to which the entities belong.
1947                "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong.
1948              },
1949            },
1950            "stringValue": "A String", # A UTF-8 encoded string value.
1951                # When `exclude_from_indexes` is false (it is indexed) , may have at most 1500 bytes.
1952                # Otherwise, may be set to at least 1,000,000 bytes.
1953            "blobValue": "A String", # A blob value.
1954                # May have at most 1,000,000 bytes.
1955                # When `exclude_from_indexes` is false, may have at most 1500 bytes.
1956                # In JSON requests, must be base64-encoded.
1957            "booleanValue": True or False, # A boolean value.
1958            "arrayValue": { # An array value. # An array value.
1959                # Cannot contain another array value.
1960                # A `Value` instance that sets field `array_value` must not set fields
1961                # `meaning` or `exclude_from_indexes`.
1962              "values": [ # Values in the array.
1963                  # The order of this array may not be preserved if it contains a mix of
1964                  # indexed and unindexed values.
1965                # Object with schema name: Value
1966              ],
1967            },
1968            "integerValue": "A String", # An integer value.
1969            "nullValue": "A String", # A null value.
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            "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.
2038                # of doubles representing degrees latitude and degrees longitude. Unless
2039                # specified otherwise, this must conform to the
2040                # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
2041                # standard</a>. Values must be within normalized ranges.
2042                #
2043                # Example of normalization code in Python:
2044                #
2045                #     def NormalizeLongitude(longitude):
2046                #       """Wraps decimal degrees longitude to [-180.0, 180.0]."""
2047                #       q, r = divmod(longitude, 360.0)
2048                #       if r > 180.0 or (r == 180.0 and q <= -1.0):
2049                #         return r - 360.0
2050                #       return r
2051                #
2052                #     def NormalizeLatLng(latitude, longitude):
2053                #       """Wraps decimal degrees latitude and longitude to
2054                #       [-90.0, 90.0] and [-180.0, 180.0], respectively."""
2055                #       r = latitude % 360.0
2056                #       if r <= 90.0:
2057                #         return r, NormalizeLongitude(longitude)
2058                #       elif r >= 270.0:
2059                #         return r - 360, NormalizeLongitude(longitude)
2060                #       else:
2061                #         return 180 - r, NormalizeLongitude(longitude + 180.0)
2062                #
2063                #     assert 180.0 == NormalizeLongitude(180.0)
2064                #     assert -180.0 == NormalizeLongitude(-180.0)
2065                #     assert -179.0 == NormalizeLongitude(181.0)
2066                #     assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)
2067                #     assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)
2068                #     assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)
2069                #     assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)
2070                #     assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)
2071                #     assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)
2072                #     assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)
2073                #     assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)
2074                #     assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)
2075                #     assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)
2076              "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
2077              "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
2078            },
2079            "doubleValue": 3.14, # A double value.
2080            "meaning": 42, # The `meaning` field should only be populated for backwards compatibility.
2081            "excludeFromIndexes": True or False, # If the value should be excluded from all indexes including those defined
2082                # explicitly.
2083            "keyValue": { # A unique identifier for an entity. # A key value.
2084                # If a key's partition ID or any of its path kinds or names are
2085                # reserved/read-only, the key is reserved/read-only.
2086                # A reserved/read-only key is forbidden in certain documented contexts.
2087              "path": [ # The entity path.
2088                  # An entity path consists of one or more elements composed of a kind and a
2089                  # string or numerical identifier, which identify entities. The first
2090                  # element identifies a _root entity_, the second element identifies
2091                  # a _child_ of the root entity, the third element identifies a child of the
2092                  # second entity, and so forth. The entities identified by all prefixes of
2093                  # the path are called the element's _ancestors_.
2094                  #
2095                  # An entity path is always fully complete: *all* of the entity's ancestors
2096                  # are required to be in the path along with the entity identifier itself.
2097                  # The only exception is that in some documented cases, the identifier in the
2098                  # last path element (for the entity) itself may be omitted. For example,
2099                  # the last path element of the key of `Mutation.insert` may have no
2100                  # identifier.
2101                  #
2102                  # A path can never be empty, and a path can have at most 100 elements.
2103                { # A (kind, ID/name) pair used to construct a key path.
2104                    #
2105                    # If either name or ID is set, the element is complete.
2106                    # If neither is set, the element is incomplete.
2107                  "kind": "A String", # The kind of the entity.
2108                      # A kind matching regex `__.*__` is reserved/read-only.
2109                      # A kind must not contain more than 1500 bytes when UTF-8 encoded.
2110                      # Cannot be `""`.
2111                  "id": "A String", # The auto-allocated ID of the entity.
2112                      # Never equal to zero. Values less than zero are discouraged and may not
2113                      # be supported in the future.
2114                  "name": "A String", # The name of the entity.
2115                      # A name matching regex `__.*__` is reserved/read-only.
2116                      # A name must not be more than 1500 bytes when UTF-8 encoded.
2117                      # Cannot be `""`.
2118                },
2119              ],
2120              "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project
2121                  # ID and namespace ID.
2122                  # Queries are scoped to a single partition.
2123                  # by project and namespace, however the namespace ID may be empty.
2124                  #
2125                  # A partition ID contains several dimensions:
2126                  # project ID and namespace ID.
2127                  #
2128                  # Partition dimensions:
2129                  #
2130                  # - May be `""`.
2131                  # - Must be valid UTF-8 bytes.
2132                  # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
2133                  # If the value of any dimension matches regex `__.*__`, the partition is
2134                  # reserved/read-only.
2135                  # A reserved/read-only partition ID is forbidden in certain documented
2136                  # contexts.
2137                  #
2138                  # Foreign partition IDs (in which the project ID does
2139                  # not match the context project ID ) are discouraged.
2140                  # Reads and writes of foreign partition IDs may fail if the project is not in an active state.
2141                "projectId": "A String", # The ID of the project to which the entities belong.
2142                "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong.
2143              },
2144            },
2145            "stringValue": "A String", # A UTF-8 encoded string value.
2146                # When `exclude_from_indexes` is false (it is indexed) , may have at most 1500 bytes.
2147                # Otherwise, may be set to at least 1,000,000 bytes.
2148            "blobValue": "A String", # A blob value.
2149                # May have at most 1,000,000 bytes.
2150                # When `exclude_from_indexes` is false, may have at most 1500 bytes.
2151                # In JSON requests, must be base64-encoded.
2152            "booleanValue": True or False, # A boolean value.
2153            "arrayValue": { # An array value. # An array value.
2154                # Cannot contain another array value.
2155                # A `Value` instance that sets field `array_value` must not set fields
2156                # `meaning` or `exclude_from_indexes`.
2157              "values": [ # Values in the array.
2158                  # The order of this array may not be preserved if it contains a mix of
2159                  # indexed and unindexed values.
2160                # Object with schema name: Value
2161              ],
2162            },
2163            "integerValue": "A String", # An integer value.
2164            "nullValue": "A String", # A null value.
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            "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.
2187                # of doubles representing degrees latitude and degrees longitude. Unless
2188                # specified otherwise, this must conform to the
2189                # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
2190                # standard</a>. Values must be within normalized ranges.
2191                #
2192                # Example of normalization code in Python:
2193                #
2194                #     def NormalizeLongitude(longitude):
2195                #       """Wraps decimal degrees longitude to [-180.0, 180.0]."""
2196                #       q, r = divmod(longitude, 360.0)
2197                #       if r > 180.0 or (r == 180.0 and q <= -1.0):
2198                #         return r - 360.0
2199                #       return r
2200                #
2201                #     def NormalizeLatLng(latitude, longitude):
2202                #       """Wraps decimal degrees latitude and longitude to
2203                #       [-90.0, 90.0] and [-180.0, 180.0], respectively."""
2204                #       r = latitude % 360.0
2205                #       if r <= 90.0:
2206                #         return r, NormalizeLongitude(longitude)
2207                #       elif r >= 270.0:
2208                #         return r - 360, NormalizeLongitude(longitude)
2209                #       else:
2210                #         return 180 - r, NormalizeLongitude(longitude + 180.0)
2211                #
2212                #     assert 180.0 == NormalizeLongitude(180.0)
2213                #     assert -180.0 == NormalizeLongitude(-180.0)
2214                #     assert -179.0 == NormalizeLongitude(181.0)
2215                #     assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)
2216                #     assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)
2217                #     assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)
2218                #     assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)
2219                #     assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)
2220                #     assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)
2221                #     assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)
2222                #     assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)
2223                #     assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)
2224                #     assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)
2225              "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
2226              "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
2227            },
2228            "doubleValue": 3.14, # A double value.
2229            "meaning": 42, # The `meaning` field should only be populated for backwards compatibility.
2230            "excludeFromIndexes": True or False, # If the value should be excluded from all indexes including those defined
2231                # explicitly.
2232            "keyValue": { # A unique identifier for an entity. # A key value.
2233                # If a key's partition ID or any of its path kinds or names are
2234                # reserved/read-only, the key is reserved/read-only.
2235                # A reserved/read-only key is forbidden in certain documented contexts.
2236              "path": [ # The entity path.
2237                  # An entity path consists of one or more elements composed of a kind and a
2238                  # string or numerical identifier, which identify entities. The first
2239                  # element identifies a _root entity_, the second element identifies
2240                  # a _child_ of the root entity, the third element identifies a child of the
2241                  # second entity, and so forth. The entities identified by all prefixes of
2242                  # the path are called the element's _ancestors_.
2243                  #
2244                  # An entity path is always fully complete: *all* of the entity's ancestors
2245                  # are required to be in the path along with the entity identifier itself.
2246                  # The only exception is that in some documented cases, the identifier in the
2247                  # last path element (for the entity) itself may be omitted. For example,
2248                  # the last path element of the key of `Mutation.insert` may have no
2249                  # identifier.
2250                  #
2251                  # A path can never be empty, and a path can have at most 100 elements.
2252                { # A (kind, ID/name) pair used to construct a key path.
2253                    #
2254                    # If either name or ID is set, the element is complete.
2255                    # If neither is set, the element is incomplete.
2256                  "kind": "A String", # The kind of the entity.
2257                      # A kind matching regex `__.*__` is reserved/read-only.
2258                      # A kind must not contain more than 1500 bytes when UTF-8 encoded.
2259                      # Cannot be `""`.
2260                  "id": "A String", # The auto-allocated ID of the entity.
2261                      # Never equal to zero. Values less than zero are discouraged and may not
2262                      # be supported in the future.
2263                  "name": "A String", # The name of the entity.
2264                      # A name matching regex `__.*__` is reserved/read-only.
2265                      # A name must not be more than 1500 bytes when UTF-8 encoded.
2266                      # Cannot be `""`.
2267                },
2268              ],
2269              "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project
2270                  # ID and namespace ID.
2271                  # Queries are scoped to a single partition.
2272                  # by project and namespace, however the namespace ID may be empty.
2273                  #
2274                  # A partition ID contains several dimensions:
2275                  # project ID and namespace ID.
2276                  #
2277                  # Partition dimensions:
2278                  #
2279                  # - May be `""`.
2280                  # - Must be valid UTF-8 bytes.
2281                  # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
2282                  # If the value of any dimension matches regex `__.*__`, the partition is
2283                  # reserved/read-only.
2284                  # A reserved/read-only partition ID is forbidden in certain documented
2285                  # contexts.
2286                  #
2287                  # Foreign partition IDs (in which the project ID does
2288                  # not match the context project ID ) are discouraged.
2289                  # Reads and writes of foreign partition IDs may fail if the project is not in an active state.
2290                "projectId": "A String", # The ID of the project to which the entities belong.
2291                "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong.
2292              },
2293            },
2294            "stringValue": "A String", # A UTF-8 encoded string value.
2295                # When `exclude_from_indexes` is false (it is indexed) , may have at most 1500 bytes.
2296                # Otherwise, may be set to at least 1,000,000 bytes.
2297            "blobValue": "A String", # A blob value.
2298                # May have at most 1,000,000 bytes.
2299                # When `exclude_from_indexes` is false, may have at most 1500 bytes.
2300                # In JSON requests, must be base64-encoded.
2301            "booleanValue": True or False, # A boolean value.
2302            "arrayValue": { # An array value. # An array value.
2303                # Cannot contain another array value.
2304                # A `Value` instance that sets field `array_value` must not set fields
2305                # `meaning` or `exclude_from_indexes`.
2306              "values": [ # Values in the array.
2307                  # The order of this array may not be preserved if it contains a mix of
2308                  # indexed and unindexed values.
2309                # Object with schema name: Value
2310              ],
2311            },
2312            "integerValue": "A String", # An integer value.
2313            "nullValue": "A String", # A null value.
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
2338Returns:
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            "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.
2392                # of doubles representing degrees latitude and degrees longitude. Unless
2393                # specified otherwise, this must conform to the
2394                # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
2395                # standard</a>. Values must be within normalized ranges.
2396                #
2397                # Example of normalization code in Python:
2398                #
2399                #     def NormalizeLongitude(longitude):
2400                #       """Wraps decimal degrees longitude to [-180.0, 180.0]."""
2401                #       q, r = divmod(longitude, 360.0)
2402                #       if r > 180.0 or (r == 180.0 and q <= -1.0):
2403                #         return r - 360.0
2404                #       return r
2405                #
2406                #     def NormalizeLatLng(latitude, longitude):
2407                #       """Wraps decimal degrees latitude and longitude to
2408                #       [-90.0, 90.0] and [-180.0, 180.0], respectively."""
2409                #       r = latitude % 360.0
2410                #       if r <= 90.0:
2411                #         return r, NormalizeLongitude(longitude)
2412                #       elif r >= 270.0:
2413                #         return r - 360, NormalizeLongitude(longitude)
2414                #       else:
2415                #         return 180 - r, NormalizeLongitude(longitude + 180.0)
2416                #
2417                #     assert 180.0 == NormalizeLongitude(180.0)
2418                #     assert -180.0 == NormalizeLongitude(-180.0)
2419                #     assert -179.0 == NormalizeLongitude(181.0)
2420                #     assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)
2421                #     assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)
2422                #     assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)
2423                #     assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)
2424                #     assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)
2425                #     assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)
2426                #     assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)
2427                #     assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)
2428                #     assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)
2429                #     assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)
2430              "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
2431              "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
2432            },
2433            "doubleValue": 3.14, # A double value.
2434            "meaning": 42, # The `meaning` field should only be populated for backwards compatibility.
2435            "excludeFromIndexes": True or False, # If the value should be excluded from all indexes including those defined
2436                # explicitly.
2437            "keyValue": { # A unique identifier for an entity. # A key value.
2438                # If a key's partition ID or any of its path kinds or names are
2439                # reserved/read-only, the key is reserved/read-only.
2440                # A reserved/read-only key is forbidden in certain documented contexts.
2441              "path": [ # The entity path.
2442                  # An entity path consists of one or more elements composed of a kind and a
2443                  # string or numerical identifier, which identify entities. The first
2444                  # element identifies a _root entity_, the second element identifies
2445                  # a _child_ of the root entity, the third element identifies a child of the
2446                  # second entity, and so forth. The entities identified by all prefixes of
2447                  # the path are called the element's _ancestors_.
2448                  #
2449                  # An entity path is always fully complete: *all* of the entity's ancestors
2450                  # are required to be in the path along with the entity identifier itself.
2451                  # The only exception is that in some documented cases, the identifier in the
2452                  # last path element (for the entity) itself may be omitted. For example,
2453                  # the last path element of the key of `Mutation.insert` may have no
2454                  # identifier.
2455                  #
2456                  # A path can never be empty, and a path can have at most 100 elements.
2457                { # A (kind, ID/name) pair used to construct a key path.
2458                    #
2459                    # If either name or ID is set, the element is complete.
2460                    # If neither is set, the element is incomplete.
2461                  "kind": "A String", # The kind of the entity.
2462                      # A kind matching regex `__.*__` is reserved/read-only.
2463                      # A kind must not contain more than 1500 bytes when UTF-8 encoded.
2464                      # Cannot be `""`.
2465                  "id": "A String", # The auto-allocated ID of the entity.
2466                      # Never equal to zero. Values less than zero are discouraged and may not
2467                      # be supported in the future.
2468                  "name": "A String", # The name of the entity.
2469                      # A name matching regex `__.*__` is reserved/read-only.
2470                      # A name must not be more than 1500 bytes when UTF-8 encoded.
2471                      # Cannot be `""`.
2472                },
2473              ],
2474              "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project
2475                  # ID and namespace ID.
2476                  # Queries are scoped to a single partition.
2477                  # by project and namespace, however the namespace ID may be empty.
2478                  #
2479                  # A partition ID contains several dimensions:
2480                  # project ID and namespace ID.
2481                  #
2482                  # Partition dimensions:
2483                  #
2484                  # - May be `""`.
2485                  # - Must be valid UTF-8 bytes.
2486                  # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
2487                  # If the value of any dimension matches regex `__.*__`, the partition is
2488                  # reserved/read-only.
2489                  # A reserved/read-only partition ID is forbidden in certain documented
2490                  # contexts.
2491                  #
2492                  # Foreign partition IDs (in which the project ID does
2493                  # not match the context project ID ) are discouraged.
2494                  # Reads and writes of foreign partition IDs may fail if the project is not in an active state.
2495                "projectId": "A String", # The ID of the project to which the entities belong.
2496                "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong.
2497              },
2498            },
2499            "stringValue": "A String", # A UTF-8 encoded string value.
2500                # When `exclude_from_indexes` is false (it is indexed) , may have at most 1500 bytes.
2501                # Otherwise, may be set to at least 1,000,000 bytes.
2502            "blobValue": "A String", # A blob value.
2503                # May have at most 1,000,000 bytes.
2504                # When `exclude_from_indexes` is false, may have at most 1500 bytes.
2505                # In JSON requests, must be base64-encoded.
2506            "booleanValue": True or False, # A boolean value.
2507            "arrayValue": { # An array value. # An array value.
2508                # Cannot contain another array value.
2509                # A `Value` instance that sets field `array_value` must not set fields
2510                # `meaning` or `exclude_from_indexes`.
2511              "values": [ # Values in the array.
2512                  # The order of this array may not be preserved if it contains a mix of
2513                  # indexed and unindexed values.
2514                # Object with schema name: Value
2515              ],
2516            },
2517            "integerValue": "A String", # An integer value.
2518            "nullValue": "A String", # A null value.
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                "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.
2589                    # of doubles representing degrees latitude and degrees longitude. Unless
2590                    # specified otherwise, this must conform to the
2591                    # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
2592                    # standard</a>. Values must be within normalized ranges.
2593                    #
2594                    # Example of normalization code in Python:
2595                    #
2596                    #     def NormalizeLongitude(longitude):
2597                    #       """Wraps decimal degrees longitude to [-180.0, 180.0]."""
2598                    #       q, r = divmod(longitude, 360.0)
2599                    #       if r > 180.0 or (r == 180.0 and q <= -1.0):
2600                    #         return r - 360.0
2601                    #       return r
2602                    #
2603                    #     def NormalizeLatLng(latitude, longitude):
2604                    #       """Wraps decimal degrees latitude and longitude to
2605                    #       [-90.0, 90.0] and [-180.0, 180.0], respectively."""
2606                    #       r = latitude % 360.0
2607                    #       if r <= 90.0:
2608                    #         return r, NormalizeLongitude(longitude)
2609                    #       elif r >= 270.0:
2610                    #         return r - 360, NormalizeLongitude(longitude)
2611                    #       else:
2612                    #         return 180 - r, NormalizeLongitude(longitude + 180.0)
2613                    #
2614                    #     assert 180.0 == NormalizeLongitude(180.0)
2615                    #     assert -180.0 == NormalizeLongitude(-180.0)
2616                    #     assert -179.0 == NormalizeLongitude(181.0)
2617                    #     assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)
2618                    #     assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)
2619                    #     assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)
2620                    #     assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)
2621                    #     assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)
2622                    #     assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)
2623                    #     assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)
2624                    #     assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)
2625                    #     assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)
2626                    #     assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)
2627                  "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
2628                  "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
2629                },
2630                "doubleValue": 3.14, # A double value.
2631                "meaning": 42, # The `meaning` field should only be populated for backwards compatibility.
2632                "excludeFromIndexes": True or False, # If the value should be excluded from all indexes including those defined
2633                    # explicitly.
2634                "keyValue": { # A unique identifier for an entity. # A key value.
2635                    # If a key's partition ID or any of its path kinds or names are
2636                    # reserved/read-only, the key is reserved/read-only.
2637                    # A reserved/read-only key is forbidden in certain documented contexts.
2638                  "path": [ # The entity path.
2639                      # An entity path consists of one or more elements composed of a kind and a
2640                      # string or numerical identifier, which identify entities. The first
2641                      # element identifies a _root entity_, the second element identifies
2642                      # a _child_ of the root entity, the third element identifies a child of the
2643                      # second entity, and so forth. The entities identified by all prefixes of
2644                      # the path are called the element's _ancestors_.
2645                      #
2646                      # An entity path is always fully complete: *all* of the entity's ancestors
2647                      # are required to be in the path along with the entity identifier itself.
2648                      # The only exception is that in some documented cases, the identifier in the
2649                      # last path element (for the entity) itself may be omitted. For example,
2650                      # the last path element of the key of `Mutation.insert` may have no
2651                      # identifier.
2652                      #
2653                      # A path can never be empty, and a path can have at most 100 elements.
2654                    { # A (kind, ID/name) pair used to construct a key path.
2655                        #
2656                        # If either name or ID is set, the element is complete.
2657                        # If neither is set, the element is incomplete.
2658                      "kind": "A String", # The kind of the entity.
2659                          # A kind matching regex `__.*__` is reserved/read-only.
2660                          # A kind must not contain more than 1500 bytes when UTF-8 encoded.
2661                          # Cannot be `""`.
2662                      "id": "A String", # The auto-allocated ID of the entity.
2663                          # Never equal to zero. Values less than zero are discouraged and may not
2664                          # be supported in the future.
2665                      "name": "A String", # The name of the entity.
2666                          # A name matching regex `__.*__` is reserved/read-only.
2667                          # A name must not be more than 1500 bytes when UTF-8 encoded.
2668                          # Cannot be `""`.
2669                    },
2670                  ],
2671                  "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project
2672                      # ID and namespace ID.
2673                      # Queries are scoped to a single partition.
2674                      # by project and namespace, however the namespace ID may be empty.
2675                      #
2676                      # A partition ID contains several dimensions:
2677                      # project ID and namespace ID.
2678                      #
2679                      # Partition dimensions:
2680                      #
2681                      # - May be `""`.
2682                      # - Must be valid UTF-8 bytes.
2683                      # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
2684                      # If the value of any dimension matches regex `__.*__`, the partition is
2685                      # reserved/read-only.
2686                      # A reserved/read-only partition ID is forbidden in certain documented
2687                      # contexts.
2688                      #
2689                      # Foreign partition IDs (in which the project ID does
2690                      # not match the context project ID ) are discouraged.
2691                      # Reads and writes of foreign partition IDs may fail if the project is not in an active state.
2692                    "projectId": "A String", # The ID of the project to which the entities belong.
2693                    "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong.
2694                  },
2695                },
2696                "stringValue": "A String", # A UTF-8 encoded string value.
2697                    # When `exclude_from_indexes` is false (it is indexed) , may have at most 1500 bytes.
2698                    # Otherwise, may be set to at least 1,000,000 bytes.
2699                "blobValue": "A String", # A blob value.
2700                    # May have at most 1,000,000 bytes.
2701                    # When `exclude_from_indexes` is false, may have at most 1500 bytes.
2702                    # In JSON requests, must be base64-encoded.
2703                "booleanValue": True or False, # A boolean value.
2704                "arrayValue": { # An array value. # An array value.
2705                    # Cannot contain another array value.
2706                    # A `Value` instance that sets field `array_value` must not set fields
2707                    # `meaning` or `exclude_from_indexes`.
2708                  "values": [ # Values in the array.
2709                      # The order of this array may not be preserved if it contains a mix of
2710                      # indexed and unindexed values.
2711                    # Object with schema name: Value
2712                  ],
2713                },
2714                "integerValue": "A String", # An integer value.
2715                "nullValue": "A String", # A null value.
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>