1<html><body> 2<style> 3 4body, h1, h2, h3, div, span, p, pre, a { 5 margin: 0; 6 padding: 0; 7 border: 0; 8 font-weight: inherit; 9 font-style: inherit; 10 font-size: 100%; 11 font-family: inherit; 12 vertical-align: baseline; 13} 14 15body { 16 font-size: 13px; 17 padding: 1em; 18} 19 20h1 { 21 font-size: 26px; 22 margin-bottom: 1em; 23} 24 25h2 { 26 font-size: 24px; 27 margin-bottom: 1em; 28} 29 30h3 { 31 font-size: 20px; 32 margin-bottom: 1em; 33 margin-top: 1em; 34} 35 36pre, code { 37 line-height: 1.5; 38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; 39} 40 41pre { 42 margin-top: 0.5em; 43} 44 45h1, h2, h3, p { 46 font-family: Arial, sans serif; 47} 48 49h1, h2, h3 { 50 border-bottom: solid #CCC 1px; 51} 52 53.toc_element { 54 margin-top: 0.5em; 55} 56 57.firstline { 58 margin-left: 2 em; 59} 60 61.method { 62 margin-top: 1em; 63 border: solid 1px #CCC; 64 padding: 1em; 65 background: #EEE; 66} 67 68.details { 69 font-weight: bold; 70 font-size: 14px; 71} 72 73</style> 74 75<h1><a href="datastore_v1beta3.html">Cloud Datastore API</a> . <a href="datastore_v1beta3.projects.html">projects</a></h1> 76<h2>Instance Methods</h2> 77<p class="toc_element"> 78 <code><a href="#allocateIds">allocateIds(projectId, body, x__xgafv=None)</a></code></p> 79<p class="firstline">Allocates IDs for the given keys, which is useful for referencing an entity</p> 80<p class="toc_element"> 81 <code><a href="#beginTransaction">beginTransaction(projectId, body, x__xgafv=None)</a></code></p> 82<p class="firstline">Begins a new transaction.</p> 83<p class="toc_element"> 84 <code><a href="#commit">commit(projectId, body, x__xgafv=None)</a></code></p> 85<p class="firstline">Commits a transaction, optionally creating, deleting or modifying some</p> 86<p class="toc_element"> 87 <code><a href="#lookup">lookup(projectId, body, x__xgafv=None)</a></code></p> 88<p class="firstline">Looks up entities by key.</p> 89<p class="toc_element"> 90 <code><a href="#reserveIds">reserveIds(projectId, body, x__xgafv=None)</a></code></p> 91<p class="firstline">Prevents the supplied keys' IDs from being auto-allocated by Cloud</p> 92<p class="toc_element"> 93 <code><a href="#rollback">rollback(projectId, body, x__xgafv=None)</a></code></p> 94<p class="firstline">Rolls back a transaction.</p> 95<p class="toc_element"> 96 <code><a href="#runQuery">runQuery(projectId, body, x__xgafv=None)</a></code></p> 97<p class="firstline">Queries for entities.</p> 98<h3>Method Details</h3> 99<div class="method"> 100 <code class="details" id="allocateIds">allocateIds(projectId, body, x__xgafv=None)</code> 101 <pre>Allocates IDs for the given keys, which is useful for referencing an entity 102before it is inserted. 103 104Args: 105 projectId: string, The ID of the project against which to make the request. (required) 106 body: object, The request body. (required) 107 The object takes the form of: 108 109{ # The request for Datastore.AllocateIds. 110 "keys": [ # A list of keys with incomplete key paths for which to allocate IDs. 111 # 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 `""`. 140 "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. 143 "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 `""`. 147 }, 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 185 { # The response for Datastore.AllocateIds. 186 "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 `""`. 216 "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. 219 "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 `""`. 223 }, 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"> 255 <code class="details" id="beginTransaction">beginTransaction(projectId, body, x__xgafv=None)</code> 256 <pre>Begins a new transaction. 257 258Args: 259 projectId: string, The ID of the project against which to make the request. (required) 260 body: object, The request body. (required) 261 The object takes the form of: 262 263{ # The request for Datastore.BeginTransaction. 264 "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 }, 275 } 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 285 { # The response for Datastore.BeginTransaction. 286 "transaction": "A String", # The transaction identifier (always present). 287 }</pre> 288</div> 289 290<div class="method"> 291 <code class="details" id="commit">commit(projectId, body, x__xgafv=None)</code> 292 <pre>Commits a transaction, optionally creating, deleting or modifying some 293entities. 294 295Args: 296 projectId: string, The ID of the project against which to make the request. (required) 297 body: object, The request body. (required) 298 The object takes the form of: 299 300{ # The request for Datastore.Commit. 301 "transaction": "A String", # The identifier of the transaction associated with the commit. A 302 # transaction identifier is returned by a call to 303 # Datastore.BeginTransaction. 304 "mode": "A String", # The type of commit to perform. Defaults to `TRANSACTIONAL`. 305 "mutations": [ # The mutations to perform. 306 # 307 # When mode is `TRANSACTIONAL`, mutations affecting a single entity are 308 # applied in order. The following sequences of mutations affecting a single 309 # entity are not permitted in a single `Commit` request: 310 # 311 # - `insert` followed by `insert` 312 # - `update` followed by `insert` 313 # - `upsert` followed by `insert` 314 # - `delete` followed by `update` 315 # 316 # When mode is `NON_TRANSACTIONAL`, no two mutations may affect a single 317 # entity. 318 { # A mutation to apply to an entity. 319 "insert": { # A Datastore data object. # The entity to insert. The entity must not already exist. 320 # The entity key's final path element may be incomplete. 321 # 322 # An entity is limited to 1 megabyte when stored. That _roughly_ 323 # corresponds to a limit of 1 megabyte for the serialized form of this 324 # message. 325 "properties": { # The entity's properties. 326 # The map's keys are property names. 327 # A property name matching regex `__.*__` is reserved. 328 # A reserved property name is forbidden in certain documented contexts. 329 # The name must not contain more than 500 characters. 330 # The name cannot be `""`. 331 "a_key": { # A message that can hold any of the supported value types and associated 332 # metadata. 333 "booleanValue": True or False, # A boolean value. 334 "entityValue": # Object with schema name: Entity # An entity value. 335 # 336 # - May have no key. 337 # - May have a key with an incomplete key path. 338 # - May have a reserved/read-only key. 339 "timestampValue": "A String", # A timestamp value. 340 # When stored in the Datastore, precise only to microseconds; 341 # any additional precision is rounded down. 342 "doubleValue": 3.14, # A double value. 343 "meaning": 42, # The `meaning` field should only be populated for backwards compatibility. 344 "excludeFromIndexes": True or False, # If the value should be excluded from all indexes including those defined 345 # explicitly. 346 "keyValue": { # A unique identifier for an entity. # A key value. 347 # If a key's partition ID or any of its path kinds or names are 348 # reserved/read-only, the key is reserved/read-only. 349 # A reserved/read-only key is forbidden in certain documented contexts. 350 "path": [ # The entity path. 351 # An entity path consists of one or more elements composed of a kind and a 352 # string or numerical identifier, which identify entities. The first 353 # element identifies a _root entity_, the second element identifies 354 # a _child_ of the root entity, the third element identifies a child of the 355 # second entity, and so forth. The entities identified by all prefixes of 356 # the path are called the element's _ancestors_. 357 # 358 # An entity path is always fully complete: *all* of the entity's ancestors 359 # are required to be in the path along with the entity identifier itself. 360 # The only exception is that in some documented cases, the identifier in the 361 # last path element (for the entity) itself may be omitted. For example, 362 # the last path element of the key of `Mutation.insert` may have no 363 # identifier. 364 # 365 # A path can never be empty, and a path can have at most 100 elements. 366 { # A (kind, ID/name) pair used to construct a key path. 367 # 368 # If either name or ID is set, the element is complete. 369 # If neither is set, the element is incomplete. 370 "kind": "A String", # The kind of the entity. 371 # A kind matching regex `__.*__` is reserved/read-only. 372 # A kind must not contain more than 1500 bytes when UTF-8 encoded. 373 # Cannot be `""`. 374 "id": "A String", # The auto-allocated ID of the entity. 375 # Never equal to zero. Values less than zero are discouraged and may not 376 # be supported in the future. 377 "name": "A String", # The name of the entity. 378 # A name matching regex `__.*__` is reserved/read-only. 379 # A name must not be more than 1500 bytes when UTF-8 encoded. 380 # Cannot be `""`. 381 }, 382 ], 383 "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project 384 # ID and namespace ID. 385 # Queries are scoped to a single partition. 386 # by project and namespace, however the namespace ID may be empty. 387 # 388 # A partition ID contains several dimensions: 389 # project ID and namespace ID. 390 # 391 # Partition dimensions: 392 # 393 # - May be `""`. 394 # - Must be valid UTF-8 bytes. 395 # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}` 396 # If the value of any dimension matches regex `__.*__`, the partition is 397 # reserved/read-only. 398 # A reserved/read-only partition ID is forbidden in certain documented 399 # contexts. 400 # 401 # Foreign partition IDs (in which the project ID does 402 # not match the context project ID ) are discouraged. 403 # Reads and writes of foreign partition IDs may fail if the project is not in an active state. 404 "projectId": "A String", # The ID of the project to which the entities belong. 405 "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong. 406 }, 407 }, 408 "blobValue": "A String", # A blob value. 409 # May have at most 1,000,000 bytes. 410 # When `exclude_from_indexes` is false, may have at most 1500 bytes. 411 # In JSON requests, must be base64-encoded. 412 "stringValue": "A String", # A UTF-8 encoded string value. 413 # When `exclude_from_indexes` is false (it is indexed) , may have at most 1500 bytes. 414 # Otherwise, may be set to at least 1,000,000 bytes. 415 "nullValue": "A String", # A null value. 416 "arrayValue": { # An array value. # An array value. 417 # Cannot contain another array value. 418 # A `Value` instance that sets field `array_value` must not set fields 419 # `meaning` or `exclude_from_indexes`. 420 "values": [ # Values in the array. 421 # The order of values in an array is preserved as long as all values have 422 # identical settings for 'exclude_from_indexes'. 423 # Object with schema name: Value 424 ], 425 }, 426 "integerValue": "A String", # An integer value. 427 "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. 428 # of doubles representing degrees latitude and degrees longitude. Unless 429 # specified otherwise, this must conform to the 430 # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84 431 # standard</a>. Values must be within normalized ranges. 432 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0]. 433 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0]. 434 }, 435 }, 436 }, 437 "key": { # A unique identifier for an entity. # The entity's key. 438 # 439 # An entity must have a key, unless otherwise documented (for example, 440 # an entity in `Value.entity_value` may have no key). 441 # An entity's kind is its key path's last element's kind, 442 # or null if it has no key. 443 # If a key's partition ID or any of its path kinds or names are 444 # reserved/read-only, the key is reserved/read-only. 445 # A reserved/read-only key is forbidden in certain documented contexts. 446 "path": [ # The entity path. 447 # An entity path consists of one or more elements composed of a kind and a 448 # string or numerical identifier, which identify entities. The first 449 # element identifies a _root entity_, the second element identifies 450 # a _child_ of the root entity, the third element identifies a child of the 451 # second entity, and so forth. The entities identified by all prefixes of 452 # the path are called the element's _ancestors_. 453 # 454 # An entity path is always fully complete: *all* of the entity's ancestors 455 # are required to be in the path along with the entity identifier itself. 456 # The only exception is that in some documented cases, the identifier in the 457 # last path element (for the entity) itself may be omitted. For example, 458 # the last path element of the key of `Mutation.insert` may have no 459 # identifier. 460 # 461 # A path can never be empty, and a path can have at most 100 elements. 462 { # A (kind, ID/name) pair used to construct a key path. 463 # 464 # If either name or ID is set, the element is complete. 465 # If neither is set, the element is incomplete. 466 "kind": "A String", # The kind of the entity. 467 # A kind matching regex `__.*__` is reserved/read-only. 468 # A kind must not contain more than 1500 bytes when UTF-8 encoded. 469 # Cannot be `""`. 470 "id": "A String", # The auto-allocated ID of the entity. 471 # Never equal to zero. Values less than zero are discouraged and may not 472 # be supported in the future. 473 "name": "A String", # The name of the entity. 474 # A name matching regex `__.*__` is reserved/read-only. 475 # A name must not be more than 1500 bytes when UTF-8 encoded. 476 # Cannot be `""`. 477 }, 478 ], 479 "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project 480 # ID and namespace ID. 481 # Queries are scoped to a single partition. 482 # by project and namespace, however the namespace ID may be empty. 483 # 484 # A partition ID contains several dimensions: 485 # project ID and namespace ID. 486 # 487 # Partition dimensions: 488 # 489 # - May be `""`. 490 # - Must be valid UTF-8 bytes. 491 # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}` 492 # If the value of any dimension matches regex `__.*__`, the partition is 493 # reserved/read-only. 494 # A reserved/read-only partition ID is forbidden in certain documented 495 # contexts. 496 # 497 # Foreign partition IDs (in which the project ID does 498 # not match the context project ID ) are discouraged. 499 # Reads and writes of foreign partition IDs may fail if the project is not in an active state. 500 "projectId": "A String", # The ID of the project to which the entities belong. 501 "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong. 502 }, 503 }, 504 }, 505 "upsert": { # A Datastore data object. # The entity to upsert. The entity may or may not already exist. 506 # The entity key's final path element may be incomplete. 507 # 508 # An entity is limited to 1 megabyte when stored. That _roughly_ 509 # corresponds to a limit of 1 megabyte for the serialized form of this 510 # message. 511 "properties": { # The entity's properties. 512 # The map's keys are property names. 513 # A property name matching regex `__.*__` is reserved. 514 # A reserved property name is forbidden in certain documented contexts. 515 # The name must not contain more than 500 characters. 516 # The name cannot be `""`. 517 "a_key": { # A message that can hold any of the supported value types and associated 518 # metadata. 519 "booleanValue": True or False, # A boolean value. 520 "entityValue": # Object with schema name: Entity # An entity value. 521 # 522 # - May have no key. 523 # - May have a key with an incomplete key path. 524 # - May have a reserved/read-only key. 525 "timestampValue": "A String", # A timestamp value. 526 # When stored in the Datastore, precise only to microseconds; 527 # any additional precision is rounded down. 528 "doubleValue": 3.14, # A double value. 529 "meaning": 42, # The `meaning` field should only be populated for backwards compatibility. 530 "excludeFromIndexes": True or False, # If the value should be excluded from all indexes including those defined 531 # explicitly. 532 "keyValue": { # A unique identifier for an entity. # A key value. 533 # If a key's partition ID or any of its path kinds or names are 534 # reserved/read-only, the key is reserved/read-only. 535 # A reserved/read-only key is forbidden in certain documented contexts. 536 "path": [ # The entity path. 537 # An entity path consists of one or more elements composed of a kind and a 538 # string or numerical identifier, which identify entities. The first 539 # element identifies a _root entity_, the second element identifies 540 # a _child_ of the root entity, the third element identifies a child of the 541 # second entity, and so forth. The entities identified by all prefixes of 542 # the path are called the element's _ancestors_. 543 # 544 # An entity path is always fully complete: *all* of the entity's ancestors 545 # are required to be in the path along with the entity identifier itself. 546 # The only exception is that in some documented cases, the identifier in the 547 # last path element (for the entity) itself may be omitted. For example, 548 # the last path element of the key of `Mutation.insert` may have no 549 # identifier. 550 # 551 # A path can never be empty, and a path can have at most 100 elements. 552 { # A (kind, ID/name) pair used to construct a key path. 553 # 554 # If either name or ID is set, the element is complete. 555 # If neither is set, the element is incomplete. 556 "kind": "A String", # The kind of the entity. 557 # A kind matching regex `__.*__` is reserved/read-only. 558 # A kind must not contain more than 1500 bytes when UTF-8 encoded. 559 # Cannot be `""`. 560 "id": "A String", # The auto-allocated ID of the entity. 561 # Never equal to zero. Values less than zero are discouraged and may not 562 # be supported in the future. 563 "name": "A String", # The name of the entity. 564 # A name matching regex `__.*__` is reserved/read-only. 565 # A name must not be more than 1500 bytes when UTF-8 encoded. 566 # Cannot be `""`. 567 }, 568 ], 569 "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project 570 # ID and namespace ID. 571 # Queries are scoped to a single partition. 572 # by project and namespace, however the namespace ID may be empty. 573 # 574 # A partition ID contains several dimensions: 575 # project ID and namespace ID. 576 # 577 # Partition dimensions: 578 # 579 # - May be `""`. 580 # - Must be valid UTF-8 bytes. 581 # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}` 582 # If the value of any dimension matches regex `__.*__`, the partition is 583 # reserved/read-only. 584 # A reserved/read-only partition ID is forbidden in certain documented 585 # contexts. 586 # 587 # Foreign partition IDs (in which the project ID does 588 # not match the context project ID ) are discouraged. 589 # Reads and writes of foreign partition IDs may fail if the project is not in an active state. 590 "projectId": "A String", # The ID of the project to which the entities belong. 591 "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong. 592 }, 593 }, 594 "blobValue": "A String", # A blob value. 595 # May have at most 1,000,000 bytes. 596 # When `exclude_from_indexes` is false, may have at most 1500 bytes. 597 # In JSON requests, must be base64-encoded. 598 "stringValue": "A String", # A UTF-8 encoded string value. 599 # When `exclude_from_indexes` is false (it is indexed) , may have at most 1500 bytes. 600 # Otherwise, may be set to at least 1,000,000 bytes. 601 "nullValue": "A String", # A null value. 602 "arrayValue": { # An array value. # An array value. 603 # Cannot contain another array value. 604 # A `Value` instance that sets field `array_value` must not set fields 605 # `meaning` or `exclude_from_indexes`. 606 "values": [ # Values in the array. 607 # The order of values in an array is preserved as long as all values have 608 # identical settings for 'exclude_from_indexes'. 609 # Object with schema name: Value 610 ], 611 }, 612 "integerValue": "A String", # An integer value. 613 "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. 614 # of doubles representing degrees latitude and degrees longitude. Unless 615 # specified otherwise, this must conform to the 616 # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84 617 # standard</a>. Values must be within normalized ranges. 618 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0]. 619 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0]. 620 }, 621 }, 622 }, 623 "key": { # A unique identifier for an entity. # The entity's key. 624 # 625 # An entity must have a key, unless otherwise documented (for example, 626 # an entity in `Value.entity_value` may have no key). 627 # An entity's kind is its key path's last element's kind, 628 # or null if it has no key. 629 # If a key's partition ID or any of its path kinds or names are 630 # reserved/read-only, the key is reserved/read-only. 631 # A reserved/read-only key is forbidden in certain documented contexts. 632 "path": [ # The entity path. 633 # An entity path consists of one or more elements composed of a kind and a 634 # string or numerical identifier, which identify entities. The first 635 # element identifies a _root entity_, the second element identifies 636 # a _child_ of the root entity, the third element identifies a child of the 637 # second entity, and so forth. The entities identified by all prefixes of 638 # the path are called the element's _ancestors_. 639 # 640 # An entity path is always fully complete: *all* of the entity's ancestors 641 # are required to be in the path along with the entity identifier itself. 642 # The only exception is that in some documented cases, the identifier in the 643 # last path element (for the entity) itself may be omitted. For example, 644 # the last path element of the key of `Mutation.insert` may have no 645 # identifier. 646 # 647 # A path can never be empty, and a path can have at most 100 elements. 648 { # A (kind, ID/name) pair used to construct a key path. 649 # 650 # If either name or ID is set, the element is complete. 651 # If neither is set, the element is incomplete. 652 "kind": "A String", # The kind of the entity. 653 # A kind matching regex `__.*__` is reserved/read-only. 654 # A kind must not contain more than 1500 bytes when UTF-8 encoded. 655 # Cannot be `""`. 656 "id": "A String", # The auto-allocated ID of the entity. 657 # Never equal to zero. Values less than zero are discouraged and may not 658 # be supported in the future. 659 "name": "A String", # The name of the entity. 660 # A name matching regex `__.*__` is reserved/read-only. 661 # A name must not be more than 1500 bytes when UTF-8 encoded. 662 # Cannot be `""`. 663 }, 664 ], 665 "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project 666 # ID and namespace ID. 667 # Queries are scoped to a single partition. 668 # by project and namespace, however the namespace ID may be empty. 669 # 670 # A partition ID contains several dimensions: 671 # project ID and namespace ID. 672 # 673 # Partition dimensions: 674 # 675 # - May be `""`. 676 # - Must be valid UTF-8 bytes. 677 # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}` 678 # If the value of any dimension matches regex `__.*__`, the partition is 679 # reserved/read-only. 680 # A reserved/read-only partition ID is forbidden in certain documented 681 # contexts. 682 # 683 # Foreign partition IDs (in which the project ID does 684 # not match the context project ID ) are discouraged. 685 # Reads and writes of foreign partition IDs may fail if the project is not in an active state. 686 "projectId": "A String", # The ID of the project to which the entities belong. 687 "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong. 688 }, 689 }, 690 }, 691 "update": { # A Datastore data object. # The entity to update. The entity must already exist. 692 # Must have a complete key path. 693 # 694 # An entity is limited to 1 megabyte when stored. That _roughly_ 695 # corresponds to a limit of 1 megabyte for the serialized form of this 696 # message. 697 "properties": { # The entity's properties. 698 # The map's keys are property names. 699 # A property name matching regex `__.*__` is reserved. 700 # A reserved property name is forbidden in certain documented contexts. 701 # The name must not contain more than 500 characters. 702 # The name cannot be `""`. 703 "a_key": { # A message that can hold any of the supported value types and associated 704 # metadata. 705 "booleanValue": True or False, # A boolean value. 706 "entityValue": # Object with schema name: Entity # An entity value. 707 # 708 # - May have no key. 709 # - May have a key with an incomplete key path. 710 # - May have a reserved/read-only key. 711 "timestampValue": "A String", # A timestamp value. 712 # When stored in the Datastore, precise only to microseconds; 713 # any additional precision is rounded down. 714 "doubleValue": 3.14, # A double value. 715 "meaning": 42, # The `meaning` field should only be populated for backwards compatibility. 716 "excludeFromIndexes": True or False, # If the value should be excluded from all indexes including those defined 717 # explicitly. 718 "keyValue": { # A unique identifier for an entity. # A key value. 719 # If a key's partition ID or any of its path kinds or names are 720 # reserved/read-only, the key is reserved/read-only. 721 # A reserved/read-only key is forbidden in certain documented contexts. 722 "path": [ # The entity path. 723 # An entity path consists of one or more elements composed of a kind and a 724 # string or numerical identifier, which identify entities. The first 725 # element identifies a _root entity_, the second element identifies 726 # a _child_ of the root entity, the third element identifies a child of the 727 # second entity, and so forth. The entities identified by all prefixes of 728 # the path are called the element's _ancestors_. 729 # 730 # An entity path is always fully complete: *all* of the entity's ancestors 731 # are required to be in the path along with the entity identifier itself. 732 # The only exception is that in some documented cases, the identifier in the 733 # last path element (for the entity) itself may be omitted. For example, 734 # the last path element of the key of `Mutation.insert` may have no 735 # identifier. 736 # 737 # A path can never be empty, and a path can have at most 100 elements. 738 { # A (kind, ID/name) pair used to construct a key path. 739 # 740 # If either name or ID is set, the element is complete. 741 # If neither is set, the element is incomplete. 742 "kind": "A String", # The kind of the entity. 743 # A kind matching regex `__.*__` is reserved/read-only. 744 # A kind must not contain more than 1500 bytes when UTF-8 encoded. 745 # Cannot be `""`. 746 "id": "A String", # The auto-allocated ID of the entity. 747 # Never equal to zero. Values less than zero are discouraged and may not 748 # be supported in the future. 749 "name": "A String", # The name of the entity. 750 # A name matching regex `__.*__` is reserved/read-only. 751 # A name must not be more than 1500 bytes when UTF-8 encoded. 752 # Cannot be `""`. 753 }, 754 ], 755 "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project 756 # ID and namespace ID. 757 # Queries are scoped to a single partition. 758 # by project and namespace, however the namespace ID may be empty. 759 # 760 # A partition ID contains several dimensions: 761 # project ID and namespace ID. 762 # 763 # Partition dimensions: 764 # 765 # - May be `""`. 766 # - Must be valid UTF-8 bytes. 767 # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}` 768 # If the value of any dimension matches regex `__.*__`, the partition is 769 # reserved/read-only. 770 # A reserved/read-only partition ID is forbidden in certain documented 771 # contexts. 772 # 773 # Foreign partition IDs (in which the project ID does 774 # not match the context project ID ) are discouraged. 775 # Reads and writes of foreign partition IDs may fail if the project is not in an active state. 776 "projectId": "A String", # The ID of the project to which the entities belong. 777 "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong. 778 }, 779 }, 780 "blobValue": "A String", # A blob value. 781 # May have at most 1,000,000 bytes. 782 # When `exclude_from_indexes` is false, may have at most 1500 bytes. 783 # In JSON requests, must be base64-encoded. 784 "stringValue": "A String", # A UTF-8 encoded string value. 785 # When `exclude_from_indexes` is false (it is indexed) , may have at most 1500 bytes. 786 # Otherwise, may be set to at least 1,000,000 bytes. 787 "nullValue": "A String", # A null value. 788 "arrayValue": { # An array value. # An array value. 789 # Cannot contain another array value. 790 # A `Value` instance that sets field `array_value` must not set fields 791 # `meaning` or `exclude_from_indexes`. 792 "values": [ # Values in the array. 793 # The order of values in an array is preserved as long as all values have 794 # identical settings for 'exclude_from_indexes'. 795 # Object with schema name: Value 796 ], 797 }, 798 "integerValue": "A String", # An integer value. 799 "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. 800 # of doubles representing degrees latitude and degrees longitude. Unless 801 # specified otherwise, this must conform to the 802 # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84 803 # standard</a>. Values must be within normalized ranges. 804 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0]. 805 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0]. 806 }, 807 }, 808 }, 809 "key": { # A unique identifier for an entity. # The entity's key. 810 # 811 # An entity must have a key, unless otherwise documented (for example, 812 # an entity in `Value.entity_value` may have no key). 813 # An entity's kind is its key path's last element's kind, 814 # or null if it has no key. 815 # If a key's partition ID or any of its path kinds or names are 816 # reserved/read-only, the key is reserved/read-only. 817 # A reserved/read-only key is forbidden in certain documented contexts. 818 "path": [ # The entity path. 819 # An entity path consists of one or more elements composed of a kind and a 820 # string or numerical identifier, which identify entities. The first 821 # element identifies a _root entity_, the second element identifies 822 # a _child_ of the root entity, the third element identifies a child of the 823 # second entity, and so forth. The entities identified by all prefixes of 824 # the path are called the element's _ancestors_. 825 # 826 # An entity path is always fully complete: *all* of the entity's ancestors 827 # are required to be in the path along with the entity identifier itself. 828 # The only exception is that in some documented cases, the identifier in the 829 # last path element (for the entity) itself may be omitted. For example, 830 # the last path element of the key of `Mutation.insert` may have no 831 # identifier. 832 # 833 # A path can never be empty, and a path can have at most 100 elements. 834 { # A (kind, ID/name) pair used to construct a key path. 835 # 836 # If either name or ID is set, the element is complete. 837 # If neither is set, the element is incomplete. 838 "kind": "A String", # The kind of the entity. 839 # A kind matching regex `__.*__` is reserved/read-only. 840 # A kind must not contain more than 1500 bytes when UTF-8 encoded. 841 # Cannot be `""`. 842 "id": "A String", # The auto-allocated ID of the entity. 843 # Never equal to zero. Values less than zero are discouraged and may not 844 # be supported in the future. 845 "name": "A String", # The name of the entity. 846 # A name matching regex `__.*__` is reserved/read-only. 847 # A name must not be more than 1500 bytes when UTF-8 encoded. 848 # Cannot be `""`. 849 }, 850 ], 851 "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project 852 # ID and namespace ID. 853 # Queries are scoped to a single partition. 854 # by project and namespace, however the namespace ID may be empty. 855 # 856 # A partition ID contains several dimensions: 857 # project ID and namespace ID. 858 # 859 # Partition dimensions: 860 # 861 # - May be `""`. 862 # - Must be valid UTF-8 bytes. 863 # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}` 864 # If the value of any dimension matches regex `__.*__`, the partition is 865 # reserved/read-only. 866 # A reserved/read-only partition ID is forbidden in certain documented 867 # contexts. 868 # 869 # Foreign partition IDs (in which the project ID does 870 # not match the context project ID ) are discouraged. 871 # Reads and writes of foreign partition IDs may fail if the project is not in an active state. 872 "projectId": "A String", # The ID of the project to which the entities belong. 873 "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong. 874 }, 875 }, 876 }, 877 "baseVersion": "A String", # The version of the entity that this mutation is being applied to. If this 878 # does not match the current version on the server, the mutation conflicts. 879 "delete": { # A unique identifier for an entity. # The key of the entity to delete. The entity may or may not already exist. 880 # Must have a complete key path and must not be reserved/read-only. 881 # If a key's partition ID or any of its path kinds or names are 882 # reserved/read-only, the key is reserved/read-only. 883 # A reserved/read-only key is forbidden in certain documented contexts. 884 "path": [ # The entity path. 885 # An entity path consists of one or more elements composed of a kind and a 886 # string or numerical identifier, which identify entities. The first 887 # element identifies a _root entity_, the second element identifies 888 # a _child_ of the root entity, the third element identifies a child of the 889 # second entity, and so forth. The entities identified by all prefixes of 890 # the path are called the element's _ancestors_. 891 # 892 # An entity path is always fully complete: *all* of the entity's ancestors 893 # are required to be in the path along with the entity identifier itself. 894 # The only exception is that in some documented cases, the identifier in the 895 # last path element (for the entity) itself may be omitted. For example, 896 # the last path element of the key of `Mutation.insert` may have no 897 # identifier. 898 # 899 # A path can never be empty, and a path can have at most 100 elements. 900 { # A (kind, ID/name) pair used to construct a key path. 901 # 902 # If either name or ID is set, the element is complete. 903 # If neither is set, the element is incomplete. 904 "kind": "A String", # The kind of the entity. 905 # A kind matching regex `__.*__` is reserved/read-only. 906 # A kind must not contain more than 1500 bytes when UTF-8 encoded. 907 # Cannot be `""`. 908 "id": "A String", # The auto-allocated ID of the entity. 909 # Never equal to zero. Values less than zero are discouraged and may not 910 # be supported in the future. 911 "name": "A String", # The name of the entity. 912 # A name matching regex `__.*__` is reserved/read-only. 913 # A name must not be more than 1500 bytes when UTF-8 encoded. 914 # Cannot be `""`. 915 }, 916 ], 917 "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project 918 # ID and namespace ID. 919 # Queries are scoped to a single partition. 920 # by project and namespace, however the namespace ID may be empty. 921 # 922 # A partition ID contains several dimensions: 923 # project ID and namespace ID. 924 # 925 # Partition dimensions: 926 # 927 # - May be `""`. 928 # - Must be valid UTF-8 bytes. 929 # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}` 930 # If the value of any dimension matches regex `__.*__`, the partition is 931 # reserved/read-only. 932 # A reserved/read-only partition ID is forbidden in certain documented 933 # contexts. 934 # 935 # Foreign partition IDs (in which the project ID does 936 # not match the context project ID ) are discouraged. 937 # Reads and writes of foreign partition IDs may fail if the project is not in an active state. 938 "projectId": "A String", # The ID of the project to which the entities belong. 939 "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong. 940 }, 941 }, 942 }, 943 ], 944 } 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 954 { # The response for Datastore.Commit. 955 "mutationResults": [ # The result of performing the mutations. 956 # The i-th mutation result corresponds to the i-th mutation in the request. 957 { # The result of applying a mutation. 958 "version": "A String", # The version of the entity on the server after processing the mutation. If 959 # the mutation doesn't change anything on the server, then the version will 960 # be the version of the current entity or, if no entity is present, a version 961 # that is strictly greater than the version of any previous entity and less 962 # than the version of any possible future entity. 963 "conflictDetected": True or False, # Whether a conflict was detected for this mutation. Always false when a 964 # conflict detection strategy field is not set in the mutation. 965 "key": { # A unique identifier for an entity. # The automatically allocated key. 966 # Set only when the mutation allocated a key. 967 # If a key's partition ID or any of its path kinds or names are 968 # reserved/read-only, the key is reserved/read-only. 969 # A reserved/read-only key is forbidden in certain documented contexts. 970 "path": [ # The entity path. 971 # An entity path consists of one or more elements composed of a kind and a 972 # string or numerical identifier, which identify entities. The first 973 # element identifies a _root entity_, the second element identifies 974 # a _child_ of the root entity, the third element identifies a child of the 975 # second entity, and so forth. The entities identified by all prefixes of 976 # the path are called the element's _ancestors_. 977 # 978 # An entity path is always fully complete: *all* of the entity's ancestors 979 # are required to be in the path along with the entity identifier itself. 980 # The only exception is that in some documented cases, the identifier in the 981 # last path element (for the entity) itself may be omitted. For example, 982 # the last path element of the key of `Mutation.insert` may have no 983 # identifier. 984 # 985 # A path can never be empty, and a path can have at most 100 elements. 986 { # A (kind, ID/name) pair used to construct a key path. 987 # 988 # If either name or ID is set, the element is complete. 989 # If neither is set, the element is incomplete. 990 "kind": "A String", # The kind of the entity. 991 # A kind matching regex `__.*__` is reserved/read-only. 992 # A kind must not contain more than 1500 bytes when UTF-8 encoded. 993 # Cannot be `""`. 994 "id": "A String", # The auto-allocated ID of the entity. 995 # Never equal to zero. Values less than zero are discouraged and may not 996 # be supported in the future. 997 "name": "A String", # The name of the entity. 998 # A name matching regex `__.*__` is reserved/read-only. 999 # A name must not be more than 1500 bytes when UTF-8 encoded. 1000 # Cannot be `""`. 1001 }, 1002 ], 1003 "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project 1004 # ID and namespace ID. 1005 # Queries are scoped to a single partition. 1006 # by project and namespace, however the namespace ID may be empty. 1007 # 1008 # A partition ID contains several dimensions: 1009 # project ID and namespace ID. 1010 # 1011 # Partition dimensions: 1012 # 1013 # - May be `""`. 1014 # - Must be valid UTF-8 bytes. 1015 # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}` 1016 # If the value of any dimension matches regex `__.*__`, the partition is 1017 # reserved/read-only. 1018 # A reserved/read-only partition ID is forbidden in certain documented 1019 # contexts. 1020 # 1021 # Foreign partition IDs (in which the project ID does 1022 # not match the context project ID ) are discouraged. 1023 # Reads and writes of foreign partition IDs may fail if the project is not in an active state. 1024 "projectId": "A String", # The ID of the project to which the entities belong. 1025 "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong. 1026 }, 1027 }, 1028 }, 1029 ], 1030 "indexUpdates": 42, # The number of index entries updated during the commit, or zero if none were 1031 # updated. 1032 }</pre> 1033</div> 1034 1035<div class="method"> 1036 <code class="details" id="lookup">lookup(projectId, body, x__xgafv=None)</code> 1037 <pre>Looks up entities by key. 1038 1039Args: 1040 projectId: string, The ID of the project against which to make the request. (required) 1041 body: object, The request body. (required) 1042 The object takes the form of: 1043 1044{ # The request for Datastore.Lookup. 1045 "keys": [ # Keys of entities to look up. 1046 { # 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 `""`. 1074 "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. 1077 "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 `""`. 1081 }, 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 1112 # Datastore.BeginTransaction. 1113 "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 1126 { # The response for Datastore.Lookup. 1127 "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 `""`. 1158 "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. 1161 "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 `""`. 1165 }, 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 ], 1193 "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. 1221 "booleanValue": True or False, # A boolean value. 1222 "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. 1230 "doubleValue": 3.14, # A double value. 1231 "meaning": 42, # The `meaning` field should only be populated for backwards compatibility. 1232 "excludeFromIndexes": True or False, # If the value should be excluded from all indexes including those defined 1233 # explicitly. 1234 "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. 1300 "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. 1304 "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. 1309 # The order of values in an array is preserved as long as all values have 1310 # identical settings for 'exclude_from_indexes'. 1311 # 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 1318 # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84 1319 # standard</a>. Values must be within normalized ranges. 1320 "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. 1351 # 1352 # 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. 1425 # 1426 # - 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. 1432 "doubleValue": 3.14, # A double value. 1433 "meaning": 42, # The `meaning` field should only be populated for backwards compatibility. 1434 "excludeFromIndexes": True or False, # If the value should be excluded from all indexes including those defined 1435 # explicitly. 1436 "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 1520 # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84 1521 # standard</a>. Values must be within normalized ranges. 1522 "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 ], 1597 }</pre> 1598</div> 1599 1600<div class="method"> 1601 <code class="details" id="reserveIds">reserveIds(projectId, body, x__xgafv=None)</code> 1602 <pre>Prevents the supplied keys' IDs from being auto-allocated by Cloud 1603Datastore. 1604 1605Args: 1606 projectId: string, The ID of the project against which to make the request. (required) 1607 body: object, The request body. (required) 1608 The object takes the form of: 1609 1610{ # The request for Datastore.ReserveIds. 1611 "keys": [ # A list of keys with complete key paths whose numeric IDs should not be 1612 # 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"> 1692 <code class="details" id="rollback">rollback(projectId, body, x__xgafv=None)</code> 1693 <pre>Rolls back a transaction. 1694 1695Args: 1696 projectId: string, The ID of the project against which to make the request. (required) 1697 body: object, The request body. (required) 1698 The object takes the form of: 1699 1700{ # The request for Datastore.Rollback. 1701 "transaction": "A String", # The transaction identifier, returned by a call to 1702 # Datastore.BeginTransaction. 1703 } 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 1713 { # The response for Datastore.Rollback. 1714 # (an empty message). 1715 }</pre> 1716</div> 1717 1718<div class="method"> 1719 <code class="details" id="runQuery">runQuery(projectId, body, x__xgafv=None)</code> 1720 <pre>Queries for entities. 1721 1722Args: 1723 projectId: string, The ID of the project against which to make the request. (required) 1724 body: object, The request body. (required) 1725 The object takes the form of: 1726 1727{ # The request for Datastore.RunQuery. 1728 "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 1731 # [can only be used to continue the same 1732 # query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets). 1733 "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. 1770 "booleanValue": True or False, # A boolean value. 1771 "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. 1779 "doubleValue": 3.14, # A double value. 1780 "meaning": 42, # The `meaning` field should only be populated for backwards compatibility. 1781 "excludeFromIndexes": True or False, # If the value should be excluded from all indexes including those defined 1782 # explicitly. 1783 "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 `""`. 1811 "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. 1814 "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 `""`. 1818 }, 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. 1849 "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. 1853 "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. 1858 # The order of values in an array is preserved as long as all values have 1859 # identical settings for 'exclude_from_indexes'. 1860 # 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 1867 # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84 1868 # standard</a>. Values must be within normalized ranges. 1869 "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. 1879 # Must be >= 0 if specified. 1880 "offset": 42, # The number of results to skip. Applies before limit, but after all other 1881 # constraints. Optional. Must be >= 0 if specified. 1882 "endCursor": "A String", # An ending point for the query results. Query cursors are 1883 # returned in query result batches and 1884 # [can only be used to limit the same 1885 # query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets). 1886 "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 }, 1921 "gqlQuery": { # A [GQL # The GQL query to run. 1922 # query](https://cloud.google.com/datastore/docs/apis/gql/gql_reference). 1923 "namedBindings": { # For each non-reserved named binding site in the query string, there must be 1924 # a named parameter with that name, but not necessarily the inverse. 1925 # 1926 # Key must match regex `A-Za-z_$*`, must not match regex 1927 # `__.*__`, and must not be `""`. 1928 "a_key": { # A binding parameter for a GQL query. 1929 "cursor": "A String", # A query cursor. Query cursors are returned in query 1930 # result batches. 1931 "value": { # A message that can hold any of the supported value types and associated # A value parameter. 1932 # metadata. 1933 "booleanValue": True or False, # A boolean value. 1934 "entityValue": # Object with schema name: Entity # An entity value. 1935 # 1936 # - May have no key. 1937 # - May have a key with an incomplete key path. 1938 # - May have a reserved/read-only key. 1939 "timestampValue": "A String", # A timestamp value. 1940 # When stored in the Datastore, precise only to microseconds; 1941 # any additional precision is rounded down. 1942 "doubleValue": 3.14, # A double value. 1943 "meaning": 42, # The `meaning` field should only be populated for backwards compatibility. 1944 "excludeFromIndexes": True or False, # If the value should be excluded from all indexes including those defined 1945 # explicitly. 1946 "keyValue": { # A unique identifier for an entity. # A key value. 1947 # If a key's partition ID or any of its path kinds or names are 1948 # reserved/read-only, the key is reserved/read-only. 1949 # A reserved/read-only key is forbidden in certain documented contexts. 1950 "path": [ # The entity path. 1951 # An entity path consists of one or more elements composed of a kind and a 1952 # string or numerical identifier, which identify entities. The first 1953 # element identifies a _root entity_, the second element identifies 1954 # a _child_ of the root entity, the third element identifies a child of the 1955 # second entity, and so forth. The entities identified by all prefixes of 1956 # the path are called the element's _ancestors_. 1957 # 1958 # An entity path is always fully complete: *all* of the entity's ancestors 1959 # are required to be in the path along with the entity identifier itself. 1960 # The only exception is that in some documented cases, the identifier in the 1961 # last path element (for the entity) itself may be omitted. For example, 1962 # the last path element of the key of `Mutation.insert` may have no 1963 # identifier. 1964 # 1965 # A path can never be empty, and a path can have at most 100 elements. 1966 { # A (kind, ID/name) pair used to construct a key path. 1967 # 1968 # If either name or ID is set, the element is complete. 1969 # If neither is set, the element is incomplete. 1970 "kind": "A String", # The kind of the entity. 1971 # A kind matching regex `__.*__` is reserved/read-only. 1972 # A kind must not contain more than 1500 bytes when UTF-8 encoded. 1973 # Cannot be `""`. 1974 "id": "A String", # The auto-allocated ID of the entity. 1975 # Never equal to zero. Values less than zero are discouraged and may not 1976 # be supported in the future. 1977 "name": "A String", # The name of the entity. 1978 # A name matching regex `__.*__` is reserved/read-only. 1979 # A name must not be more than 1500 bytes when UTF-8 encoded. 1980 # Cannot be `""`. 1981 }, 1982 ], 1983 "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project 1984 # ID and namespace ID. 1985 # Queries are scoped to a single partition. 1986 # by project and namespace, however the namespace ID may be empty. 1987 # 1988 # A partition ID contains several dimensions: 1989 # project ID and namespace ID. 1990 # 1991 # Partition dimensions: 1992 # 1993 # - May be `""`. 1994 # - Must be valid UTF-8 bytes. 1995 # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}` 1996 # If the value of any dimension matches regex `__.*__`, the partition is 1997 # reserved/read-only. 1998 # A reserved/read-only partition ID is forbidden in certain documented 1999 # contexts. 2000 # 2001 # Foreign partition IDs (in which the project ID does 2002 # not match the context project ID ) are discouraged. 2003 # Reads and writes of foreign partition IDs may fail if the project is not in an active state. 2004 "projectId": "A String", # The ID of the project to which the entities belong. 2005 "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong. 2006 }, 2007 }, 2008 "blobValue": "A String", # A blob value. 2009 # May have at most 1,000,000 bytes. 2010 # When `exclude_from_indexes` is false, may have at most 1500 bytes. 2011 # In JSON requests, must be base64-encoded. 2012 "stringValue": "A String", # A UTF-8 encoded string value. 2013 # When `exclude_from_indexes` is false (it is indexed) , may have at most 1500 bytes. 2014 # Otherwise, may be set to at least 1,000,000 bytes. 2015 "nullValue": "A String", # A null value. 2016 "arrayValue": { # An array value. # An array value. 2017 # Cannot contain another array value. 2018 # A `Value` instance that sets field `array_value` must not set fields 2019 # `meaning` or `exclude_from_indexes`. 2020 "values": [ # Values in the array. 2021 # The order of values in an array is preserved as long as all values have 2022 # identical settings for 'exclude_from_indexes'. 2023 # Object with schema name: Value 2024 ], 2025 }, 2026 "integerValue": "A String", # An integer value. 2027 "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. 2028 # of doubles representing degrees latitude and degrees longitude. Unless 2029 # specified otherwise, this must conform to the 2030 # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84 2031 # standard</a>. Values must be within normalized ranges. 2032 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0]. 2033 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0]. 2034 }, 2035 }, 2036 }, 2037 }, 2038 "positionalBindings": [ # Numbered binding site @1 references the first numbered parameter, 2039 # effectively using 1-based indexing, rather than the usual 0. 2040 # 2041 # For each binding site numbered i in `query_string`, there must be an i-th 2042 # numbered parameter. The inverse must also be true. 2043 { # A binding parameter for a GQL query. 2044 "cursor": "A String", # A query cursor. Query cursors are returned in query 2045 # result batches. 2046 "value": { # A message that can hold any of the supported value types and associated # A value parameter. 2047 # metadata. 2048 "booleanValue": True or False, # A boolean value. 2049 "entityValue": # Object with schema name: Entity # An entity value. 2050 # 2051 # - May have no key. 2052 # - May have a key with an incomplete key path. 2053 # - May have a reserved/read-only key. 2054 "timestampValue": "A String", # A timestamp value. 2055 # When stored in the Datastore, precise only to microseconds; 2056 # any additional precision is rounded down. 2057 "doubleValue": 3.14, # A double value. 2058 "meaning": 42, # The `meaning` field should only be populated for backwards compatibility. 2059 "excludeFromIndexes": True or False, # If the value should be excluded from all indexes including those defined 2060 # explicitly. 2061 "keyValue": { # A unique identifier for an entity. # A key value. 2062 # If a key's partition ID or any of its path kinds or names are 2063 # reserved/read-only, the key is reserved/read-only. 2064 # A reserved/read-only key is forbidden in certain documented contexts. 2065 "path": [ # The entity path. 2066 # An entity path consists of one or more elements composed of a kind and a 2067 # string or numerical identifier, which identify entities. The first 2068 # element identifies a _root entity_, the second element identifies 2069 # a _child_ of the root entity, the third element identifies a child of the 2070 # second entity, and so forth. The entities identified by all prefixes of 2071 # the path are called the element's _ancestors_. 2072 # 2073 # An entity path is always fully complete: *all* of the entity's ancestors 2074 # are required to be in the path along with the entity identifier itself. 2075 # The only exception is that in some documented cases, the identifier in the 2076 # last path element (for the entity) itself may be omitted. For example, 2077 # the last path element of the key of `Mutation.insert` may have no 2078 # identifier. 2079 # 2080 # A path can never be empty, and a path can have at most 100 elements. 2081 { # A (kind, ID/name) pair used to construct a key path. 2082 # 2083 # If either name or ID is set, the element is complete. 2084 # If neither is set, the element is incomplete. 2085 "kind": "A String", # The kind of the entity. 2086 # A kind matching regex `__.*__` is reserved/read-only. 2087 # A kind must not contain more than 1500 bytes when UTF-8 encoded. 2088 # Cannot be `""`. 2089 "id": "A String", # The auto-allocated ID of the entity. 2090 # Never equal to zero. Values less than zero are discouraged and may not 2091 # be supported in the future. 2092 "name": "A String", # The name of the entity. 2093 # A name matching regex `__.*__` is reserved/read-only. 2094 # A name must not be more than 1500 bytes when UTF-8 encoded. 2095 # Cannot be `""`. 2096 }, 2097 ], 2098 "partitionId": { # A partition ID identifies a grouping of entities. The grouping is always # Entities are partitioned into subsets, currently identified by a project 2099 # ID and namespace ID. 2100 # Queries are scoped to a single partition. 2101 # by project and namespace, however the namespace ID may be empty. 2102 # 2103 # A partition ID contains several dimensions: 2104 # project ID and namespace ID. 2105 # 2106 # Partition dimensions: 2107 # 2108 # - May be `""`. 2109 # - Must be valid UTF-8 bytes. 2110 # - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}` 2111 # If the value of any dimension matches regex `__.*__`, the partition is 2112 # reserved/read-only. 2113 # A reserved/read-only partition ID is forbidden in certain documented 2114 # contexts. 2115 # 2116 # Foreign partition IDs (in which the project ID does 2117 # not match the context project ID ) are discouraged. 2118 # Reads and writes of foreign partition IDs may fail if the project is not in an active state. 2119 "projectId": "A String", # The ID of the project to which the entities belong. 2120 "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong. 2121 }, 2122 }, 2123 "blobValue": "A String", # A blob value. 2124 # May have at most 1,000,000 bytes. 2125 # When `exclude_from_indexes` is false, may have at most 1500 bytes. 2126 # In JSON requests, must be base64-encoded. 2127 "stringValue": "A String", # A UTF-8 encoded string value. 2128 # When `exclude_from_indexes` is false (it is indexed) , may have at most 1500 bytes. 2129 # Otherwise, may be set to at least 1,000,000 bytes. 2130 "nullValue": "A String", # A null value. 2131 "arrayValue": { # An array value. # An array value. 2132 # Cannot contain another array value. 2133 # A `Value` instance that sets field `array_value` must not set fields 2134 # `meaning` or `exclude_from_indexes`. 2135 "values": [ # Values in the array. 2136 # The order of values in an array is preserved as long as all values have 2137 # identical settings for 'exclude_from_indexes'. 2138 # Object with schema name: Value 2139 ], 2140 }, 2141 "integerValue": "A String", # An integer value. 2142 "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. 2143 # of doubles representing degrees latitude and degrees longitude. Unless 2144 # specified otherwise, this must conform to the 2145 # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84 2146 # standard</a>. Values must be within normalized ranges. 2147 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0]. 2148 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0]. 2149 }, 2150 }, 2151 }, 2152 ], 2153 "queryString": "A String", # A string of the format described 2154 # [here](https://cloud.google.com/datastore/docs/apis/gql/gql_reference). 2155 "allowLiterals": True or False, # When false, the query string must not contain any literals and instead must 2156 # bind all values. For example, 2157 # `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 2163 # Datastore.BeginTransaction. 2164 "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 2177 { # The response for Datastore.RunQuery. 2178 "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 2181 # [can only be used to continue the same 2182 # query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets). 2183 "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. 2220 "booleanValue": True or False, # A boolean value. 2221 "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. 2229 "doubleValue": 3.14, # A double value. 2230 "meaning": 42, # The `meaning` field should only be populated for backwards compatibility. 2231 "excludeFromIndexes": True or False, # If the value should be excluded from all indexes including those defined 2232 # explicitly. 2233 "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 `""`. 2261 "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. 2264 "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 `""`. 2268 }, 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. 2299 "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. 2303 "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. 2308 # The order of values in an array is preserved as long as all values have 2309 # identical settings for 'exclude_from_indexes'. 2310 # 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 2317 # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84 2318 # standard</a>. Values must be within normalized ranges. 2319 "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. 2329 # Must be >= 0 if specified. 2330 "offset": 42, # The number of results to skip. Applies before limit, but after all other 2331 # constraints. Optional. Must be >= 0 if specified. 2332 "endCursor": "A String", # An ending point for the query results. Query cursors are 2333 # returned in query result batches and 2334 # [can only be used to limit the same 2335 # query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets). 2336 "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`. 2348 "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. 2356 # The value will be zero for eventually consistent queries. 2357 "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. 2362 "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. 2371 "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. 2384 "booleanValue": True or False, # A boolean value. 2385 "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. 2393 "doubleValue": 3.14, # A double value. 2394 "meaning": 42, # The `meaning` field should only be populated for backwards compatibility. 2395 "excludeFromIndexes": True or False, # If the value should be excluded from all indexes including those defined 2396 # explicitly. 2397 "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 `""`. 2425 "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. 2428 "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 `""`. 2432 }, 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. 2463 "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. 2467 "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. 2472 # The order of values in an array is preserved as long as all values have 2473 # identical settings for 'exclude_from_indexes'. 2474 # 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 2481 # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84 2482 # standard</a>. Values must be within normalized ranges. 2483 "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 `""`. 2521 "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. 2524 "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 `""`. 2528 }, 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>