blob: 76928b2494f811b3b779906edf24a06ef1a7fdcd [file] [log] [blame]
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001<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
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070075<h1><a href="datastore_v1beta3.html">Cloud Datastore API</a> . <a href="datastore_v1beta3.projects.html">projects</a></h1>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070076<h2>Instance Methods</h2>
77<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#allocateIds">allocateIds(projectId, body=None, x__xgafv=None)</a></code></p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070079<p class="firstline">Allocates IDs for the given keys, which is useful for referencing an entity</p>
80<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070081 <code><a href="#beginTransaction">beginTransaction(projectId, body=None, x__xgafv=None)</a></code></p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070082<p class="firstline">Begins a new transaction.</p>
83<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070084 <code><a href="#commit">commit(projectId, body=None, x__xgafv=None)</a></code></p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070085<p class="firstline">Commits a transaction, optionally creating, deleting or modifying some</p>
86<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070087 <code><a href="#lookup">lookup(projectId, body=None, x__xgafv=None)</a></code></p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070088<p class="firstline">Looks up entities by key.</p>
89<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070090 <code><a href="#reserveIds">reserveIds(projectId, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070091<p class="firstline">Prevents the supplied keys' IDs from being auto-allocated by Cloud</p>
92<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070093 <code><a href="#rollback">rollback(projectId, body=None, x__xgafv=None)</a></code></p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070094<p class="firstline">Rolls back a transaction.</p>
95<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070096 <code><a href="#runQuery">runQuery(projectId, body=None, x__xgafv=None)</a></code></p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070097<p class="firstline">Queries for entities.</p>
98<h3>Method Details</h3>
99<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700100 <code class="details" id="allocateIds">allocateIds(projectId, body=None, x__xgafv=None)</code>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700101 <pre>Allocates IDs for the given keys, which is useful for referencing an entity
102before it is inserted.
103
104Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700105 projectId: string, Required. The ID of the project against which to make the request. (required)
106 body: object, The request body.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700107 The object takes the form of:
108
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700109{ # The request for Datastore.AllocateIds.
Dan O'Mearadd494642020-05-01 07:42:23 -0700110 "keys": [ # Required. A list of keys with incomplete key paths for which to allocate IDs.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700111 # No key may be reserved/read-only.
112 { # A unique identifier for an entity.
113 # If a key's partition ID or any of its path kinds or names are
114 # reserved/read-only, the key is reserved/read-only.
115 # A reserved/read-only key is forbidden in certain documented contexts.
116 "path": [ # The entity path.
117 # An entity path consists of one or more elements composed of a kind and a
118 # string or numerical identifier, which identify entities. The first
119 # element identifies a _root entity_, the second element identifies
120 # a _child_ of the root entity, the third element identifies a child of the
121 # second entity, and so forth. The entities identified by all prefixes of
122 # the path are called the element's _ancestors_.
123 #
124 # An entity path is always fully complete: *all* of the entity's ancestors
125 # are required to be in the path along with the entity identifier itself.
126 # The only exception is that in some documented cases, the identifier in the
127 # last path element (for the entity) itself may be omitted. For example,
128 # the last path element of the key of `Mutation.insert` may have no
129 # identifier.
130 #
131 # A path can never be empty, and a path can have at most 100 elements.
132 { # A (kind, ID/name) pair used to construct a key path.
133 #
134 # If either name or ID is set, the element is complete.
135 # If neither is set, the element is incomplete.
136 "kind": "A String", # The kind of the entity.
137 # A kind matching regex `__.*__` is reserved/read-only.
138 # A kind must not contain more than 1500 bytes when UTF-8 encoded.
139 # Cannot be `""`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700140 "id": "A String", # The auto-allocated ID of the entity.
141 # Never equal to zero. Values less than zero are discouraged and may not
142 # be supported in the future.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700143 "name": "A String", # The name of the entity.
144 # A name matching regex `__.*__` is reserved/read-only.
145 # A name must not be more than 1500 bytes when UTF-8 encoded.
146 # Cannot be `""`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700147 },
148 ],
149 "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project
150 # ID and namespace ID.
151 # Queries are scoped to a single partition.
152 # by project and namespace, however the namespace ID may be empty.
153 #
154 # A partition ID contains several dimensions:
155 # project ID and namespace ID.
156 #
157 # Partition dimensions:
158 #
159 # - May be `""`.
160 # - Must be valid UTF-8 bytes.
161 # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
162 # If the value of any dimension matches regex `__.*__`, the partition is
163 # reserved/read-only.
164 # A reserved/read-only partition ID is forbidden in certain documented
165 # contexts.
166 #
167 # Foreign partition IDs (in which the project ID does
168 # not match the context project ID ) are discouraged.
169 # Reads and writes of foreign partition IDs may fail if the project is not in an active state.
170 "projectId": "A String", # The ID of the project to which the entities belong.
171 "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong.
172 },
173 },
174 ],
175 }
176
177 x__xgafv: string, V1 error format.
178 Allowed values
179 1 - v1 error format
180 2 - v2 error format
181
182Returns:
183 An object of the form:
184
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700185 { # The response for Datastore.AllocateIds.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700186 "keys": [ # The keys specified in the request (in the same order), each with
187 # its key path completed with a newly allocated ID.
188 { # A unique identifier for an entity.
189 # If a key's partition ID or any of its path kinds or names are
190 # reserved/read-only, the key is reserved/read-only.
191 # A reserved/read-only key is forbidden in certain documented contexts.
192 "path": [ # The entity path.
193 # An entity path consists of one or more elements composed of a kind and a
194 # string or numerical identifier, which identify entities. The first
195 # element identifies a _root entity_, the second element identifies
196 # a _child_ of the root entity, the third element identifies a child of the
197 # second entity, and so forth. The entities identified by all prefixes of
198 # the path are called the element's _ancestors_.
199 #
200 # An entity path is always fully complete: *all* of the entity's ancestors
201 # are required to be in the path along with the entity identifier itself.
202 # The only exception is that in some documented cases, the identifier in the
203 # last path element (for the entity) itself may be omitted. For example,
204 # the last path element of the key of `Mutation.insert` may have no
205 # identifier.
206 #
207 # A path can never be empty, and a path can have at most 100 elements.
208 { # A (kind, ID/name) pair used to construct a key path.
209 #
210 # If either name or ID is set, the element is complete.
211 # If neither is set, the element is incomplete.
212 "kind": "A String", # The kind of the entity.
213 # A kind matching regex `__.*__` is reserved/read-only.
214 # A kind must not contain more than 1500 bytes when UTF-8 encoded.
215 # Cannot be `""`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700216 "id": "A String", # The auto-allocated ID of the entity.
217 # Never equal to zero. Values less than zero are discouraged and may not
218 # be supported in the future.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700219 "name": "A String", # The name of the entity.
220 # A name matching regex `__.*__` is reserved/read-only.
221 # A name must not be more than 1500 bytes when UTF-8 encoded.
222 # Cannot be `""`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700223 },
224 ],
225 "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project
226 # ID and namespace ID.
227 # Queries are scoped to a single partition.
228 # by project and namespace, however the namespace ID may be empty.
229 #
230 # A partition ID contains several dimensions:
231 # project ID and namespace ID.
232 #
233 # Partition dimensions:
234 #
235 # - May be `""`.
236 # - Must be valid UTF-8 bytes.
237 # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
238 # If the value of any dimension matches regex `__.*__`, the partition is
239 # reserved/read-only.
240 # A reserved/read-only partition ID is forbidden in certain documented
241 # contexts.
242 #
243 # Foreign partition IDs (in which the project ID does
244 # not match the context project ID ) are discouraged.
245 # Reads and writes of foreign partition IDs may fail if the project is not in an active state.
246 "projectId": "A String", # The ID of the project to which the entities belong.
247 "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong.
248 },
249 },
250 ],
251 }</pre>
252</div>
253
254<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700255 <code class="details" id="beginTransaction">beginTransaction(projectId, body=None, x__xgafv=None)</code>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700256 <pre>Begins a new transaction.
257
258Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700259 projectId: string, Required. The ID of the project against which to make the request. (required)
260 body: object, The request body.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700261 The object takes the form of:
262
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700263{ # The request for Datastore.BeginTransaction.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700264 "transactionOptions": { # Options for beginning a new transaction. # Options for a new transaction.
265 #
266 # Transactions can be created explicitly with calls to
267 # Datastore.BeginTransaction or implicitly by setting
268 # ReadOptions.new_transaction in read requests.
269 "readWrite": { # Options specific to read / write transactions. # The transaction should allow both reads and writes.
270 "previousTransaction": "A String", # The transaction identifier of the transaction being retried.
271 },
272 "readOnly": { # Options specific to read-only transactions. # The transaction should only allow reads.
273 },
274 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700275 }
276
277 x__xgafv: string, V1 error format.
278 Allowed values
279 1 - v1 error format
280 2 - v2 error format
281
282Returns:
283 An object of the form:
284
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700285 { # The response for Datastore.BeginTransaction.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700286 "transaction": "A String", # The transaction identifier (always present).
287 }</pre>
288</div>
289
290<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700291 <code class="details" id="commit">commit(projectId, body=None, x__xgafv=None)</code>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700292 <pre>Commits a transaction, optionally creating, deleting or modifying some
293entities.
294
295Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700296 projectId: string, Required. The ID of the project against which to make the request. (required)
297 body: object, The request body.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700298 The object takes the form of:
299
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700300{ # The request for Datastore.Commit.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700301 "transaction": "A String", # The identifier of the transaction associated with the commit. A
302 # transaction identifier is returned by a call to
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700303 # Datastore.BeginTransaction.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700304 "mutations": [ # The mutations to perform.
305 #
306 # When mode is `TRANSACTIONAL`, mutations affecting a single entity are
307 # applied in order. The following sequences of mutations affecting a single
308 # entity are not permitted in a single `Commit` request:
309 #
310 # - `insert` followed by `insert`
311 # - `update` followed by `insert`
312 # - `upsert` followed by `insert`
313 # - `delete` followed by `update`
314 #
315 # When mode is `NON_TRANSACTIONAL`, no two mutations may affect a single
316 # entity.
317 { # A mutation to apply to an entity.
318 "insert": { # A Datastore data object. # The entity to insert. The entity must not already exist.
319 # The entity key's final path element may be incomplete.
320 #
321 # An entity is limited to 1 megabyte when stored. That _roughly_
322 # corresponds to a limit of 1 megabyte for the serialized form of this
323 # message.
324 "properties": { # The entity's properties.
325 # The map's keys are property names.
326 # A property name matching regex `__.*__` is reserved.
327 # A reserved property name is forbidden in certain documented contexts.
328 # The name must not contain more than 500 characters.
329 # The name cannot be `""`.
330 "a_key": { # A message that can hold any of the supported value types and associated
331 # metadata.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700332 "booleanValue": True or False, # A boolean value.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700333 "entityValue": # Object with schema name: Entity # An entity value.
334 #
335 # - May have no key.
336 # - May have a key with an incomplete key path.
337 # - May have a reserved/read-only key.
338 "timestampValue": "A String", # A timestamp value.
339 # When stored in the Datastore, precise only to microseconds;
340 # any additional precision is rounded down.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700341 "excludeFromIndexes": True or False, # If the value should be excluded from all indexes including those defined
342 # explicitly.
Dan O'Mearadd494642020-05-01 07:42:23 -0700343 "doubleValue": 3.14, # A double value.
344 "meaning": 42, # The `meaning` field should only be populated for backwards compatibility.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700345 "keyValue": { # A unique identifier for an entity. # A key value.
346 # If a key's partition ID or any of its path kinds or names are
347 # reserved/read-only, the key is reserved/read-only.
348 # A reserved/read-only key is forbidden in certain documented contexts.
349 "path": [ # The entity path.
350 # An entity path consists of one or more elements composed of a kind and a
351 # string or numerical identifier, which identify entities. The first
352 # element identifies a _root entity_, the second element identifies
353 # a _child_ of the root entity, the third element identifies a child of the
354 # second entity, and so forth. The entities identified by all prefixes of
355 # the path are called the element's _ancestors_.
356 #
357 # An entity path is always fully complete: *all* of the entity's ancestors
358 # are required to be in the path along with the entity identifier itself.
359 # The only exception is that in some documented cases, the identifier in the
360 # last path element (for the entity) itself may be omitted. For example,
361 # the last path element of the key of `Mutation.insert` may have no
362 # identifier.
363 #
364 # A path can never be empty, and a path can have at most 100 elements.
365 { # A (kind, ID/name) pair used to construct a key path.
366 #
367 # If either name or ID is set, the element is complete.
368 # If neither is set, the element is incomplete.
369 "kind": "A String", # The kind of the entity.
370 # A kind matching regex `__.*__` is reserved/read-only.
371 # A kind must not contain more than 1500 bytes when UTF-8 encoded.
372 # Cannot be `""`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700373 "id": "A String", # The auto-allocated ID of the entity.
374 # Never equal to zero. Values less than zero are discouraged and may not
375 # be supported in the future.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700376 "name": "A String", # The name of the entity.
377 # A name matching regex `__.*__` is reserved/read-only.
378 # A name must not be more than 1500 bytes when UTF-8 encoded.
379 # Cannot be `""`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700380 },
381 ],
382 "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project
383 # ID and namespace ID.
384 # Queries are scoped to a single partition.
385 # by project and namespace, however the namespace ID may be empty.
386 #
387 # A partition ID contains several dimensions:
388 # project ID and namespace ID.
389 #
390 # Partition dimensions:
391 #
392 # - May be `""`.
393 # - Must be valid UTF-8 bytes.
394 # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
395 # If the value of any dimension matches regex `__.*__`, the partition is
396 # reserved/read-only.
397 # A reserved/read-only partition ID is forbidden in certain documented
398 # contexts.
399 #
400 # Foreign partition IDs (in which the project ID does
401 # not match the context project ID ) are discouraged.
402 # Reads and writes of foreign partition IDs may fail if the project is not in an active state.
403 "projectId": "A String", # The ID of the project to which the entities belong.
404 "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong.
405 },
406 },
407 "blobValue": "A String", # A blob value.
408 # May have at most 1,000,000 bytes.
409 # When `exclude_from_indexes` is false, may have at most 1500 bytes.
410 # In JSON requests, must be base64-encoded.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700411 "stringValue": "A String", # A UTF-8 encoded string value.
412 # When `exclude_from_indexes` is false (it is indexed) , may have at most 1500 bytes.
413 # Otherwise, may be set to at least 1,000,000 bytes.
414 "nullValue": "A String", # A null value.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700415 "arrayValue": { # An array value. # An array value.
416 # Cannot contain another array value.
417 # A `Value` instance that sets field `array_value` must not set fields
418 # `meaning` or `exclude_from_indexes`.
419 "values": [ # Values in the array.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700420 # The order of values in an array is preserved as long as all values have
421 # identical settings for 'exclude_from_indexes'.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700422 # Object with schema name: Value
423 ],
424 },
425 "integerValue": "A String", # An integer value.
426 "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.
427 # of doubles representing degrees latitude and degrees longitude. Unless
428 # specified otherwise, this must conform to the
Dan O'Mearadd494642020-05-01 07:42:23 -0700429 # &lt;a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf"&gt;WGS84
430 # standard&lt;/a&gt;. Values must be within normalized ranges.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700431 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
432 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
433 },
434 },
435 },
436 "key": { # A unique identifier for an entity. # The entity's key.
437 #
438 # An entity must have a key, unless otherwise documented (for example,
439 # an entity in `Value.entity_value` may have no key).
440 # An entity's kind is its key path's last element's kind,
441 # or null if it has no key.
442 # If a key's partition ID or any of its path kinds or names are
443 # reserved/read-only, the key is reserved/read-only.
444 # A reserved/read-only key is forbidden in certain documented contexts.
445 "path": [ # The entity path.
446 # An entity path consists of one or more elements composed of a kind and a
447 # string or numerical identifier, which identify entities. The first
448 # element identifies a _root entity_, the second element identifies
449 # a _child_ of the root entity, the third element identifies a child of the
450 # second entity, and so forth. The entities identified by all prefixes of
451 # the path are called the element's _ancestors_.
452 #
453 # An entity path is always fully complete: *all* of the entity's ancestors
454 # are required to be in the path along with the entity identifier itself.
455 # The only exception is that in some documented cases, the identifier in the
456 # last path element (for the entity) itself may be omitted. For example,
457 # the last path element of the key of `Mutation.insert` may have no
458 # identifier.
459 #
460 # A path can never be empty, and a path can have at most 100 elements.
461 { # A (kind, ID/name) pair used to construct a key path.
462 #
463 # If either name or ID is set, the element is complete.
464 # If neither is set, the element is incomplete.
465 "kind": "A String", # The kind of the entity.
466 # A kind matching regex `__.*__` is reserved/read-only.
467 # A kind must not contain more than 1500 bytes when UTF-8 encoded.
468 # Cannot be `""`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700469 "id": "A String", # The auto-allocated ID of the entity.
470 # Never equal to zero. Values less than zero are discouraged and may not
471 # be supported in the future.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700472 "name": "A String", # The name of the entity.
473 # A name matching regex `__.*__` is reserved/read-only.
474 # A name must not be more than 1500 bytes when UTF-8 encoded.
475 # Cannot be `""`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700476 },
477 ],
478 "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project
479 # ID and namespace ID.
480 # Queries are scoped to a single partition.
481 # by project and namespace, however the namespace ID may be empty.
482 #
483 # A partition ID contains several dimensions:
484 # project ID and namespace ID.
485 #
486 # Partition dimensions:
487 #
488 # - May be `""`.
489 # - Must be valid UTF-8 bytes.
490 # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
491 # If the value of any dimension matches regex `__.*__`, the partition is
492 # reserved/read-only.
493 # A reserved/read-only partition ID is forbidden in certain documented
494 # contexts.
495 #
496 # Foreign partition IDs (in which the project ID does
497 # not match the context project ID ) are discouraged.
498 # Reads and writes of foreign partition IDs may fail if the project is not in an active state.
499 "projectId": "A String", # The ID of the project to which the entities belong.
500 "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong.
501 },
502 },
503 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400504 "upsert": { # A Datastore data object. # The entity to upsert. The entity may or may not already exist.
505 # The entity key's final path element may be incomplete.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700506 #
507 # An entity is limited to 1 megabyte when stored. That _roughly_
508 # corresponds to a limit of 1 megabyte for the serialized form of this
509 # message.
510 "properties": { # The entity's properties.
511 # The map's keys are property names.
512 # A property name matching regex `__.*__` is reserved.
513 # A reserved property name is forbidden in certain documented contexts.
514 # The name must not contain more than 500 characters.
515 # The name cannot be `""`.
516 "a_key": { # A message that can hold any of the supported value types and associated
517 # metadata.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700518 "booleanValue": True or False, # A boolean value.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700519 "entityValue": # Object with schema name: Entity # An entity value.
520 #
521 # - May have no key.
522 # - May have a key with an incomplete key path.
523 # - May have a reserved/read-only key.
524 "timestampValue": "A String", # A timestamp value.
525 # When stored in the Datastore, precise only to microseconds;
526 # any additional precision is rounded down.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700527 "excludeFromIndexes": True or False, # If the value should be excluded from all indexes including those defined
528 # explicitly.
Dan O'Mearadd494642020-05-01 07:42:23 -0700529 "doubleValue": 3.14, # A double value.
530 "meaning": 42, # The `meaning` field should only be populated for backwards compatibility.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700531 "keyValue": { # A unique identifier for an entity. # A key value.
532 # If a key's partition ID or any of its path kinds or names are
533 # reserved/read-only, the key is reserved/read-only.
534 # A reserved/read-only key is forbidden in certain documented contexts.
535 "path": [ # The entity path.
536 # An entity path consists of one or more elements composed of a kind and a
537 # string or numerical identifier, which identify entities. The first
538 # element identifies a _root entity_, the second element identifies
539 # a _child_ of the root entity, the third element identifies a child of the
540 # second entity, and so forth. The entities identified by all prefixes of
541 # the path are called the element's _ancestors_.
542 #
543 # An entity path is always fully complete: *all* of the entity's ancestors
544 # are required to be in the path along with the entity identifier itself.
545 # The only exception is that in some documented cases, the identifier in the
546 # last path element (for the entity) itself may be omitted. For example,
547 # the last path element of the key of `Mutation.insert` may have no
548 # identifier.
549 #
550 # A path can never be empty, and a path can have at most 100 elements.
551 { # A (kind, ID/name) pair used to construct a key path.
552 #
553 # If either name or ID is set, the element is complete.
554 # If neither is set, the element is incomplete.
555 "kind": "A String", # The kind of the entity.
556 # A kind matching regex `__.*__` is reserved/read-only.
557 # A kind must not contain more than 1500 bytes when UTF-8 encoded.
558 # Cannot be `""`.
559 "id": "A String", # The auto-allocated ID of the entity.
560 # Never equal to zero. Values less than zero are discouraged and may not
561 # be supported in the future.
562 "name": "A String", # The name of the entity.
563 # A name matching regex `__.*__` is reserved/read-only.
564 # A name must not be more than 1500 bytes when UTF-8 encoded.
565 # Cannot be `""`.
566 },
567 ],
568 "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project
569 # ID and namespace ID.
570 # Queries are scoped to a single partition.
571 # by project and namespace, however the namespace ID may be empty.
572 #
573 # A partition ID contains several dimensions:
574 # project ID and namespace ID.
575 #
576 # Partition dimensions:
577 #
578 # - May be `""`.
579 # - Must be valid UTF-8 bytes.
580 # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
581 # If the value of any dimension matches regex `__.*__`, the partition is
582 # reserved/read-only.
583 # A reserved/read-only partition ID is forbidden in certain documented
584 # contexts.
585 #
586 # Foreign partition IDs (in which the project ID does
587 # not match the context project ID ) are discouraged.
588 # Reads and writes of foreign partition IDs may fail if the project is not in an active state.
589 "projectId": "A String", # The ID of the project to which the entities belong.
590 "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong.
591 },
592 },
593 "blobValue": "A String", # A blob value.
594 # May have at most 1,000,000 bytes.
595 # When `exclude_from_indexes` is false, may have at most 1500 bytes.
596 # In JSON requests, must be base64-encoded.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700597 "stringValue": "A String", # A UTF-8 encoded string value.
598 # When `exclude_from_indexes` is false (it is indexed) , may have at most 1500 bytes.
599 # Otherwise, may be set to at least 1,000,000 bytes.
600 "nullValue": "A String", # A null value.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700601 "arrayValue": { # An array value. # An array value.
602 # Cannot contain another array value.
603 # A `Value` instance that sets field `array_value` must not set fields
604 # `meaning` or `exclude_from_indexes`.
605 "values": [ # Values in the array.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700606 # The order of values in an array is preserved as long as all values have
607 # identical settings for 'exclude_from_indexes'.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700608 # Object with schema name: Value
609 ],
610 },
611 "integerValue": "A String", # An integer value.
612 "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.
613 # of doubles representing degrees latitude and degrees longitude. Unless
614 # specified otherwise, this must conform to the
Dan O'Mearadd494642020-05-01 07:42:23 -0700615 # &lt;a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf"&gt;WGS84
616 # standard&lt;/a&gt;. Values must be within normalized ranges.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400617 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
618 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
619 },
620 },
621 },
622 "key": { # A unique identifier for an entity. # The entity's key.
623 #
624 # An entity must have a key, unless otherwise documented (for example,
625 # an entity in `Value.entity_value` may have no key).
626 # An entity's kind is its key path's last element's kind,
627 # or null if it has no key.
628 # If a key's partition ID or any of its path kinds or names are
629 # reserved/read-only, the key is reserved/read-only.
630 # A reserved/read-only key is forbidden in certain documented contexts.
631 "path": [ # The entity path.
632 # An entity path consists of one or more elements composed of a kind and a
633 # string or numerical identifier, which identify entities. The first
634 # element identifies a _root entity_, the second element identifies
635 # a _child_ of the root entity, the third element identifies a child of the
636 # second entity, and so forth. The entities identified by all prefixes of
637 # the path are called the element's _ancestors_.
638 #
639 # An entity path is always fully complete: *all* of the entity's ancestors
640 # are required to be in the path along with the entity identifier itself.
641 # The only exception is that in some documented cases, the identifier in the
642 # last path element (for the entity) itself may be omitted. For example,
643 # the last path element of the key of `Mutation.insert` may have no
644 # identifier.
645 #
646 # A path can never be empty, and a path can have at most 100 elements.
647 { # A (kind, ID/name) pair used to construct a key path.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400648 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400649 # If either name or ID is set, the element is complete.
650 # If neither is set, the element is incomplete.
651 "kind": "A String", # The kind of the entity.
652 # A kind matching regex `__.*__` is reserved/read-only.
653 # A kind must not contain more than 1500 bytes when UTF-8 encoded.
654 # Cannot be `""`.
655 "id": "A String", # The auto-allocated ID of the entity.
656 # Never equal to zero. Values less than zero are discouraged and may not
657 # be supported in the future.
658 "name": "A String", # The name of the entity.
659 # A name matching regex `__.*__` is reserved/read-only.
660 # A name must not be more than 1500 bytes when UTF-8 encoded.
661 # Cannot be `""`.
662 },
663 ],
664 "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project
665 # ID and namespace ID.
666 # Queries are scoped to a single partition.
667 # by project and namespace, however the namespace ID may be empty.
668 #
669 # A partition ID contains several dimensions:
670 # project ID and namespace ID.
671 #
672 # Partition dimensions:
673 #
674 # - May be `""`.
675 # - Must be valid UTF-8 bytes.
676 # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
677 # If the value of any dimension matches regex `__.*__`, the partition is
678 # reserved/read-only.
679 # A reserved/read-only partition ID is forbidden in certain documented
680 # contexts.
681 #
682 # Foreign partition IDs (in which the project ID does
683 # not match the context project ID ) are discouraged.
684 # Reads and writes of foreign partition IDs may fail if the project is not in an active state.
685 "projectId": "A String", # The ID of the project to which the entities belong.
686 "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong.
687 },
688 },
689 },
690 "update": { # A Datastore data object. # The entity to update. The entity must already exist.
691 # Must have a complete key path.
692 #
693 # An entity is limited to 1 megabyte when stored. That _roughly_
694 # corresponds to a limit of 1 megabyte for the serialized form of this
695 # message.
696 "properties": { # The entity's properties.
697 # The map's keys are property names.
698 # A property name matching regex `__.*__` is reserved.
699 # A reserved property name is forbidden in certain documented contexts.
700 # The name must not contain more than 500 characters.
701 # The name cannot be `""`.
702 "a_key": { # A message that can hold any of the supported value types and associated
703 # metadata.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700704 "booleanValue": True or False, # A boolean value.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400705 "entityValue": # Object with schema name: Entity # An entity value.
706 #
707 # - May have no key.
708 # - May have a key with an incomplete key path.
709 # - May have a reserved/read-only key.
710 "timestampValue": "A String", # A timestamp value.
711 # When stored in the Datastore, precise only to microseconds;
712 # any additional precision is rounded down.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700713 "excludeFromIndexes": True or False, # If the value should be excluded from all indexes including those defined
714 # explicitly.
Dan O'Mearadd494642020-05-01 07:42:23 -0700715 "doubleValue": 3.14, # A double value.
716 "meaning": 42, # The `meaning` field should only be populated for backwards compatibility.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400717 "keyValue": { # A unique identifier for an entity. # A key value.
718 # If a key's partition ID or any of its path kinds or names are
719 # reserved/read-only, the key is reserved/read-only.
720 # A reserved/read-only key is forbidden in certain documented contexts.
721 "path": [ # The entity path.
722 # An entity path consists of one or more elements composed of a kind and a
723 # string or numerical identifier, which identify entities. The first
724 # element identifies a _root entity_, the second element identifies
725 # a _child_ of the root entity, the third element identifies a child of the
726 # second entity, and so forth. The entities identified by all prefixes of
727 # the path are called the element's _ancestors_.
728 #
729 # An entity path is always fully complete: *all* of the entity's ancestors
730 # are required to be in the path along with the entity identifier itself.
731 # The only exception is that in some documented cases, the identifier in the
732 # last path element (for the entity) itself may be omitted. For example,
733 # the last path element of the key of `Mutation.insert` may have no
734 # identifier.
735 #
736 # A path can never be empty, and a path can have at most 100 elements.
737 { # A (kind, ID/name) pair used to construct a key path.
738 #
739 # If either name or ID is set, the element is complete.
740 # If neither is set, the element is incomplete.
741 "kind": "A String", # The kind of the entity.
742 # A kind matching regex `__.*__` is reserved/read-only.
743 # A kind must not contain more than 1500 bytes when UTF-8 encoded.
744 # Cannot be `""`.
745 "id": "A String", # The auto-allocated ID of the entity.
746 # Never equal to zero. Values less than zero are discouraged and may not
747 # be supported in the future.
748 "name": "A String", # The name of the entity.
749 # A name matching regex `__.*__` is reserved/read-only.
750 # A name must not be more than 1500 bytes when UTF-8 encoded.
751 # Cannot be `""`.
752 },
753 ],
754 "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project
755 # ID and namespace ID.
756 # Queries are scoped to a single partition.
757 # by project and namespace, however the namespace ID may be empty.
758 #
759 # A partition ID contains several dimensions:
760 # project ID and namespace ID.
761 #
762 # Partition dimensions:
763 #
764 # - May be `""`.
765 # - Must be valid UTF-8 bytes.
766 # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
767 # If the value of any dimension matches regex `__.*__`, the partition is
768 # reserved/read-only.
769 # A reserved/read-only partition ID is forbidden in certain documented
770 # contexts.
771 #
772 # Foreign partition IDs (in which the project ID does
773 # not match the context project ID ) are discouraged.
774 # Reads and writes of foreign partition IDs may fail if the project is not in an active state.
775 "projectId": "A String", # The ID of the project to which the entities belong.
776 "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong.
777 },
778 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400779 "blobValue": "A String", # A blob value.
780 # May have at most 1,000,000 bytes.
781 # When `exclude_from_indexes` is false, may have at most 1500 bytes.
782 # In JSON requests, must be base64-encoded.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700783 "stringValue": "A String", # A UTF-8 encoded string value.
784 # When `exclude_from_indexes` is false (it is indexed) , may have at most 1500 bytes.
785 # Otherwise, may be set to at least 1,000,000 bytes.
786 "nullValue": "A String", # A null value.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400787 "arrayValue": { # An array value. # An array value.
788 # Cannot contain another array value.
789 # A `Value` instance that sets field `array_value` must not set fields
790 # `meaning` or `exclude_from_indexes`.
791 "values": [ # Values in the array.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700792 # The order of values in an array is preserved as long as all values have
793 # identical settings for 'exclude_from_indexes'.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400794 # Object with schema name: Value
795 ],
796 },
797 "integerValue": "A String", # An integer value.
798 "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.
799 # of doubles representing degrees latitude and degrees longitude. Unless
800 # specified otherwise, this must conform to the
Dan O'Mearadd494642020-05-01 07:42:23 -0700801 # &lt;a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf"&gt;WGS84
802 # standard&lt;/a&gt;. Values must be within normalized ranges.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700803 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
804 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
805 },
806 },
807 },
808 "key": { # A unique identifier for an entity. # The entity's key.
809 #
810 # An entity must have a key, unless otherwise documented (for example,
811 # an entity in `Value.entity_value` may have no key).
812 # An entity's kind is its key path's last element's kind,
813 # or null if it has no key.
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 },
876 "baseVersion": "A String", # The version of the entity that this mutation is being applied to. If this
877 # does not match the current version on the server, the mutation conflicts.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400878 "delete": { # A unique identifier for an entity. # The key of the entity to delete. The entity may or may not already exist.
879 # Must have a complete key path and must not be reserved/read-only.
880 # If a key's partition ID or any of its path kinds or names are
881 # reserved/read-only, the key is reserved/read-only.
882 # A reserved/read-only key is forbidden in certain documented contexts.
883 "path": [ # The entity path.
884 # An entity path consists of one or more elements composed of a kind and a
885 # string or numerical identifier, which identify entities. The first
886 # element identifies a _root entity_, the second element identifies
887 # a _child_ of the root entity, the third element identifies a child of the
888 # second entity, and so forth. The entities identified by all prefixes of
889 # the path are called the element's _ancestors_.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700890 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400891 # An entity path is always fully complete: *all* of the entity's ancestors
892 # are required to be in the path along with the entity identifier itself.
893 # The only exception is that in some documented cases, the identifier in the
894 # last path element (for the entity) itself may be omitted. For example,
895 # the last path element of the key of `Mutation.insert` may have no
896 # identifier.
897 #
898 # A path can never be empty, and a path can have at most 100 elements.
899 { # A (kind, ID/name) pair used to construct a key path.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700900 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400901 # If either name or ID is set, the element is complete.
902 # If neither is set, the element is incomplete.
903 "kind": "A String", # The kind of the entity.
904 # A kind matching regex `__.*__` is reserved/read-only.
905 # A kind must not contain more than 1500 bytes when UTF-8 encoded.
906 # Cannot be `""`.
907 "id": "A String", # The auto-allocated ID of the entity.
908 # Never equal to zero. Values less than zero are discouraged and may not
909 # be supported in the future.
910 "name": "A String", # The name of the entity.
911 # A name matching regex `__.*__` is reserved/read-only.
912 # A name must not be more than 1500 bytes when UTF-8 encoded.
913 # Cannot be `""`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700914 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400915 ],
916 "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project
917 # ID and namespace ID.
918 # Queries are scoped to a single partition.
919 # by project and namespace, however the namespace ID may be empty.
920 #
921 # A partition ID contains several dimensions:
922 # project ID and namespace ID.
923 #
924 # Partition dimensions:
925 #
926 # - May be `""`.
927 # - Must be valid UTF-8 bytes.
928 # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
929 # If the value of any dimension matches regex `__.*__`, the partition is
930 # reserved/read-only.
931 # A reserved/read-only partition ID is forbidden in certain documented
932 # contexts.
933 #
934 # Foreign partition IDs (in which the project ID does
935 # not match the context project ID ) are discouraged.
936 # Reads and writes of foreign partition IDs may fail if the project is not in an active state.
937 "projectId": "A String", # The ID of the project to which the entities belong.
938 "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700939 },
940 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700941 },
942 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700943 "mode": "A String", # The type of commit to perform. Defaults to `TRANSACTIONAL`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700944 }
945
946 x__xgafv: string, V1 error format.
947 Allowed values
948 1 - v1 error format
949 2 - v2 error format
950
951Returns:
952 An object of the form:
953
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700954 { # The response for Datastore.Commit.
Dan O'Mearadd494642020-05-01 07:42:23 -0700955 "indexUpdates": 42, # The number of index entries updated during the commit, or zero if none were
956 # updated.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700957 "mutationResults": [ # The result of performing the mutations.
958 # The i-th mutation result corresponds to the i-th mutation in the request.
959 { # The result of applying a mutation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700960 "version": "A String", # The version of the entity on the server after processing the mutation. If
961 # the mutation doesn't change anything on the server, then the version will
962 # be the version of the current entity or, if no entity is present, a version
963 # that is strictly greater than the version of any previous entity and less
964 # than the version of any possible future entity.
965 "conflictDetected": True or False, # Whether a conflict was detected for this mutation. Always false when a
966 # conflict detection strategy field is not set in the mutation.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700967 "key": { # A unique identifier for an entity. # The automatically allocated key.
968 # Set only when the mutation allocated a key.
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 `""`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700996 "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.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700999 "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 `""`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001003 },
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 ],
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001032 }</pre>
1033</div>
1034
1035<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001036 <code class="details" id="lookup">lookup(projectId, body=None, x__xgafv=None)</code>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001037 <pre>Looks up entities by key.
1038
1039Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07001040 projectId: string, Required. The ID of the project against which to make the request. (required)
1041 body: object, The request body.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001042 The object takes the form of:
1043
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001044{ # The request for Datastore.Lookup.
Dan O'Mearadd494642020-05-01 07:42:23 -07001045 "keys": [ # Required. Keys of entities to look up.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001046 { # A unique identifier for an entity.
1047 # If a key's partition ID or any of its path kinds or names are
1048 # reserved/read-only, the key is reserved/read-only.
1049 # A reserved/read-only key is forbidden in certain documented contexts.
1050 "path": [ # The entity path.
1051 # An entity path consists of one or more elements composed of a kind and a
1052 # string or numerical identifier, which identify entities. The first
1053 # element identifies a _root entity_, the second element identifies
1054 # a _child_ of the root entity, the third element identifies a child of the
1055 # second entity, and so forth. The entities identified by all prefixes of
1056 # the path are called the element's _ancestors_.
1057 #
1058 # An entity path is always fully complete: *all* of the entity's ancestors
1059 # are required to be in the path along with the entity identifier itself.
1060 # The only exception is that in some documented cases, the identifier in the
1061 # last path element (for the entity) itself may be omitted. For example,
1062 # the last path element of the key of `Mutation.insert` may have no
1063 # identifier.
1064 #
1065 # A path can never be empty, and a path can have at most 100 elements.
1066 { # A (kind, ID/name) pair used to construct a key path.
1067 #
1068 # If either name or ID is set, the element is complete.
1069 # If neither is set, the element is incomplete.
1070 "kind": "A String", # The kind of the entity.
1071 # A kind matching regex `__.*__` is reserved/read-only.
1072 # A kind must not contain more than 1500 bytes when UTF-8 encoded.
1073 # Cannot be `""`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001074 "id": "A String", # The auto-allocated ID of the entity.
1075 # Never equal to zero. Values less than zero are discouraged and may not
1076 # be supported in the future.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001077 "name": "A String", # The name of the entity.
1078 # A name matching regex `__.*__` is reserved/read-only.
1079 # A name must not be more than 1500 bytes when UTF-8 encoded.
1080 # Cannot be `""`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001081 },
1082 ],
1083 "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project
1084 # ID and namespace ID.
1085 # Queries are scoped to a single partition.
1086 # by project and namespace, however the namespace ID may be empty.
1087 #
1088 # A partition ID contains several dimensions:
1089 # project ID and namespace ID.
1090 #
1091 # Partition dimensions:
1092 #
1093 # - May be `""`.
1094 # - Must be valid UTF-8 bytes.
1095 # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
1096 # If the value of any dimension matches regex `__.*__`, the partition is
1097 # reserved/read-only.
1098 # A reserved/read-only partition ID is forbidden in certain documented
1099 # contexts.
1100 #
1101 # Foreign partition IDs (in which the project ID does
1102 # not match the context project ID ) are discouraged.
1103 # Reads and writes of foreign partition IDs may fail if the project is not in an active state.
1104 "projectId": "A String", # The ID of the project to which the entities belong.
1105 "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong.
1106 },
1107 },
1108 ],
1109 "readOptions": { # The options shared by read requests. # The options for this lookup request.
1110 "transaction": "A String", # The identifier of the transaction in which to read. A
1111 # transaction identifier is returned by a call to
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001112 # Datastore.BeginTransaction.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001113 "readConsistency": "A String", # The non-transactional read consistency to use.
1114 # Cannot be set to `STRONG` for global queries.
1115 },
1116 }
1117
1118 x__xgafv: string, V1 error format.
1119 Allowed values
1120 1 - v1 error format
1121 2 - v2 error format
1122
1123Returns:
1124 An object of the form:
1125
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001126 { # The response for Datastore.Lookup.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001127 "deferred": [ # A list of keys that were not looked up due to resource constraints. The
1128 # order of results in this field is undefined and has no relation to the
1129 # order of the keys in the input.
1130 { # A unique identifier for an entity.
1131 # If a key's partition ID or any of its path kinds or names are
1132 # reserved/read-only, the key is reserved/read-only.
1133 # A reserved/read-only key is forbidden in certain documented contexts.
1134 "path": [ # The entity path.
1135 # An entity path consists of one or more elements composed of a kind and a
1136 # string or numerical identifier, which identify entities. The first
1137 # element identifies a _root entity_, the second element identifies
1138 # a _child_ of the root entity, the third element identifies a child of the
1139 # second entity, and so forth. The entities identified by all prefixes of
1140 # the path are called the element's _ancestors_.
1141 #
1142 # An entity path is always fully complete: *all* of the entity's ancestors
1143 # are required to be in the path along with the entity identifier itself.
1144 # The only exception is that in some documented cases, the identifier in the
1145 # last path element (for the entity) itself may be omitted. For example,
1146 # the last path element of the key of `Mutation.insert` may have no
1147 # identifier.
1148 #
1149 # A path can never be empty, and a path can have at most 100 elements.
1150 { # A (kind, ID/name) pair used to construct a key path.
1151 #
1152 # If either name or ID is set, the element is complete.
1153 # If neither is set, the element is incomplete.
1154 "kind": "A String", # The kind of the entity.
1155 # A kind matching regex `__.*__` is reserved/read-only.
1156 # A kind must not contain more than 1500 bytes when UTF-8 encoded.
1157 # Cannot be `""`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001158 "id": "A String", # The auto-allocated ID of the entity.
1159 # Never equal to zero. Values less than zero are discouraged and may not
1160 # be supported in the future.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001161 "name": "A String", # The name of the entity.
1162 # A name matching regex `__.*__` is reserved/read-only.
1163 # A name must not be more than 1500 bytes when UTF-8 encoded.
1164 # Cannot be `""`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001165 },
1166 ],
1167 "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project
1168 # ID and namespace ID.
1169 # Queries are scoped to a single partition.
1170 # by project and namespace, however the namespace ID may be empty.
1171 #
1172 # A partition ID contains several dimensions:
1173 # project ID and namespace ID.
1174 #
1175 # Partition dimensions:
1176 #
1177 # - May be `""`.
1178 # - Must be valid UTF-8 bytes.
1179 # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
1180 # If the value of any dimension matches regex `__.*__`, the partition is
1181 # reserved/read-only.
1182 # A reserved/read-only partition ID is forbidden in certain documented
1183 # contexts.
1184 #
1185 # Foreign partition IDs (in which the project ID does
1186 # not match the context project ID ) are discouraged.
1187 # Reads and writes of foreign partition IDs may fail if the project is not in an active state.
1188 "projectId": "A String", # The ID of the project to which the entities belong.
1189 "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong.
1190 },
1191 },
1192 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001193 "missing": [ # Entities not found as `ResultType.KEY_ONLY` entities. The order of results
1194 # in this field is undefined and has no relation to the order of the keys
1195 # in the input.
1196 { # The result of fetching an entity from Datastore.
1197 "cursor": "A String", # A cursor that points to the position after the result entity.
1198 # Set only when the `EntityResult` is part of a `QueryResultBatch` message.
1199 "version": "A String", # The version of the entity, a strictly positive number that monotonically
1200 # increases with changes to the entity.
1201 #
1202 # This field is set for `FULL` entity
1203 # results.
1204 #
1205 # For missing entities in `LookupResponse`, this
1206 # is the version of the snapshot that was used to look up the entity, and it
1207 # is always set except for eventually consistent reads.
1208 "entity": { # A Datastore data object. # The resulting entity.
1209 #
1210 # An entity is limited to 1 megabyte when stored. That _roughly_
1211 # corresponds to a limit of 1 megabyte for the serialized form of this
1212 # message.
1213 "properties": { # The entity's properties.
1214 # The map's keys are property names.
1215 # A property name matching regex `__.*__` is reserved.
1216 # A reserved property name is forbidden in certain documented contexts.
1217 # The name must not contain more than 500 characters.
1218 # The name cannot be `""`.
1219 "a_key": { # A message that can hold any of the supported value types and associated
1220 # metadata.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001221 "booleanValue": True or False, # A boolean value.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001222 "entityValue": # Object with schema name: Entity # An entity value.
1223 #
1224 # - May have no key.
1225 # - May have a key with an incomplete key path.
1226 # - May have a reserved/read-only key.
1227 "timestampValue": "A String", # A timestamp value.
1228 # When stored in the Datastore, precise only to microseconds;
1229 # any additional precision is rounded down.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001230 "excludeFromIndexes": True or False, # If the value should be excluded from all indexes including those defined
1231 # explicitly.
Dan O'Mearadd494642020-05-01 07:42:23 -07001232 "doubleValue": 3.14, # A double value.
1233 "meaning": 42, # The `meaning` field should only be populated for backwards compatibility.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001234 "keyValue": { # A unique identifier for an entity. # A key value.
1235 # If a key's partition ID or any of its path kinds or names are
1236 # reserved/read-only, the key is reserved/read-only.
1237 # A reserved/read-only key is forbidden in certain documented contexts.
1238 "path": [ # The entity path.
1239 # An entity path consists of one or more elements composed of a kind and a
1240 # string or numerical identifier, which identify entities. The first
1241 # element identifies a _root entity_, the second element identifies
1242 # a _child_ of the root entity, the third element identifies a child of the
1243 # second entity, and so forth. The entities identified by all prefixes of
1244 # the path are called the element's _ancestors_.
1245 #
1246 # An entity path is always fully complete: *all* of the entity's ancestors
1247 # are required to be in the path along with the entity identifier itself.
1248 # The only exception is that in some documented cases, the identifier in the
1249 # last path element (for the entity) itself may be omitted. For example,
1250 # the last path element of the key of `Mutation.insert` may have no
1251 # identifier.
1252 #
1253 # A path can never be empty, and a path can have at most 100 elements.
1254 { # A (kind, ID/name) pair used to construct a key path.
1255 #
1256 # If either name or ID is set, the element is complete.
1257 # If neither is set, the element is incomplete.
1258 "kind": "A String", # The kind of the entity.
1259 # A kind matching regex `__.*__` is reserved/read-only.
1260 # A kind must not contain more than 1500 bytes when UTF-8 encoded.
1261 # Cannot be `""`.
1262 "id": "A String", # The auto-allocated ID of the entity.
1263 # Never equal to zero. Values less than zero are discouraged and may not
1264 # be supported in the future.
1265 "name": "A String", # The name of the entity.
1266 # A name matching regex `__.*__` is reserved/read-only.
1267 # A name must not be more than 1500 bytes when UTF-8 encoded.
1268 # Cannot be `""`.
1269 },
1270 ],
1271 "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project
1272 # ID and namespace ID.
1273 # Queries are scoped to a single partition.
1274 # by project and namespace, however the namespace ID may be empty.
1275 #
1276 # A partition ID contains several dimensions:
1277 # project ID and namespace ID.
1278 #
1279 # Partition dimensions:
1280 #
1281 # - May be `""`.
1282 # - Must be valid UTF-8 bytes.
1283 # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
1284 # If the value of any dimension matches regex `__.*__`, the partition is
1285 # reserved/read-only.
1286 # A reserved/read-only partition ID is forbidden in certain documented
1287 # contexts.
1288 #
1289 # Foreign partition IDs (in which the project ID does
1290 # not match the context project ID ) are discouraged.
1291 # Reads and writes of foreign partition IDs may fail if the project is not in an active state.
1292 "projectId": "A String", # The ID of the project to which the entities belong.
1293 "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong.
1294 },
1295 },
1296 "blobValue": "A String", # A blob value.
1297 # May have at most 1,000,000 bytes.
1298 # When `exclude_from_indexes` is false, may have at most 1500 bytes.
1299 # In JSON requests, must be base64-encoded.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001300 "stringValue": "A String", # A UTF-8 encoded string value.
1301 # When `exclude_from_indexes` is false (it is indexed) , may have at most 1500 bytes.
1302 # Otherwise, may be set to at least 1,000,000 bytes.
1303 "nullValue": "A String", # A null value.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001304 "arrayValue": { # An array value. # An array value.
1305 # Cannot contain another array value.
1306 # A `Value` instance that sets field `array_value` must not set fields
1307 # `meaning` or `exclude_from_indexes`.
1308 "values": [ # Values in the array.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001309 # The order of values in an array is preserved as long as all values have
1310 # identical settings for 'exclude_from_indexes'.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001311 # Object with schema name: Value
1312 ],
1313 },
1314 "integerValue": "A String", # An integer value.
1315 "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.
1316 # of doubles representing degrees latitude and degrees longitude. Unless
1317 # specified otherwise, this must conform to the
Dan O'Mearadd494642020-05-01 07:42:23 -07001318 # &lt;a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf"&gt;WGS84
1319 # standard&lt;/a&gt;. Values must be within normalized ranges.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001320 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
1321 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
1322 },
1323 },
1324 },
1325 "key": { # A unique identifier for an entity. # The entity's key.
1326 #
1327 # An entity must have a key, unless otherwise documented (for example,
1328 # an entity in `Value.entity_value` may have no key).
1329 # An entity's kind is its key path's last element's kind,
1330 # or null if it has no key.
1331 # If a key's partition ID or any of its path kinds or names are
1332 # reserved/read-only, the key is reserved/read-only.
1333 # A reserved/read-only key is forbidden in certain documented contexts.
1334 "path": [ # The entity path.
1335 # An entity path consists of one or more elements composed of a kind and a
1336 # string or numerical identifier, which identify entities. The first
1337 # element identifies a _root entity_, the second element identifies
1338 # a _child_ of the root entity, the third element identifies a child of the
1339 # second entity, and so forth. The entities identified by all prefixes of
1340 # the path are called the element's _ancestors_.
1341 #
1342 # An entity path is always fully complete: *all* of the entity's ancestors
1343 # are required to be in the path along with the entity identifier itself.
1344 # The only exception is that in some documented cases, the identifier in the
1345 # last path element (for the entity) itself may be omitted. For example,
1346 # the last path element of the key of `Mutation.insert` may have no
1347 # identifier.
1348 #
1349 # A path can never be empty, and a path can have at most 100 elements.
1350 { # A (kind, ID/name) pair used to construct a key path.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001351 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001352 # If either name or ID is set, the element is complete.
1353 # If neither is set, the element is incomplete.
1354 "kind": "A String", # The kind of the entity.
1355 # A kind matching regex `__.*__` is reserved/read-only.
1356 # A kind must not contain more than 1500 bytes when UTF-8 encoded.
1357 # Cannot be `""`.
1358 "id": "A String", # The auto-allocated ID of the entity.
1359 # Never equal to zero. Values less than zero are discouraged and may not
1360 # be supported in the future.
1361 "name": "A String", # The name of the entity.
1362 # A name matching regex `__.*__` is reserved/read-only.
1363 # A name must not be more than 1500 bytes when UTF-8 encoded.
1364 # Cannot be `""`.
1365 },
1366 ],
1367 "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project
1368 # ID and namespace ID.
1369 # Queries are scoped to a single partition.
1370 # by project and namespace, however the namespace ID may be empty.
1371 #
1372 # A partition ID contains several dimensions:
1373 # project ID and namespace ID.
1374 #
1375 # Partition dimensions:
1376 #
1377 # - May be `""`.
1378 # - Must be valid UTF-8 bytes.
1379 # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
1380 # If the value of any dimension matches regex `__.*__`, the partition is
1381 # reserved/read-only.
1382 # A reserved/read-only partition ID is forbidden in certain documented
1383 # contexts.
1384 #
1385 # Foreign partition IDs (in which the project ID does
1386 # not match the context project ID ) are discouraged.
1387 # Reads and writes of foreign partition IDs may fail if the project is not in an active state.
1388 "projectId": "A String", # The ID of the project to which the entities belong.
1389 "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong.
1390 },
1391 },
1392 },
1393 },
1394 ],
1395 "found": [ # Entities found as `ResultType.FULL` entities. The order of results in this
1396 # field is undefined and has no relation to the order of the keys in the
1397 # input.
1398 { # The result of fetching an entity from Datastore.
1399 "cursor": "A String", # A cursor that points to the position after the result entity.
1400 # Set only when the `EntityResult` is part of a `QueryResultBatch` message.
1401 "version": "A String", # The version of the entity, a strictly positive number that monotonically
1402 # increases with changes to the entity.
1403 #
1404 # This field is set for `FULL` entity
1405 # results.
1406 #
1407 # For missing entities in `LookupResponse`, this
1408 # is the version of the snapshot that was used to look up the entity, and it
1409 # is always set except for eventually consistent reads.
1410 "entity": { # A Datastore data object. # The resulting entity.
1411 #
1412 # An entity is limited to 1 megabyte when stored. That _roughly_
1413 # corresponds to a limit of 1 megabyte for the serialized form of this
1414 # message.
1415 "properties": { # The entity's properties.
1416 # The map's keys are property names.
1417 # A property name matching regex `__.*__` is reserved.
1418 # A reserved property name is forbidden in certain documented contexts.
1419 # The name must not contain more than 500 characters.
1420 # The name cannot be `""`.
1421 "a_key": { # A message that can hold any of the supported value types and associated
1422 # metadata.
1423 "booleanValue": True or False, # A boolean value.
1424 "entityValue": # Object with schema name: Entity # An entity value.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001425 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001426 # - May have no key.
1427 # - May have a key with an incomplete key path.
1428 # - May have a reserved/read-only key.
1429 "timestampValue": "A String", # A timestamp value.
1430 # When stored in the Datastore, precise only to microseconds;
1431 # any additional precision is rounded down.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001432 "excludeFromIndexes": True or False, # If the value should be excluded from all indexes including those defined
1433 # explicitly.
Dan O'Mearadd494642020-05-01 07:42:23 -07001434 "doubleValue": 3.14, # A double value.
1435 "meaning": 42, # The `meaning` field should only be populated for backwards compatibility.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001436 "keyValue": { # A unique identifier for an entity. # A key value.
1437 # If a key's partition ID or any of its path kinds or names are
1438 # reserved/read-only, the key is reserved/read-only.
1439 # A reserved/read-only key is forbidden in certain documented contexts.
1440 "path": [ # The entity path.
1441 # An entity path consists of one or more elements composed of a kind and a
1442 # string or numerical identifier, which identify entities. The first
1443 # element identifies a _root entity_, the second element identifies
1444 # a _child_ of the root entity, the third element identifies a child of the
1445 # second entity, and so forth. The entities identified by all prefixes of
1446 # the path are called the element's _ancestors_.
1447 #
1448 # An entity path is always fully complete: *all* of the entity's ancestors
1449 # are required to be in the path along with the entity identifier itself.
1450 # The only exception is that in some documented cases, the identifier in the
1451 # last path element (for the entity) itself may be omitted. For example,
1452 # the last path element of the key of `Mutation.insert` may have no
1453 # identifier.
1454 #
1455 # A path can never be empty, and a path can have at most 100 elements.
1456 { # A (kind, ID/name) pair used to construct a key path.
1457 #
1458 # If either name or ID is set, the element is complete.
1459 # If neither is set, the element is incomplete.
1460 "kind": "A String", # The kind of the entity.
1461 # A kind matching regex `__.*__` is reserved/read-only.
1462 # A kind must not contain more than 1500 bytes when UTF-8 encoded.
1463 # Cannot be `""`.
1464 "id": "A String", # The auto-allocated ID of the entity.
1465 # Never equal to zero. Values less than zero are discouraged and may not
1466 # be supported in the future.
1467 "name": "A String", # The name of the entity.
1468 # A name matching regex `__.*__` is reserved/read-only.
1469 # A name must not be more than 1500 bytes when UTF-8 encoded.
1470 # Cannot be `""`.
1471 },
1472 ],
1473 "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project
1474 # ID and namespace ID.
1475 # Queries are scoped to a single partition.
1476 # by project and namespace, however the namespace ID may be empty.
1477 #
1478 # A partition ID contains several dimensions:
1479 # project ID and namespace ID.
1480 #
1481 # Partition dimensions:
1482 #
1483 # - May be `""`.
1484 # - Must be valid UTF-8 bytes.
1485 # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
1486 # If the value of any dimension matches regex `__.*__`, the partition is
1487 # reserved/read-only.
1488 # A reserved/read-only partition ID is forbidden in certain documented
1489 # contexts.
1490 #
1491 # Foreign partition IDs (in which the project ID does
1492 # not match the context project ID ) are discouraged.
1493 # Reads and writes of foreign partition IDs may fail if the project is not in an active state.
1494 "projectId": "A String", # The ID of the project to which the entities belong.
1495 "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong.
1496 },
1497 },
1498 "blobValue": "A String", # A blob value.
1499 # May have at most 1,000,000 bytes.
1500 # When `exclude_from_indexes` is false, may have at most 1500 bytes.
1501 # In JSON requests, must be base64-encoded.
1502 "stringValue": "A String", # A UTF-8 encoded string value.
1503 # When `exclude_from_indexes` is false (it is indexed) , may have at most 1500 bytes.
1504 # Otherwise, may be set to at least 1,000,000 bytes.
1505 "nullValue": "A String", # A null value.
1506 "arrayValue": { # An array value. # An array value.
1507 # Cannot contain another array value.
1508 # A `Value` instance that sets field `array_value` must not set fields
1509 # `meaning` or `exclude_from_indexes`.
1510 "values": [ # Values in the array.
1511 # The order of values in an array is preserved as long as all values have
1512 # identical settings for 'exclude_from_indexes'.
1513 # Object with schema name: Value
1514 ],
1515 },
1516 "integerValue": "A String", # An integer value.
1517 "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.
1518 # of doubles representing degrees latitude and degrees longitude. Unless
1519 # specified otherwise, this must conform to the
Dan O'Mearadd494642020-05-01 07:42:23 -07001520 # &lt;a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf"&gt;WGS84
1521 # standard&lt;/a&gt;. Values must be within normalized ranges.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001522 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
1523 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
1524 },
1525 },
1526 },
1527 "key": { # A unique identifier for an entity. # The entity's key.
1528 #
1529 # An entity must have a key, unless otherwise documented (for example,
1530 # an entity in `Value.entity_value` may have no key).
1531 # An entity's kind is its key path's last element's kind,
1532 # or null if it has no key.
1533 # If a key's partition ID or any of its path kinds or names are
1534 # reserved/read-only, the key is reserved/read-only.
1535 # A reserved/read-only key is forbidden in certain documented contexts.
1536 "path": [ # The entity path.
1537 # An entity path consists of one or more elements composed of a kind and a
1538 # string or numerical identifier, which identify entities. The first
1539 # element identifies a _root entity_, the second element identifies
1540 # a _child_ of the root entity, the third element identifies a child of the
1541 # second entity, and so forth. The entities identified by all prefixes of
1542 # the path are called the element's _ancestors_.
1543 #
1544 # An entity path is always fully complete: *all* of the entity's ancestors
1545 # are required to be in the path along with the entity identifier itself.
1546 # The only exception is that in some documented cases, the identifier in the
1547 # last path element (for the entity) itself may be omitted. For example,
1548 # the last path element of the key of `Mutation.insert` may have no
1549 # identifier.
1550 #
1551 # A path can never be empty, and a path can have at most 100 elements.
1552 { # A (kind, ID/name) pair used to construct a key path.
1553 #
1554 # If either name or ID is set, the element is complete.
1555 # If neither is set, the element is incomplete.
1556 "kind": "A String", # The kind of the entity.
1557 # A kind matching regex `__.*__` is reserved/read-only.
1558 # A kind must not contain more than 1500 bytes when UTF-8 encoded.
1559 # Cannot be `""`.
1560 "id": "A String", # The auto-allocated ID of the entity.
1561 # Never equal to zero. Values less than zero are discouraged and may not
1562 # be supported in the future.
1563 "name": "A String", # The name of the entity.
1564 # A name matching regex `__.*__` is reserved/read-only.
1565 # A name must not be more than 1500 bytes when UTF-8 encoded.
1566 # Cannot be `""`.
1567 },
1568 ],
1569 "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project
1570 # ID and namespace ID.
1571 # Queries are scoped to a single partition.
1572 # by project and namespace, however the namespace ID may be empty.
1573 #
1574 # A partition ID contains several dimensions:
1575 # project ID and namespace ID.
1576 #
1577 # Partition dimensions:
1578 #
1579 # - May be `""`.
1580 # - Must be valid UTF-8 bytes.
1581 # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
1582 # If the value of any dimension matches regex `__.*__`, the partition is
1583 # reserved/read-only.
1584 # A reserved/read-only partition ID is forbidden in certain documented
1585 # contexts.
1586 #
1587 # Foreign partition IDs (in which the project ID does
1588 # not match the context project ID ) are discouraged.
1589 # Reads and writes of foreign partition IDs may fail if the project is not in an active state.
1590 "projectId": "A String", # The ID of the project to which the entities belong.
1591 "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong.
1592 },
1593 },
1594 },
1595 },
1596 ],
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001597 }</pre>
1598</div>
1599
1600<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001601 <code class="details" id="reserveIds">reserveIds(projectId, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001602 <pre>Prevents the supplied keys' IDs from being auto-allocated by Cloud
1603Datastore.
1604
1605Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07001606 projectId: string, Required. The ID of the project against which to make the request. (required)
1607 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001608 The object takes the form of:
1609
1610{ # The request for Datastore.ReserveIds.
Dan O'Mearadd494642020-05-01 07:42:23 -07001611 "keys": [ # Required. A list of keys with complete key paths whose numeric IDs should not be
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001612 # auto-allocated.
1613 { # A unique identifier for an entity.
1614 # If a key's partition ID or any of its path kinds or names are
1615 # reserved/read-only, the key is reserved/read-only.
1616 # A reserved/read-only key is forbidden in certain documented contexts.
1617 "path": [ # The entity path.
1618 # An entity path consists of one or more elements composed of a kind and a
1619 # string or numerical identifier, which identify entities. The first
1620 # element identifies a _root entity_, the second element identifies
1621 # a _child_ of the root entity, the third element identifies a child of the
1622 # second entity, and so forth. The entities identified by all prefixes of
1623 # the path are called the element's _ancestors_.
1624 #
1625 # An entity path is always fully complete: *all* of the entity's ancestors
1626 # are required to be in the path along with the entity identifier itself.
1627 # The only exception is that in some documented cases, the identifier in the
1628 # last path element (for the entity) itself may be omitted. For example,
1629 # the last path element of the key of `Mutation.insert` may have no
1630 # identifier.
1631 #
1632 # A path can never be empty, and a path can have at most 100 elements.
1633 { # A (kind, ID/name) pair used to construct a key path.
1634 #
1635 # If either name or ID is set, the element is complete.
1636 # If neither is set, the element is incomplete.
1637 "kind": "A String", # The kind of the entity.
1638 # A kind matching regex `__.*__` is reserved/read-only.
1639 # A kind must not contain more than 1500 bytes when UTF-8 encoded.
1640 # Cannot be `""`.
1641 "id": "A String", # The auto-allocated ID of the entity.
1642 # Never equal to zero. Values less than zero are discouraged and may not
1643 # be supported in the future.
1644 "name": "A String", # The name of the entity.
1645 # A name matching regex `__.*__` is reserved/read-only.
1646 # A name must not be more than 1500 bytes when UTF-8 encoded.
1647 # Cannot be `""`.
1648 },
1649 ],
1650 "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project
1651 # ID and namespace ID.
1652 # Queries are scoped to a single partition.
1653 # by project and namespace, however the namespace ID may be empty.
1654 #
1655 # A partition ID contains several dimensions:
1656 # project ID and namespace ID.
1657 #
1658 # Partition dimensions:
1659 #
1660 # - May be `""`.
1661 # - Must be valid UTF-8 bytes.
1662 # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
1663 # If the value of any dimension matches regex `__.*__`, the partition is
1664 # reserved/read-only.
1665 # A reserved/read-only partition ID is forbidden in certain documented
1666 # contexts.
1667 #
1668 # Foreign partition IDs (in which the project ID does
1669 # not match the context project ID ) are discouraged.
1670 # Reads and writes of foreign partition IDs may fail if the project is not in an active state.
1671 "projectId": "A String", # The ID of the project to which the entities belong.
1672 "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong.
1673 },
1674 },
1675 ],
1676 "databaseId": "A String", # If not empty, the ID of the database against which to make the request.
1677 }
1678
1679 x__xgafv: string, V1 error format.
1680 Allowed values
1681 1 - v1 error format
1682 2 - v2 error format
1683
1684Returns:
1685 An object of the form:
1686
1687 { # The response for Datastore.ReserveIds.
1688 }</pre>
1689</div>
1690
1691<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001692 <code class="details" id="rollback">rollback(projectId, body=None, x__xgafv=None)</code>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001693 <pre>Rolls back a transaction.
1694
1695Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07001696 projectId: string, Required. The ID of the project against which to make the request. (required)
1697 body: object, The request body.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001698 The object takes the form of:
1699
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001700{ # The request for Datastore.Rollback.
Dan O'Mearadd494642020-05-01 07:42:23 -07001701 "transaction": "A String", # Required. The transaction identifier, returned by a call to
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001702 # Datastore.BeginTransaction.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001703 }
1704
1705 x__xgafv: string, V1 error format.
1706 Allowed values
1707 1 - v1 error format
1708 2 - v2 error format
1709
1710Returns:
1711 An object of the form:
1712
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001713 { # The response for Datastore.Rollback.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001714 # (an empty message).
1715 }</pre>
1716</div>
1717
1718<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001719 <code class="details" id="runQuery">runQuery(projectId, body=None, x__xgafv=None)</code>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001720 <pre>Queries for entities.
1721
1722Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07001723 projectId: string, Required. The ID of the project against which to make the request. (required)
1724 body: object, The request body.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001725 The object takes the form of:
1726
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001727{ # The request for Datastore.RunQuery.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001728 "query": { # A query for entities. # The query to run.
1729 "startCursor": "A String", # A starting point for the query results. Query cursors are
1730 # returned in query result batches and
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001731 # [can only be used to continue the same
1732 # query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets).
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001733 "kind": [ # The kinds to query (if empty, returns entities of all kinds).
1734 # Currently at most 1 kind may be specified.
1735 { # A representation of a kind.
1736 "name": "A String", # The name of the kind.
1737 },
1738 ],
1739 "projection": [ # The projection to return. Defaults to returning all properties.
1740 { # A representation of a property in a projection.
1741 "property": { # A reference to a property relative to the kind expressions. # The property to project.
1742 "name": "A String", # The name of the property.
1743 # If name includes "."s, it may be interpreted as a property name path.
1744 },
1745 },
1746 ],
1747 "distinctOn": [ # The properties to make distinct. The query results will contain the first
1748 # result for each distinct combination of values for the given properties
1749 # (if empty, all results are returned).
1750 { # A reference to a property relative to the kind expressions.
1751 "name": "A String", # The name of the property.
1752 # If name includes "."s, it may be interpreted as a property name path.
1753 },
1754 ],
1755 "filter": { # A holder for any type of filter. # The filter to apply.
1756 "compositeFilter": { # A filter that merges multiple other filters using the given operator. # A composite filter.
1757 "filters": [ # The list of filters to combine.
1758 # Must contain at least one filter.
1759 # Object with schema name: Filter
1760 ],
1761 "op": "A String", # The operator for combining multiple filters.
1762 },
1763 "propertyFilter": { # A filter on a specific property. # A filter on a property.
1764 "property": { # A reference to a property relative to the kind expressions. # The property to filter by.
1765 "name": "A String", # The name of the property.
1766 # If name includes "."s, it may be interpreted as a property name path.
1767 },
1768 "value": { # A message that can hold any of the supported value types and associated # The value to compare the property to.
1769 # metadata.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001770 "booleanValue": True or False, # A boolean value.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001771 "entityValue": # Object with schema name: Entity # An entity value.
1772 #
1773 # - May have no key.
1774 # - May have a key with an incomplete key path.
1775 # - May have a reserved/read-only key.
1776 "timestampValue": "A String", # A timestamp value.
1777 # When stored in the Datastore, precise only to microseconds;
1778 # any additional precision is rounded down.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001779 "excludeFromIndexes": True or False, # If the value should be excluded from all indexes including those defined
1780 # explicitly.
Dan O'Mearadd494642020-05-01 07:42:23 -07001781 "doubleValue": 3.14, # A double value.
1782 "meaning": 42, # The `meaning` field should only be populated for backwards compatibility.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001783 "keyValue": { # A unique identifier for an entity. # A key value.
1784 # If a key's partition ID or any of its path kinds or names are
1785 # reserved/read-only, the key is reserved/read-only.
1786 # A reserved/read-only key is forbidden in certain documented contexts.
1787 "path": [ # The entity path.
1788 # An entity path consists of one or more elements composed of a kind and a
1789 # string or numerical identifier, which identify entities. The first
1790 # element identifies a _root entity_, the second element identifies
1791 # a _child_ of the root entity, the third element identifies a child of the
1792 # second entity, and so forth. The entities identified by all prefixes of
1793 # the path are called the element's _ancestors_.
1794 #
1795 # An entity path is always fully complete: *all* of the entity's ancestors
1796 # are required to be in the path along with the entity identifier itself.
1797 # The only exception is that in some documented cases, the identifier in the
1798 # last path element (for the entity) itself may be omitted. For example,
1799 # the last path element of the key of `Mutation.insert` may have no
1800 # identifier.
1801 #
1802 # A path can never be empty, and a path can have at most 100 elements.
1803 { # A (kind, ID/name) pair used to construct a key path.
1804 #
1805 # If either name or ID is set, the element is complete.
1806 # If neither is set, the element is incomplete.
1807 "kind": "A String", # The kind of the entity.
1808 # A kind matching regex `__.*__` is reserved/read-only.
1809 # A kind must not contain more than 1500 bytes when UTF-8 encoded.
1810 # Cannot be `""`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001811 "id": "A String", # The auto-allocated ID of the entity.
1812 # Never equal to zero. Values less than zero are discouraged and may not
1813 # be supported in the future.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001814 "name": "A String", # The name of the entity.
1815 # A name matching regex `__.*__` is reserved/read-only.
1816 # A name must not be more than 1500 bytes when UTF-8 encoded.
1817 # Cannot be `""`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001818 },
1819 ],
1820 "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project
1821 # ID and namespace ID.
1822 # Queries are scoped to a single partition.
1823 # by project and namespace, however the namespace ID may be empty.
1824 #
1825 # A partition ID contains several dimensions:
1826 # project ID and namespace ID.
1827 #
1828 # Partition dimensions:
1829 #
1830 # - May be `""`.
1831 # - Must be valid UTF-8 bytes.
1832 # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
1833 # If the value of any dimension matches regex `__.*__`, the partition is
1834 # reserved/read-only.
1835 # A reserved/read-only partition ID is forbidden in certain documented
1836 # contexts.
1837 #
1838 # Foreign partition IDs (in which the project ID does
1839 # not match the context project ID ) are discouraged.
1840 # Reads and writes of foreign partition IDs may fail if the project is not in an active state.
1841 "projectId": "A String", # The ID of the project to which the entities belong.
1842 "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong.
1843 },
1844 },
1845 "blobValue": "A String", # A blob value.
1846 # May have at most 1,000,000 bytes.
1847 # When `exclude_from_indexes` is false, may have at most 1500 bytes.
1848 # In JSON requests, must be base64-encoded.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001849 "stringValue": "A String", # A UTF-8 encoded string value.
1850 # When `exclude_from_indexes` is false (it is indexed) , may have at most 1500 bytes.
1851 # Otherwise, may be set to at least 1,000,000 bytes.
1852 "nullValue": "A String", # A null value.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001853 "arrayValue": { # An array value. # An array value.
1854 # Cannot contain another array value.
1855 # A `Value` instance that sets field `array_value` must not set fields
1856 # `meaning` or `exclude_from_indexes`.
1857 "values": [ # Values in the array.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001858 # The order of values in an array is preserved as long as all values have
1859 # identical settings for 'exclude_from_indexes'.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001860 # Object with schema name: Value
1861 ],
1862 },
1863 "integerValue": "A String", # An integer value.
1864 "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.
1865 # of doubles representing degrees latitude and degrees longitude. Unless
1866 # specified otherwise, this must conform to the
Dan O'Mearadd494642020-05-01 07:42:23 -07001867 # &lt;a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf"&gt;WGS84
1868 # standard&lt;/a&gt;. Values must be within normalized ranges.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001869 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
1870 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
1871 },
1872 },
1873 "op": "A String", # The operator to filter by.
1874 },
1875 },
1876 "limit": 42, # The maximum number of results to return. Applies after all other
1877 # constraints. Optional.
1878 # Unspecified is interpreted as no limit.
Dan O'Mearadd494642020-05-01 07:42:23 -07001879 # Must be &gt;= 0 if specified.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001880 "offset": 42, # The number of results to skip. Applies before limit, but after all other
Dan O'Mearadd494642020-05-01 07:42:23 -07001881 # constraints. Optional. Must be &gt;= 0 if specified.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001882 "endCursor": "A String", # An ending point for the query results. Query cursors are
1883 # returned in query result batches and
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001884 # [can only be used to limit the same
1885 # query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets).
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001886 "order": [ # The order to apply to the query results (if empty, order is unspecified).
1887 { # The desired order for a specific property.
1888 "direction": "A String", # The direction to order by. Defaults to `ASCENDING`.
1889 "property": { # A reference to a property relative to the kind expressions. # The property to order by.
1890 "name": "A String", # The name of the property.
1891 # If name includes "."s, it may be interpreted as a property name path.
1892 },
1893 },
1894 ],
1895 },
1896 "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, identified by a partition ID.
1897 # Queries are scoped to a single partition.
1898 # This partition ID is normalized with the standard default context
1899 # partition ID.
1900 # by project and namespace, however the namespace ID may be empty.
1901 #
1902 # A partition ID contains several dimensions:
1903 # project ID and namespace ID.
1904 #
1905 # Partition dimensions:
1906 #
1907 # - May be `""`.
1908 # - Must be valid UTF-8 bytes.
1909 # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
1910 # If the value of any dimension matches regex `__.*__`, the partition is
1911 # reserved/read-only.
1912 # A reserved/read-only partition ID is forbidden in certain documented
1913 # contexts.
1914 #
1915 # Foreign partition IDs (in which the project ID does
1916 # not match the context project ID ) are discouraged.
1917 # Reads and writes of foreign partition IDs may fail if the project is not in an active state.
1918 "projectId": "A String", # The ID of the project to which the entities belong.
1919 "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong.
1920 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001921 "gqlQuery": { # A [GQL # The GQL query to run.
1922 # query](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).
Dan O'Mearadd494642020-05-01 07:42:23 -07001923 "queryString": "A String", # A string of the format described
1924 # [here](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001925 "positionalBindings": [ # Numbered binding site @1 references the first numbered parameter,
1926 # effectively using 1-based indexing, rather than the usual 0.
1927 #
1928 # For each binding site numbered i in `query_string`, there must be an i-th
1929 # numbered parameter. The inverse must also be true.
1930 { # A binding parameter for a GQL query.
1931 "cursor": "A String", # A query cursor. Query cursors are returned in query
1932 # result batches.
1933 "value": { # A message that can hold any of the supported value types and associated # A value parameter.
1934 # metadata.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001935 "booleanValue": True or False, # A boolean value.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001936 "entityValue": # Object with schema name: Entity # An entity value.
1937 #
1938 # - May have no key.
1939 # - May have a key with an incomplete key path.
1940 # - May have a reserved/read-only key.
1941 "timestampValue": "A String", # A timestamp value.
1942 # When stored in the Datastore, precise only to microseconds;
1943 # any additional precision is rounded down.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001944 "excludeFromIndexes": True or False, # If the value should be excluded from all indexes including those defined
1945 # explicitly.
Dan O'Mearadd494642020-05-01 07:42:23 -07001946 "doubleValue": 3.14, # A double value.
1947 "meaning": 42, # The `meaning` field should only be populated for backwards compatibility.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001948 "keyValue": { # A unique identifier for an entity. # A key value.
1949 # If a key's partition ID or any of its path kinds or names are
1950 # reserved/read-only, the key is reserved/read-only.
1951 # A reserved/read-only key is forbidden in certain documented contexts.
1952 "path": [ # The entity path.
1953 # An entity path consists of one or more elements composed of a kind and a
1954 # string or numerical identifier, which identify entities. The first
1955 # element identifies a _root entity_, the second element identifies
1956 # a _child_ of the root entity, the third element identifies a child of the
1957 # second entity, and so forth. The entities identified by all prefixes of
1958 # the path are called the element's _ancestors_.
1959 #
1960 # An entity path is always fully complete: *all* of the entity's ancestors
1961 # are required to be in the path along with the entity identifier itself.
1962 # The only exception is that in some documented cases, the identifier in the
1963 # last path element (for the entity) itself may be omitted. For example,
1964 # the last path element of the key of `Mutation.insert` may have no
1965 # identifier.
1966 #
1967 # A path can never be empty, and a path can have at most 100 elements.
1968 { # A (kind, ID/name) pair used to construct a key path.
1969 #
1970 # If either name or ID is set, the element is complete.
1971 # If neither is set, the element is incomplete.
1972 "kind": "A String", # The kind of the entity.
1973 # A kind matching regex `__.*__` is reserved/read-only.
1974 # A kind must not contain more than 1500 bytes when UTF-8 encoded.
1975 # Cannot be `""`.
1976 "id": "A String", # The auto-allocated ID of the entity.
1977 # Never equal to zero. Values less than zero are discouraged and may not
1978 # be supported in the future.
1979 "name": "A String", # The name of the entity.
1980 # A name matching regex `__.*__` is reserved/read-only.
1981 # A name must not be more than 1500 bytes when UTF-8 encoded.
1982 # Cannot be `""`.
1983 },
1984 ],
1985 "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project
1986 # ID and namespace ID.
1987 # Queries are scoped to a single partition.
1988 # by project and namespace, however the namespace ID may be empty.
1989 #
1990 # A partition ID contains several dimensions:
1991 # project ID and namespace ID.
1992 #
1993 # Partition dimensions:
1994 #
1995 # - May be `""`.
1996 # - Must be valid UTF-8 bytes.
1997 # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
1998 # If the value of any dimension matches regex `__.*__`, the partition is
1999 # reserved/read-only.
2000 # A reserved/read-only partition ID is forbidden in certain documented
2001 # contexts.
2002 #
2003 # Foreign partition IDs (in which the project ID does
2004 # not match the context project ID ) are discouraged.
2005 # Reads and writes of foreign partition IDs may fail if the project is not in an active state.
2006 "projectId": "A String", # The ID of the project to which the entities belong.
2007 "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong.
2008 },
2009 },
2010 "blobValue": "A String", # A blob value.
2011 # May have at most 1,000,000 bytes.
2012 # When `exclude_from_indexes` is false, may have at most 1500 bytes.
2013 # In JSON requests, must be base64-encoded.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002014 "stringValue": "A String", # A UTF-8 encoded string value.
2015 # When `exclude_from_indexes` is false (it is indexed) , may have at most 1500 bytes.
2016 # Otherwise, may be set to at least 1,000,000 bytes.
2017 "nullValue": "A String", # A null value.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002018 "arrayValue": { # An array value. # An array value.
2019 # Cannot contain another array value.
2020 # A `Value` instance that sets field `array_value` must not set fields
2021 # `meaning` or `exclude_from_indexes`.
2022 "values": [ # Values in the array.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002023 # The order of values in an array is preserved as long as all values have
2024 # identical settings for 'exclude_from_indexes'.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002025 # Object with schema name: Value
2026 ],
2027 },
2028 "integerValue": "A String", # An integer value.
2029 "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.
2030 # of doubles representing degrees latitude and degrees longitude. Unless
2031 # specified otherwise, this must conform to the
Dan O'Mearadd494642020-05-01 07:42:23 -07002032 # &lt;a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf"&gt;WGS84
2033 # standard&lt;/a&gt;. Values must be within normalized ranges.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002034 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
2035 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
2036 },
2037 },
2038 },
2039 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002040 "namedBindings": { # For each non-reserved named binding site in the query string, there must be
2041 # a named parameter with that name, but not necessarily the inverse.
2042 #
2043 # Key must match regex `A-Za-z_$*`, must not match regex
2044 # `__.*__`, and must not be `""`.
2045 "a_key": { # A binding parameter for a GQL query.
2046 "cursor": "A String", # A query cursor. Query cursors are returned in query
2047 # result batches.
2048 "value": { # A message that can hold any of the supported value types and associated # A value parameter.
2049 # metadata.
2050 "booleanValue": True or False, # A boolean value.
2051 "entityValue": # Object with schema name: Entity # An entity value.
2052 #
2053 # - May have no key.
2054 # - May have a key with an incomplete key path.
2055 # - May have a reserved/read-only key.
2056 "timestampValue": "A String", # A timestamp value.
2057 # When stored in the Datastore, precise only to microseconds;
2058 # any additional precision is rounded down.
2059 "excludeFromIndexes": True or False, # If the value should be excluded from all indexes including those defined
2060 # explicitly.
2061 "doubleValue": 3.14, # A double value.
2062 "meaning": 42, # The `meaning` field should only be populated for backwards compatibility.
2063 "keyValue": { # A unique identifier for an entity. # A key value.
2064 # If a key's partition ID or any of its path kinds or names are
2065 # reserved/read-only, the key is reserved/read-only.
2066 # A reserved/read-only key is forbidden in certain documented contexts.
2067 "path": [ # The entity path.
2068 # An entity path consists of one or more elements composed of a kind and a
2069 # string or numerical identifier, which identify entities. The first
2070 # element identifies a _root entity_, the second element identifies
2071 # a _child_ of the root entity, the third element identifies a child of the
2072 # second entity, and so forth. The entities identified by all prefixes of
2073 # the path are called the element's _ancestors_.
2074 #
2075 # An entity path is always fully complete: *all* of the entity's ancestors
2076 # are required to be in the path along with the entity identifier itself.
2077 # The only exception is that in some documented cases, the identifier in the
2078 # last path element (for the entity) itself may be omitted. For example,
2079 # the last path element of the key of `Mutation.insert` may have no
2080 # identifier.
2081 #
2082 # A path can never be empty, and a path can have at most 100 elements.
2083 { # A (kind, ID/name) pair used to construct a key path.
2084 #
2085 # If either name or ID is set, the element is complete.
2086 # If neither is set, the element is incomplete.
2087 "kind": "A String", # The kind of the entity.
2088 # A kind matching regex `__.*__` is reserved/read-only.
2089 # A kind must not contain more than 1500 bytes when UTF-8 encoded.
2090 # Cannot be `""`.
2091 "id": "A String", # The auto-allocated ID of the entity.
2092 # Never equal to zero. Values less than zero are discouraged and may not
2093 # be supported in the future.
2094 "name": "A String", # The name of the entity.
2095 # A name matching regex `__.*__` is reserved/read-only.
2096 # A name must not be more than 1500 bytes when UTF-8 encoded.
2097 # Cannot be `""`.
2098 },
2099 ],
2100 "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project
2101 # ID and namespace ID.
2102 # Queries are scoped to a single partition.
2103 # by project and namespace, however the namespace ID may be empty.
2104 #
2105 # A partition ID contains several dimensions:
2106 # project ID and namespace ID.
2107 #
2108 # Partition dimensions:
2109 #
2110 # - May be `""`.
2111 # - Must be valid UTF-8 bytes.
2112 # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
2113 # If the value of any dimension matches regex `__.*__`, the partition is
2114 # reserved/read-only.
2115 # A reserved/read-only partition ID is forbidden in certain documented
2116 # contexts.
2117 #
2118 # Foreign partition IDs (in which the project ID does
2119 # not match the context project ID ) are discouraged.
2120 # Reads and writes of foreign partition IDs may fail if the project is not in an active state.
2121 "projectId": "A String", # The ID of the project to which the entities belong.
2122 "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong.
2123 },
2124 },
2125 "blobValue": "A String", # A blob value.
2126 # May have at most 1,000,000 bytes.
2127 # When `exclude_from_indexes` is false, may have at most 1500 bytes.
2128 # In JSON requests, must be base64-encoded.
2129 "stringValue": "A String", # A UTF-8 encoded string value.
2130 # When `exclude_from_indexes` is false (it is indexed) , may have at most 1500 bytes.
2131 # Otherwise, may be set to at least 1,000,000 bytes.
2132 "nullValue": "A String", # A null value.
2133 "arrayValue": { # An array value. # An array value.
2134 # Cannot contain another array value.
2135 # A `Value` instance that sets field `array_value` must not set fields
2136 # `meaning` or `exclude_from_indexes`.
2137 "values": [ # Values in the array.
2138 # The order of values in an array is preserved as long as all values have
2139 # identical settings for 'exclude_from_indexes'.
2140 # Object with schema name: Value
2141 ],
2142 },
2143 "integerValue": "A String", # An integer value.
2144 "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.
2145 # of doubles representing degrees latitude and degrees longitude. Unless
2146 # specified otherwise, this must conform to the
2147 # &lt;a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf"&gt;WGS84
2148 # standard&lt;/a&gt;. Values must be within normalized ranges.
2149 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
2150 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
2151 },
2152 },
2153 },
2154 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002155 "allowLiterals": True or False, # When false, the query string must not contain any literals and instead must
2156 # bind all values. For example,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002157 # `SELECT * FROM Kind WHERE a = 'string literal'` is not allowed, while
2158 # `SELECT * FROM Kind WHERE a = @value` is.
2159 },
2160 "readOptions": { # The options shared by read requests. # The options for this query.
2161 "transaction": "A String", # The identifier of the transaction in which to read. A
2162 # transaction identifier is returned by a call to
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002163 # Datastore.BeginTransaction.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002164 "readConsistency": "A String", # The non-transactional read consistency to use.
2165 # Cannot be set to `STRONG` for global queries.
2166 },
2167 }
2168
2169 x__xgafv: string, V1 error format.
2170 Allowed values
2171 1 - v1 error format
2172 2 - v2 error format
2173
2174Returns:
2175 An object of the form:
2176
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002177 { # The response for Datastore.RunQuery.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002178 "query": { # A query for entities. # The parsed form of the `GqlQuery` from the request, if it was set.
2179 "startCursor": "A String", # A starting point for the query results. Query cursors are
2180 # returned in query result batches and
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002181 # [can only be used to continue the same
2182 # query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets).
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002183 "kind": [ # The kinds to query (if empty, returns entities of all kinds).
2184 # Currently at most 1 kind may be specified.
2185 { # A representation of a kind.
2186 "name": "A String", # The name of the kind.
2187 },
2188 ],
2189 "projection": [ # The projection to return. Defaults to returning all properties.
2190 { # A representation of a property in a projection.
2191 "property": { # A reference to a property relative to the kind expressions. # The property to project.
2192 "name": "A String", # The name of the property.
2193 # If name includes "."s, it may be interpreted as a property name path.
2194 },
2195 },
2196 ],
2197 "distinctOn": [ # The properties to make distinct. The query results will contain the first
2198 # result for each distinct combination of values for the given properties
2199 # (if empty, all results are returned).
2200 { # A reference to a property relative to the kind expressions.
2201 "name": "A String", # The name of the property.
2202 # If name includes "."s, it may be interpreted as a property name path.
2203 },
2204 ],
2205 "filter": { # A holder for any type of filter. # The filter to apply.
2206 "compositeFilter": { # A filter that merges multiple other filters using the given operator. # A composite filter.
2207 "filters": [ # The list of filters to combine.
2208 # Must contain at least one filter.
2209 # Object with schema name: Filter
2210 ],
2211 "op": "A String", # The operator for combining multiple filters.
2212 },
2213 "propertyFilter": { # A filter on a specific property. # A filter on a property.
2214 "property": { # A reference to a property relative to the kind expressions. # The property to filter by.
2215 "name": "A String", # The name of the property.
2216 # If name includes "."s, it may be interpreted as a property name path.
2217 },
2218 "value": { # A message that can hold any of the supported value types and associated # The value to compare the property to.
2219 # metadata.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002220 "booleanValue": True or False, # A boolean value.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002221 "entityValue": # Object with schema name: Entity # An entity value.
2222 #
2223 # - May have no key.
2224 # - May have a key with an incomplete key path.
2225 # - May have a reserved/read-only key.
2226 "timestampValue": "A String", # A timestamp value.
2227 # When stored in the Datastore, precise only to microseconds;
2228 # any additional precision is rounded down.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002229 "excludeFromIndexes": True or False, # If the value should be excluded from all indexes including those defined
2230 # explicitly.
Dan O'Mearadd494642020-05-01 07:42:23 -07002231 "doubleValue": 3.14, # A double value.
2232 "meaning": 42, # The `meaning` field should only be populated for backwards compatibility.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002233 "keyValue": { # A unique identifier for an entity. # A key value.
2234 # If a key's partition ID or any of its path kinds or names are
2235 # reserved/read-only, the key is reserved/read-only.
2236 # A reserved/read-only key is forbidden in certain documented contexts.
2237 "path": [ # The entity path.
2238 # An entity path consists of one or more elements composed of a kind and a
2239 # string or numerical identifier, which identify entities. The first
2240 # element identifies a _root entity_, the second element identifies
2241 # a _child_ of the root entity, the third element identifies a child of the
2242 # second entity, and so forth. The entities identified by all prefixes of
2243 # the path are called the element's _ancestors_.
2244 #
2245 # An entity path is always fully complete: *all* of the entity's ancestors
2246 # are required to be in the path along with the entity identifier itself.
2247 # The only exception is that in some documented cases, the identifier in the
2248 # last path element (for the entity) itself may be omitted. For example,
2249 # the last path element of the key of `Mutation.insert` may have no
2250 # identifier.
2251 #
2252 # A path can never be empty, and a path can have at most 100 elements.
2253 { # A (kind, ID/name) pair used to construct a key path.
2254 #
2255 # If either name or ID is set, the element is complete.
2256 # If neither is set, the element is incomplete.
2257 "kind": "A String", # The kind of the entity.
2258 # A kind matching regex `__.*__` is reserved/read-only.
2259 # A kind must not contain more than 1500 bytes when UTF-8 encoded.
2260 # Cannot be `""`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002261 "id": "A String", # The auto-allocated ID of the entity.
2262 # Never equal to zero. Values less than zero are discouraged and may not
2263 # be supported in the future.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002264 "name": "A String", # The name of the entity.
2265 # A name matching regex `__.*__` is reserved/read-only.
2266 # A name must not be more than 1500 bytes when UTF-8 encoded.
2267 # Cannot be `""`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002268 },
2269 ],
2270 "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project
2271 # ID and namespace ID.
2272 # Queries are scoped to a single partition.
2273 # by project and namespace, however the namespace ID may be empty.
2274 #
2275 # A partition ID contains several dimensions:
2276 # project ID and namespace ID.
2277 #
2278 # Partition dimensions:
2279 #
2280 # - May be `""`.
2281 # - Must be valid UTF-8 bytes.
2282 # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
2283 # If the value of any dimension matches regex `__.*__`, the partition is
2284 # reserved/read-only.
2285 # A reserved/read-only partition ID is forbidden in certain documented
2286 # contexts.
2287 #
2288 # Foreign partition IDs (in which the project ID does
2289 # not match the context project ID ) are discouraged.
2290 # Reads and writes of foreign partition IDs may fail if the project is not in an active state.
2291 "projectId": "A String", # The ID of the project to which the entities belong.
2292 "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong.
2293 },
2294 },
2295 "blobValue": "A String", # A blob value.
2296 # May have at most 1,000,000 bytes.
2297 # When `exclude_from_indexes` is false, may have at most 1500 bytes.
2298 # In JSON requests, must be base64-encoded.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002299 "stringValue": "A String", # A UTF-8 encoded string value.
2300 # When `exclude_from_indexes` is false (it is indexed) , may have at most 1500 bytes.
2301 # Otherwise, may be set to at least 1,000,000 bytes.
2302 "nullValue": "A String", # A null value.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002303 "arrayValue": { # An array value. # An array value.
2304 # Cannot contain another array value.
2305 # A `Value` instance that sets field `array_value` must not set fields
2306 # `meaning` or `exclude_from_indexes`.
2307 "values": [ # Values in the array.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002308 # The order of values in an array is preserved as long as all values have
2309 # identical settings for 'exclude_from_indexes'.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002310 # Object with schema name: Value
2311 ],
2312 },
2313 "integerValue": "A String", # An integer value.
2314 "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.
2315 # of doubles representing degrees latitude and degrees longitude. Unless
2316 # specified otherwise, this must conform to the
Dan O'Mearadd494642020-05-01 07:42:23 -07002317 # &lt;a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf"&gt;WGS84
2318 # standard&lt;/a&gt;. Values must be within normalized ranges.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002319 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
2320 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
2321 },
2322 },
2323 "op": "A String", # The operator to filter by.
2324 },
2325 },
2326 "limit": 42, # The maximum number of results to return. Applies after all other
2327 # constraints. Optional.
2328 # Unspecified is interpreted as no limit.
Dan O'Mearadd494642020-05-01 07:42:23 -07002329 # Must be &gt;= 0 if specified.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002330 "offset": 42, # The number of results to skip. Applies before limit, but after all other
Dan O'Mearadd494642020-05-01 07:42:23 -07002331 # constraints. Optional. Must be &gt;= 0 if specified.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002332 "endCursor": "A String", # An ending point for the query results. Query cursors are
2333 # returned in query result batches and
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002334 # [can only be used to limit the same
2335 # query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets).
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002336 "order": [ # The order to apply to the query results (if empty, order is unspecified).
2337 { # The desired order for a specific property.
2338 "direction": "A String", # The direction to order by. Defaults to `ASCENDING`.
2339 "property": { # A reference to a property relative to the kind expressions. # The property to order by.
2340 "name": "A String", # The name of the property.
2341 # If name includes "."s, it may be interpreted as a property name path.
2342 },
2343 },
2344 ],
2345 },
2346 "batch": { # A batch of results produced by a query. # A batch of query results (always present).
2347 "entityResultType": "A String", # The result type for every entity in `entity_results`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002348 "snapshotVersion": "A String", # The version number of the snapshot this batch was returned from.
2349 # This applies to the range of results from the query's `start_cursor` (or
2350 # the beginning of the query if no cursor was given) to this batch's
2351 # `end_cursor` (not the query's `end_cursor`).
2352 #
2353 # In a single transaction, subsequent query result batches for the same query
2354 # can have a greater snapshot version number. Each batch's snapshot version
2355 # is valid for all preceding batches.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002356 # The value will be zero for eventually consistent queries.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002357 "skippedResults": 42, # The number of results skipped, typically because of an offset.
2358 "entityResults": [ # The results for this batch.
2359 { # The result of fetching an entity from Datastore.
2360 "cursor": "A String", # A cursor that points to the position after the result entity.
2361 # Set only when the `EntityResult` is part of a `QueryResultBatch` message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002362 "version": "A String", # The version of the entity, a strictly positive number that monotonically
2363 # increases with changes to the entity.
2364 #
2365 # This field is set for `FULL` entity
2366 # results.
2367 #
2368 # For missing entities in `LookupResponse`, this
2369 # is the version of the snapshot that was used to look up the entity, and it
2370 # is always set except for eventually consistent reads.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002371 "entity": { # A Datastore data object. # The resulting entity.
2372 #
2373 # An entity is limited to 1 megabyte when stored. That _roughly_
2374 # corresponds to a limit of 1 megabyte for the serialized form of this
2375 # message.
2376 "properties": { # The entity's properties.
2377 # The map's keys are property names.
2378 # A property name matching regex `__.*__` is reserved.
2379 # A reserved property name is forbidden in certain documented contexts.
2380 # The name must not contain more than 500 characters.
2381 # The name cannot be `""`.
2382 "a_key": { # A message that can hold any of the supported value types and associated
2383 # metadata.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002384 "booleanValue": True or False, # A boolean value.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002385 "entityValue": # Object with schema name: Entity # An entity value.
2386 #
2387 # - May have no key.
2388 # - May have a key with an incomplete key path.
2389 # - May have a reserved/read-only key.
2390 "timestampValue": "A String", # A timestamp value.
2391 # When stored in the Datastore, precise only to microseconds;
2392 # any additional precision is rounded down.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002393 "excludeFromIndexes": True or False, # If the value should be excluded from all indexes including those defined
2394 # explicitly.
Dan O'Mearadd494642020-05-01 07:42:23 -07002395 "doubleValue": 3.14, # A double value.
2396 "meaning": 42, # The `meaning` field should only be populated for backwards compatibility.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002397 "keyValue": { # A unique identifier for an entity. # A key value.
2398 # If a key's partition ID or any of its path kinds or names are
2399 # reserved/read-only, the key is reserved/read-only.
2400 # A reserved/read-only key is forbidden in certain documented contexts.
2401 "path": [ # The entity path.
2402 # An entity path consists of one or more elements composed of a kind and a
2403 # string or numerical identifier, which identify entities. The first
2404 # element identifies a _root entity_, the second element identifies
2405 # a _child_ of the root entity, the third element identifies a child of the
2406 # second entity, and so forth. The entities identified by all prefixes of
2407 # the path are called the element's _ancestors_.
2408 #
2409 # An entity path is always fully complete: *all* of the entity's ancestors
2410 # are required to be in the path along with the entity identifier itself.
2411 # The only exception is that in some documented cases, the identifier in the
2412 # last path element (for the entity) itself may be omitted. For example,
2413 # the last path element of the key of `Mutation.insert` may have no
2414 # identifier.
2415 #
2416 # A path can never be empty, and a path can have at most 100 elements.
2417 { # A (kind, ID/name) pair used to construct a key path.
2418 #
2419 # If either name or ID is set, the element is complete.
2420 # If neither is set, the element is incomplete.
2421 "kind": "A String", # The kind of the entity.
2422 # A kind matching regex `__.*__` is reserved/read-only.
2423 # A kind must not contain more than 1500 bytes when UTF-8 encoded.
2424 # Cannot be `""`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002425 "id": "A String", # The auto-allocated ID of the entity.
2426 # Never equal to zero. Values less than zero are discouraged and may not
2427 # be supported in the future.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002428 "name": "A String", # The name of the entity.
2429 # A name matching regex `__.*__` is reserved/read-only.
2430 # A name must not be more than 1500 bytes when UTF-8 encoded.
2431 # Cannot be `""`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002432 },
2433 ],
2434 "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project
2435 # ID and namespace ID.
2436 # Queries are scoped to a single partition.
2437 # by project and namespace, however the namespace ID may be empty.
2438 #
2439 # A partition ID contains several dimensions:
2440 # project ID and namespace ID.
2441 #
2442 # Partition dimensions:
2443 #
2444 # - May be `""`.
2445 # - Must be valid UTF-8 bytes.
2446 # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
2447 # If the value of any dimension matches regex `__.*__`, the partition is
2448 # reserved/read-only.
2449 # A reserved/read-only partition ID is forbidden in certain documented
2450 # contexts.
2451 #
2452 # Foreign partition IDs (in which the project ID does
2453 # not match the context project ID ) are discouraged.
2454 # Reads and writes of foreign partition IDs may fail if the project is not in an active state.
2455 "projectId": "A String", # The ID of the project to which the entities belong.
2456 "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong.
2457 },
2458 },
2459 "blobValue": "A String", # A blob value.
2460 # May have at most 1,000,000 bytes.
2461 # When `exclude_from_indexes` is false, may have at most 1500 bytes.
2462 # In JSON requests, must be base64-encoded.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002463 "stringValue": "A String", # A UTF-8 encoded string value.
2464 # When `exclude_from_indexes` is false (it is indexed) , may have at most 1500 bytes.
2465 # Otherwise, may be set to at least 1,000,000 bytes.
2466 "nullValue": "A String", # A null value.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002467 "arrayValue": { # An array value. # An array value.
2468 # Cannot contain another array value.
2469 # A `Value` instance that sets field `array_value` must not set fields
2470 # `meaning` or `exclude_from_indexes`.
2471 "values": [ # Values in the array.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002472 # The order of values in an array is preserved as long as all values have
2473 # identical settings for 'exclude_from_indexes'.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002474 # Object with schema name: Value
2475 ],
2476 },
2477 "integerValue": "A String", # An integer value.
2478 "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.
2479 # of doubles representing degrees latitude and degrees longitude. Unless
2480 # specified otherwise, this must conform to the
Dan O'Mearadd494642020-05-01 07:42:23 -07002481 # &lt;a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf"&gt;WGS84
2482 # standard&lt;/a&gt;. Values must be within normalized ranges.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002483 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
2484 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
2485 },
2486 },
2487 },
2488 "key": { # A unique identifier for an entity. # The entity's key.
2489 #
2490 # An entity must have a key, unless otherwise documented (for example,
2491 # an entity in `Value.entity_value` may have no key).
2492 # An entity's kind is its key path's last element's kind,
2493 # or null if it has no key.
2494 # If a key's partition ID or any of its path kinds or names are
2495 # reserved/read-only, the key is reserved/read-only.
2496 # A reserved/read-only key is forbidden in certain documented contexts.
2497 "path": [ # The entity path.
2498 # An entity path consists of one or more elements composed of a kind and a
2499 # string or numerical identifier, which identify entities. The first
2500 # element identifies a _root entity_, the second element identifies
2501 # a _child_ of the root entity, the third element identifies a child of the
2502 # second entity, and so forth. The entities identified by all prefixes of
2503 # the path are called the element's _ancestors_.
2504 #
2505 # An entity path is always fully complete: *all* of the entity's ancestors
2506 # are required to be in the path along with the entity identifier itself.
2507 # The only exception is that in some documented cases, the identifier in the
2508 # last path element (for the entity) itself may be omitted. For example,
2509 # the last path element of the key of `Mutation.insert` may have no
2510 # identifier.
2511 #
2512 # A path can never be empty, and a path can have at most 100 elements.
2513 { # A (kind, ID/name) pair used to construct a key path.
2514 #
2515 # If either name or ID is set, the element is complete.
2516 # If neither is set, the element is incomplete.
2517 "kind": "A String", # The kind of the entity.
2518 # A kind matching regex `__.*__` is reserved/read-only.
2519 # A kind must not contain more than 1500 bytes when UTF-8 encoded.
2520 # Cannot be `""`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002521 "id": "A String", # The auto-allocated ID of the entity.
2522 # Never equal to zero. Values less than zero are discouraged and may not
2523 # be supported in the future.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002524 "name": "A String", # The name of the entity.
2525 # A name matching regex `__.*__` is reserved/read-only.
2526 # A name must not be more than 1500 bytes when UTF-8 encoded.
2527 # Cannot be `""`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002528 },
2529 ],
2530 "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project
2531 # ID and namespace ID.
2532 # Queries are scoped to a single partition.
2533 # by project and namespace, however the namespace ID may be empty.
2534 #
2535 # A partition ID contains several dimensions:
2536 # project ID and namespace ID.
2537 #
2538 # Partition dimensions:
2539 #
2540 # - May be `""`.
2541 # - Must be valid UTF-8 bytes.
2542 # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
2543 # If the value of any dimension matches regex `__.*__`, the partition is
2544 # reserved/read-only.
2545 # A reserved/read-only partition ID is forbidden in certain documented
2546 # contexts.
2547 #
2548 # Foreign partition IDs (in which the project ID does
2549 # not match the context project ID ) are discouraged.
2550 # Reads and writes of foreign partition IDs may fail if the project is not in an active state.
2551 "projectId": "A String", # The ID of the project to which the entities belong.
2552 "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong.
2553 },
2554 },
2555 },
2556 },
2557 ],
2558 "skippedCursor": "A String", # A cursor that points to the position after the last skipped result.
2559 # Will be set when `skipped_results` != 0.
2560 "moreResults": "A String", # The state of the query after the current batch.
2561 "endCursor": "A String", # A cursor that points to the position after the last result in the batch.
2562 },
2563 }</pre>
2564</div>
2565
2566</body></html>