OLD | NEW |
| 1 // This is a generated file (see the discoveryapis_generator project). |
| 2 |
1 library googleapis_beta.datastore.v1beta2; | 3 library googleapis_beta.datastore.v1beta2; |
2 | 4 |
3 import "dart:core" as core; | 5 import 'dart:core' as core; |
4 import "dart:collection" as collection; | 6 import 'dart:collection' as collection; |
5 import "dart:async" as async; | 7 import 'dart:async' as async; |
6 import "dart:convert" as convert; | 8 import 'dart:convert' as convert; |
7 | 9 |
8 import "package:crypto/crypto.dart" as crypto; | 10 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
| 11 import 'package:crypto/crypto.dart' as crypto; |
9 import 'package:http/http.dart' as http; | 12 import 'package:http/http.dart' as http; |
10 import '../src/common_internal.dart' as common_internal; | |
11 import '../common/common.dart' as common; | |
12 | 13 |
13 export '../common/common.dart' show ApiRequestError; | 14 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show |
14 export '../common/common.dart' show DetailedApiRequestError; | 15 ApiRequestError, DetailedApiRequestError; |
| 16 |
| 17 const core.String USER_AGENT = 'dart-api-client datastore/v1beta2'; |
15 | 18 |
16 /** API for accessing Google Cloud Datastore. */ | 19 /** API for accessing Google Cloud Datastore. */ |
17 class DatastoreApi { | 20 class DatastoreApi { |
18 /** View and manage your data across Google Cloud Platform services */ | 21 /** View and manage your data across Google Cloud Platform services */ |
19 static const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platf
orm"; | 22 static const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platf
orm"; |
20 | 23 |
21 /** View and manage your Google Cloud Datastore data */ | 24 /** View and manage your Google Cloud Datastore data */ |
22 static const DatastoreScope = "https://www.googleapis.com/auth/datastore"; | 25 static const DatastoreScope = "https://www.googleapis.com/auth/datastore"; |
23 | 26 |
24 /** View your email address */ | 27 /** View your email address */ |
25 static const UserinfoEmailScope = "https://www.googleapis.com/auth/userinfo.em
ail"; | 28 static const UserinfoEmailScope = "https://www.googleapis.com/auth/userinfo.em
ail"; |
26 | 29 |
27 | 30 |
28 final common_internal.ApiRequester _requester; | 31 final commons.ApiRequester _requester; |
29 | 32 |
30 DatasetsResourceApi get datasets => new DatasetsResourceApi(_requester); | 33 DatasetsResourceApi get datasets => new DatasetsResourceApi(_requester); |
31 | 34 |
32 DatastoreApi(http.Client client, {core.String rootUrl: "https://www.googleapis
.com/", core.String servicePath: "datastore/v1beta2/datasets/"}) : | 35 DatastoreApi(http.Client client, {core.String rootUrl: "https://www.googleapis
.com/", core.String servicePath: "datastore/v1beta2/datasets/"}) : |
33 _requester = new common_internal.ApiRequester(client, rootUrl, servicePath
); | 36 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); |
34 } | 37 } |
35 | 38 |
36 | 39 |
37 /** Not documented yet. */ | |
38 class DatasetsResourceApi { | 40 class DatasetsResourceApi { |
39 final common_internal.ApiRequester _requester; | 41 final commons.ApiRequester _requester; |
40 | 42 |
41 DatasetsResourceApi(common_internal.ApiRequester client) : | 43 DatasetsResourceApi(commons.ApiRequester client) : |
42 _requester = client; | 44 _requester = client; |
43 | 45 |
44 /** | 46 /** |
45 * Allocate IDs for incomplete keys (useful for referencing an entity before | 47 * Allocate IDs for incomplete keys (useful for referencing an entity before |
46 * it is inserted). | 48 * it is inserted). |
47 * | 49 * |
48 * [request] - The metadata request object. | 50 * [request] - The metadata request object. |
49 * | 51 * |
50 * Request parameters: | 52 * Request parameters: |
51 * | 53 * |
52 * [datasetId] - Identifies the dataset. | 54 * [datasetId] - Identifies the dataset. |
53 * | 55 * |
54 * Completes with a [AllocateIdsResponse]. | 56 * Completes with a [AllocateIdsResponse]. |
55 * | 57 * |
56 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 58 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
57 * error. | 59 * error. |
58 * | 60 * |
59 * If the used [http.Client] completes with an error when making a REST call, | 61 * If the used [http.Client] completes with an error when making a REST call, |
60 * this method will complete with the same error. | 62 * this method will complete with the same error. |
61 */ | 63 */ |
62 async.Future<AllocateIdsResponse> allocateIds(AllocateIdsRequest request, core
.String datasetId) { | 64 async.Future<AllocateIdsResponse> allocateIds(AllocateIdsRequest request, core
.String datasetId) { |
63 var _url = null; | 65 var _url = null; |
64 var _queryParams = new core.Map(); | 66 var _queryParams = new core.Map(); |
65 var _uploadMedia = null; | 67 var _uploadMedia = null; |
66 var _uploadOptions = null; | 68 var _uploadOptions = null; |
67 var _downloadOptions = common.DownloadOptions.Metadata; | 69 var _downloadOptions = commons.DownloadOptions.Metadata; |
68 var _body = null; | 70 var _body = null; |
69 | 71 |
70 if (request != null) { | 72 if (request != null) { |
71 _body = convert.JSON.encode((request).toJson()); | 73 _body = convert.JSON.encode((request).toJson()); |
72 } | 74 } |
73 if (datasetId == null) { | 75 if (datasetId == null) { |
74 throw new core.ArgumentError("Parameter datasetId is required."); | 76 throw new core.ArgumentError("Parameter datasetId is required."); |
75 } | 77 } |
76 | 78 |
77 | 79 |
78 _url = common_internal.Escaper.ecapeVariable('$datasetId') + '/allocateIds'; | 80 _url = commons.Escaper.ecapeVariable('$datasetId') + '/allocateIds'; |
79 | 81 |
80 var _response = _requester.request(_url, | 82 var _response = _requester.request(_url, |
81 "POST", | 83 "POST", |
82 body: _body, | 84 body: _body, |
83 queryParams: _queryParams, | 85 queryParams: _queryParams, |
84 uploadOptions: _uploadOptions, | 86 uploadOptions: _uploadOptions, |
85 uploadMedia: _uploadMedia, | 87 uploadMedia: _uploadMedia, |
86 downloadOptions: _downloadOptions); | 88 downloadOptions: _downloadOptions); |
87 return _response.then((data) => new AllocateIdsResponse.fromJson(data)); | 89 return _response.then((data) => new AllocateIdsResponse.fromJson(data)); |
88 } | 90 } |
89 | 91 |
90 /** | 92 /** |
91 * Begin a new transaction. | 93 * Begin a new transaction. |
92 * | 94 * |
93 * [request] - The metadata request object. | 95 * [request] - The metadata request object. |
94 * | 96 * |
95 * Request parameters: | 97 * Request parameters: |
96 * | 98 * |
97 * [datasetId] - Identifies the dataset. | 99 * [datasetId] - Identifies the dataset. |
98 * | 100 * |
99 * Completes with a [BeginTransactionResponse]. | 101 * Completes with a [BeginTransactionResponse]. |
100 * | 102 * |
101 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 103 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
102 * error. | 104 * error. |
103 * | 105 * |
104 * If the used [http.Client] completes with an error when making a REST call, | 106 * If the used [http.Client] completes with an error when making a REST call, |
105 * this method will complete with the same error. | 107 * this method will complete with the same error. |
106 */ | 108 */ |
107 async.Future<BeginTransactionResponse> beginTransaction(BeginTransactionReques
t request, core.String datasetId) { | 109 async.Future<BeginTransactionResponse> beginTransaction(BeginTransactionReques
t request, core.String datasetId) { |
108 var _url = null; | 110 var _url = null; |
109 var _queryParams = new core.Map(); | 111 var _queryParams = new core.Map(); |
110 var _uploadMedia = null; | 112 var _uploadMedia = null; |
111 var _uploadOptions = null; | 113 var _uploadOptions = null; |
112 var _downloadOptions = common.DownloadOptions.Metadata; | 114 var _downloadOptions = commons.DownloadOptions.Metadata; |
113 var _body = null; | 115 var _body = null; |
114 | 116 |
115 if (request != null) { | 117 if (request != null) { |
116 _body = convert.JSON.encode((request).toJson()); | 118 _body = convert.JSON.encode((request).toJson()); |
117 } | 119 } |
118 if (datasetId == null) { | 120 if (datasetId == null) { |
119 throw new core.ArgumentError("Parameter datasetId is required."); | 121 throw new core.ArgumentError("Parameter datasetId is required."); |
120 } | 122 } |
121 | 123 |
122 | 124 |
123 _url = common_internal.Escaper.ecapeVariable('$datasetId') + '/beginTransact
ion'; | 125 _url = commons.Escaper.ecapeVariable('$datasetId') + '/beginTransaction'; |
124 | 126 |
125 var _response = _requester.request(_url, | 127 var _response = _requester.request(_url, |
126 "POST", | 128 "POST", |
127 body: _body, | 129 body: _body, |
128 queryParams: _queryParams, | 130 queryParams: _queryParams, |
129 uploadOptions: _uploadOptions, | 131 uploadOptions: _uploadOptions, |
130 uploadMedia: _uploadMedia, | 132 uploadMedia: _uploadMedia, |
131 downloadOptions: _downloadOptions); | 133 downloadOptions: _downloadOptions); |
132 return _response.then((data) => new BeginTransactionResponse.fromJson(data))
; | 134 return _response.then((data) => new BeginTransactionResponse.fromJson(data))
; |
133 } | 135 } |
134 | 136 |
135 /** | 137 /** |
136 * Commit a transaction, optionally creating, deleting or modifying some | 138 * Commit a transaction, optionally creating, deleting or modifying some |
137 * entities. | 139 * entities. |
138 * | 140 * |
139 * [request] - The metadata request object. | 141 * [request] - The metadata request object. |
140 * | 142 * |
141 * Request parameters: | 143 * Request parameters: |
142 * | 144 * |
143 * [datasetId] - Identifies the dataset. | 145 * [datasetId] - Identifies the dataset. |
144 * | 146 * |
145 * Completes with a [CommitResponse]. | 147 * Completes with a [CommitResponse]. |
146 * | 148 * |
147 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 149 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
148 * error. | 150 * error. |
149 * | 151 * |
150 * If the used [http.Client] completes with an error when making a REST call, | 152 * If the used [http.Client] completes with an error when making a REST call, |
151 * this method will complete with the same error. | 153 * this method will complete with the same error. |
152 */ | 154 */ |
153 async.Future<CommitResponse> commit(CommitRequest request, core.String dataset
Id) { | 155 async.Future<CommitResponse> commit(CommitRequest request, core.String dataset
Id) { |
154 var _url = null; | 156 var _url = null; |
155 var _queryParams = new core.Map(); | 157 var _queryParams = new core.Map(); |
156 var _uploadMedia = null; | 158 var _uploadMedia = null; |
157 var _uploadOptions = null; | 159 var _uploadOptions = null; |
158 var _downloadOptions = common.DownloadOptions.Metadata; | 160 var _downloadOptions = commons.DownloadOptions.Metadata; |
159 var _body = null; | 161 var _body = null; |
160 | 162 |
161 if (request != null) { | 163 if (request != null) { |
162 _body = convert.JSON.encode((request).toJson()); | 164 _body = convert.JSON.encode((request).toJson()); |
163 } | 165 } |
164 if (datasetId == null) { | 166 if (datasetId == null) { |
165 throw new core.ArgumentError("Parameter datasetId is required."); | 167 throw new core.ArgumentError("Parameter datasetId is required."); |
166 } | 168 } |
167 | 169 |
168 | 170 |
169 _url = common_internal.Escaper.ecapeVariable('$datasetId') + '/commit'; | 171 _url = commons.Escaper.ecapeVariable('$datasetId') + '/commit'; |
170 | 172 |
171 var _response = _requester.request(_url, | 173 var _response = _requester.request(_url, |
172 "POST", | 174 "POST", |
173 body: _body, | 175 body: _body, |
174 queryParams: _queryParams, | 176 queryParams: _queryParams, |
175 uploadOptions: _uploadOptions, | 177 uploadOptions: _uploadOptions, |
176 uploadMedia: _uploadMedia, | 178 uploadMedia: _uploadMedia, |
177 downloadOptions: _downloadOptions); | 179 downloadOptions: _downloadOptions); |
178 return _response.then((data) => new CommitResponse.fromJson(data)); | 180 return _response.then((data) => new CommitResponse.fromJson(data)); |
179 } | 181 } |
180 | 182 |
181 /** | 183 /** |
182 * Look up some entities by key. | 184 * Look up some entities by key. |
183 * | 185 * |
184 * [request] - The metadata request object. | 186 * [request] - The metadata request object. |
185 * | 187 * |
186 * Request parameters: | 188 * Request parameters: |
187 * | 189 * |
188 * [datasetId] - Identifies the dataset. | 190 * [datasetId] - Identifies the dataset. |
189 * | 191 * |
190 * Completes with a [LookupResponse]. | 192 * Completes with a [LookupResponse]. |
191 * | 193 * |
192 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 194 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
193 * error. | 195 * error. |
194 * | 196 * |
195 * If the used [http.Client] completes with an error when making a REST call, | 197 * If the used [http.Client] completes with an error when making a REST call, |
196 * this method will complete with the same error. | 198 * this method will complete with the same error. |
197 */ | 199 */ |
198 async.Future<LookupResponse> lookup(LookupRequest request, core.String dataset
Id) { | 200 async.Future<LookupResponse> lookup(LookupRequest request, core.String dataset
Id) { |
199 var _url = null; | 201 var _url = null; |
200 var _queryParams = new core.Map(); | 202 var _queryParams = new core.Map(); |
201 var _uploadMedia = null; | 203 var _uploadMedia = null; |
202 var _uploadOptions = null; | 204 var _uploadOptions = null; |
203 var _downloadOptions = common.DownloadOptions.Metadata; | 205 var _downloadOptions = commons.DownloadOptions.Metadata; |
204 var _body = null; | 206 var _body = null; |
205 | 207 |
206 if (request != null) { | 208 if (request != null) { |
207 _body = convert.JSON.encode((request).toJson()); | 209 _body = convert.JSON.encode((request).toJson()); |
208 } | 210 } |
209 if (datasetId == null) { | 211 if (datasetId == null) { |
210 throw new core.ArgumentError("Parameter datasetId is required."); | 212 throw new core.ArgumentError("Parameter datasetId is required."); |
211 } | 213 } |
212 | 214 |
213 | 215 |
214 _url = common_internal.Escaper.ecapeVariable('$datasetId') + '/lookup'; | 216 _url = commons.Escaper.ecapeVariable('$datasetId') + '/lookup'; |
215 | 217 |
216 var _response = _requester.request(_url, | 218 var _response = _requester.request(_url, |
217 "POST", | 219 "POST", |
218 body: _body, | 220 body: _body, |
219 queryParams: _queryParams, | 221 queryParams: _queryParams, |
220 uploadOptions: _uploadOptions, | 222 uploadOptions: _uploadOptions, |
221 uploadMedia: _uploadMedia, | 223 uploadMedia: _uploadMedia, |
222 downloadOptions: _downloadOptions); | 224 downloadOptions: _downloadOptions); |
223 return _response.then((data) => new LookupResponse.fromJson(data)); | 225 return _response.then((data) => new LookupResponse.fromJson(data)); |
224 } | 226 } |
225 | 227 |
226 /** | 228 /** |
227 * Roll back a transaction. | 229 * Roll back a transaction. |
228 * | 230 * |
229 * [request] - The metadata request object. | 231 * [request] - The metadata request object. |
230 * | 232 * |
231 * Request parameters: | 233 * Request parameters: |
232 * | 234 * |
233 * [datasetId] - Identifies the dataset. | 235 * [datasetId] - Identifies the dataset. |
234 * | 236 * |
235 * Completes with a [RollbackResponse]. | 237 * Completes with a [RollbackResponse]. |
236 * | 238 * |
237 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 239 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
238 * error. | 240 * error. |
239 * | 241 * |
240 * If the used [http.Client] completes with an error when making a REST call, | 242 * If the used [http.Client] completes with an error when making a REST call, |
241 * this method will complete with the same error. | 243 * this method will complete with the same error. |
242 */ | 244 */ |
243 async.Future<RollbackResponse> rollback(RollbackRequest request, core.String d
atasetId) { | 245 async.Future<RollbackResponse> rollback(RollbackRequest request, core.String d
atasetId) { |
244 var _url = null; | 246 var _url = null; |
245 var _queryParams = new core.Map(); | 247 var _queryParams = new core.Map(); |
246 var _uploadMedia = null; | 248 var _uploadMedia = null; |
247 var _uploadOptions = null; | 249 var _uploadOptions = null; |
248 var _downloadOptions = common.DownloadOptions.Metadata; | 250 var _downloadOptions = commons.DownloadOptions.Metadata; |
249 var _body = null; | 251 var _body = null; |
250 | 252 |
251 if (request != null) { | 253 if (request != null) { |
252 _body = convert.JSON.encode((request).toJson()); | 254 _body = convert.JSON.encode((request).toJson()); |
253 } | 255 } |
254 if (datasetId == null) { | 256 if (datasetId == null) { |
255 throw new core.ArgumentError("Parameter datasetId is required."); | 257 throw new core.ArgumentError("Parameter datasetId is required."); |
256 } | 258 } |
257 | 259 |
258 | 260 |
259 _url = common_internal.Escaper.ecapeVariable('$datasetId') + '/rollback'; | 261 _url = commons.Escaper.ecapeVariable('$datasetId') + '/rollback'; |
260 | 262 |
261 var _response = _requester.request(_url, | 263 var _response = _requester.request(_url, |
262 "POST", | 264 "POST", |
263 body: _body, | 265 body: _body, |
264 queryParams: _queryParams, | 266 queryParams: _queryParams, |
265 uploadOptions: _uploadOptions, | 267 uploadOptions: _uploadOptions, |
266 uploadMedia: _uploadMedia, | 268 uploadMedia: _uploadMedia, |
267 downloadOptions: _downloadOptions); | 269 downloadOptions: _downloadOptions); |
268 return _response.then((data) => new RollbackResponse.fromJson(data)); | 270 return _response.then((data) => new RollbackResponse.fromJson(data)); |
269 } | 271 } |
270 | 272 |
271 /** | 273 /** |
272 * Query for entities. | 274 * Query for entities. |
273 * | 275 * |
274 * [request] - The metadata request object. | 276 * [request] - The metadata request object. |
275 * | 277 * |
276 * Request parameters: | 278 * Request parameters: |
277 * | 279 * |
278 * [datasetId] - Identifies the dataset. | 280 * [datasetId] - Identifies the dataset. |
279 * | 281 * |
280 * Completes with a [RunQueryResponse]. | 282 * Completes with a [RunQueryResponse]. |
281 * | 283 * |
282 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 284 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
283 * error. | 285 * error. |
284 * | 286 * |
285 * If the used [http.Client] completes with an error when making a REST call, | 287 * If the used [http.Client] completes with an error when making a REST call, |
286 * this method will complete with the same error. | 288 * this method will complete with the same error. |
287 */ | 289 */ |
288 async.Future<RunQueryResponse> runQuery(RunQueryRequest request, core.String d
atasetId) { | 290 async.Future<RunQueryResponse> runQuery(RunQueryRequest request, core.String d
atasetId) { |
289 var _url = null; | 291 var _url = null; |
290 var _queryParams = new core.Map(); | 292 var _queryParams = new core.Map(); |
291 var _uploadMedia = null; | 293 var _uploadMedia = null; |
292 var _uploadOptions = null; | 294 var _uploadOptions = null; |
293 var _downloadOptions = common.DownloadOptions.Metadata; | 295 var _downloadOptions = commons.DownloadOptions.Metadata; |
294 var _body = null; | 296 var _body = null; |
295 | 297 |
296 if (request != null) { | 298 if (request != null) { |
297 _body = convert.JSON.encode((request).toJson()); | 299 _body = convert.JSON.encode((request).toJson()); |
298 } | 300 } |
299 if (datasetId == null) { | 301 if (datasetId == null) { |
300 throw new core.ArgumentError("Parameter datasetId is required."); | 302 throw new core.ArgumentError("Parameter datasetId is required."); |
301 } | 303 } |
302 | 304 |
303 | 305 |
304 _url = common_internal.Escaper.ecapeVariable('$datasetId') + '/runQuery'; | 306 _url = commons.Escaper.ecapeVariable('$datasetId') + '/runQuery'; |
305 | 307 |
306 var _response = _requester.request(_url, | 308 var _response = _requester.request(_url, |
307 "POST", | 309 "POST", |
308 body: _body, | 310 body: _body, |
309 queryParams: _queryParams, | 311 queryParams: _queryParams, |
310 uploadOptions: _uploadOptions, | 312 uploadOptions: _uploadOptions, |
311 uploadMedia: _uploadMedia, | 313 uploadMedia: _uploadMedia, |
312 downloadOptions: _downloadOptions); | 314 downloadOptions: _downloadOptions); |
313 return _response.then((data) => new RunQueryResponse.fromJson(data)); | 315 return _response.then((data) => new RunQueryResponse.fromJson(data)); |
314 } | 316 } |
315 | 317 |
316 } | 318 } |
317 | 319 |
318 | 320 |
319 | 321 |
320 /** Not documented yet. */ | |
321 class AllocateIdsRequest { | 322 class AllocateIdsRequest { |
322 /** | 323 /** |
323 * A list of keys with incomplete key paths to allocate IDs for. No key may be | 324 * A list of keys with incomplete key paths to allocate IDs for. No key may be |
324 * reserved/read-only. | 325 * reserved/read-only. |
325 */ | 326 */ |
326 core.List<Key> keys; | 327 core.List<Key> keys; |
327 | 328 |
328 | 329 |
329 AllocateIdsRequest(); | 330 AllocateIdsRequest(); |
330 | 331 |
331 AllocateIdsRequest.fromJson(core.Map _json) { | 332 AllocateIdsRequest.fromJson(core.Map _json) { |
332 if (_json.containsKey("keys")) { | 333 if (_json.containsKey("keys")) { |
333 keys = _json["keys"].map((value) => new Key.fromJson(value)).toList(); | 334 keys = _json["keys"].map((value) => new Key.fromJson(value)).toList(); |
334 } | 335 } |
335 } | 336 } |
336 | 337 |
337 core.Map toJson() { | 338 core.Map toJson() { |
338 var _json = new core.Map(); | 339 var _json = new core.Map(); |
339 if (keys != null) { | 340 if (keys != null) { |
340 _json["keys"] = keys.map((value) => (value).toJson()).toList(); | 341 _json["keys"] = keys.map((value) => (value).toJson()).toList(); |
341 } | 342 } |
342 return _json; | 343 return _json; |
343 } | 344 } |
344 } | 345 } |
345 | 346 |
346 | 347 |
347 /** Not documented yet. */ | |
348 class AllocateIdsResponse { | 348 class AllocateIdsResponse { |
349 /** Not documented yet. */ | |
350 ResponseHeader header; | 349 ResponseHeader header; |
351 | 350 |
352 /** | 351 /** |
353 * The keys specified in the request (in the same order), each with its key | 352 * The keys specified in the request (in the same order), each with its key |
354 * path completed with a newly allocated ID. | 353 * path completed with a newly allocated ID. |
355 */ | 354 */ |
356 core.List<Key> keys; | 355 core.List<Key> keys; |
357 | 356 |
358 | 357 |
359 AllocateIdsResponse(); | 358 AllocateIdsResponse(); |
(...skipping 13 matching lines...) Expand all Loading... |
373 _json["header"] = (header).toJson(); | 372 _json["header"] = (header).toJson(); |
374 } | 373 } |
375 if (keys != null) { | 374 if (keys != null) { |
376 _json["keys"] = keys.map((value) => (value).toJson()).toList(); | 375 _json["keys"] = keys.map((value) => (value).toJson()).toList(); |
377 } | 376 } |
378 return _json; | 377 return _json; |
379 } | 378 } |
380 } | 379 } |
381 | 380 |
382 | 381 |
383 /** Not documented yet. */ | |
384 class BeginTransactionRequest { | 382 class BeginTransactionRequest { |
385 /** | 383 /** |
386 * The transaction isolation level. Either snapshot or serializable. The | 384 * The transaction isolation level. Either snapshot or serializable. The |
387 * default isolation level is snapshot isolation, which means that another | 385 * default isolation level is snapshot isolation, which means that another |
388 * transaction may not concurrently modify the data that is modified by this | 386 * transaction may not concurrently modify the data that is modified by this |
389 * transaction. Optionally, a transaction can request to be made serializable | 387 * transaction. Optionally, a transaction can request to be made serializable |
390 * which means that another transaction cannot concurrently modify the data | 388 * which means that another transaction cannot concurrently modify the data |
391 * that is read or modified by this transaction. | 389 * that is read or modified by this transaction. |
392 * Possible string values are: | 390 * Possible string values are: |
393 * - "SERIALIZABLE" | 391 * - "SERIALIZABLE" |
(...skipping 13 matching lines...) Expand all Loading... |
407 core.Map toJson() { | 405 core.Map toJson() { |
408 var _json = new core.Map(); | 406 var _json = new core.Map(); |
409 if (isolationLevel != null) { | 407 if (isolationLevel != null) { |
410 _json["isolationLevel"] = isolationLevel; | 408 _json["isolationLevel"] = isolationLevel; |
411 } | 409 } |
412 return _json; | 410 return _json; |
413 } | 411 } |
414 } | 412 } |
415 | 413 |
416 | 414 |
417 /** Not documented yet. */ | |
418 class BeginTransactionResponse { | 415 class BeginTransactionResponse { |
419 /** Not documented yet. */ | |
420 ResponseHeader header; | 416 ResponseHeader header; |
421 | 417 |
422 /** The transaction identifier (always present). */ | 418 /** The transaction identifier (always present). */ |
423 core.String transaction; | 419 core.String transaction; |
424 | 420 |
425 core.List<core.int> get transactionAsBytes { | 421 core.List<core.int> get transactionAsBytes { |
426 return crypto.CryptoUtils.base64StringToBytes(transaction); | 422 return crypto.CryptoUtils.base64StringToBytes(transaction); |
427 } | 423 } |
428 | 424 |
429 void set transactionAsBytes(core.List<core.int> _bytes) { | 425 void set transactionAsBytes(core.List<core.int> _bytes) { |
(...skipping 18 matching lines...) Expand all Loading... |
448 _json["header"] = (header).toJson(); | 444 _json["header"] = (header).toJson(); |
449 } | 445 } |
450 if (transaction != null) { | 446 if (transaction != null) { |
451 _json["transaction"] = transaction; | 447 _json["transaction"] = transaction; |
452 } | 448 } |
453 return _json; | 449 return _json; |
454 } | 450 } |
455 } | 451 } |
456 | 452 |
457 | 453 |
458 /** Not documented yet. */ | |
459 class CommitRequest { | 454 class CommitRequest { |
460 /** Not documented yet. */ | |
461 core.bool ignoreReadOnly; | 455 core.bool ignoreReadOnly; |
462 | 456 |
463 /** | 457 /** |
464 * The type of commit to perform. Either TRANSACTIONAL or NON_TRANSACTIONAL. | 458 * The type of commit to perform. Either TRANSACTIONAL or NON_TRANSACTIONAL. |
465 * Possible string values are: | 459 * Possible string values are: |
466 * - "NON_TRANSACTIONAL" | 460 * - "NON_TRANSACTIONAL" |
467 * - "TRANSACTIONAL" | 461 * - "TRANSACTIONAL" |
468 */ | 462 */ |
469 core.String mode; | 463 core.String mode; |
470 | 464 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
515 _json["mutation"] = (mutation).toJson(); | 509 _json["mutation"] = (mutation).toJson(); |
516 } | 510 } |
517 if (transaction != null) { | 511 if (transaction != null) { |
518 _json["transaction"] = transaction; | 512 _json["transaction"] = transaction; |
519 } | 513 } |
520 return _json; | 514 return _json; |
521 } | 515 } |
522 } | 516 } |
523 | 517 |
524 | 518 |
525 /** Not documented yet. */ | |
526 class CommitResponse { | 519 class CommitResponse { |
527 /** Not documented yet. */ | |
528 ResponseHeader header; | 520 ResponseHeader header; |
529 | 521 |
530 /** The result of performing the mutation (if any). */ | 522 /** The result of performing the mutation (if any). */ |
531 MutationResult mutationResult; | 523 MutationResult mutationResult; |
532 | 524 |
533 | 525 |
534 CommitResponse(); | 526 CommitResponse(); |
535 | 527 |
536 CommitResponse.fromJson(core.Map _json) { | 528 CommitResponse.fromJson(core.Map _json) { |
537 if (_json.containsKey("header")) { | 529 if (_json.containsKey("header")) { |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
610 core.Map<core.String, Property> properties; | 602 core.Map<core.String, Property> properties; |
611 | 603 |
612 | 604 |
613 Entity(); | 605 Entity(); |
614 | 606 |
615 Entity.fromJson(core.Map _json) { | 607 Entity.fromJson(core.Map _json) { |
616 if (_json.containsKey("key")) { | 608 if (_json.containsKey("key")) { |
617 key = new Key.fromJson(_json["key"]); | 609 key = new Key.fromJson(_json["key"]); |
618 } | 610 } |
619 if (_json.containsKey("properties")) { | 611 if (_json.containsKey("properties")) { |
620 properties = common_internal.mapMap(_json["properties"], (item) => new Pro
perty.fromJson(item)); | 612 properties = commons.mapMap(_json["properties"], (item) => new Property.fr
omJson(item)); |
621 } | 613 } |
622 } | 614 } |
623 | 615 |
624 core.Map toJson() { | 616 core.Map toJson() { |
625 var _json = new core.Map(); | 617 var _json = new core.Map(); |
626 if (key != null) { | 618 if (key != null) { |
627 _json["key"] = (key).toJson(); | 619 _json["key"] = (key).toJson(); |
628 } | 620 } |
629 if (properties != null) { | 621 if (properties != null) { |
630 _json["properties"] = common_internal.mapMap(properties, (item) => (item).
toJson()); | 622 _json["properties"] = commons.mapMap(properties, (item) => (item).toJson()
); |
631 } | 623 } |
632 return _json; | 624 return _json; |
633 } | 625 } |
634 } | 626 } |
635 | 627 |
636 | 628 |
637 /** The result of fetching an entity from the datastore. */ | 629 /** The result of fetching an entity from the datastore. */ |
638 class EntityResult { | 630 class EntityResult { |
639 /** The resulting entity. */ | 631 /** The resulting entity. */ |
640 Entity entity; | 632 Entity entity; |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
748 if (queryString != null) { | 740 if (queryString != null) { |
749 _json["queryString"] = queryString; | 741 _json["queryString"] = queryString; |
750 } | 742 } |
751 return _json; | 743 return _json; |
752 } | 744 } |
753 } | 745 } |
754 | 746 |
755 | 747 |
756 /** A binding argument for a GQL query. */ | 748 /** A binding argument for a GQL query. */ |
757 class GqlQueryArg { | 749 class GqlQueryArg { |
758 /** Not documented yet. */ | |
759 core.String cursor; | 750 core.String cursor; |
760 | 751 |
761 core.List<core.int> get cursorAsBytes { | 752 core.List<core.int> get cursorAsBytes { |
762 return crypto.CryptoUtils.base64StringToBytes(cursor); | 753 return crypto.CryptoUtils.base64StringToBytes(cursor); |
763 } | 754 } |
764 | 755 |
765 void set cursorAsBytes(core.List<core.int> _bytes) { | 756 void set cursorAsBytes(core.List<core.int> _bytes) { |
766 cursor = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true); | 757 cursor = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true); |
767 } | 758 } |
768 | 759 |
769 /** | 760 /** |
770 * Must match regex "[A-Za-z_$][A-Za-z_$0-9]*". Must not match regex "__.*__". | 761 * Must match regex "[A-Za-z_$][A-Za-z_$0-9]*". Must not match regex "__.*__". |
771 * Must not be "". | 762 * Must not be "". |
772 */ | 763 */ |
773 core.String name; | 764 core.String name; |
774 | 765 |
775 /** Not documented yet. */ | |
776 Value value; | 766 Value value; |
777 | 767 |
778 | 768 |
779 GqlQueryArg(); | 769 GqlQueryArg(); |
780 | 770 |
781 GqlQueryArg.fromJson(core.Map _json) { | 771 GqlQueryArg.fromJson(core.Map _json) { |
782 if (_json.containsKey("cursor")) { | 772 if (_json.containsKey("cursor")) { |
783 cursor = _json["cursor"]; | 773 cursor = _json["cursor"]; |
784 } | 774 } |
785 if (_json.containsKey("name")) { | 775 if (_json.containsKey("name")) { |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
930 core.Map toJson() { | 920 core.Map toJson() { |
931 var _json = new core.Map(); | 921 var _json = new core.Map(); |
932 if (name != null) { | 922 if (name != null) { |
933 _json["name"] = name; | 923 _json["name"] = name; |
934 } | 924 } |
935 return _json; | 925 return _json; |
936 } | 926 } |
937 } | 927 } |
938 | 928 |
939 | 929 |
940 /** Not documented yet. */ | |
941 class LookupRequest { | 930 class LookupRequest { |
942 /** Keys of entities to look up from the datastore. */ | 931 /** Keys of entities to look up from the datastore. */ |
943 core.List<Key> keys; | 932 core.List<Key> keys; |
944 | 933 |
945 /** Options for this lookup request. Optional. */ | 934 /** Options for this lookup request. Optional. */ |
946 ReadOptions readOptions; | 935 ReadOptions readOptions; |
947 | 936 |
948 | 937 |
949 LookupRequest(); | 938 LookupRequest(); |
950 | 939 |
(...skipping 12 matching lines...) Expand all Loading... |
963 _json["keys"] = keys.map((value) => (value).toJson()).toList(); | 952 _json["keys"] = keys.map((value) => (value).toJson()).toList(); |
964 } | 953 } |
965 if (readOptions != null) { | 954 if (readOptions != null) { |
966 _json["readOptions"] = (readOptions).toJson(); | 955 _json["readOptions"] = (readOptions).toJson(); |
967 } | 956 } |
968 return _json; | 957 return _json; |
969 } | 958 } |
970 } | 959 } |
971 | 960 |
972 | 961 |
973 /** Not documented yet. */ | |
974 class LookupResponse { | 962 class LookupResponse { |
975 /** A list of keys that were not looked up due to resource constraints. */ | 963 /** A list of keys that were not looked up due to resource constraints. */ |
976 core.List<Key> deferred; | 964 core.List<Key> deferred; |
977 | 965 |
978 /** Entities found. */ | 966 /** Entities found. */ |
979 core.List<EntityResult> found; | 967 core.List<EntityResult> found; |
980 | 968 |
981 /** Not documented yet. */ | |
982 ResponseHeader header; | 969 ResponseHeader header; |
983 | 970 |
984 /** Entities not found, with only the key populated. */ | 971 /** Entities not found, with only the key populated. */ |
985 core.List<EntityResult> missing; | 972 core.List<EntityResult> missing; |
986 | 973 |
987 | 974 |
988 LookupResponse(); | 975 LookupResponse(); |
989 | 976 |
990 LookupResponse.fromJson(core.Map _json) { | 977 LookupResponse.fromJson(core.Map _json) { |
991 if (_json.containsKey("deferred")) { | 978 if (_json.containsKey("deferred")) { |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1098 _json["update"] = update.map((value) => (value).toJson()).toList(); | 1085 _json["update"] = update.map((value) => (value).toJson()).toList(); |
1099 } | 1086 } |
1100 if (upsert != null) { | 1087 if (upsert != null) { |
1101 _json["upsert"] = upsert.map((value) => (value).toJson()).toList(); | 1088 _json["upsert"] = upsert.map((value) => (value).toJson()).toList(); |
1102 } | 1089 } |
1103 return _json; | 1090 return _json; |
1104 } | 1091 } |
1105 } | 1092 } |
1106 | 1093 |
1107 | 1094 |
1108 /** Not documented yet. */ | |
1109 class MutationResult { | 1095 class MutationResult { |
1110 /** Number of index writes. */ | 1096 /** Number of index writes. */ |
1111 core.int indexUpdates; | 1097 core.int indexUpdates; |
1112 | 1098 |
1113 /** | 1099 /** |
1114 * Keys for insertAutoId entities. One per entity from the request, in the | 1100 * Keys for insertAutoId entities. One per entity from the request, in the |
1115 * same order. | 1101 * same order. |
1116 */ | 1102 */ |
1117 core.List<Key> insertAutoIdKeys; | 1103 core.List<Key> insertAutoIdKeys; |
1118 | 1104 |
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1690 _json["moreResults"] = moreResults; | 1676 _json["moreResults"] = moreResults; |
1691 } | 1677 } |
1692 if (skippedResults != null) { | 1678 if (skippedResults != null) { |
1693 _json["skippedResults"] = skippedResults; | 1679 _json["skippedResults"] = skippedResults; |
1694 } | 1680 } |
1695 return _json; | 1681 return _json; |
1696 } | 1682 } |
1697 } | 1683 } |
1698 | 1684 |
1699 | 1685 |
1700 /** Not documented yet. */ | |
1701 class ReadOptions { | 1686 class ReadOptions { |
1702 /** | 1687 /** |
1703 * The read consistency to use. One of default, strong, or eventual. Cannot be | 1688 * The read consistency to use. One of default, strong, or eventual. Cannot be |
1704 * set when transaction is set. Lookup and ancestor queries default to strong, | 1689 * set when transaction is set. Lookup and ancestor queries default to strong, |
1705 * global queries default to eventual and cannot be set to strong. Optional. | 1690 * global queries default to eventual and cannot be set to strong. Optional. |
1706 * Default is default. | 1691 * Default is default. |
1707 * Possible string values are: | 1692 * Possible string values are: |
1708 * - "DEFAULT" | 1693 * - "DEFAULT" |
1709 * - "EVENTUAL" | 1694 * - "EVENTUAL" |
1710 * - "STRONG" | 1695 * - "STRONG" |
(...skipping 29 matching lines...) Expand all Loading... |
1740 _json["readConsistency"] = readConsistency; | 1725 _json["readConsistency"] = readConsistency; |
1741 } | 1726 } |
1742 if (transaction != null) { | 1727 if (transaction != null) { |
1743 _json["transaction"] = transaction; | 1728 _json["transaction"] = transaction; |
1744 } | 1729 } |
1745 return _json; | 1730 return _json; |
1746 } | 1731 } |
1747 } | 1732 } |
1748 | 1733 |
1749 | 1734 |
1750 /** Not documented yet. */ | |
1751 class ResponseHeader { | 1735 class ResponseHeader { |
1752 /** | 1736 /** |
1753 * Identifies what kind of resource this is. Value: the fixed string | 1737 * Identifies what kind of resource this is. Value: the fixed string |
1754 * "datastore#responseHeader". | 1738 * "datastore#responseHeader". |
1755 */ | 1739 */ |
1756 core.String kind; | 1740 core.String kind; |
1757 | 1741 |
1758 | 1742 |
1759 ResponseHeader(); | 1743 ResponseHeader(); |
1760 | 1744 |
1761 ResponseHeader.fromJson(core.Map _json) { | 1745 ResponseHeader.fromJson(core.Map _json) { |
1762 if (_json.containsKey("kind")) { | 1746 if (_json.containsKey("kind")) { |
1763 kind = _json["kind"]; | 1747 kind = _json["kind"]; |
1764 } | 1748 } |
1765 } | 1749 } |
1766 | 1750 |
1767 core.Map toJson() { | 1751 core.Map toJson() { |
1768 var _json = new core.Map(); | 1752 var _json = new core.Map(); |
1769 if (kind != null) { | 1753 if (kind != null) { |
1770 _json["kind"] = kind; | 1754 _json["kind"] = kind; |
1771 } | 1755 } |
1772 return _json; | 1756 return _json; |
1773 } | 1757 } |
1774 } | 1758 } |
1775 | 1759 |
1776 | 1760 |
1777 /** Not documented yet. */ | |
1778 class RollbackRequest { | 1761 class RollbackRequest { |
1779 /** The transaction identifier, returned by a call to beginTransaction. */ | 1762 /** The transaction identifier, returned by a call to beginTransaction. */ |
1780 core.String transaction; | 1763 core.String transaction; |
1781 | 1764 |
1782 core.List<core.int> get transactionAsBytes { | 1765 core.List<core.int> get transactionAsBytes { |
1783 return crypto.CryptoUtils.base64StringToBytes(transaction); | 1766 return crypto.CryptoUtils.base64StringToBytes(transaction); |
1784 } | 1767 } |
1785 | 1768 |
1786 void set transactionAsBytes(core.List<core.int> _bytes) { | 1769 void set transactionAsBytes(core.List<core.int> _bytes) { |
1787 transaction = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true); | 1770 transaction = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true); |
(...skipping 11 matching lines...) Expand all Loading... |
1799 core.Map toJson() { | 1782 core.Map toJson() { |
1800 var _json = new core.Map(); | 1783 var _json = new core.Map(); |
1801 if (transaction != null) { | 1784 if (transaction != null) { |
1802 _json["transaction"] = transaction; | 1785 _json["transaction"] = transaction; |
1803 } | 1786 } |
1804 return _json; | 1787 return _json; |
1805 } | 1788 } |
1806 } | 1789 } |
1807 | 1790 |
1808 | 1791 |
1809 /** Not documented yet. */ | |
1810 class RollbackResponse { | 1792 class RollbackResponse { |
1811 /** Not documented yet. */ | |
1812 ResponseHeader header; | 1793 ResponseHeader header; |
1813 | 1794 |
1814 | 1795 |
1815 RollbackResponse(); | 1796 RollbackResponse(); |
1816 | 1797 |
1817 RollbackResponse.fromJson(core.Map _json) { | 1798 RollbackResponse.fromJson(core.Map _json) { |
1818 if (_json.containsKey("header")) { | 1799 if (_json.containsKey("header")) { |
1819 header = new ResponseHeader.fromJson(_json["header"]); | 1800 header = new ResponseHeader.fromJson(_json["header"]); |
1820 } | 1801 } |
1821 } | 1802 } |
1822 | 1803 |
1823 core.Map toJson() { | 1804 core.Map toJson() { |
1824 var _json = new core.Map(); | 1805 var _json = new core.Map(); |
1825 if (header != null) { | 1806 if (header != null) { |
1826 _json["header"] = (header).toJson(); | 1807 _json["header"] = (header).toJson(); |
1827 } | 1808 } |
1828 return _json; | 1809 return _json; |
1829 } | 1810 } |
1830 } | 1811 } |
1831 | 1812 |
1832 | 1813 |
1833 /** Not documented yet. */ | |
1834 class RunQueryRequest { | 1814 class RunQueryRequest { |
1835 /** | 1815 /** |
1836 * The GQL query to run. Either this field or field query must be set, but not | 1816 * The GQL query to run. Either this field or field query must be set, but not |
1837 * both. | 1817 * both. |
1838 */ | 1818 */ |
1839 GqlQuery gqlQuery; | 1819 GqlQuery gqlQuery; |
1840 | 1820 |
1841 /** | 1821 /** |
1842 * Entities are partitioned into subsets, identified by a dataset (usually | 1822 * Entities are partitioned into subsets, identified by a dataset (usually |
1843 * implicitly specified by the project) and namespace ID. Queries are scoped | 1823 * implicitly specified by the project) and namespace ID. Queries are scoped |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1887 _json["query"] = (query).toJson(); | 1867 _json["query"] = (query).toJson(); |
1888 } | 1868 } |
1889 if (readOptions != null) { | 1869 if (readOptions != null) { |
1890 _json["readOptions"] = (readOptions).toJson(); | 1870 _json["readOptions"] = (readOptions).toJson(); |
1891 } | 1871 } |
1892 return _json; | 1872 return _json; |
1893 } | 1873 } |
1894 } | 1874 } |
1895 | 1875 |
1896 | 1876 |
1897 /** Not documented yet. */ | |
1898 class RunQueryResponse { | 1877 class RunQueryResponse { |
1899 /** A batch of query results (always present). */ | 1878 /** A batch of query results (always present). */ |
1900 QueryResultBatch batch; | 1879 QueryResultBatch batch; |
1901 | 1880 |
1902 /** Not documented yet. */ | |
1903 ResponseHeader header; | 1881 ResponseHeader header; |
1904 | 1882 |
1905 | 1883 |
1906 RunQueryResponse(); | 1884 RunQueryResponse(); |
1907 | 1885 |
1908 RunQueryResponse.fromJson(core.Map _json) { | 1886 RunQueryResponse.fromJson(core.Map _json) { |
1909 if (_json.containsKey("batch")) { | 1887 if (_json.containsKey("batch")) { |
1910 batch = new QueryResultBatch.fromJson(_json["batch"]); | 1888 batch = new QueryResultBatch.fromJson(_json["batch"]); |
1911 } | 1889 } |
1912 if (_json.containsKey("header")) { | 1890 if (_json.containsKey("header")) { |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2067 } | 2045 } |
2068 if (meaning != null) { | 2046 if (meaning != null) { |
2069 _json["meaning"] = meaning; | 2047 _json["meaning"] = meaning; |
2070 } | 2048 } |
2071 if (stringValue != null) { | 2049 if (stringValue != null) { |
2072 _json["stringValue"] = stringValue; | 2050 _json["stringValue"] = stringValue; |
2073 } | 2051 } |
2074 return _json; | 2052 return _json; |
2075 } | 2053 } |
2076 } | 2054 } |
2077 | |
2078 | |
OLD | NEW |