on develop help sign in
Regenerating gogol-datastore from latest service definition
commita335a5264561b2839ebf614b30a1c82f12961b19 authorBrendan Hay <brendan.g.hay@gmail.com> dateTue 25 Oct 2016, 11:37 (10 years ago) parent1b1d102
12 files changed+1504−314
gen/model/datastore/v1/datastore-api.json+1075 gen/model/datastore/v1beta3/datastore-api.json+296−272 gogol-datastore/gen/Network/Google/Datastore.hs+5 gogol-datastore/gen/Network/Google/Datastore/Types.hs+7−2 gogol-datastore/gen/Network/Google/Datastore/Types/Product.hs+114−33 gogol-datastore/gen/Network/Google/Resource/Datastore/Projects/AllocateIds.hs+1−1 gogol-datastore/gen/Network/Google/Resource/Datastore/Projects/BeginTransaction.hs+1−1 gogol-datastore/gen/Network/Google/Resource/Datastore/Projects/Commit.hs+1−1 gogol-datastore/gen/Network/Google/Resource/Datastore/Projects/Lookup.hs+1−1 gogol-datastore/gen/Network/Google/Resource/Datastore/Projects/Rollback.hs+1−1 gogol-datastore/gen/Network/Google/Resource/Datastore/Projects/RunQuery.hs+1−1 gogol-datastore/gogol-datastore.cabal+1−1
gen/model/datastore/v1/datastore-api.jsonnew file+1075
@@ -0,0 +1,1075 @@
1+{
2+ "id": "datastore:v1",
3+ "auth": {
4+ "oauth2": {
5+ "scopes": {
6+ "https://www.googleapis.com/auth/cloud-platform": {
7+ "description": "View and manage your data across Google Cloud Platform services"
8+ },
9+ "https://www.googleapis.com/auth/datastore": {
10+ "description": "View and manage your Google Cloud Datastore data"
11+ }
12+ }
13+ }
14+ },
15+ "description": "Accesses the schemaless NoSQL database to provide fully managed, robust, scalable storage for your application.\n",
16+ "protocol": "rest",
17+ "title": "Google Cloud Datastore API",
18+ "resources": {
19+ "projects": {
20+ "methods": {
21+ "runQuery": {
22+ "id": "datastore.projects.runQuery",
23+ "response": {
24+ "$ref": "RunQueryResponse"
25+ },
26+ "parameterOrder": [
27+ "projectId"
28+ ],
29+ "description": "Queries for entities.",
30+ "request": {
31+ "$ref": "RunQueryRequest"
32+ },
33+ "flatPath": "v1/projects/{projectId}:runQuery",
34+ "httpMethod": "POST",
35+ "parameters": {
36+ "projectId": {
37+ "description": "The ID of the project against which to make the request.",
38+ "required": true,
39+ "location": "path",
40+ "type": "string"
41+ }
42+ },
43+ "path": "v1/projects/{projectId}:runQuery",
44+ "scopes": [
45+ "https://www.googleapis.com/auth/cloud-platform",
46+ "https://www.googleapis.com/auth/datastore"
47+ ]
48+ },
49+ "beginTransaction": {
50+ "id": "datastore.projects.beginTransaction",
51+ "response": {
52+ "$ref": "BeginTransactionResponse"
53+ },
54+ "parameterOrder": [
55+ "projectId"
56+ ],
57+ "description": "Begins a new transaction.",
58+ "request": {
59+ "$ref": "BeginTransactionRequest"
60+ },
61+ "flatPath": "v1/projects/{projectId}:beginTransaction",
62+ "httpMethod": "POST",
63+ "parameters": {
64+ "projectId": {
65+ "description": "The ID of the project against which to make the request.",
66+ "required": true,
67+ "location": "path",
68+ "type": "string"
69+ }
70+ },
71+ "path": "v1/projects/{projectId}:beginTransaction",
72+ "scopes": [
73+ "https://www.googleapis.com/auth/cloud-platform",
74+ "https://www.googleapis.com/auth/datastore"
75+ ]
76+ },
77+ "allocateIds": {
78+ "id": "datastore.projects.allocateIds",
79+ "response": {
80+ "$ref": "AllocateIdsResponse"
81+ },
82+ "parameterOrder": [
83+ "projectId"
84+ ],
85+ "description": "Allocates IDs for the given keys, which is useful for referencing an entity\nbefore it is inserted.",
86+ "request": {
87+ "$ref": "AllocateIdsRequest"
88+ },
89+ "flatPath": "v1/projects/{projectId}:allocateIds",
90+ "httpMethod": "POST",
91+ "parameters": {
92+ "projectId": {
93+ "description": "The ID of the project against which to make the request.",
94+ "required": true,
95+ "location": "path",
96+ "type": "string"
97+ }
98+ },
99+ "path": "v1/projects/{projectId}:allocateIds",
100+ "scopes": [
101+ "https://www.googleapis.com/auth/cloud-platform",
102+ "https://www.googleapis.com/auth/datastore"
103+ ]
104+ },
105+ "lookup": {
106+ "id": "datastore.projects.lookup",
107+ "response": {
108+ "$ref": "LookupResponse"
109+ },
110+ "parameterOrder": [
111+ "projectId"
112+ ],
113+ "description": "Looks up entities by key.",
114+ "request": {
115+ "$ref": "LookupRequest"
116+ },
117+ "flatPath": "v1/projects/{projectId}:lookup",
118+ "httpMethod": "POST",
119+ "parameters": {
120+ "projectId": {
121+ "description": "The ID of the project against which to make the request.",
122+ "required": true,
123+ "location": "path",
124+ "type": "string"
125+ }
126+ },
127+ "path": "v1/projects/{projectId}:lookup",
128+ "scopes": [
129+ "https://www.googleapis.com/auth/cloud-platform",
130+ "https://www.googleapis.com/auth/datastore"
131+ ]
132+ },
133+ "commit": {
134+ "id": "datastore.projects.commit",
135+ "response": {
136+ "$ref": "CommitResponse"
137+ },
138+ "parameterOrder": [
139+ "projectId"
140+ ],
141+ "description": "Commits a transaction, optionally creating, deleting or modifying some\nentities.",
142+ "request": {
143+ "$ref": "CommitRequest"
144+ },
145+ "flatPath": "v1/projects/{projectId}:commit",
146+ "httpMethod": "POST",
147+ "parameters": {
148+ "projectId": {
149+ "description": "The ID of the project against which to make the request.",
150+ "required": true,
151+ "location": "path",
152+ "type": "string"
153+ }
154+ },
155+ "path": "v1/projects/{projectId}:commit",
156+ "scopes": [
157+ "https://www.googleapis.com/auth/cloud-platform",
158+ "https://www.googleapis.com/auth/datastore"
159+ ]
160+ },
161+ "rollback": {
162+ "id": "datastore.projects.rollback",
163+ "response": {
164+ "$ref": "RollbackResponse"
165+ },
166+ "parameterOrder": [
167+ "projectId"
168+ ],
169+ "description": "Rolls back a transaction.",
170+ "request": {
171+ "$ref": "RollbackRequest"
172+ },
173+ "flatPath": "v1/projects/{projectId}:rollback",
174+ "httpMethod": "POST",
175+ "parameters": {
176+ "projectId": {
177+ "description": "The ID of the project against which to make the request.",
178+ "required": true,
179+ "location": "path",
180+ "type": "string"
181+ }
182+ },
183+ "path": "v1/projects/{projectId}:rollback",
184+ "scopes": [
185+ "https://www.googleapis.com/auth/cloud-platform",
186+ "https://www.googleapis.com/auth/datastore"
187+ ]
188+ }
189+ }
190+ }
191+ },
192+ "schemas": {
193+ "Value": {
194+ "description": "A message that can hold any of the supported value types and associated\nmetadata.",
195+ "type": "object",
196+ "properties": {
197+ "stringValue": {
198+ "description": "A UTF-8 encoded string value.\nWhen `exclude_from_indexes` is false (it is indexed) , may have at most 1500 bytes.\nOtherwise, may be set to at least 1,000,000 bytes.",
199+ "type": "string"
200+ },
201+ "arrayValue": {
202+ "description": "An array value.\nCannot contain another array value.\nA `Value` instance that sets field `array_value` must not set fields\n`meaning` or `exclude_from_indexes`.",
203+ "$ref": "ArrayValue"
204+ },
205+ "entityValue": {
206+ "description": "An entity value.\n\n- May have no key.\n- May have a key with an incomplete key path.\n- May have a reserved/read-only key.",
207+ "$ref": "Entity"
208+ },
209+ "meaning": {
210+ "description": "The `meaning` field should only be populated for backwards compatibility.",
211+ "type": "integer",
212+ "format": "int32"
213+ },
214+ "integerValue": {
215+ "description": "An integer value.",
216+ "type": "string",
217+ "format": "int64"
218+ },
219+ "doubleValue": {
220+ "description": "A double value.",
221+ "type": "number",
222+ "format": "double"
223+ },
224+ "blobValue": {
225+ "description": "A blob value.\nMay have at most 1,000,000 bytes.\nWhen `exclude_from_indexes` is false, may have at most 1500 bytes.\nIn JSON requests, must be base64-encoded.",
226+ "type": "string",
227+ "format": "byte"
228+ },
229+ "geoPointValue": {
230+ "description": "A geo point value representing a point on the surface of Earth.",
231+ "$ref": "LatLng"
232+ },
233+ "nullValue": {
234+ "description": "A null value.",
235+ "enum": [
236+ "NULL_VALUE"
237+ ],
238+ "enumDescriptions": [
239+ "Null value."
240+ ],
241+ "type": "string"
242+ },
243+ "booleanValue": {
244+ "description": "A boolean value.",
245+ "type": "boolean"
246+ },
247+ "keyValue": {
248+ "description": "A key value.",
249+ "$ref": "Key"
250+ },
251+ "excludeFromIndexes": {
252+ "description": "If the value should be excluded from all indexes including those defined\nexplicitly.",
253+ "type": "boolean"
254+ },
255+ "timestampValue": {
256+ "description": "A timestamp value.\nWhen stored in the Datastore, precise only to microseconds;\nany additional precision is rounded down.",
257+ "type": "string",
258+ "format": "google-datetime"
259+ }
260+ },
261+ "id": "Value"
262+ },
263+ "ReadOptions": {
264+ "description": "The options shared by read requests.",
265+ "type": "object",
266+ "properties": {
267+ "transaction": {
268+ "description": "The identifier of the transaction in which to read. A\ntransaction identifier is returned by a call to\nDatastore.BeginTransaction.",
269+ "type": "string",
270+ "format": "byte"
271+ },
272+ "readConsistency": {
273+ "description": "The non-transactional read consistency to use.\nCannot be set to `STRONG` for global queries.",
274+ "enum": [
275+ "READ_CONSISTENCY_UNSPECIFIED",
276+ "STRONG",
277+ "EVENTUAL"
278+ ],
279+ "enumDescriptions": [
280+ "Unspecified. This value must not be used.",
281+ "Strong consistency.",
282+ "Eventual consistency."
283+ ],
284+ "type": "string"
285+ }
286+ },
287+ "id": "ReadOptions"
288+ },
289+ "PropertyOrder": {
290+ "description": "The desired order for a specific property.",
291+ "type": "object",
292+ "properties": {
293+ "direction": {
294+ "description": "The direction to order by. Defaults to `ASCENDING`.",
295+ "enum": [
296+ "DIRECTION_UNSPECIFIED",
297+ "ASCENDING",
298+ "DESCENDING"
299+ ],
300+ "enumDescriptions": [
301+ "Unspecified. This value must not be used.",
302+ "Ascending.",
303+ "Descending."
304+ ],
305+ "type": "string"
306+ },
307+ "property": {
308+ "description": "The property to order by.",
309+ "$ref": "PropertyReference"
310+ }
311+ },
312+ "id": "PropertyOrder"
313+ },
314+ "CommitRequest": {
315+ "description": "The request for Datastore.Commit.",
316+ "type": "object",
317+ "properties": {
318+ "transaction": {
319+ "description": "The identifier of the transaction associated with the commit. A\ntransaction identifier is returned by a call to\nDatastore.BeginTransaction.",
320+ "type": "string",
321+ "format": "byte"
322+ },
323+ "mode": {
324+ "description": "The type of commit to perform. Defaults to `TRANSACTIONAL`.",
325+ "enum": [
326+ "MODE_UNSPECIFIED",
327+ "TRANSACTIONAL",
328+ "NON_TRANSACTIONAL"
329+ ],
330+ "enumDescriptions": [
331+ "Unspecified. This value must not be used.",
332+ "Transactional: The mutations are either all applied, or none are applied.\nLearn about transactions [here](https://cloud.google.com/datastore/docs/concepts/transactions).",
333+ "Non-transactional: The mutations may not apply as all or none."
334+ ],
335+ "type": "string"
336+ },
337+ "mutations": {
338+ "description": "The mutations to perform.\n\nWhen mode is `TRANSACTIONAL`, mutations affecting a single entity are\napplied in order. The following sequences of mutations affecting a single\nentity are not permitted in a single `Commit` request:\n\n- `insert` followed by `insert`\n- `update` followed by `insert`\n- `upsert` followed by `insert`\n- `delete` followed by `update`\n\nWhen mode is `NON_TRANSACTIONAL`, no two mutations may affect a single\nentity.",
339+ "type": "array",
340+ "items": {
341+ "$ref": "Mutation"
342+ }
343+ }
344+ },
345+ "id": "CommitRequest"
346+ },
347+ "Query": {
348+ "description": "A query for entities.",
349+ "type": "object",
350+ "properties": {
351+ "limit": {
352+ "description": "The maximum number of results to return. Applies after all other\nconstraints. Optional.\nUnspecified is interpreted as no limit.\nMust be \u003e= 0 if specified.",
353+ "type": "integer",
354+ "format": "int32"
355+ },
356+ "filter": {
357+ "description": "The filter to apply.",
358+ "$ref": "Filter"
359+ },
360+ "endCursor": {
361+ "description": "An ending point for the query results. Query cursors are\nreturned in query result batches and\n[can only be used to limit the same query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets).",
362+ "type": "string",
363+ "format": "byte"
364+ },
365+ "distinctOn": {
366+ "description": "The properties to make distinct. The query results will contain the first\nresult for each distinct combination of values for the given properties\n(if empty, all results are returned).",
367+ "type": "array",
368+ "items": {
369+ "$ref": "PropertyReference"
370+ }
371+ },
372+ "offset": {
373+ "description": "The number of results to skip. Applies before limit, but after all other\nconstraints. Optional. Must be \u003e= 0 if specified.",
374+ "type": "integer",
375+ "format": "int32"
376+ },
377+ "projection": {
378+ "description": "The projection to return. Defaults to returning all properties.",
379+ "type": "array",
380+ "items": {
381+ "$ref": "Projection"
382+ }
383+ },
384+ "order": {
385+ "description": "The order to apply to the query results (if empty, order is unspecified).",
386+ "type": "array",
387+ "items": {
388+ "$ref": "PropertyOrder"
389+ }
390+ },
391+ "startCursor": {
392+ "description": "A starting point for the query results. Query cursors are\nreturned in query result batches and\n[can only be used to continue the same query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets).",
393+ "type": "string",
394+ "format": "byte"
395+ },
396+ "kind": {
397+ "description": "The kinds to query (if empty, returns entities of all kinds).\nCurrently at most 1 kind may be specified.",
398+ "type": "array",
399+ "items": {
400+ "$ref": "KindExpression"
401+ }
402+ }
403+ },
404+ "id": "Query"
405+ },
406+ "RollbackRequest": {
407+ "description": "The request for Datastore.Rollback.",
408+ "type": "object",
409+ "properties": {
410+ "transaction": {
411+ "description": "The transaction identifier, returned by a call to\nDatastore.BeginTransaction.",
412+ "type": "string",
413+ "format": "byte"
414+ }
415+ },
416+ "id": "RollbackRequest"
417+ },
418+ "EntityResult": {
419+ "description": "The result of fetching an entity from Datastore.",
420+ "type": "object",
421+ "properties": {
422+ "cursor": {
423+ "description": "A cursor that points to the position after the result entity.\nSet only when the `EntityResult` is part of a `QueryResultBatch` message.",
424+ "type": "string",
425+ "format": "byte"
426+ },
427+ "entity": {
428+ "description": "The resulting entity.",
429+ "$ref": "Entity"
430+ },
431+ "version": {
432+ "description": "The version of the entity, a strictly positive number that monotonically\nincreases with changes to the entity.\n\nThis field is set for `FULL` entity\nresults.\n\nFor missing entities in `LookupResponse`, this\nis the version of the snapshot that was used to look up the entity, and it\nis always set except for eventually consistent reads.",
433+ "type": "string",
434+ "format": "int64"
435+ }
436+ },
437+ "id": "EntityResult"
438+ },
439+ "GqlQueryParameter": {
440+ "description": "A binding parameter for a GQL query.",
441+ "type": "object",
442+ "properties": {
443+ "value": {
444+ "description": "A value parameter.",
445+ "$ref": "Value"
446+ },
447+ "cursor": {
448+ "description": "A query cursor. Query cursors are returned in query\nresult batches.",
449+ "type": "string",
450+ "format": "byte"
451+ }
452+ },
453+ "id": "GqlQueryParameter"
454+ },
455+ "ArrayValue": {
456+ "description": "An array value.",
457+ "type": "object",
458+ "properties": {
459+ "values": {
460+ "description": "Values in the array.\nThe order of this array may not be preserved if it contains a mix of\nindexed and unindexed values.",
461+ "type": "array",
462+ "items": {
463+ "$ref": "Value"
464+ }
465+ }
466+ },
467+ "id": "ArrayValue"
468+ },
469+ "Filter": {
470+ "description": "A holder for any type of filter.",
471+ "type": "object",
472+ "properties": {
473+ "propertyFilter": {
474+ "description": "A filter on a property.",
475+ "$ref": "PropertyFilter"
476+ },
477+ "compositeFilter": {
478+ "description": "A composite filter.",
479+ "$ref": "CompositeFilter"
480+ }
481+ },
482+ "id": "Filter"
483+ },
484+ "BeginTransactionResponse": {
485+ "description": "The response for Datastore.BeginTransaction.",
486+ "type": "object",
487+ "properties": {
488+ "transaction": {
489+ "description": "The transaction identifier (always present).",
490+ "type": "string",
491+ "format": "byte"
492+ }
493+ },
494+ "id": "BeginTransactionResponse"
495+ },
496+ "PartitionId": {
497+ "description": "A partition ID identifies a grouping of entities. The grouping is always\nby project and namespace, however the namespace ID may be empty.\n\nA partition ID contains several dimensions:\nproject ID and namespace ID.\n\nPartition dimensions:\n\n- May be `\"\"`.\n- Must be valid UTF-8 bytes.\n- Must have values that match regex `[A-Za-z\\d\\.\\-_]{1,100}`\nIf the value of any dimension matches regex `__.*__`, the partition is\nreserved/read-only.\nA reserved/read-only partition ID is forbidden in certain documented\ncontexts.\n\nForeign partition IDs (in which the project ID does\nnot match the context project ID ) are discouraged.\nReads and writes of foreign partition IDs may fail if the project is not in an active state.",
498+ "type": "object",
499+ "properties": {
500+ "namespaceId": {
501+ "description": "If not empty, the ID of the namespace to which the entities belong.",
502+ "type": "string"
503+ },
504+ "projectId": {
505+ "description": "The ID of the project to which the entities belong.",
506+ "type": "string"
507+ }
508+ },
509+ "id": "PartitionId"
510+ },
511+ "QueryResultBatch": {
512+ "description": "A batch of results produced by a query.",
513+ "type": "object",
514+ "properties": {
515+ "snapshotVersion": {
516+ "description": "The version number of the snapshot this batch was returned from.\nThis applies to the range of results from the query's `start_cursor` (or\nthe beginning of the query if no cursor was given) to this batch's\n`end_cursor` (not the query's `end_cursor`).\n\nIn a single transaction, subsequent query result batches for the same query\ncan have a greater snapshot version number. Each batch's snapshot version\nis valid for all preceding batches.",
517+ "type": "string",
518+ "format": "int64"
519+ },
520+ "endCursor": {
521+ "description": "A cursor that points to the position after the last result in the batch.",
522+ "type": "string",
523+ "format": "byte"
524+ },
525+ "skippedCursor": {
526+ "description": "A cursor that points to the position after the last skipped result.\nWill be set when `skipped_results` != 0.",
527+ "type": "string",
528+ "format": "byte"
529+ },
530+ "entityResultType": {
531+ "description": "The result type for every entity in `entity_results`.",
532+ "enum": [
533+ "RESULT_TYPE_UNSPECIFIED",
534+ "FULL",
535+ "PROJECTION",
536+ "KEY_ONLY"
537+ ],
538+ "enumDescriptions": [
539+ "Unspecified. This value is never used.",
540+ "The key and properties.",
541+ "A projected subset of properties. The entity may have no key.",
542+ "Only the key."
543+ ],
544+ "type": "string"
545+ },
546+ "moreResults": {
547+ "description": "The state of the query after the current batch.",
548+ "enum": [
549+ "MORE_RESULTS_TYPE_UNSPECIFIED",
550+ "NOT_FINISHED",
551+ "MORE_RESULTS_AFTER_LIMIT",
552+ "MORE_RESULTS_AFTER_CURSOR",
553+ "NO_MORE_RESULTS"
554+ ],
555+ "enumDescriptions": [
556+ "Unspecified. This value is never used.",
557+ "There may be additional batches to fetch from this query.",
558+ "The query is finished, but there may be more results after the limit.",
559+ "The query is finished, but there may be more results after the end\ncursor.",
560+ "The query has been exhausted."
561+ ],
562+ "type": "string"
563+ },
564+ "entityResults": {
565+ "description": "The results for this batch.",
566+ "type": "array",
567+ "items": {
568+ "$ref": "EntityResult"
569+ }
570+ },
571+ "skippedResults": {
572+ "description": "The number of results skipped, typically because of an offset.",
573+ "type": "integer",
574+ "format": "int32"
575+ }
576+ },
577+ "id": "QueryResultBatch"
578+ },
579+ "AllocateIdsRequest": {
580+ "description": "The request for Datastore.AllocateIds.",
581+ "type": "object",
582+ "properties": {
583+ "keys": {
584+ "description": "A list of keys with incomplete key paths for which to allocate IDs.\nNo key may be reserved/read-only.",
585+ "type": "array",
586+ "items": {
587+ "$ref": "Key"
588+ }
589+ }
590+ },
591+ "id": "AllocateIdsRequest"
592+ },
593+ "KindExpression": {
594+ "description": "A representation of a kind.",
595+ "type": "object",
596+ "properties": {
597+ "name": {
598+ "description": "The name of the kind.",
599+ "type": "string"
600+ }
601+ },
602+ "id": "KindExpression"
603+ },
604+ "PropertyFilter": {
605+ "description": "A filter on a specific property.",
606+ "type": "object",
607+ "properties": {
608+ "value": {
609+ "description": "The value to compare the property to.",
610+ "$ref": "Value"
611+ },
612+ "op": {
613+ "description": "The operator to filter by.",
614+ "enum": [
615+ "OPERATOR_UNSPECIFIED",
616+ "LESS_THAN",
617+ "LESS_THAN_OR_EQUAL",
618+ "GREATER_THAN",
619+ "GREATER_THAN_OR_EQUAL",
620+ "EQUAL",
621+ "HAS_ANCESTOR"
622+ ],
623+ "enumDescriptions": [
624+ "Unspecified. This value must not be used.",
625+ "Less than.",
626+ "Less than or equal.",
627+ "Greater than.",
628+ "Greater than or equal.",
629+ "Equal.",
630+ "Has ancestor."
631+ ],
632+ "type": "string"
633+ },
634+ "property": {
635+ "description": "The property to filter by.",
636+ "$ref": "PropertyReference"
637+ }
638+ },
639+ "id": "PropertyFilter"
640+ },
641+ "PathElement": {
642+ "description": "A (kind, ID/name) pair used to construct a key path.\n\nIf either name or ID is set, the element is complete.\nIf neither is set, the element is incomplete.",
643+ "type": "object",
644+ "properties": {
645+ "kind": {
646+ "description": "The kind of the entity.\nA kind matching regex `__.*__` is reserved/read-only.\nA kind must not contain more than 1500 bytes when UTF-8 encoded.\nCannot be `\"\"`.",
647+ "type": "string"
648+ },
649+ "id": {
650+ "description": "The auto-allocated ID of the entity.\nNever equal to zero. Values less than zero are discouraged and may not\nbe supported in the future.",
651+ "type": "string",
652+ "format": "int64"
653+ },
654+ "name": {
655+ "description": "The name of the entity.\nA name matching regex `__.*__` is reserved/read-only.\nA name must not be more than 1500 bytes when UTF-8 encoded.\nCannot be `\"\"`.",
656+ "type": "string"
657+ }
658+ },
659+ "id": "PathElement"
660+ },
661+ "RollbackResponse": {
662+ "description": "The response for Datastore.Rollback.\n(an empty message).",
663+ "type": "object",
664+ "properties": {},
665+ "id": "RollbackResponse"
666+ },
667+ "PropertyReference": {
668+ "description": "A reference to a property relative to the kind expressions.",
669+ "type": "object",
670+ "properties": {
671+ "name": {
672+ "description": "The name of the property.\nIf name includes \".\"s, it may be interpreted as a property name path.",
673+ "type": "string"
674+ }
675+ },
676+ "id": "PropertyReference"
677+ },
678+ "Projection": {
679+ "description": "A representation of a property in a projection.",
680+ "type": "object",
681+ "properties": {
682+ "property": {
683+ "description": "The property to project.",
684+ "$ref": "PropertyReference"
685+ }
686+ },
687+ "id": "Projection"
688+ },
689+ "MutationResult": {
690+ "description": "The result of applying a mutation.",
691+ "type": "object",
692+ "properties": {
693+ "conflictDetected": {
694+ "description": "Whether a conflict was detected for this mutation. Always false when a\nconflict detection strategy field is not set in the mutation.",
695+ "type": "boolean"
696+ },
697+ "key": {
698+ "description": "The automatically allocated key.\nSet only when the mutation allocated a key.",
699+ "$ref": "Key"
700+ },
701+ "version": {
702+ "description": "The version of the entity on the server after processing the mutation. If\nthe mutation doesn't change anything on the server, then the version will\nbe the version of the current entity or, if no entity is present, a version\nthat is strictly greater than the version of any previous entity and less\nthan the version of any possible future entity.",
703+ "type": "string",
704+ "format": "int64"
705+ }
706+ },
707+ "id": "MutationResult"
708+ },
709+ "AllocateIdsResponse": {
710+ "description": "The response for Datastore.AllocateIds.",
711+ "type": "object",
712+ "properties": {
713+ "keys": {
714+ "description": "The keys specified in the request (in the same order), each with\nits key path completed with a newly allocated ID.",
715+ "type": "array",
716+ "items": {
717+ "$ref": "Key"
718+ }
719+ }
720+ },
721+ "id": "AllocateIdsResponse"
722+ },
723+ "LookupResponse": {
724+ "description": "The response for Datastore.Lookup.",
725+ "type": "object",
726+ "properties": {
727+ "found": {
728+ "description": "Entities found as `ResultType.FULL` entities. The order of results in this\nfield is undefined and has no relation to the order of the keys in the\ninput.",
729+ "type": "array",
730+ "items": {
731+ "$ref": "EntityResult"
732+ }
733+ },
734+ "missing": {
735+ "description": "Entities not found as `ResultType.KEY_ONLY` entities. The order of results\nin this field is undefined and has no relation to the order of the keys\nin the input.",
736+ "type": "array",
737+ "items": {
738+ "$ref": "EntityResult"
739+ }
740+ },
741+ "deferred": {
742+ "description": "A list of keys that were not looked up due to resource constraints. The\norder of results in this field is undefined and has no relation to the\norder of the keys in the input.",
743+ "type": "array",
744+ "items": {
745+ "$ref": "Key"
746+ }
747+ }
748+ },
749+ "id": "LookupResponse"
750+ },
751+ "BeginTransactionRequest": {
752+ "description": "The request for Datastore.BeginTransaction.",
753+ "type": "object",
754+ "properties": {},
755+ "id": "BeginTransactionRequest"
756+ },
757+ "Key": {
758+ "description": "A unique identifier for an entity.\nIf a key's partition ID or any of its path kinds or names are\nreserved/read-only, the key is reserved/read-only.\nA reserved/read-only key is forbidden in certain documented contexts.",
759+ "type": "object",
760+ "properties": {
761+ "partitionId": {
762+ "description": "Entities are partitioned into subsets, currently identified by a project\nID and namespace ID.\nQueries are scoped to a single partition.",
763+ "$ref": "PartitionId"
764+ },
765+ "path": {
766+ "description": "The entity path.\nAn entity path consists of one or more elements composed of a kind and a\nstring or numerical identifier, which identify entities. The first\nelement identifies a _root entity_, the second element identifies\na _child_ of the root entity, the third element identifies a child of the\nsecond entity, and so forth. The entities identified by all prefixes of\nthe path are called the element's _ancestors_.\n\nAn entity path is always fully complete: *all* of the entity's ancestors\nare required to be in the path along with the entity identifier itself.\nThe only exception is that in some documented cases, the identifier in the\nlast path element (for the entity) itself may be omitted. For example,\nthe last path element of the key of `Mutation.insert` may have no\nidentifier.\n\nA path can never be empty, and a path can have at most 100 elements.",
767+ "type": "array",
768+ "items": {
769+ "$ref": "PathElement"
770+ }
771+ }
772+ },
773+ "id": "Key"
774+ },
775+ "RunQueryResponse": {
776+ "description": "The response for Datastore.RunQuery.",
777+ "type": "object",
778+ "properties": {
779+ "batch": {
780+ "description": "A batch of query results (always present).",
781+ "$ref": "QueryResultBatch"
782+ },
783+ "query": {
784+ "description": "The parsed form of the `GqlQuery` from the request, if it was set.",
785+ "$ref": "Query"
786+ }
787+ },
788+ "id": "RunQueryResponse"
789+ },
790+ "Entity": {
791+ "description": "A Datastore data object.\n\nAn entity is limited to 1 megabyte when stored. That _roughly_\ncorresponds to a limit of 1 megabyte for the serialized form of this\nmessage.",
792+ "type": "object",
793+ "properties": {
794+ "properties": {
795+ "description": "The entity's properties.\nThe map's keys are property names.\nA property name matching regex `__.*__` is reserved.\nA reserved property name is forbidden in certain documented contexts.\nThe name must not contain more than 500 characters.\nThe name cannot be `\"\"`.",
796+ "additionalProperties": {
797+ "$ref": "Value"
798+ },
799+ "type": "object"
800+ },
801+ "key": {
802+ "description": "The entity's key.\n\nAn entity must have a key, unless otherwise documented (for example,\nan entity in `Value.entity_value` may have no key).\nAn entity's kind is its key path's last element's kind,\nor null if it has no key.",
803+ "$ref": "Key"
804+ }
805+ },
806+ "id": "Entity"
807+ },
808+ "GqlQuery": {
809+ "description": "A [GQL query](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).",
810+ "type": "object",
811+ "properties": {
812+ "queryString": {
813+ "description": "A string of the format described\n[here](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).",
814+ "type": "string"
815+ },
816+ "namedBindings": {
817+ "description": "For each non-reserved named binding site in the query string, there must be\na named parameter with that name, but not necessarily the inverse.\n\nKey must match regex `A-Za-z_$*`, must not match regex\n`__.*__`, and must not be `\"\"`.",
818+ "additionalProperties": {
819+ "$ref": "GqlQueryParameter"
820+ },
821+ "type": "object"
822+ },
823+ "allowLiterals": {
824+ "description": "When false, the query string must not contain any literals and instead must\nbind all values. For example,\n`SELECT * FROM Kind WHERE a = 'string literal'` is not allowed, while\n`SELECT * FROM Kind WHERE a = @value` is.",
825+ "type": "boolean"
826+ },
827+ "positionalBindings": {
828+ "description": "Numbered binding site @1 references the first numbered parameter,\neffectively using 1-based indexing, rather than the usual 0.\n\nFor each binding site numbered i in `query_string`, there must be an i-th\nnumbered parameter. The inverse must also be true.",
829+ "type": "array",
830+ "items": {
831+ "$ref": "GqlQueryParameter"
832+ }
833+ }
834+ },
835+ "id": "GqlQuery"
836+ },
837+ "Mutation": {
838+ "description": "A mutation to apply to an entity.",
839+ "type": "object",
840+ "properties": {
841+ "insert": {
842+ "description": "The entity to insert. The entity must not already exist.\nThe entity key's final path element may be incomplete.",
843+ "$ref": "Entity"
844+ },
845+ "update": {
846+ "description": "The entity to update. The entity must already exist.\nMust have a complete key path.",
847+ "$ref": "Entity"
848+ },
849+ "baseVersion": {
850+ "description": "The version of the entity that this mutation is being applied to. If this\ndoes not match the current version on the server, the mutation conflicts.",
851+ "type": "string",
852+ "format": "int64"
853+ },
854+ "upsert": {
855+ "description": "The entity to upsert. The entity may or may not already exist.\nThe entity key's final path element may be incomplete.",
856+ "$ref": "Entity"
857+ },
858+ "delete": {
859+ "description": "The key of the entity to delete. The entity may or may not already exist.\nMust have a complete key path and must not be reserved/read-only.",
860+ "$ref": "Key"
861+ }
862+ },
863+ "id": "Mutation"
864+ },
865+ "CommitResponse": {
866+ "description": "The response for Datastore.Commit.",
867+ "type": "object",
868+ "properties": {
869+ "mutationResults": {
870+ "description": "The result of performing the mutations.\nThe i-th mutation result corresponds to the i-th mutation in the request.",
871+ "type": "array",
872+ "items": {
873+ "$ref": "MutationResult"
874+ }
875+ },
876+ "indexUpdates": {
877+ "description": "The number of index entries updated during the commit, or zero if none were\nupdated.",
878+ "type": "integer",
879+ "format": "int32"
880+ }
881+ },
882+ "id": "CommitResponse"
883+ },
884+ "RunQueryRequest": {
885+ "description": "The request for Datastore.RunQuery.",
886+ "type": "object",
887+ "properties": {
888+ "partitionId": {
889+ "description": "Entities are partitioned into subsets, identified by a partition ID.\nQueries are scoped to a single partition.\nThis partition ID is normalized with the standard default context\npartition ID.",
890+ "$ref": "PartitionId"
891+ },
892+ "gqlQuery": {
893+ "description": "The GQL query to run.",
894+ "$ref": "GqlQuery"
895+ },
896+ "readOptions": {
897+ "description": "The options for this query.",
898+ "$ref": "ReadOptions"
899+ },
900+ "query": {
901+ "description": "The query to run.",
902+ "$ref": "Query"
903+ }
904+ },
905+ "id": "RunQueryRequest"
906+ },
907+ "LookupRequest": {
908+ "description": "The request for Datastore.Lookup.",
909+ "type": "object",
910+ "properties": {
911+ "readOptions": {
912+ "description": "The options for this lookup request.",
913+ "$ref": "ReadOptions"
914+ },
915+ "keys": {
916+ "description": "Keys of entities to look up.",
917+ "type": "array",
918+ "items": {
919+ "$ref": "Key"
920+ }
921+ }
922+ },
923+ "id": "LookupRequest"
924+ },
925+ "LatLng": {
926+ "description": "An object representing a latitude/longitude pair. This is expressed as a pair\nof doubles representing degrees latitude and degrees longitude. Unless\nspecified otherwise, this must conform to the\n\u003ca href=\"http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf\"\u003eWGS84\nstandard\u003c/a\u003e. Values must be within normalized ranges.\n\nExample of normalization code in Python:\n\n def NormalizeLongitude(longitude):\n \"\"\"Wraps decimal degrees longitude to [-180.0, 180.0].\"\"\"\n q, r = divmod(longitude, 360.0)\n if r \u003e 180.0 or (r == 180.0 and q \u003c= -1.0):\n return r - 360.0\n return r\n\n def NormalizeLatLng(latitude, longitude):\n \"\"\"Wraps decimal degrees latitude and longitude to\n [-90.0, 90.0] and [-180.0, 180.0], respectively.\"\"\"\n r = latitude % 360.0\n if r \u003c= 90.0:\n return r, NormalizeLongitude(longitude)\n elif r \u003e= 270.0:\n return r - 360, NormalizeLongitude(longitude)\n else:\n return 180 - r, NormalizeLongitude(longitude + 180.0)\n\n assert 180.0 == NormalizeLongitude(180.0)\n assert -180.0 == NormalizeLongitude(-180.0)\n assert -179.0 == NormalizeLongitude(181.0)\n assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)\n assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)\n assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)\n assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)\n assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)\n assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)\n assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)\n assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)\n assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)\n assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)",
927+ "type": "object",
928+ "properties": {
929+ "latitude": {
930+ "description": "The latitude in degrees. It must be in the range [-90.0, +90.0].",
931+ "type": "number",
932+ "format": "double"
933+ },
934+ "longitude": {
935+ "description": "The longitude in degrees. It must be in the range [-180.0, +180.0].",
936+ "type": "number",
937+ "format": "double"
938+ }
939+ },
940+ "id": "LatLng"
941+ },
942+ "CompositeFilter": {
943+ "description": "A filter that merges multiple other filters using the given operator.",
944+ "type": "object",
945+ "properties": {
946+ "op": {
947+ "description": "The operator for combining multiple filters.",
948+ "enum": [
949+ "OPERATOR_UNSPECIFIED",
950+ "AND"
951+ ],
952+ "enumDescriptions": [
953+ "Unspecified. This value must not be used.",
954+ "The results are required to satisfy each of the combined filters."
955+ ],
956+ "type": "string"
957+ },
958+ "filters": {
959+ "description": "The list of filters to combine.\nMust contain at least one filter.",
960+ "type": "array",
961+ "items": {
962+ "$ref": "Filter"
963+ }
964+ }
965+ },
966+ "id": "CompositeFilter"
967+ }
968+ },
969+ "revision": "20160920",
970+ "basePath": "",
971+ "icons": {
972+ "x32": "http://www.google.com/images/icons/product/search-32.gif",
973+ "x16": "http://www.google.com/images/icons/product/search-16.gif"
974+ },
975+ "version_module": "True",
976+ "discoveryVersion": "v1",
977+ "baseUrl": "https://datastore.googleapis.com/",
978+ "name": "datastore",
979+ "parameters": {
980+ "access_token": {
981+ "description": "OAuth access token.",
982+ "type": "string",
983+ "location": "query"
984+ },
985+ "prettyPrint": {
986+ "description": "Returns response with indentations and line breaks.",
987+ "default": "true",
988+ "type": "boolean",
989+ "location": "query"
990+ },
991+ "key": {
992+ "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
993+ "type": "string",
994+ "location": "query"
995+ },
996+ "quotaUser": {
997+ "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.",
998+ "type": "string",
999+ "location": "query"
1000+ },
1001+ "pp": {
1002+ "description": "Pretty-print response.",
1003+ "default": "true",
1004+ "type": "boolean",
1005+ "location": "query"
1006+ },
1007+ "fields": {
1008+ "description": "Selector specifying which fields to include in a partial response.",
1009+ "type": "string",
1010+ "location": "query"
1011+ },
1012+ "alt": {
1013+ "description": "Data format for response.",
1014+ "location": "query",
1015+ "enum": [
1016+ "json",
1017+ "media",
1018+ "proto"
1019+ ],
1020+ "default": "json",
1021+ "enumDescriptions": [
1022+ "Responses with Content-Type of application/json",
1023+ "Media download with context-dependent Content-Type",
1024+ "Responses with Content-Type of application/x-protobuf"
1025+ ],
1026+ "type": "string"
1027+ },
1028+ "$.xgafv": {
1029+ "description": "V1 error format.",
1030+ "enum": [
1031+ "1",
1032+ "2"
1033+ ],
1034+ "enumDescriptions": [
1035+ "v1 error format",
1036+ "v2 error format"
1037+ ],
1038+ "type": "string",
1039+ "location": "query"
1040+ },
1041+ "callback": {
1042+ "description": "JSONP",
1043+ "type": "string",
1044+ "location": "query"
1045+ },
1046+ "oauth_token": {
1047+ "description": "OAuth 2.0 token for the current user.",
1048+ "type": "string",
1049+ "location": "query"
1050+ },
1051+ "uploadType": {
1052+ "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").",
1053+ "type": "string",
1054+ "location": "query"
1055+ },
1056+ "bearer_token": {
1057+ "description": "OAuth bearer token.",
1058+ "type": "string",
1059+ "location": "query"
1060+ },
1061+ "upload_protocol": {
1062+ "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").",
1063+ "type": "string",
1064+ "location": "query"
1065+ }
1066+ },
1067+ "documentationLink": "https://cloud.google.com/datastore/",
1068+ "ownerDomain": "google.com",
1069+ "batchPath": "batch",
1070+ "servicePath": "",
1071+ "ownerName": "Google",
1072+ "version": "v1",
1073+ "rootUrl": "https://datastore.googleapis.com/",
1074+ "kind": "discovery#restDescription"
1075+}
gen/model/datastore/v1beta3/datastore-api.json+296−272
@@ -30,21 +30,21 @@
3030 "request": {
3131 "$ref": "RunQueryRequest"
3232 },
33− "httpMethod": "POST",
3433 "flatPath": "v1beta3/projects/{projectId}:runQuery",
34+ "httpMethod": "POST",
3535 "parameters": {
3636 "projectId": {
37− "required": true,
3837 "description": "The ID of the project against which to make the request.",
39− "type": "string",
40− "location": "path"
38+ "required": true,
39+ "location": "path",
40+ "type": "string"
4141 }
4242 },
43+ "path": "v1beta3/projects/{projectId}:runQuery",
4344 "scopes": [
4445 "https://www.googleapis.com/auth/cloud-platform",
4546 "https://www.googleapis.com/auth/datastore"
46− ],
47− "path": "v1beta3/projects/{projectId}:runQuery"
47+ ]
4848 },
4949 "beginTransaction": {
5050 "id": "datastore.projects.beginTransaction",
@@ -58,21 +58,21 @@
5858 "request": {
5959 "$ref": "BeginTransactionRequest"
6060 },
61− "httpMethod": "POST",
6261 "flatPath": "v1beta3/projects/{projectId}:beginTransaction",
62+ "httpMethod": "POST",
6363 "parameters": {
6464 "projectId": {
65− "required": true,
6665 "description": "The ID of the project against which to make the request.",
67− "type": "string",
68− "location": "path"
66+ "required": true,
67+ "location": "path",
68+ "type": "string"
6969 }
7070 },
71+ "path": "v1beta3/projects/{projectId}:beginTransaction",
7172 "scopes": [
7273 "https://www.googleapis.com/auth/cloud-platform",
7374 "https://www.googleapis.com/auth/datastore"
74− ],
75− "path": "v1beta3/projects/{projectId}:beginTransaction"
75+ ]
7676 },
7777 "allocateIds": {
7878 "id": "datastore.projects.allocateIds",
@@ -86,21 +86,21 @@
8686 "request": {
8787 "$ref": "AllocateIdsRequest"
8888 },
89− "httpMethod": "POST",
9089 "flatPath": "v1beta3/projects/{projectId}:allocateIds",
90+ "httpMethod": "POST",
9191 "parameters": {
9292 "projectId": {
93− "required": true,
9493 "description": "The ID of the project against which to make the request.",
95− "type": "string",
96− "location": "path"
94+ "required": true,
95+ "location": "path",
96+ "type": "string"
9797 }
9898 },
99+ "path": "v1beta3/projects/{projectId}:allocateIds",
99100 "scopes": [
100101 "https://www.googleapis.com/auth/cloud-platform",
101102 "https://www.googleapis.com/auth/datastore"
102− ],
103− "path": "v1beta3/projects/{projectId}:allocateIds"
103+ ]
104104 },
105105 "lookup": {
106106 "id": "datastore.projects.lookup",
@@ -114,21 +114,21 @@
114114 "request": {
115115 "$ref": "LookupRequest"
116116 },
117− "httpMethod": "POST",
118117 "flatPath": "v1beta3/projects/{projectId}:lookup",
118+ "httpMethod": "POST",
119119 "parameters": {
120120 "projectId": {
121− "required": true,
122121 "description": "The ID of the project against which to make the request.",
123− "type": "string",
124− "location": "path"
122+ "required": true,
123+ "location": "path",
124+ "type": "string"
125125 }
126126 },
127+ "path": "v1beta3/projects/{projectId}:lookup",
127128 "scopes": [
128129 "https://www.googleapis.com/auth/cloud-platform",
129130 "https://www.googleapis.com/auth/datastore"
130− ],
131− "path": "v1beta3/projects/{projectId}:lookup"
131+ ]
132132 },
133133 "commit": {
134134 "id": "datastore.projects.commit",
@@ -142,21 +142,21 @@
142142 "request": {
143143 "$ref": "CommitRequest"
144144 },
145− "httpMethod": "POST",
146145 "flatPath": "v1beta3/projects/{projectId}:commit",
146+ "httpMethod": "POST",
147147 "parameters": {
148148 "projectId": {
149− "required": true,
150149 "description": "The ID of the project against which to make the request.",
151− "type": "string",
152− "location": "path"
150+ "required": true,
151+ "location": "path",
152+ "type": "string"
153153 }
154154 },
155+ "path": "v1beta3/projects/{projectId}:commit",
155156 "scopes": [
156157 "https://www.googleapis.com/auth/cloud-platform",
157158 "https://www.googleapis.com/auth/datastore"
158− ],
159− "path": "v1beta3/projects/{projectId}:commit"
159+ ]
160160 },
161161 "rollback": {
162162 "id": "datastore.projects.rollback",
@@ -170,21 +170,21 @@
170170 "request": {
171171 "$ref": "RollbackRequest"
172172 },
173− "httpMethod": "POST",
174173 "flatPath": "v1beta3/projects/{projectId}:rollback",
174+ "httpMethod": "POST",
175175 "parameters": {
176176 "projectId": {
177− "required": true,
178177 "description": "The ID of the project against which to make the request.",
179− "type": "string",
180− "location": "path"
178+ "required": true,
179+ "location": "path",
180+ "type": "string"
181181 }
182182 },
183+ "path": "v1beta3/projects/{projectId}:rollback",
183184 "scopes": [
184185 "https://www.googleapis.com/auth/cloud-platform",
185186 "https://www.googleapis.com/auth/datastore"
186− ],
187− "path": "v1beta3/projects/{projectId}:rollback"
187+ ]
188188 }
189189 }
190190 }
@@ -192,6 +192,7 @@
192192 "schemas": {
193193 "Value": {
194194 "description": "A message that can hold any of the supported value types and associated\nmetadata.",
195+ "type": "object",
195196 "properties": {
196197 "stringValue": {
197198 "description": "A UTF-8 encoded string value.\nWhen `exclude_from_indexes` is false (it is indexed) , may have at most 1500 bytes.\nOtherwise, may be set to at least 1,000,000 bytes.",
@@ -220,33 +221,33 @@
220221 "type": "number",
221222 "format": "double"
222223 },
223− "geoPointValue": {
224− "description": "A geo point value representing a point on the surface of Earth.",
225− "$ref": "LatLng"
226− },
227224 "blobValue": {
228225 "description": "A blob value.\nMay have at most 1,000,000 bytes.\nWhen `exclude_from_indexes` is false, may have at most 1500 bytes.\nIn JSON requests, must be base64-encoded.",
229226 "type": "string",
230227 "format": "byte"
231228 },
229+ "geoPointValue": {
230+ "description": "A geo point value representing a point on the surface of Earth.",
231+ "$ref": "LatLng"
232+ },
232233 "nullValue": {
234+ "description": "A null value.",
233235 "enum": [
234236 "NULL_VALUE"
235237 ],
236− "description": "A null value.",
237238 "enumDescriptions": [
238239 "Null value."
239240 ],
240241 "type": "string"
241242 },
242− "keyValue": {
243− "description": "A key value.",
244− "$ref": "Key"
245− },
246243 "booleanValue": {
247244 "description": "A boolean value.",
248245 "type": "boolean"
249246 },
247+ "keyValue": {
248+ "description": "A key value.",
249+ "$ref": "Key"
250+ },
250251 "excludeFromIndexes": {
251252 "description": "If the value should be excluded from all indexes including those defined\nexplicitly.",
252253 "type": "boolean"
@@ -257,24 +258,24 @@
257258 "format": "google-datetime"
258259 }
259260 },
260− "type": "object",
261261 "id": "Value"
262262 },
263263 "ReadOptions": {
264264 "description": "The options shared by read requests.",
265+ "type": "object",
265266 "properties": {
266267 "transaction": {
267− "description": "The identifier of the transaction in which to read. A\ntransaction identifier is returned by a call to\nBeginTransaction.",
268+ "description": "The identifier of the transaction in which to read. A\ntransaction identifier is returned by a call to\nDatastore.BeginTransaction.",
268269 "type": "string",
269270 "format": "byte"
270271 },
271272 "readConsistency": {
273+ "description": "The non-transactional read consistency to use.\nCannot be set to `STRONG` for global queries.",
272274 "enum": [
273275 "READ_CONSISTENCY_UNSPECIFIED",
274276 "STRONG",
275277 "EVENTUAL"
276278 ],
277− "description": "The non-transactional read consistency to use.\nCannot be set to `STRONG` for global queries.",
278279 "enumDescriptions": [
279280 "Unspecified. This value must not be used.",
280281 "Strong consistency.",
@@ -283,19 +284,19 @@
283284 "type": "string"
284285 }
285286 },
286− "type": "object",
287287 "id": "ReadOptions"
288288 },
289289 "PropertyOrder": {
290290 "description": "The desired order for a specific property.",
291+ "type": "object",
291292 "properties": {
292293 "direction": {
294+ "description": "The direction to order by. Defaults to `ASCENDING`.",
293295 "enum": [
294296 "DIRECTION_UNSPECIFIED",
295297 "ASCENDING",
296298 "DESCENDING"
297299 ],
298− "description": "The direction to order by. Defaults to `ASCENDING`.",
299300 "enumDescriptions": [
300301 "Unspecified. This value must not be used.",
301302 "Ascending.",
@@ -308,56 +309,44 @@
308309 "$ref": "PropertyReference"
309310 }
310311 },
311− "type": "object",
312312 "id": "PropertyOrder"
313313 },
314314 "CommitRequest": {
315− "description": "The request for google.datastore.v1beta3.Datastore.Commit.",
315+ "description": "The request for Datastore.Commit.",
316+ "type": "object",
316317 "properties": {
317318 "transaction": {
318− "description": "The identifier of the transaction associated with the commit. A\ntransaction identifier is returned by a call to\nBeginTransaction.",
319+ "description": "The identifier of the transaction associated with the commit. A\ntransaction identifier is returned by a call to\nDatastore.BeginTransaction.",
319320 "type": "string",
320321 "format": "byte"
321322 },
322− "mutations": {
323− "description": "The mutations to perform.\n\nWhen mode is `TRANSACTIONAL`, mutations affecting a single entity are\napplied in order. The following sequences of mutations affecting a single\nentity are not permitted in a single `Commit` request:\n\n- `insert` followed by `insert`\n- `update` followed by `insert`\n- `upsert` followed by `insert`\n- `delete` followed by `update`\n\nWhen mode is `NON_TRANSACTIONAL`, no two mutations may affect a single\nentity.",
324− "type": "array",
325− "items": {
326− "$ref": "Mutation"
327− }
328− },
329323 "mode": {
324+ "description": "The type of commit to perform. Defaults to `TRANSACTIONAL`.",
330325 "enum": [
331326 "MODE_UNSPECIFIED",
332327 "TRANSACTIONAL",
333328 "NON_TRANSACTIONAL"
334329 ],
335− "description": "The type of commit to perform. Defaults to `TRANSACTIONAL`.",
336330 "enumDescriptions": [
337331 "Unspecified. This value must not be used.",
338332 "Transactional: The mutations are either all applied, or none are applied.\nLearn about transactions [here](https://cloud.google.com/datastore/docs/concepts/transactions).",
339333 "Non-transactional: The mutations may not apply as all or none."
340334 ],
341335 "type": "string"
336+ },
337+ "mutations": {
338+ "description": "The mutations to perform.\n\nWhen mode is `TRANSACTIONAL`, mutations affecting a single entity are\napplied in order. The following sequences of mutations affecting a single\nentity are not permitted in a single `Commit` request:\n\n- `insert` followed by `insert`\n- `update` followed by `insert`\n- `upsert` followed by `insert`\n- `delete` followed by `update`\n\nWhen mode is `NON_TRANSACTIONAL`, no two mutations may affect a single\nentity.",
339+ "type": "array",
340+ "items": {
341+ "$ref": "Mutation"
342+ }
342343 }
343344 },
344− "type": "object",
345345 "id": "CommitRequest"
346346 },
347− "RollbackRequest": {
348− "description": "The request for google.datastore.v1beta3.Datastore.Rollback.",
349− "properties": {
350− "transaction": {
351− "description": "The transaction identifier, returned by a call to\ngoogle.datastore.v1beta3.Datastore.BeginTransaction.",
352− "type": "string",
353− "format": "byte"
354− }
355− },
356− "type": "object",
357− "id": "RollbackRequest"
358− },
359347 "Query": {
360348 "description": "A query for entities.",
349+ "type": "object",
361350 "properties": {
362351 "limit": {
363352 "description": "The maximum number of results to return. Applies after all other\nconstraints. Optional.\nUnspecified is interpreted as no limit.\nMust be \u003e= 0 if specified.",
@@ -392,11 +381,6 @@
392381 "$ref": "Projection"
393382 }
394383 },
395− "startCursor": {
396− "description": "A starting point for the query results. Query cursors are\nreturned in query result batches and\n[can only be used to continue the same query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets).",
397− "type": "string",
398− "format": "byte"
399− },
400384 "order": {
401385 "description": "The order to apply to the query results (if empty, order is unspecified).",
402386 "type": "array",
@@ -404,6 +388,11 @@
404388 "$ref": "PropertyOrder"
405389 }
406390 },
391+ "startCursor": {
392+ "description": "A starting point for the query results. Query cursors are\nreturned in query result batches and\n[can only be used to continue the same query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets).",
393+ "type": "string",
394+ "format": "byte"
395+ },
407396 "kind": {
408397 "description": "The kinds to query (if empty, returns entities of all kinds).\nCurrently at most 1 kind may be specified.",
409398 "type": "array",
@@ -412,11 +401,23 @@
412401 }
413402 }
414403 },
415− "type": "object",
416404 "id": "Query"
417405 },
406+ "RollbackRequest": {
407+ "description": "The request for Datastore.Rollback.",
408+ "type": "object",
409+ "properties": {
410+ "transaction": {
411+ "description": "The transaction identifier, returned by a call to\nDatastore.BeginTransaction.",
412+ "type": "string",
413+ "format": "byte"
414+ }
415+ },
416+ "id": "RollbackRequest"
417+ },
418418 "EntityResult": {
419419 "description": "The result of fetching an entity from Datastore.",
420+ "type": "object",
420421 "properties": {
421422 "cursor": {
422423 "description": "A cursor that points to the position after the result entity.\nSet only when the `EntityResult` is part of a `QueryResultBatch` message.",
@@ -426,41 +427,48 @@
426427 "entity": {
427428 "description": "The resulting entity.",
428429 "$ref": "Entity"
430+ },
431+ "version": {
432+ "description": "The version of the entity, a strictly positive number that monotonically\nincreases with changes to the entity.\n\nThis field is set for `FULL` entity\nresults.\n\nFor missing entities in `LookupResponse`, this\nis the version of the snapshot that was used to look up the entity, and it\nis always set except for eventually consistent reads.",
433+ "type": "string",
434+ "format": "int64"
429435 }
430436 },
431− "type": "object",
432437 "id": "EntityResult"
433438 },
434439 "GqlQueryParameter": {
435440 "description": "A binding parameter for a GQL query.",
441+ "type": "object",
436442 "properties": {
443+ "value": {
444+ "description": "A value parameter.",
445+ "$ref": "Value"
446+ },
437447 "cursor": {
438448 "description": "A query cursor. Query cursors are returned in query\nresult batches.",
439449 "type": "string",
440450 "format": "byte"
441− },
442− "value": {
443− "description": "A value parameter.",
444− "$ref": "Value"
445451 }
446452 },
447− "type": "object",
448453 "id": "GqlQueryParameter"
449454 },
450− "BeginTransactionResponse": {
451− "description": "The response for google.datastore.v1beta3.Datastore.BeginTransaction.",
455+ "ArrayValue": {
456+ "description": "An array value.",
457+ "type": "object",
452458 "properties": {
453− "transaction": {
454− "description": "The transaction identifier (always present).",
455− "type": "string",
456− "format": "byte"
459+ "values": {
460+ "description": "Values in the array.\nThe order of this array may not be preserved if it contains a mix of\nindexed and unindexed values.",
461+ "type": "array",
462+ "items": {
463+ "$ref": "Value"
464+ }
457465 }
458466 },
459− "type": "object",
460− "id": "BeginTransactionResponse"
467+ "id": "ArrayValue"
461468 },
462469 "Filter": {
463470 "description": "A holder for any type of filter.",
471+ "type": "object",
464472 "properties": {
465473 "propertyFilter": {
466474 "description": "A filter on a property.",
@@ -471,25 +479,23 @@
471479 "$ref": "CompositeFilter"
472480 }
473481 },
474− "type": "object",
475482 "id": "Filter"
476483 },
477− "ArrayValue": {
478− "description": "An array value.",
484+ "BeginTransactionResponse": {
485+ "description": "The response for Datastore.BeginTransaction.",
486+ "type": "object",
479487 "properties": {
480− "values": {
481− "description": "Values in the array.\nThe order of this array may not be preserved if it contains a mix of\nindexed and unindexed values.",
482− "type": "array",
483− "items": {
484− "$ref": "Value"
485− }
488+ "transaction": {
489+ "description": "The transaction identifier (always present).",
490+ "type": "string",
491+ "format": "byte"
486492 }
487493 },
488− "type": "object",
489− "id": "ArrayValue"
494+ "id": "BeginTransactionResponse"
490495 },
491496 "PartitionId": {
492497 "description": "A partition ID identifies a grouping of entities. The grouping is always\nby project and namespace, however the namespace ID may be empty.\n\nA partition ID contains several dimensions:\nproject ID and namespace ID.\n\nPartition dimensions:\n\n- May be `\"\"`.\n- Must be valid UTF-8 bytes.\n- Must have values that match regex `[A-Za-z\\d\\.\\-_]{1,100}`\nIf the value of any dimension matches regex `__.*__`, the partition is\nreserved/read-only.\nA reserved/read-only partition ID is forbidden in certain documented\ncontexts.\n\nForeign partition IDs (in which the project ID does\nnot match the context project ID ) are discouraged.\nReads and writes of foreign partition IDs may fail if the project is not in an active state.",
498+ "type": "object",
493499 "properties": {
494500 "namespaceId": {
495501 "description": "If not empty, the ID of the namespace to which the entities belong.",
@@ -500,12 +506,17 @@
500506 "type": "string"
501507 }
502508 },
503− "type": "object",
504509 "id": "PartitionId"
505510 },
506511 "QueryResultBatch": {
507512 "description": "A batch of results produced by a query.",
513+ "type": "object",
508514 "properties": {
515+ "snapshotVersion": {
516+ "description": "The version number of the snapshot this batch was returned from.\nThis applies to the range of results from the query's `start_cursor` (or\nthe beginning of the query if no cursor was given) to this batch's\n`end_cursor` (not the query's `end_cursor`).\n\nIn a single transaction, subsequent query result batches for the same query\ncan have a greater snapshot version number. Each batch's snapshot version\nis valid for all preceding batches.",
517+ "type": "string",
518+ "format": "int64"
519+ },
509520 "endCursor": {
510521 "description": "A cursor that points to the position after the last result in the batch.",
511522 "type": "string",
@@ -517,13 +528,13 @@
517528 "format": "byte"
518529 },
519530 "entityResultType": {
531+ "description": "The result type for every entity in `entity_results`.",
520532 "enum": [
521533 "RESULT_TYPE_UNSPECIFIED",
522534 "FULL",
523535 "PROJECTION",
524536 "KEY_ONLY"
525537 ],
526− "description": "The result type for every entity in `entity_results`.",
527538 "enumDescriptions": [
528539 "Unspecified. This value is never used.",
529540 "The key and properties.",
@@ -533,6 +544,7 @@
533544 "type": "string"
534545 },
535546 "moreResults": {
547+ "description": "The state of the query after the current batch.",
536548 "enum": [
537549 "MORE_RESULTS_TYPE_UNSPECIFIED",
538550 "NOT_FINISHED",
@@ -540,12 +552,11 @@
540552 "MORE_RESULTS_AFTER_CURSOR",
541553 "NO_MORE_RESULTS"
542554 ],
543− "description": "The state of the query after the current batch.",
544555 "enumDescriptions": [
545556 "Unspecified. This value is never used.",
546557 "There may be additional batches to fetch from this query.",
547558 "The query is finished, but there may be more results after the limit.",
548− "The query is finished, but there may be more results after the end cursor.",
559+ "The query is finished, but there may be more results after the end\ncursor.",
549560 "The query has been exhausted."
550561 ],
551562 "type": "string"
@@ -563,11 +574,11 @@
563574 "format": "int32"
564575 }
565576 },
566− "type": "object",
567577 "id": "QueryResultBatch"
568578 },
569579 "AllocateIdsRequest": {
570− "description": "The request for google.datastore.v1beta3.Datastore.AllocateIds.",
580+ "description": "The request for Datastore.AllocateIds.",
581+ "type": "object",
571582 "properties": {
572583 "keys": {
573584 "description": "A list of keys with incomplete key paths for which to allocate IDs.\nNo key may be reserved/read-only.",
@@ -577,17 +588,29 @@
577588 }
578589 }
579590 },
580− "type": "object",
581591 "id": "AllocateIdsRequest"
582592 },
593+ "KindExpression": {
594+ "description": "A representation of a kind.",
595+ "type": "object",
596+ "properties": {
597+ "name": {
598+ "description": "The name of the kind.",
599+ "type": "string"
600+ }
601+ },
602+ "id": "KindExpression"
603+ },
583604 "PropertyFilter": {
584605 "description": "A filter on a specific property.",
606+ "type": "object",
585607 "properties": {
586608 "value": {
587609 "description": "The value to compare the property to.",
588610 "$ref": "Value"
589611 },
590612 "op": {
613+ "description": "The operator to filter by.",
591614 "enum": [
592615 "OPERATOR_UNSPECIFIED",
593616 "LESS_THAN",
@@ -597,7 +620,6 @@
597620 "EQUAL",
598621 "HAS_ANCESTOR"
599622 ],
600− "description": "The operator to filter by.",
601623 "enumDescriptions": [
602624 "Unspecified. This value must not be used.",
603625 "Less than.",
@@ -614,70 +636,79 @@
614636 "$ref": "PropertyReference"
615637 }
616638 },
617− "type": "object",
618639 "id": "PropertyFilter"
619640 },
620− "KindExpression": {
621− "description": "A representation of a kind.",
622− "properties": {
623− "name": {
624− "description": "The name of the kind.",
625− "type": "string"
626− }
627− },
628− "type": "object",
629− "id": "KindExpression"
630− },
631641 "PathElement": {
632642 "description": "A (kind, ID/name) pair used to construct a key path.\n\nIf either name or ID is set, the element is complete.\nIf neither is set, the element is incomplete.",
643+ "type": "object",
633644 "properties": {
634645 "kind": {
635646 "description": "The kind of the entity.\nA kind matching regex `__.*__` is reserved/read-only.\nA kind must not contain more than 1500 bytes when UTF-8 encoded.\nCannot be `\"\"`.",
636647 "type": "string"
637648 },
638− "name": {
639− "description": "The name of the entity.\nA name matching regex `__.*__` is reserved/read-only.\nA name must not be more than 1500 bytes when UTF-8 encoded.\nCannot be `\"\"`.",
640− "type": "string"
641− },
642649 "id": {
643650 "description": "The auto-allocated ID of the entity.\nNever equal to zero. Values less than zero are discouraged and may not\nbe supported in the future.",
644651 "type": "string",
645652 "format": "int64"
653+ },
654+ "name": {
655+ "description": "The name of the entity.\nA name matching regex `__.*__` is reserved/read-only.\nA name must not be more than 1500 bytes when UTF-8 encoded.\nCannot be `\"\"`.",
656+ "type": "string"
646657 }
647658 },
648− "type": "object",
649659 "id": "PathElement"
650660 },
651661 "RollbackResponse": {
652− "description": "The response for google.datastore.v1beta3.Datastore.Rollback\n(an empty message).",
653− "properties": {},
662+ "description": "The response for Datastore.Rollback.\n(an empty message).",
654663 "type": "object",
664+ "properties": {},
655665 "id": "RollbackResponse"
656666 },
657667 "PropertyReference": {
658668 "description": "A reference to a property relative to the kind expressions.",
669+ "type": "object",
659670 "properties": {
660671 "name": {
661672 "description": "The name of the property.\nIf name includes \".\"s, it may be interpreted as a property name path.",
662673 "type": "string"
663674 }
664675 },
665− "type": "object",
666676 "id": "PropertyReference"
667677 },
668678 "Projection": {
669679 "description": "A representation of a property in a projection.",
680+ "type": "object",
670681 "properties": {
671682 "property": {
672683 "description": "The property to project.",
673684 "$ref": "PropertyReference"
674685 }
675686 },
676− "type": "object",
677687 "id": "Projection"
678688 },
689+ "MutationResult": {
690+ "description": "The result of applying a mutation.",
691+ "type": "object",
692+ "properties": {
693+ "conflictDetected": {
694+ "description": "Whether a conflict was detected for this mutation. Always false when a\nconflict detection strategy field is not set in the mutation.",
695+ "type": "boolean"
696+ },
697+ "key": {
698+ "description": "The automatically allocated key.\nSet only when the mutation allocated a key.",
699+ "$ref": "Key"
700+ },
701+ "version": {
702+ "description": "The version of the entity on the server after processing the mutation. If\nthe mutation doesn't change anything on the server, then the version will\nbe the version of the current entity or, if no entity is present, a version\nthat is strictly greater than the version of any previous entity and less\nthan the version of any possible future entity.",
703+ "type": "string",
704+ "format": "int64"
705+ }
706+ },
707+ "id": "MutationResult"
708+ },
679709 "AllocateIdsResponse": {
680− "description": "The response for google.datastore.v1beta3.Datastore.AllocateIds.",
710+ "description": "The response for Datastore.AllocateIds.",
711+ "type": "object",
681712 "properties": {
682713 "keys": {
683714 "description": "The keys specified in the request (in the same order), each with\nits key path completed with a newly allocated ID.",
@@ -687,22 +718,11 @@
687718 }
688719 }
689720 },
690− "type": "object",
691721 "id": "AllocateIdsResponse"
692722 },
693− "MutationResult": {
694− "description": "The result of applying a mutation.",
695− "properties": {
696− "key": {
697− "description": "The automatically allocated key.\nSet only when the mutation allocated a key.",
698− "$ref": "Key"
699− }
700− },
701− "type": "object",
702− "id": "MutationResult"
703− },
704723 "LookupResponse": {
705− "description": "The response for google.datastore.v1beta3.Datastore.Lookup.",
724+ "description": "The response for Datastore.Lookup.",
725+ "type": "object",
706726 "properties": {
707727 "found": {
708728 "description": "Entities found as `ResultType.FULL` entities. The order of results in this\nfield is undefined and has no relation to the order of the keys in the\ninput.",
@@ -711,32 +731,32 @@
711731 "$ref": "EntityResult"
712732 }
713733 },
714− "deferred": {
715− "description": "A list of keys that were not looked up due to resource constraints. The\norder of results in this field is undefined and has no relation to the\norder of the keys in the input.",
734+ "missing": {
735+ "description": "Entities not found as `ResultType.KEY_ONLY` entities. The order of results\nin this field is undefined and has no relation to the order of the keys\nin the input.",
716736 "type": "array",
717737 "items": {
718− "$ref": "Key"
738+ "$ref": "EntityResult"
719739 }
720740 },
721− "missing": {
722− "description": "Entities not found as `ResultType.KEY_ONLY` entities. The order of results\nin this field is undefined and has no relation to the order of the keys\nin the input.",
741+ "deferred": {
742+ "description": "A list of keys that were not looked up due to resource constraints. The\norder of results in this field is undefined and has no relation to the\norder of the keys in the input.",
723743 "type": "array",
724744 "items": {
725− "$ref": "EntityResult"
745+ "$ref": "Key"
726746 }
727747 }
728748 },
729− "type": "object",
730749 "id": "LookupResponse"
731750 },
732751 "BeginTransactionRequest": {
733− "description": "The request for google.datastore.v1beta3.Datastore.BeginTransaction.",
734− "properties": {},
752+ "description": "The request for Datastore.BeginTransaction.",
735753 "type": "object",
754+ "properties": {},
736755 "id": "BeginTransactionRequest"
737756 },
738757 "Key": {
739758 "description": "A unique identifier for an entity.\nIf a key's partition ID or any of its path kinds or names are\nreserved/read-only, the key is reserved/read-only.\nA reserved/read-only key is forbidden in certain documented contexts.",
759+ "type": "object",
740760 "properties": {
741761 "partitionId": {
742762 "description": "Entities are partitioned into subsets, currently identified by a project\nID and namespace ID.\nQueries are scoped to a single partition.",
@@ -750,11 +770,11 @@
750770 }
751771 }
752772 },
753− "type": "object",
754773 "id": "Key"
755774 },
756775 "RunQueryResponse": {
757− "description": "The response for google.datastore.v1beta3.Datastore.RunQuery.",
776+ "description": "The response for Datastore.RunQuery.",
777+ "type": "object",
758778 "properties": {
759779 "batch": {
760780 "description": "A batch of query results (always present).",
@@ -765,17 +785,17 @@
765785 "$ref": "Query"
766786 }
767787 },
768− "type": "object",
769788 "id": "RunQueryResponse"
770789 },
771790 "Entity": {
772791 "description": "A Datastore data object.\n\nAn entity is limited to 1 megabyte when stored. That _roughly_\ncorresponds to a limit of 1 megabyte for the serialized form of this\nmessage.",
792+ "type": "object",
773793 "properties": {
774794 "properties": {
795+ "description": "The entity's properties.\nThe map's keys are property names.\nA property name matching regex `__.*__` is reserved.\nA reserved property name is forbidden in certain documented contexts.\nThe name must not contain more than 500 characters.\nThe name cannot be `\"\"`.",
775796 "additionalProperties": {
776797 "$ref": "Value"
777798 },
778− "description": "The entity's properties.\nThe map's keys are property names.\nA property name matching regex `__.*__` is reserved.\nA reserved property name is forbidden in certain documented contexts.\nThe name must not contain more than 500 characters.\nThe name cannot be `\"\"`.",
779799 "type": "object"
780800 },
781801 "key": {
@@ -783,40 +803,68 @@
783803 "$ref": "Key"
784804 }
785805 },
786− "type": "object",
787806 "id": "Entity"
788807 },
789808 "GqlQuery": {
790809 "description": "A [GQL query](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).",
810+ "type": "object",
791811 "properties": {
812+ "queryString": {
813+ "description": "A string of the format described\n[here](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).",
814+ "type": "string"
815+ },
792816 "namedBindings": {
817+ "description": "For each non-reserved named binding site in the query string, there must be\na named parameter with that name, but not necessarily the inverse.\n\nKey must match regex `A-Za-z_$*`, must not match regex\n`__.*__`, and must not be `\"\"`.",
793818 "additionalProperties": {
794819 "$ref": "GqlQueryParameter"
795820 },
796− "description": "For each non-reserved named binding site in the query string,\nthere must be a named parameter with that name,\nbut not necessarily the inverse.\nKey must match regex `A-Za-z_$*`, must not match regex\n`__.*__`, and must not be `\"\"`.",
797821 "type": "object"
798822 },
799− "queryString": {
800− "description": "A string of the format described\n[here](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).",
801− "type": "string"
802− },
803823 "allowLiterals": {
804− "description": "When false, the query string must not contain any literals and instead\nmust bind all values. For example,\n`SELECT * FROM Kind WHERE a = 'string literal'` is not allowed, while\n`SELECT * FROM Kind WHERE a = @value` is.",
824+ "description": "When false, the query string must not contain any literals and instead must\nbind all values. For example,\n`SELECT * FROM Kind WHERE a = 'string literal'` is not allowed, while\n`SELECT * FROM Kind WHERE a = @value` is.",
805825 "type": "boolean"
806826 },
807827 "positionalBindings": {
808− "description": "Numbered binding site @1 references the first numbered parameter,\neffectively using 1-based indexing, rather than the usual 0.\nFor each binding site numbered i in `query_string`,\nthere must be an i-th numbered parameter.\nThe inverse must also be true.",
828+ "description": "Numbered binding site @1 references the first numbered parameter,\neffectively using 1-based indexing, rather than the usual 0.\n\nFor each binding site numbered i in `query_string`, there must be an i-th\nnumbered parameter. The inverse must also be true.",
809829 "type": "array",
810830 "items": {
811831 "$ref": "GqlQueryParameter"
812832 }
813833 }
814834 },
815− "type": "object",
816835 "id": "GqlQuery"
817836 },
837+ "Mutation": {
838+ "description": "A mutation to apply to an entity.",
839+ "type": "object",
840+ "properties": {
841+ "insert": {
842+ "description": "The entity to insert. The entity must not already exist.\nThe entity key's final path element may be incomplete.",
843+ "$ref": "Entity"
844+ },
845+ "update": {
846+ "description": "The entity to update. The entity must already exist.\nMust have a complete key path.",
847+ "$ref": "Entity"
848+ },
849+ "baseVersion": {
850+ "description": "The version of the entity that this mutation is being applied to. If this\ndoes not match the current version on the server, the mutation conflicts.",
851+ "type": "string",
852+ "format": "int64"
853+ },
854+ "upsert": {
855+ "description": "The entity to upsert. The entity may or may not already exist.\nThe entity key's final path element may be incomplete.",
856+ "$ref": "Entity"
857+ },
858+ "delete": {
859+ "description": "The key of the entity to delete. The entity may or may not already exist.\nMust have a complete key path and must not be reserved/read-only.",
860+ "$ref": "Key"
861+ }
862+ },
863+ "id": "Mutation"
864+ },
818865 "CommitResponse": {
819− "description": "The response for google.datastore.v1beta3.Datastore.Commit.",
866+ "description": "The response for Datastore.Commit.",
867+ "type": "object",
820868 "properties": {
821869 "mutationResults": {
822870 "description": "The result of performing the mutations.\nThe i-th mutation result corresponds to the i-th mutation in the request.",
@@ -831,34 +879,11 @@
831879 "format": "int32"
832880 }
833881 },
834− "type": "object",
835882 "id": "CommitResponse"
836883 },
837− "Mutation": {
838− "description": "A mutation to apply to an entity.",
839− "properties": {
840− "update": {
841− "description": "The entity to update. The entity must already exist.\nMust have a complete key path.",
842− "$ref": "Entity"
843− },
844− "insert": {
845− "description": "The entity to insert. The entity must not already exist.\nThe entity key's final path element may be incomplete.",
846− "$ref": "Entity"
847− },
848− "delete": {
849− "description": "The key of the entity to delete. The entity may or may not already exist.\nMust have a complete key path and must not be reserved/read-only.",
850− "$ref": "Key"
851− },
852− "upsert": {
853− "description": "The entity to upsert. The entity may or may not already exist.\nThe entity key's final path element may be incomplete.",
854− "$ref": "Entity"
855− }
856− },
857− "type": "object",
858− "id": "Mutation"
859− },
860884 "RunQueryRequest": {
861− "description": "The request for google.datastore.v1beta3.Datastore.RunQuery.",
885+ "description": "The request for Datastore.RunQuery.",
886+ "type": "object",
862887 "properties": {
863888 "partitionId": {
864889 "description": "Entities are partitioned into subsets, identified by a partition ID.\nQueries are scoped to a single partition.\nThis partition ID is normalized with the standard default context\npartition ID.",
@@ -868,81 +893,80 @@
868893 "description": "The GQL query to run.",
869894 "$ref": "GqlQuery"
870895 },
871− "query": {
872− "description": "The query to run.",
873− "$ref": "Query"
874− },
875896 "readOptions": {
876897 "description": "The options for this query.",
877898 "$ref": "ReadOptions"
899+ },
900+ "query": {
901+ "description": "The query to run.",
902+ "$ref": "Query"
878903 }
879904 },
880− "type": "object",
881905 "id": "RunQueryRequest"
882906 },
883− "CompositeFilter": {
884− "description": "A filter that merges multiple other filters using the given operator.",
907+ "LookupRequest": {
908+ "description": "The request for Datastore.Lookup.",
909+ "type": "object",
885910 "properties": {
886− "op": {
887− "enum": [
888− "OPERATOR_UNSPECIFIED",
889− "AND"
890− ],
891− "description": "The operator for combining multiple filters.",
892− "enumDescriptions": [
893− "Unspecified. This value must not be used.",
894− "The results are required to satisfy each of the combined filters."
895− ],
896− "type": "string"
911+ "readOptions": {
912+ "description": "The options for this lookup request.",
913+ "$ref": "ReadOptions"
897914 },
898− "filters": {
899− "description": "The list of filters to combine.\nMust contain at least one filter.",
915+ "keys": {
916+ "description": "Keys of entities to look up.",
900917 "type": "array",
901918 "items": {
902− "$ref": "Filter"
919+ "$ref": "Key"
903920 }
904921 }
905922 },
906− "type": "object",
907− "id": "CompositeFilter"
923+ "id": "LookupRequest"
908924 },
909925 "LatLng": {
910− "description": "An object representing a latitude/longitude pair. This is expressed as a pair\nof doubles representing degrees latitude and degrees longitude. Unless\nspecified otherwise, this must conform to the\n\u003ca href=\"http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf\"\u003eWGS84\nstandard\u003c/a\u003e. Values must be within normalized ranges.\n\nExample of normalization code in Python:\n\n def NormalizeLongitude(longitude):\n \"\"\"Wraps decimal degrees longitude to [-180.0, 180.0].\"\"\"\n q, r = divmod(longitude, 360.0)\n if r \u003e 180.0 or (r == 180.0 and q \u003c= -1.0):\n return r - 360.0\n return r\n\n def NormalizeLatLng(latitude, longitude):\n \"\"\"Wraps decimal degrees latitude and longitude to\n [-180.0, 180.0] and [-90.0, 90.0], respectively.\"\"\"\n r = latitude % 360.0\n if r \u003c= 90.0:\n return r, NormalizeLongitude(longitude)\n elif r \u003e= 270.0:\n return r - 360, NormalizeLongitude(longitude)\n else:\n return 180 - r, NormalizeLongitude(longitude + 180.0)\n\n assert 180.0 == NormalizeLongitude(180.0)\n assert -180.0 == NormalizeLongitude(-180.0)\n assert -179.0 == NormalizeLongitude(181.0)\n assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)\n assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)\n assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)\n assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)\n assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)\n assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)\n assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)\n assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)\n assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)\n assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)",
926+ "description": "An object representing a latitude/longitude pair. This is expressed as a pair\nof doubles representing degrees latitude and degrees longitude. Unless\nspecified otherwise, this must conform to the\n\u003ca href=\"http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf\"\u003eWGS84\nstandard\u003c/a\u003e. Values must be within normalized ranges.\n\nExample of normalization code in Python:\n\n def NormalizeLongitude(longitude):\n \"\"\"Wraps decimal degrees longitude to [-180.0, 180.0].\"\"\"\n q, r = divmod(longitude, 360.0)\n if r \u003e 180.0 or (r == 180.0 and q \u003c= -1.0):\n return r - 360.0\n return r\n\n def NormalizeLatLng(latitude, longitude):\n \"\"\"Wraps decimal degrees latitude and longitude to\n [-90.0, 90.0] and [-180.0, 180.0], respectively.\"\"\"\n r = latitude % 360.0\n if r \u003c= 90.0:\n return r, NormalizeLongitude(longitude)\n elif r \u003e= 270.0:\n return r - 360, NormalizeLongitude(longitude)\n else:\n return 180 - r, NormalizeLongitude(longitude + 180.0)\n\n assert 180.0 == NormalizeLongitude(180.0)\n assert -180.0 == NormalizeLongitude(-180.0)\n assert -179.0 == NormalizeLongitude(181.0)\n assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)\n assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)\n assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)\n assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)\n assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)\n assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)\n assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)\n assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)\n assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)\n assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)",
927+ "type": "object",
911928 "properties": {
912− "longitude": {
913− "description": "The longitude in degrees. It must be in the range [-180.0, +180.0].",
929+ "latitude": {
930+ "description": "The latitude in degrees. It must be in the range [-90.0, +90.0].",
914931 "type": "number",
915932 "format": "double"
916933 },
917− "latitude": {
918− "description": "The latitude in degrees. It must be in the range [-90.0, +90.0].",
934+ "longitude": {
935+ "description": "The longitude in degrees. It must be in the range [-180.0, +180.0].",
919936 "type": "number",
920937 "format": "double"
921938 }
922939 },
923− "type": "object",
924940 "id": "LatLng"
925941 },
926− "LookupRequest": {
927− "description": "The request for google.datastore.v1beta3.Datastore.Lookup.",
942+ "CompositeFilter": {
943+ "description": "A filter that merges multiple other filters using the given operator.",
944+ "type": "object",
928945 "properties": {
929− "keys": {
930− "description": "Keys of entities to look up.",
946+ "op": {
947+ "description": "The operator for combining multiple filters.",
948+ "enum": [
949+ "OPERATOR_UNSPECIFIED",
950+ "AND"
951+ ],
952+ "enumDescriptions": [
953+ "Unspecified. This value must not be used.",
954+ "The results are required to satisfy each of the combined filters."
955+ ],
956+ "type": "string"
957+ },
958+ "filters": {
959+ "description": "The list of filters to combine.\nMust contain at least one filter.",
931960 "type": "array",
932961 "items": {
933− "$ref": "Key"
962+ "$ref": "Filter"
934963 }
935− },
936− "readOptions": {
937− "description": "The options for this lookup request.",
938− "$ref": "ReadOptions"
939964 }
940965 },
941− "type": "object",
942− "id": "LookupRequest"
966+ "id": "CompositeFilter"
943967 }
944968 },
945− "revision": "20160502",
969+ "revision": "20160920",
946970 "basePath": "",
947971 "icons": {
948972 "x32": "http://www.google.com/images/icons/product/search-32.gif",
@@ -950,38 +974,40 @@
950974 },
951975 "version_module": "True",
952976 "discoveryVersion": "v1",
977+ "baseUrl": "https://datastore.googleapis.com/",
978+ "name": "datastore",
953979 "parameters": {
954980 "access_token": {
955981 "description": "OAuth access token.",
956− "location": "query",
957− "type": "string"
982+ "type": "string",
983+ "location": "query"
958984 },
959985 "prettyPrint": {
960− "default": "true",
961986 "description": "Returns response with indentations and line breaks.",
962− "location": "query",
963− "type": "boolean"
987+ "default": "true",
988+ "type": "boolean",
989+ "location": "query"
964990 },
965991 "key": {
966992 "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
967− "location": "query",
968− "type": "string"
993+ "type": "string",
994+ "location": "query"
969995 },
970996 "quotaUser": {
971997 "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.",
972− "location": "query",
973− "type": "string"
998+ "type": "string",
999+ "location": "query"
9741000 },
9751001 "pp": {
976− "default": "true",
9771002 "description": "Pretty-print response.",
978− "location": "query",
979− "type": "boolean"
1003+ "default": "true",
1004+ "type": "boolean",
1005+ "location": "query"
9801006 },
9811007 "fields": {
9821008 "description": "Selector specifying which fields to include in a partial response.",
983− "location": "query",
984− "type": "string"
1009+ "type": "string",
1010+ "location": "query"
9851011 },
9861012 "alt": {
9871013 "description": "Data format for response.",
@@ -1000,48 +1026,46 @@
10001026 "type": "string"
10011027 },
10021028 "$.xgafv": {
1029+ "description": "V1 error format.",
10031030 "enum": [
10041031 "1",
10051032 "2"
10061033 ],
1007− "description": "V1 error format.",
10081034 "enumDescriptions": [
10091035 "v1 error format",
10101036 "v2 error format"
10111037 ],
1012− "location": "query",
1013− "type": "string"
1038+ "type": "string",
1039+ "location": "query"
10141040 },
10151041 "callback": {
10161042 "description": "JSONP",
1017− "location": "query",
1018− "type": "string"
1019− },
1020− "uploadType": {
1021− "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").",
1022− "location": "query",
1023− "type": "string"
1043+ "type": "string",
1044+ "location": "query"
10241045 },
10251046 "oauth_token": {
10261047 "description": "OAuth 2.0 token for the current user.",
1027− "location": "query",
1028− "type": "string"
1048+ "type": "string",
1049+ "location": "query"
10291050 },
1030− "upload_protocol": {
1031− "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").",
1032− "location": "query",
1033− "type": "string"
1051+ "uploadType": {
1052+ "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").",
1053+ "type": "string",
1054+ "location": "query"
10341055 },
10351056 "bearer_token": {
10361057 "description": "OAuth bearer token.",
1037− "location": "query",
1038− "type": "string"
1058+ "type": "string",
1059+ "location": "query"
1060+ },
1061+ "upload_protocol": {
1062+ "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").",
1063+ "type": "string",
1064+ "location": "query"
10391065 }
10401066 },
1041− "name": "datastore",
1042− "baseUrl": "https://datastore.googleapis.com/",
1043− "ownerDomain": "google.com",
10441067 "documentationLink": "https://cloud.google.com/datastore/",
1068+ "ownerDomain": "google.com",
10451069 "batchPath": "batch",
10461070 "servicePath": "",
10471071 "ownerName": "Google",
gogol-datastore/gen/Network/Google/Datastore.hs+5
@@ -77,6 +77,7 @@ module Network.Google.Datastore
7777 , qrbSkippedResults
7878 , qrbSkippedCursor
7979 , qrbEntityResultType
80+ , qrbSnapshotVersion
8081 , qrbEntityResults
8182 , qrbMoreResults
8283 , qrbEndCursor
@@ -126,7 +127,9 @@ module Network.Google.Datastore
126127 -- ** MutationResult
127128 , MutationResult
128129 , mutationResult
130+ , mrConflictDetected
129131 , mrKey
132+ , mrVersion
130133
131134 -- ** AllocateIdsResponse
132135 , AllocateIdsResponse
@@ -179,6 +182,7 @@ module Network.Google.Datastore
179182 -- ** Mutation
180183 , Mutation
181184 , mutation
185+ , mBaseVersion
182186 , mInsert
183187 , mUpsert
184188 , mDelete
@@ -229,6 +233,7 @@ module Network.Google.Datastore
229233 , EntityResult
230234 , entityResult
231235 , erCursor
236+ , erVersion
232237 , erEntity
233238
234239 -- ** Xgafv
gogol-datastore/gen/Network/Google/Datastore/Types.hs+7−2
@@ -49,6 +49,7 @@ module Network.Google.Datastore.Types
4949 , qrbSkippedResults
5050 , qrbSkippedCursor
5151 , qrbEntityResultType
52+ , qrbSnapshotVersion
5253 , qrbEntityResults
5354 , qrbMoreResults
5455 , qrbEndCursor
@@ -98,7 +99,9 @@ module Network.Google.Datastore.Types
9899 -- * MutationResult
99100 , MutationResult
100101 , mutationResult
102+ , mrConflictDetected
101103 , mrKey
104+ , mrVersion
102105
103106 -- * AllocateIdsResponse
104107 , AllocateIdsResponse
@@ -151,6 +154,7 @@ module Network.Google.Datastore.Types
151154 -- * Mutation
152155 , Mutation
153156 , mutation
157+ , mBaseVersion
154158 , mInsert
155159 , mUpsert
156160 , mDelete
@@ -201,6 +205,7 @@ module Network.Google.Datastore.Types
201205 , EntityResult
202206 , entityResult
203207 , erCursor
208+ , erVersion
204209 , erEntity
205210
206211 -- * Xgafv
@@ -288,10 +293,10 @@ import Network.Google.Datastore.Types.Product
288293import Network.Google.Datastore.Types.Sum
289294import Network.Google.Prelude
290295
291−-- | Default request referring to version 'v1beta3' of the Google Cloud Datastore API. This contains the host and root path used as a starting point for constructing service requests.
296+-- | Default request referring to version 'v1' of the Google Cloud Datastore API. This contains the host and root path used as a starting point for constructing service requests.
292297datastoreService :: ServiceConfig
293298datastoreService
294− = defaultService (ServiceId "datastore:v1beta3")
299+ = defaultService (ServiceId "datastore:v1")
295300 "datastore.googleapis.com"
296301
297302-- | View and manage your data across Google Cloud Platform services
gogol-datastore/gen/Network/Google/Datastore/Types/Product.hs+114−33
@@ -29,7 +29,7 @@ import Network.Google.Prelude
2929-- degrees longitude to [-180.0, 180.0].\"\"\" q, r = divmod(longitude,
3030-- 360.0) if r > 180.0 or (r == 180.0 and q \<= -1.0): return r - 360.0
3131-- return r def NormalizeLatLng(latitude, longitude): \"\"\"Wraps decimal
32−-- degrees latitude and longitude to [-180.0, 180.0] and [-90.0, 90.0],
32+-- degrees latitude and longitude to [-90.0, 90.0] and [-180.0, 180.0],
3333-- respectively.\"\"\" r = latitude % 360.0 if r \<= 90.0: return r,
3434-- NormalizeLongitude(longitude) elif r >= 270.0: return r - 360,
3535-- NormalizeLongitude(longitude) else: return 180 - r,
@@ -93,7 +93,7 @@ instance ToJSON LatLng where
9393 [("latitude" .=) <$> _llLatitude,
9494 ("longitude" .=) <$> _llLongitude])
9595
96−-- | The request for google.datastore.v1beta3.Datastore.Rollback.
96+-- | The request for Datastore.Rollback.
9797--
9898-- /See:/ 'rollbackRequest' smart constructor.
9999newtype RollbackRequest = RollbackRequest'
@@ -113,7 +113,7 @@ rollbackRequest =
113113 }
114114
115115-- | The transaction identifier, returned by a call to
116−-- google.datastore.v1beta3.Datastore.BeginTransaction.
116+-- Datastore.BeginTransaction.
117117rrTransaction :: Lens' RollbackRequest (Maybe ByteString)
118118rrTransaction
119119 = lens _rrTransaction
@@ -195,6 +195,7 @@ data QueryResultBatch = QueryResultBatch'
195195 { _qrbSkippedResults :: !(Maybe (Textual Int32))
196196 , _qrbSkippedCursor :: !(Maybe Base64)
197197 , _qrbEntityResultType :: !(Maybe QueryResultBatchEntityResultType)
198+ , _qrbSnapshotVersion :: !(Maybe (Textual Int64))
198199 , _qrbEntityResults :: !(Maybe [EntityResult])
199200 , _qrbMoreResults :: !(Maybe QueryResultBatchMoreResults)
200201 , _qrbEndCursor :: !(Maybe Base64)
@@ -210,6 +211,8 @@ data QueryResultBatch = QueryResultBatch'
210211--
211212-- * 'qrbEntityResultType'
212213--
214+-- * 'qrbSnapshotVersion'
215+--
213216-- * 'qrbEntityResults'
214217--
215218-- * 'qrbMoreResults'
@@ -222,6 +225,7 @@ queryResultBatch =
222225 { _qrbSkippedResults = Nothing
223226 , _qrbSkippedCursor = Nothing
224227 , _qrbEntityResultType = Nothing
228+ , _qrbSnapshotVersion = Nothing
225229 , _qrbEntityResults = Nothing
226230 , _qrbMoreResults = Nothing
227231 , _qrbEndCursor = Nothing
@@ -248,6 +252,19 @@ qrbEntityResultType
248252 = lens _qrbEntityResultType
249253 (\ s a -> s{_qrbEntityResultType = a})
250254
255+-- | The version number of the snapshot this batch was returned from. This
256+-- applies to the range of results from the query\'s \`start_cursor\` (or
257+-- the beginning of the query if no cursor was given) to this batch\'s
258+-- \`end_cursor\` (not the query\'s \`end_cursor\`). In a single
259+-- transaction, subsequent query result batches for the same query can have
260+-- a greater snapshot version number. Each batch\'s snapshot version is
261+-- valid for all preceding batches.
262+qrbSnapshotVersion :: Lens' QueryResultBatch (Maybe Int64)
263+qrbSnapshotVersion
264+ = lens _qrbSnapshotVersion
265+ (\ s a -> s{_qrbSnapshotVersion = a})
266+ . mapping _Coerce
267+
251268-- | The results for this batch.
252269qrbEntityResults :: Lens' QueryResultBatch [EntityResult]
253270qrbEntityResults
@@ -275,6 +292,7 @@ instance FromJSON QueryResultBatch where
275292 QueryResultBatch' <$>
276293 (o .:? "skippedResults") <*> (o .:? "skippedCursor")
277294 <*> (o .:? "entityResultType")
295+ <*> (o .:? "snapshotVersion")
278296 <*> (o .:? "entityResults" .!= mempty)
279297 <*> (o .:? "moreResults")
280298 <*> (o .:? "endCursor"))
@@ -286,6 +304,7 @@ instance ToJSON QueryResultBatch where
286304 [("skippedResults" .=) <$> _qrbSkippedResults,
287305 ("skippedCursor" .=) <$> _qrbSkippedCursor,
288306 ("entityResultType" .=) <$> _qrbEntityResultType,
307+ ("snapshotVersion" .=) <$> _qrbSnapshotVersion,
289308 ("entityResults" .=) <$> _qrbEntityResults,
290309 ("moreResults" .=) <$> _qrbMoreResults,
291310 ("endCursor" .=) <$> _qrbEndCursor])
@@ -326,7 +345,7 @@ instance FromJSON EntityProperties where
326345instance ToJSON EntityProperties where
327346 toJSON = toJSON . _epAddtional
328347
329−-- | The request for google.datastore.v1beta3.Datastore.BeginTransaction.
348+-- | The request for Datastore.BeginTransaction.
330349--
331350-- /See:/ 'beginTransactionRequest' smart constructor.
332351data BeginTransactionRequest =
@@ -347,7 +366,7 @@ instance FromJSON BeginTransactionRequest where
347366instance ToJSON BeginTransactionRequest where
348367 toJSON = const emptyObject
349368
350−-- | The request for google.datastore.v1beta3.Datastore.RunQuery.
369+-- | The request for Datastore.RunQuery.
351370--
352371-- /See:/ 'runQueryRequest' smart constructor.
353372data RunQueryRequest = RunQueryRequest'
@@ -419,7 +438,7 @@ instance ToJSON RunQueryRequest where
419438 ("query" .=) <$> _rqrQuery,
420439 ("readOptions" .=) <$> _rqrReadOptions])
421440
422−-- | The request for google.datastore.v1beta3.Datastore.AllocateIds.
441+-- | The request for Datastore.AllocateIds.
423442--
424443-- /See:/ 'allocateIdsRequest' smart constructor.
425444newtype AllocateIdsRequest = AllocateIdsRequest'
@@ -502,7 +521,7 @@ instance ToJSON CompositeFilter where
502521 (catMaybes
503522 [("op" .=) <$> _cfOp, ("filters" .=) <$> _cfFilters])
504523
505−-- | The response for google.datastore.v1beta3.Datastore.BeginTransaction.
524+-- | The response for Datastore.BeginTransaction.
506525--
507526-- /See:/ 'beginTransactionResponse' smart constructor.
508527newtype BeginTransactionResponse = BeginTransactionResponse'
@@ -542,37 +561,69 @@ instance ToJSON BeginTransactionResponse where
542561-- | The result of applying a mutation.
543562--
544563-- /See:/ 'mutationResult' smart constructor.
545−newtype MutationResult = MutationResult'
546− { _mrKey :: Maybe Key
564+data MutationResult = MutationResult'
565+ { _mrConflictDetected :: !(Maybe Bool)
566+ , _mrKey :: !(Maybe Key)
567+ , _mrVersion :: !(Maybe (Textual Int64))
547568 } deriving (Eq,Show,Data,Typeable,Generic)
548569
549570-- | Creates a value of 'MutationResult' with the minimum fields required to make a request.
550571--
551572-- Use one of the following lenses to modify other fields as desired:
552573--
574+-- * 'mrConflictDetected'
575+--
553576-- * 'mrKey'
577+--
578+-- * 'mrVersion'
554579mutationResult
555580 :: MutationResult
556581mutationResult =
557582 MutationResult'
558− { _mrKey = Nothing
583+ { _mrConflictDetected = Nothing
584+ , _mrKey = Nothing
585+ , _mrVersion = Nothing
559586 }
560587
588+-- | Whether a conflict was detected for this mutation. Always false when a
589+-- conflict detection strategy field is not set in the mutation.
590+mrConflictDetected :: Lens' MutationResult (Maybe Bool)
591+mrConflictDetected
592+ = lens _mrConflictDetected
593+ (\ s a -> s{_mrConflictDetected = a})
594+
561595-- | The automatically allocated key. Set only when the mutation allocated a
562596-- key.
563597mrKey :: Lens' MutationResult (Maybe Key)
564598mrKey = lens _mrKey (\ s a -> s{_mrKey = a})
565599
600+-- | The version of the entity on the server after processing the mutation.
601+-- If the mutation doesn\'t change anything on the server, then the version
602+-- will be the version of the current entity or, if no entity is present, a
603+-- version that is strictly greater than the version of any previous entity
604+-- and less than the version of any possible future entity.
605+mrVersion :: Lens' MutationResult (Maybe Int64)
606+mrVersion
607+ = lens _mrVersion (\ s a -> s{_mrVersion = a}) .
608+ mapping _Coerce
609+
566610instance FromJSON MutationResult where
567611 parseJSON
568612 = withObject "MutationResult"
569− (\ o -> MutationResult' <$> (o .:? "key"))
613+ (\ o ->
614+ MutationResult' <$>
615+ (o .:? "conflictDetected") <*> (o .:? "key") <*>
616+ (o .:? "version"))
570617
571618instance ToJSON MutationResult where
572619 toJSON MutationResult'{..}
573− = object (catMaybes [("key" .=) <$> _mrKey])
620+ = object
621+ (catMaybes
622+ [("conflictDetected" .=) <$> _mrConflictDetected,
623+ ("key" .=) <$> _mrKey,
624+ ("version" .=) <$> _mrVersion])
574625
575−-- | The response for google.datastore.v1beta3.Datastore.AllocateIds.
626+-- | The response for Datastore.AllocateIds.
576627--
577628-- /See:/ 'allocateIdsResponse' smart constructor.
578629newtype AllocateIdsResponse = AllocateIdsResponse'
@@ -695,7 +746,7 @@ instance ToJSON GqlQuery where
695746 ("queryString" .=) <$> _gqQueryString,
696747 ("allowLiterals" .=) <$> _gqAllowLiterals])
697748
698−-- | The response for google.datastore.v1beta3.Datastore.RunQuery.
749+-- | The response for Datastore.RunQuery.
699750--
700751-- /See:/ 'runQueryResponse' smart constructor.
701752data RunQueryResponse = RunQueryResponse'
@@ -928,7 +979,7 @@ instance ToJSON Value where
928979 ("nullValue" .=) <$> _vNullValue,
929980 ("blobValue" .=) <$> _vBlobValue])
930981
931−-- | The request for google.datastore.v1beta3.Datastore.Lookup.
982+-- | The request for Datastore.Lookup.
932983--
933984-- /See:/ 'lookupRequest' smart constructor.
934985data LookupRequest = LookupRequest'
@@ -981,16 +1032,19 @@ instance ToJSON LookupRequest where
9811032--
9821033-- /See:/ 'mutation' smart constructor.
9831034data Mutation = Mutation'
984− { _mInsert :: !(Maybe Entity)
985− , _mUpsert :: !(Maybe Entity)
986− , _mDelete :: !(Maybe Key)
987− , _mUpdate :: !(Maybe Entity)
1035+ { _mBaseVersion :: !(Maybe (Textual Int64))
1036+ , _mInsert :: !(Maybe Entity)
1037+ , _mUpsert :: !(Maybe Entity)
1038+ , _mDelete :: !(Maybe Key)
1039+ , _mUpdate :: !(Maybe Entity)
9881040 } deriving (Eq,Show,Data,Typeable,Generic)
9891041
9901042-- | Creates a value of 'Mutation' with the minimum fields required to make a request.
9911043--
9921044-- Use one of the following lenses to modify other fields as desired:
9931045--
1046+-- * 'mBaseVersion'
1047+--
9941048-- * 'mInsert'
9951049--
9961050-- * 'mUpsert'
@@ -1002,12 +1056,21 @@ mutation
10021056 :: Mutation
10031057mutation =
10041058 Mutation'
1005− { _mInsert = Nothing
1059+ { _mBaseVersion = Nothing
1060+ , _mInsert = Nothing
10061061 , _mUpsert = Nothing
10071062 , _mDelete = Nothing
10081063 , _mUpdate = Nothing
10091064 }
10101065
1066+-- | The version of the entity that this mutation is being applied to. If
1067+-- this does not match the current version on the server, the mutation
1068+-- conflicts.
1069+mBaseVersion :: Lens' Mutation (Maybe Int64)
1070+mBaseVersion
1071+ = lens _mBaseVersion (\ s a -> s{_mBaseVersion = a})
1072+ . mapping _Coerce
1073+
10111074-- | The entity to insert. The entity must not already exist. The entity
10121075-- key\'s final path element may be incomplete.
10131076mInsert :: Lens' Mutation (Maybe Entity)
@@ -1034,15 +1097,17 @@ instance FromJSON Mutation where
10341097 = withObject "Mutation"
10351098 (\ o ->
10361099 Mutation' <$>
1037− (o .:? "insert") <*> (o .:? "upsert") <*>
1038− (o .:? "delete")
1100+ (o .:? "baseVersion") <*> (o .:? "insert") <*>
1101+ (o .:? "upsert")
1102+ <*> (o .:? "delete")
10391103 <*> (o .:? "update"))
10401104
10411105instance ToJSON Mutation where
10421106 toJSON Mutation'{..}
10431107 = object
10441108 (catMaybes
1045− [("insert" .=) <$> _mInsert,
1109+ [("baseVersion" .=) <$> _mBaseVersion,
1110+ ("insert" .=) <$> _mInsert,
10461111 ("upsert" .=) <$> _mUpsert,
10471112 ("delete" .=) <$> _mDelete,
10481113 ("update" .=) <$> _mUpdate])
@@ -1420,8 +1485,9 @@ instance ToJSON ArrayValue where
14201485--
14211486-- /See:/ 'entityResult' smart constructor.
14221487data EntityResult = EntityResult'
1423− { _erCursor :: !(Maybe Base64)
1424− , _erEntity :: !(Maybe Entity)
1488+ { _erCursor :: !(Maybe Base64)
1489+ , _erVersion :: !(Maybe (Textual Int64))
1490+ , _erEntity :: !(Maybe Entity)
14251491 } deriving (Eq,Show,Data,Typeable,Generic)
14261492
14271493-- | Creates a value of 'EntityResult' with the minimum fields required to make a request.
@@ -1430,12 +1496,15 @@ data EntityResult = EntityResult'
14301496--
14311497-- * 'erCursor'
14321498--
1499+-- * 'erVersion'
1500+--
14331501-- * 'erEntity'
14341502entityResult
14351503 :: EntityResult
14361504entityResult =
14371505 EntityResult'
14381506 { _erCursor = Nothing
1507+ , _erVersion = Nothing
14391508 , _erEntity = Nothing
14401509 }
14411510
@@ -1446,6 +1515,16 @@ erCursor
14461515 = lens _erCursor (\ s a -> s{_erCursor = a}) .
14471516 mapping _Base64
14481517
1518+-- | The version of the entity, a strictly positive number that monotonically
1519+-- increases with changes to the entity. This field is set for \`FULL\`
1520+-- entity results. For missing entities in \`LookupResponse\`, this is the
1521+-- version of the snapshot that was used to look up the entity, and it is
1522+-- always set except for eventually consistent reads.
1523+erVersion :: Lens' EntityResult (Maybe Int64)
1524+erVersion
1525+ = lens _erVersion (\ s a -> s{_erVersion = a}) .
1526+ mapping _Coerce
1527+
14491528-- | The resulting entity.
14501529erEntity :: Lens' EntityResult (Maybe Entity)
14511530erEntity = lens _erEntity (\ s a -> s{_erEntity = a})
@@ -1455,16 +1534,18 @@ instance FromJSON EntityResult where
14551534 = withObject "EntityResult"
14561535 (\ o ->
14571536 EntityResult' <$>
1458− (o .:? "cursor") <*> (o .:? "entity"))
1537+ (o .:? "cursor") <*> (o .:? "version") <*>
1538+ (o .:? "entity"))
14591539
14601540instance ToJSON EntityResult where
14611541 toJSON EntityResult'{..}
14621542 = object
14631543 (catMaybes
14641544 [("cursor" .=) <$> _erCursor,
1545+ ("version" .=) <$> _erVersion,
14651546 ("entity" .=) <$> _erEntity])
14661547
1467−-- | The response for google.datastore.v1beta3.Datastore.Commit.
1548+-- | The response for Datastore.Commit.
14681549--
14691550-- /See:/ 'commitResponse' smart constructor.
14701551data CommitResponse = CommitResponse'
@@ -1582,7 +1663,7 @@ roReadConsistency
15821663 (\ s a -> s{_roReadConsistency = a})
15831664
15841665-- | The identifier of the transaction in which to read. A transaction
1585−-- identifier is returned by a call to BeginTransaction.
1666+-- identifier is returned by a call to Datastore.BeginTransaction.
15861667roTransaction :: Lens' ReadOptions (Maybe ByteString)
15871668roTransaction
15881669 = lens _roTransaction
@@ -1603,8 +1684,7 @@ instance ToJSON ReadOptions where
16031684 [("readConsistency" .=) <$> _roReadConsistency,
16041685 ("transaction" .=) <$> _roTransaction])
16051686
1606−-- | The response for google.datastore.v1beta3.Datastore.Rollback (an empty
1607−-- message).
1687+-- | The response for Datastore.Rollback. (an empty message).
16081688--
16091689-- /See:/ 'rollbackResponse' smart constructor.
16101690data RollbackResponse =
@@ -1708,7 +1788,7 @@ instance ToJSON Filter where
17081788 [("compositeFilter" .=) <$> _fCompositeFilter,
17091789 ("propertyFilter" .=) <$> _fPropertyFilter])
17101790
1711−-- | The request for google.datastore.v1beta3.Datastore.Commit.
1791+-- | The request for Datastore.Commit.
17121792--
17131793-- /See:/ 'commitRequest' smart constructor.
17141794data CommitRequest = CommitRequest'
@@ -1753,7 +1833,8 @@ crMode :: Lens' CommitRequest (Maybe CommitRequestMode)
17531833crMode = lens _crMode (\ s a -> s{_crMode = a})
17541834
17551835-- | The identifier of the transaction associated with the commit. A
1756−-- transaction identifier is returned by a call to BeginTransaction.
1836+-- transaction identifier is returned by a call to
1837+-- Datastore.BeginTransaction.
17571838crTransaction :: Lens' CommitRequest (Maybe ByteString)
17581839crTransaction
17591840 = lens _crTransaction
@@ -1891,7 +1972,7 @@ instance ToJSON Entity where
18911972 [("key" .=) <$> _eKey,
18921973 ("properties" .=) <$> _eProperties])
18931974
1894−-- | The response for google.datastore.v1beta3.Datastore.Lookup.
1975+-- | The response for Datastore.Lookup.
18951976--
18961977-- /See:/ 'lookupResponse' smart constructor.
18971978data LookupResponse = LookupResponse'
gogol-datastore/gen/Network/Google/Resource/Datastore/Projects/AllocateIds.hs+1−1
@@ -51,7 +51,7 @@ import Network.Google.Prelude
5151-- | A resource alias for @datastore.projects.allocateIds@ method which the
5252-- 'ProjectsAllocateIds' request conforms to.
5353type ProjectsAllocateIdsResource =
54− "v1beta3" :>
54+ "v1" :>
5555 "projects" :>
5656 CaptureMode "projectId" "allocateIds" Text :>
5757 QueryParam "$.xgafv" Xgafv :>
gogol-datastore/gen/Network/Google/Resource/Datastore/Projects/BeginTransaction.hs+1−1
@@ -50,7 +50,7 @@ import Network.Google.Prelude
5050-- | A resource alias for @datastore.projects.beginTransaction@ method which the
5151-- 'ProjectsBeginTransaction' request conforms to.
5252type ProjectsBeginTransactionResource =
53− "v1beta3" :>
53+ "v1" :>
5454 "projects" :>
5555 CaptureMode "projectId" "beginTransaction" Text :>
5656 QueryParam "$.xgafv" Xgafv :>
gogol-datastore/gen/Network/Google/Resource/Datastore/Projects/Commit.hs+1−1
@@ -51,7 +51,7 @@ import Network.Google.Prelude
5151-- | A resource alias for @datastore.projects.commit@ method which the
5252-- 'ProjectsCommit' request conforms to.
5353type ProjectsCommitResource =
54− "v1beta3" :>
54+ "v1" :>
5555 "projects" :>
5656 CaptureMode "projectId" "commit" Text :>
5757 QueryParam "$.xgafv" Xgafv :>
gogol-datastore/gen/Network/Google/Resource/Datastore/Projects/Lookup.hs+1−1
@@ -50,7 +50,7 @@ import Network.Google.Prelude
5050-- | A resource alias for @datastore.projects.lookup@ method which the
5151-- 'ProjectsLookup' request conforms to.
5252type ProjectsLookupResource =
53− "v1beta3" :>
53+ "v1" :>
5454 "projects" :>
5555 CaptureMode "projectId" "lookup" Text :>
5656 QueryParam "$.xgafv" Xgafv :>
gogol-datastore/gen/Network/Google/Resource/Datastore/Projects/Rollback.hs+1−1
@@ -50,7 +50,7 @@ import Network.Google.Prelude
5050-- | A resource alias for @datastore.projects.rollback@ method which the
5151-- 'ProjectsRollback' request conforms to.
5252type ProjectsRollbackResource =
53− "v1beta3" :>
53+ "v1" :>
5454 "projects" :>
5555 CaptureMode "projectId" "rollback" Text :>
5656 QueryParam "$.xgafv" Xgafv :>
gogol-datastore/gen/Network/Google/Resource/Datastore/Projects/RunQuery.hs+1−1
@@ -50,7 +50,7 @@ import Network.Google.Prelude
5050-- | A resource alias for @datastore.projects.runQuery@ method which the
5151-- 'ProjectsRunQuery' request conforms to.
5252type ProjectsRunQueryResource =
53− "v1beta3" :>
53+ "v1" :>
5454 "projects" :>
5555 CaptureMode "projectId" "runQuery" Text :>
5656 QueryParam "$.xgafv" Xgafv :>
gogol-datastore/gogol-datastore.cabal+1−1
@@ -20,7 +20,7 @@ description:
2020 /Warning:/ This is an experimental prototype/preview release which is still
2121 under exploratory development and not intended for public use, caveat emptor!
2222 .
23− This library is compatible with version @v1beta3@
23+ This library is compatible with version @v1@
2424 of the API.
2525
2626source-repository head