OLD | NEW |
1 // This is a generated file (see the discoveryapis_generator project). | 1 // This is a generated file (see the discoveryapis_generator project). |
2 | 2 |
3 library googleapis.datastore.v1; | 3 library googleapis.datastore.v1; |
4 | 4 |
5 import 'dart:core' as core; | 5 import 'dart:core' as core; |
6 import 'dart:async' as async; | 6 import 'dart:async' as async; |
7 import 'dart:convert' as convert; | 7 import 'dart:convert' as convert; |
8 | 8 |
9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; | 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
10 import 'package:http/http.dart' as http; | 10 import 'package:http/http.dart' as http; |
11 | 11 |
12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show | 12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' |
13 ApiRequestError, DetailedApiRequestError; | 13 show ApiRequestError, DetailedApiRequestError; |
14 | 14 |
15 const core.String USER_AGENT = 'dart-api-client datastore/v1'; | 15 const core.String USER_AGENT = 'dart-api-client datastore/v1'; |
16 | 16 |
17 /** | 17 /// Accesses the schemaless NoSQL database to provide fully managed, robust, |
18 * Accesses the schemaless NoSQL database to provide fully managed, robust, | 18 /// scalable storage for your application. |
19 * scalable storage for your application. | |
20 */ | |
21 class DatastoreApi { | 19 class DatastoreApi { |
22 /** View and manage your data across Google Cloud Platform services */ | 20 /// View and manage your data across Google Cloud Platform services |
23 static const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platf
orm"; | 21 static const CloudPlatformScope = |
| 22 "https://www.googleapis.com/auth/cloud-platform"; |
24 | 23 |
25 /** View and manage your Google Cloud Datastore data */ | 24 /// View and manage your Google Cloud Datastore data |
26 static const DatastoreScope = "https://www.googleapis.com/auth/datastore"; | 25 static const DatastoreScope = "https://www.googleapis.com/auth/datastore"; |
27 | 26 |
28 | |
29 final commons.ApiRequester _requester; | 27 final commons.ApiRequester _requester; |
30 | 28 |
31 ProjectsResourceApi get projects => new ProjectsResourceApi(_requester); | 29 ProjectsResourceApi get projects => new ProjectsResourceApi(_requester); |
32 | 30 |
33 DatastoreApi(http.Client client, {core.String rootUrl: "https://datastore.goog
leapis.com/", core.String servicePath: ""}) : | 31 DatastoreApi(http.Client client, |
34 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); | 32 {core.String rootUrl: "https://datastore.googleapis.com/", |
| 33 core.String servicePath: ""}) |
| 34 : _requester = |
| 35 new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT); |
35 } | 36 } |
36 | 37 |
37 | |
38 class ProjectsResourceApi { | 38 class ProjectsResourceApi { |
39 final commons.ApiRequester _requester; | 39 final commons.ApiRequester _requester; |
40 | 40 |
41 ProjectsOperationsResourceApi get operations => new ProjectsOperationsResource
Api(_requester); | 41 ProjectsOperationsResourceApi get operations => |
| 42 new ProjectsOperationsResourceApi(_requester); |
42 | 43 |
43 ProjectsResourceApi(commons.ApiRequester client) : | 44 ProjectsResourceApi(commons.ApiRequester client) : _requester = client; |
44 _requester = client; | |
45 | 45 |
46 /** | 46 /// Allocates IDs for the given keys, which is useful for referencing an |
47 * Allocates IDs for the given keys, which is useful for referencing an entity | 47 /// entity |
48 * before it is inserted. | 48 /// before it is inserted. |
49 * | 49 /// |
50 * [request] - The metadata request object. | 50 /// [request] - The metadata request object. |
51 * | 51 /// |
52 * Request parameters: | 52 /// Request parameters: |
53 * | 53 /// |
54 * [projectId] - The ID of the project against which to make the request. | 54 /// [projectId] - The ID of the project against which to make the request. |
55 * | 55 /// |
56 * Completes with a [AllocateIdsResponse]. | 56 /// Completes with a [AllocateIdsResponse]. |
57 * | 57 /// |
58 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 58 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
59 * error. | 59 /// an error. |
60 * | 60 /// |
61 * 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 |
62 * this method will complete with the same error. | 62 /// call, this method will complete with the same error. |
63 */ | 63 async.Future<AllocateIdsResponse> allocateIds( |
64 async.Future<AllocateIdsResponse> allocateIds(AllocateIdsRequest request, core
.String projectId) { | 64 AllocateIdsRequest request, core.String projectId) { |
65 var _url = null; | 65 var _url = null; |
66 var _queryParams = new core.Map(); | 66 var _queryParams = new core.Map(); |
67 var _uploadMedia = null; | 67 var _uploadMedia = null; |
68 var _uploadOptions = null; | 68 var _uploadOptions = null; |
69 var _downloadOptions = commons.DownloadOptions.Metadata; | 69 var _downloadOptions = commons.DownloadOptions.Metadata; |
70 var _body = null; | 70 var _body = null; |
71 | 71 |
72 if (request != null) { | 72 if (request != null) { |
73 _body = convert.JSON.encode((request).toJson()); | 73 _body = convert.JSON.encode((request).toJson()); |
74 } | 74 } |
75 if (projectId == null) { | 75 if (projectId == null) { |
76 throw new core.ArgumentError("Parameter projectId is required."); | 76 throw new core.ArgumentError("Parameter projectId is required."); |
77 } | 77 } |
78 | 78 |
79 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + ':allo
cateIds'; | 79 _url = 'v1/projects/' + |
| 80 commons.Escaper.ecapeVariable('$projectId') + |
| 81 ':allocateIds'; |
80 | 82 |
81 var _response = _requester.request(_url, | 83 var _response = _requester.request(_url, "POST", |
82 "POST", | 84 body: _body, |
83 body: _body, | 85 queryParams: _queryParams, |
84 queryParams: _queryParams, | 86 uploadOptions: _uploadOptions, |
85 uploadOptions: _uploadOptions, | 87 uploadMedia: _uploadMedia, |
86 uploadMedia: _uploadMedia, | 88 downloadOptions: _downloadOptions); |
87 downloadOptions: _downloadOptions); | |
88 return _response.then((data) => new AllocateIdsResponse.fromJson(data)); | 89 return _response.then((data) => new AllocateIdsResponse.fromJson(data)); |
89 } | 90 } |
90 | 91 |
91 /** | 92 /// Begins a new transaction. |
92 * Begins a new transaction. | 93 /// |
93 * | 94 /// [request] - The metadata request object. |
94 * [request] - The metadata request object. | 95 /// |
95 * | 96 /// Request parameters: |
96 * Request parameters: | 97 /// |
97 * | 98 /// [projectId] - The ID of the project against which to make the request. |
98 * [projectId] - The ID of the project against which to make the request. | 99 /// |
99 * | 100 /// Completes with a [BeginTransactionResponse]. |
100 * Completes with a [BeginTransactionResponse]. | 101 /// |
101 * | 102 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
102 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 103 /// an error. |
103 * error. | 104 /// |
104 * | 105 /// If the used [http.Client] completes with an error when making a REST |
105 * If the used [http.Client] completes with an error when making a REST call, | 106 /// call, this method will complete with the same error. |
106 * this method will complete with the same error. | 107 async.Future<BeginTransactionResponse> beginTransaction( |
107 */ | 108 BeginTransactionRequest request, core.String projectId) { |
108 async.Future<BeginTransactionResponse> beginTransaction(BeginTransactionReques
t request, core.String projectId) { | |
109 var _url = null; | 109 var _url = null; |
110 var _queryParams = new core.Map(); | 110 var _queryParams = new core.Map(); |
111 var _uploadMedia = null; | 111 var _uploadMedia = null; |
112 var _uploadOptions = null; | 112 var _uploadOptions = null; |
113 var _downloadOptions = commons.DownloadOptions.Metadata; | 113 var _downloadOptions = commons.DownloadOptions.Metadata; |
114 var _body = null; | 114 var _body = null; |
115 | 115 |
116 if (request != null) { | 116 if (request != null) { |
117 _body = convert.JSON.encode((request).toJson()); | 117 _body = convert.JSON.encode((request).toJson()); |
118 } | 118 } |
119 if (projectId == null) { | 119 if (projectId == null) { |
120 throw new core.ArgumentError("Parameter projectId is required."); | 120 throw new core.ArgumentError("Parameter projectId is required."); |
121 } | 121 } |
122 | 122 |
123 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + ':begi
nTransaction'; | 123 _url = 'v1/projects/' + |
| 124 commons.Escaper.ecapeVariable('$projectId') + |
| 125 ':beginTransaction'; |
124 | 126 |
125 var _response = _requester.request(_url, | 127 var _response = _requester.request(_url, "POST", |
126 "POST", | 128 body: _body, |
127 body: _body, | 129 queryParams: _queryParams, |
128 queryParams: _queryParams, | 130 uploadOptions: _uploadOptions, |
129 uploadOptions: _uploadOptions, | 131 uploadMedia: _uploadMedia, |
130 uploadMedia: _uploadMedia, | 132 downloadOptions: _downloadOptions); |
131 downloadOptions: _downloadOptions); | 133 return _response |
132 return _response.then((data) => new BeginTransactionResponse.fromJson(data))
; | 134 .then((data) => new BeginTransactionResponse.fromJson(data)); |
133 } | 135 } |
134 | 136 |
135 /** | 137 /// Commits a transaction, optionally creating, deleting or modifying some |
136 * Commits a transaction, optionally creating, deleting or modifying some | 138 /// entities. |
137 * entities. | 139 /// |
138 * | 140 /// [request] - The metadata request object. |
139 * [request] - The metadata request object. | 141 /// |
140 * | 142 /// Request parameters: |
141 * Request parameters: | 143 /// |
142 * | 144 /// [projectId] - The ID of the project against which to make the request. |
143 * [projectId] - The ID of the project against which to make the request. | 145 /// |
144 * | 146 /// Completes with a [CommitResponse]. |
145 * Completes with a [CommitResponse]. | 147 /// |
146 * | 148 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
147 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 149 /// an error. |
148 * error. | 150 /// |
149 * | 151 /// If the used [http.Client] completes with an error when making a REST |
150 * If the used [http.Client] completes with an error when making a REST call, | 152 /// call, this method will complete with the same error. |
151 * this method will complete with the same error. | 153 async.Future<CommitResponse> commit( |
152 */ | 154 CommitRequest request, core.String projectId) { |
153 async.Future<CommitResponse> commit(CommitRequest request, core.String project
Id) { | |
154 var _url = null; | 155 var _url = null; |
155 var _queryParams = new core.Map(); | 156 var _queryParams = new core.Map(); |
156 var _uploadMedia = null; | 157 var _uploadMedia = null; |
157 var _uploadOptions = null; | 158 var _uploadOptions = null; |
158 var _downloadOptions = commons.DownloadOptions.Metadata; | 159 var _downloadOptions = commons.DownloadOptions.Metadata; |
159 var _body = null; | 160 var _body = null; |
160 | 161 |
161 if (request != null) { | 162 if (request != null) { |
162 _body = convert.JSON.encode((request).toJson()); | 163 _body = convert.JSON.encode((request).toJson()); |
163 } | 164 } |
164 if (projectId == null) { | 165 if (projectId == null) { |
165 throw new core.ArgumentError("Parameter projectId is required."); | 166 throw new core.ArgumentError("Parameter projectId is required."); |
166 } | 167 } |
167 | 168 |
168 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + ':comm
it'; | 169 _url = 'v1/projects/' + |
| 170 commons.Escaper.ecapeVariable('$projectId') + |
| 171 ':commit'; |
169 | 172 |
170 var _response = _requester.request(_url, | 173 var _response = _requester.request(_url, "POST", |
171 "POST", | 174 body: _body, |
172 body: _body, | 175 queryParams: _queryParams, |
173 queryParams: _queryParams, | 176 uploadOptions: _uploadOptions, |
174 uploadOptions: _uploadOptions, | 177 uploadMedia: _uploadMedia, |
175 uploadMedia: _uploadMedia, | 178 downloadOptions: _downloadOptions); |
176 downloadOptions: _downloadOptions); | |
177 return _response.then((data) => new CommitResponse.fromJson(data)); | 179 return _response.then((data) => new CommitResponse.fromJson(data)); |
178 } | 180 } |
179 | 181 |
180 /** | 182 /// Looks up entities by key. |
181 * Looks up entities by key. | 183 /// |
182 * | 184 /// [request] - The metadata request object. |
183 * [request] - The metadata request object. | 185 /// |
184 * | 186 /// Request parameters: |
185 * Request parameters: | 187 /// |
186 * | 188 /// [projectId] - The ID of the project against which to make the request. |
187 * [projectId] - The ID of the project against which to make the request. | 189 /// |
188 * | 190 /// Completes with a [LookupResponse]. |
189 * Completes with a [LookupResponse]. | 191 /// |
190 * | 192 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
191 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 193 /// an error. |
192 * error. | 194 /// |
193 * | 195 /// If the used [http.Client] completes with an error when making a REST |
194 * If the used [http.Client] completes with an error when making a REST call, | 196 /// call, this method will complete with the same error. |
195 * this method will complete with the same error. | 197 async.Future<LookupResponse> lookup( |
196 */ | 198 LookupRequest request, core.String projectId) { |
197 async.Future<LookupResponse> lookup(LookupRequest request, core.String project
Id) { | |
198 var _url = null; | 199 var _url = null; |
199 var _queryParams = new core.Map(); | 200 var _queryParams = new core.Map(); |
200 var _uploadMedia = null; | 201 var _uploadMedia = null; |
201 var _uploadOptions = null; | 202 var _uploadOptions = null; |
202 var _downloadOptions = commons.DownloadOptions.Metadata; | 203 var _downloadOptions = commons.DownloadOptions.Metadata; |
203 var _body = null; | 204 var _body = null; |
204 | 205 |
205 if (request != null) { | 206 if (request != null) { |
206 _body = convert.JSON.encode((request).toJson()); | 207 _body = convert.JSON.encode((request).toJson()); |
207 } | 208 } |
208 if (projectId == null) { | 209 if (projectId == null) { |
209 throw new core.ArgumentError("Parameter projectId is required."); | 210 throw new core.ArgumentError("Parameter projectId is required."); |
210 } | 211 } |
211 | 212 |
212 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + ':look
up'; | 213 _url = 'v1/projects/' + |
| 214 commons.Escaper.ecapeVariable('$projectId') + |
| 215 ':lookup'; |
213 | 216 |
214 var _response = _requester.request(_url, | 217 var _response = _requester.request(_url, "POST", |
215 "POST", | 218 body: _body, |
216 body: _body, | 219 queryParams: _queryParams, |
217 queryParams: _queryParams, | 220 uploadOptions: _uploadOptions, |
218 uploadOptions: _uploadOptions, | 221 uploadMedia: _uploadMedia, |
219 uploadMedia: _uploadMedia, | 222 downloadOptions: _downloadOptions); |
220 downloadOptions: _downloadOptions); | |
221 return _response.then((data) => new LookupResponse.fromJson(data)); | 223 return _response.then((data) => new LookupResponse.fromJson(data)); |
222 } | 224 } |
223 | 225 |
224 /** | 226 /// Rolls back a transaction. |
225 * Rolls back a transaction. | 227 /// |
226 * | 228 /// [request] - The metadata request object. |
227 * [request] - The metadata request object. | 229 /// |
228 * | 230 /// Request parameters: |
229 * Request parameters: | 231 /// |
230 * | 232 /// [projectId] - The ID of the project against which to make the request. |
231 * [projectId] - The ID of the project against which to make the request. | 233 /// |
232 * | 234 /// Completes with a [RollbackResponse]. |
233 * Completes with a [RollbackResponse]. | 235 /// |
234 * | 236 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
235 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 237 /// an error. |
236 * error. | 238 /// |
237 * | 239 /// If the used [http.Client] completes with an error when making a REST |
238 * If the used [http.Client] completes with an error when making a REST call, | 240 /// call, this method will complete with the same error. |
239 * this method will complete with the same error. | 241 async.Future<RollbackResponse> rollback( |
240 */ | 242 RollbackRequest request, core.String projectId) { |
241 async.Future<RollbackResponse> rollback(RollbackRequest request, core.String p
rojectId) { | |
242 var _url = null; | 243 var _url = null; |
243 var _queryParams = new core.Map(); | 244 var _queryParams = new core.Map(); |
244 var _uploadMedia = null; | 245 var _uploadMedia = null; |
245 var _uploadOptions = null; | 246 var _uploadOptions = null; |
246 var _downloadOptions = commons.DownloadOptions.Metadata; | 247 var _downloadOptions = commons.DownloadOptions.Metadata; |
247 var _body = null; | 248 var _body = null; |
248 | 249 |
249 if (request != null) { | 250 if (request != null) { |
250 _body = convert.JSON.encode((request).toJson()); | 251 _body = convert.JSON.encode((request).toJson()); |
251 } | 252 } |
252 if (projectId == null) { | 253 if (projectId == null) { |
253 throw new core.ArgumentError("Parameter projectId is required."); | 254 throw new core.ArgumentError("Parameter projectId is required."); |
254 } | 255 } |
255 | 256 |
256 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + ':roll
back'; | 257 _url = 'v1/projects/' + |
| 258 commons.Escaper.ecapeVariable('$projectId') + |
| 259 ':rollback'; |
257 | 260 |
258 var _response = _requester.request(_url, | 261 var _response = _requester.request(_url, "POST", |
259 "POST", | 262 body: _body, |
260 body: _body, | 263 queryParams: _queryParams, |
261 queryParams: _queryParams, | 264 uploadOptions: _uploadOptions, |
262 uploadOptions: _uploadOptions, | 265 uploadMedia: _uploadMedia, |
263 uploadMedia: _uploadMedia, | 266 downloadOptions: _downloadOptions); |
264 downloadOptions: _downloadOptions); | |
265 return _response.then((data) => new RollbackResponse.fromJson(data)); | 267 return _response.then((data) => new RollbackResponse.fromJson(data)); |
266 } | 268 } |
267 | 269 |
268 /** | 270 /// Queries for entities. |
269 * Queries for entities. | 271 /// |
270 * | 272 /// [request] - The metadata request object. |
271 * [request] - The metadata request object. | 273 /// |
272 * | 274 /// Request parameters: |
273 * Request parameters: | 275 /// |
274 * | 276 /// [projectId] - The ID of the project against which to make the request. |
275 * [projectId] - The ID of the project against which to make the request. | 277 /// |
276 * | 278 /// Completes with a [RunQueryResponse]. |
277 * Completes with a [RunQueryResponse]. | 279 /// |
278 * | 280 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
279 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 281 /// an error. |
280 * error. | 282 /// |
281 * | 283 /// If the used [http.Client] completes with an error when making a REST |
282 * If the used [http.Client] completes with an error when making a REST call, | 284 /// call, this method will complete with the same error. |
283 * this method will complete with the same error. | 285 async.Future<RunQueryResponse> runQuery( |
284 */ | 286 RunQueryRequest request, core.String projectId) { |
285 async.Future<RunQueryResponse> runQuery(RunQueryRequest request, core.String p
rojectId) { | |
286 var _url = null; | 287 var _url = null; |
287 var _queryParams = new core.Map(); | 288 var _queryParams = new core.Map(); |
288 var _uploadMedia = null; | 289 var _uploadMedia = null; |
289 var _uploadOptions = null; | 290 var _uploadOptions = null; |
290 var _downloadOptions = commons.DownloadOptions.Metadata; | 291 var _downloadOptions = commons.DownloadOptions.Metadata; |
291 var _body = null; | 292 var _body = null; |
292 | 293 |
293 if (request != null) { | 294 if (request != null) { |
294 _body = convert.JSON.encode((request).toJson()); | 295 _body = convert.JSON.encode((request).toJson()); |
295 } | 296 } |
296 if (projectId == null) { | 297 if (projectId == null) { |
297 throw new core.ArgumentError("Parameter projectId is required."); | 298 throw new core.ArgumentError("Parameter projectId is required."); |
298 } | 299 } |
299 | 300 |
300 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + ':runQ
uery'; | 301 _url = 'v1/projects/' + |
| 302 commons.Escaper.ecapeVariable('$projectId') + |
| 303 ':runQuery'; |
301 | 304 |
302 var _response = _requester.request(_url, | 305 var _response = _requester.request(_url, "POST", |
303 "POST", | 306 body: _body, |
304 body: _body, | 307 queryParams: _queryParams, |
305 queryParams: _queryParams, | 308 uploadOptions: _uploadOptions, |
306 uploadOptions: _uploadOptions, | 309 uploadMedia: _uploadMedia, |
307 uploadMedia: _uploadMedia, | 310 downloadOptions: _downloadOptions); |
308 downloadOptions: _downloadOptions); | |
309 return _response.then((data) => new RunQueryResponse.fromJson(data)); | 311 return _response.then((data) => new RunQueryResponse.fromJson(data)); |
310 } | 312 } |
311 | |
312 } | 313 } |
313 | 314 |
314 | |
315 class ProjectsOperationsResourceApi { | 315 class ProjectsOperationsResourceApi { |
316 final commons.ApiRequester _requester; | 316 final commons.ApiRequester _requester; |
317 | 317 |
318 ProjectsOperationsResourceApi(commons.ApiRequester client) : | 318 ProjectsOperationsResourceApi(commons.ApiRequester client) |
319 _requester = client; | 319 : _requester = client; |
320 | 320 |
321 /** | 321 /// Starts asynchronous cancellation on a long-running operation. The server |
322 * Starts asynchronous cancellation on a long-running operation. The server | 322 /// makes a best effort to cancel the operation, but success is not |
323 * makes a best effort to cancel the operation, but success is not | 323 /// guaranteed. If the server doesn't support this method, it returns |
324 * guaranteed. If the server doesn't support this method, it returns | 324 /// `google.rpc.Code.UNIMPLEMENTED`. Clients can use |
325 * `google.rpc.Code.UNIMPLEMENTED`. Clients can use | 325 /// Operations.GetOperation or |
326 * Operations.GetOperation or | 326 /// other methods to check whether the cancellation succeeded or whether the |
327 * other methods to check whether the cancellation succeeded or whether the | 327 /// operation completed despite cancellation. On successful cancellation, |
328 * operation completed despite cancellation. On successful cancellation, | 328 /// the operation is not deleted; instead, it becomes an operation with |
329 * the operation is not deleted; instead, it becomes an operation with | 329 /// an Operation.error value with a google.rpc.Status.code of 1, |
330 * an Operation.error value with a google.rpc.Status.code of 1, | 330 /// corresponding to `Code.CANCELLED`. |
331 * corresponding to `Code.CANCELLED`. | 331 /// |
332 * | 332 /// Request parameters: |
333 * Request parameters: | 333 /// |
334 * | 334 /// [name] - The name of the operation resource to be cancelled. |
335 * [name] - The name of the operation resource to be cancelled. | 335 /// Value must have pattern "^projects/[^/]+/operations/[^/]+$". |
336 * Value must have pattern "^projects/[^/]+/operations/[^/]+$". | 336 /// |
337 * | 337 /// Completes with a [Empty]. |
338 * Completes with a [Empty]. | 338 /// |
339 * | 339 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
340 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 340 /// an error. |
341 * error. | 341 /// |
342 * | 342 /// If the used [http.Client] completes with an error when making a REST |
343 * If the used [http.Client] completes with an error when making a REST call, | 343 /// call, this method will complete with the same error. |
344 * this method will complete with the same error. | |
345 */ | |
346 async.Future<Empty> cancel(core.String name) { | 344 async.Future<Empty> cancel(core.String name) { |
347 var _url = null; | 345 var _url = null; |
348 var _queryParams = new core.Map(); | 346 var _queryParams = new core.Map(); |
349 var _uploadMedia = null; | 347 var _uploadMedia = null; |
350 var _uploadOptions = null; | 348 var _uploadOptions = null; |
351 var _downloadOptions = commons.DownloadOptions.Metadata; | 349 var _downloadOptions = commons.DownloadOptions.Metadata; |
352 var _body = null; | 350 var _body = null; |
353 | 351 |
354 if (name == null) { | 352 if (name == null) { |
355 throw new core.ArgumentError("Parameter name is required."); | 353 throw new core.ArgumentError("Parameter name is required."); |
356 } | 354 } |
357 | 355 |
358 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + ':cancel'; | 356 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + ':cancel'; |
359 | 357 |
360 var _response = _requester.request(_url, | 358 var _response = _requester.request(_url, "POST", |
361 "POST", | 359 body: _body, |
362 body: _body, | 360 queryParams: _queryParams, |
363 queryParams: _queryParams, | 361 uploadOptions: _uploadOptions, |
364 uploadOptions: _uploadOptions, | 362 uploadMedia: _uploadMedia, |
365 uploadMedia: _uploadMedia, | 363 downloadOptions: _downloadOptions); |
366 downloadOptions: _downloadOptions); | |
367 return _response.then((data) => new Empty.fromJson(data)); | 364 return _response.then((data) => new Empty.fromJson(data)); |
368 } | 365 } |
369 | 366 |
370 /** | 367 /// Deletes a long-running operation. This method indicates that the client |
371 * Deletes a long-running operation. This method indicates that the client is | 368 /// is |
372 * no longer interested in the operation result. It does not cancel the | 369 /// no longer interested in the operation result. It does not cancel the |
373 * operation. If the server doesn't support this method, it returns | 370 /// operation. If the server doesn't support this method, it returns |
374 * `google.rpc.Code.UNIMPLEMENTED`. | 371 /// `google.rpc.Code.UNIMPLEMENTED`. |
375 * | 372 /// |
376 * Request parameters: | 373 /// Request parameters: |
377 * | 374 /// |
378 * [name] - The name of the operation resource to be deleted. | 375 /// [name] - The name of the operation resource to be deleted. |
379 * Value must have pattern "^projects/[^/]+/operations/[^/]+$". | 376 /// Value must have pattern "^projects/[^/]+/operations/[^/]+$". |
380 * | 377 /// |
381 * Completes with a [Empty]. | 378 /// Completes with a [Empty]. |
382 * | 379 /// |
383 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 380 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
384 * error. | 381 /// an error. |
385 * | 382 /// |
386 * If the used [http.Client] completes with an error when making a REST call, | 383 /// If the used [http.Client] completes with an error when making a REST |
387 * this method will complete with the same error. | 384 /// call, this method will complete with the same error. |
388 */ | |
389 async.Future<Empty> delete(core.String name) { | 385 async.Future<Empty> delete(core.String name) { |
390 var _url = null; | 386 var _url = null; |
391 var _queryParams = new core.Map(); | 387 var _queryParams = new core.Map(); |
392 var _uploadMedia = null; | 388 var _uploadMedia = null; |
393 var _uploadOptions = null; | 389 var _uploadOptions = null; |
394 var _downloadOptions = commons.DownloadOptions.Metadata; | 390 var _downloadOptions = commons.DownloadOptions.Metadata; |
395 var _body = null; | 391 var _body = null; |
396 | 392 |
397 if (name == null) { | 393 if (name == null) { |
398 throw new core.ArgumentError("Parameter name is required."); | 394 throw new core.ArgumentError("Parameter name is required."); |
399 } | 395 } |
400 | 396 |
401 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); | 397 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); |
402 | 398 |
403 var _response = _requester.request(_url, | 399 var _response = _requester.request(_url, "DELETE", |
404 "DELETE", | 400 body: _body, |
405 body: _body, | 401 queryParams: _queryParams, |
406 queryParams: _queryParams, | 402 uploadOptions: _uploadOptions, |
407 uploadOptions: _uploadOptions, | 403 uploadMedia: _uploadMedia, |
408 uploadMedia: _uploadMedia, | 404 downloadOptions: _downloadOptions); |
409 downloadOptions: _downloadOptions); | |
410 return _response.then((data) => new Empty.fromJson(data)); | 405 return _response.then((data) => new Empty.fromJson(data)); |
411 } | 406 } |
412 | 407 |
413 /** | 408 /// Gets the latest state of a long-running operation. Clients can use this |
414 * Gets the latest state of a long-running operation. Clients can use this | 409 /// method to poll the operation result at intervals as recommended by the |
415 * method to poll the operation result at intervals as recommended by the API | 410 /// API |
416 * service. | 411 /// service. |
417 * | 412 /// |
418 * Request parameters: | 413 /// Request parameters: |
419 * | 414 /// |
420 * [name] - The name of the operation resource. | 415 /// [name] - The name of the operation resource. |
421 * Value must have pattern "^projects/[^/]+/operations/[^/]+$". | 416 /// Value must have pattern "^projects/[^/]+/operations/[^/]+$". |
422 * | 417 /// |
423 * Completes with a [GoogleLongrunningOperation]. | 418 /// Completes with a [GoogleLongrunningOperation]. |
424 * | 419 /// |
425 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 420 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
426 * error. | 421 /// an error. |
427 * | 422 /// |
428 * If the used [http.Client] completes with an error when making a REST call, | 423 /// If the used [http.Client] completes with an error when making a REST |
429 * this method will complete with the same error. | 424 /// call, this method will complete with the same error. |
430 */ | |
431 async.Future<GoogleLongrunningOperation> get(core.String name) { | 425 async.Future<GoogleLongrunningOperation> get(core.String name) { |
432 var _url = null; | 426 var _url = null; |
433 var _queryParams = new core.Map(); | 427 var _queryParams = new core.Map(); |
434 var _uploadMedia = null; | 428 var _uploadMedia = null; |
435 var _uploadOptions = null; | 429 var _uploadOptions = null; |
436 var _downloadOptions = commons.DownloadOptions.Metadata; | 430 var _downloadOptions = commons.DownloadOptions.Metadata; |
437 var _body = null; | 431 var _body = null; |
438 | 432 |
439 if (name == null) { | 433 if (name == null) { |
440 throw new core.ArgumentError("Parameter name is required."); | 434 throw new core.ArgumentError("Parameter name is required."); |
441 } | 435 } |
442 | 436 |
443 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); | 437 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); |
444 | 438 |
445 var _response = _requester.request(_url, | 439 var _response = _requester.request(_url, "GET", |
446 "GET", | 440 body: _body, |
447 body: _body, | 441 queryParams: _queryParams, |
448 queryParams: _queryParams, | 442 uploadOptions: _uploadOptions, |
449 uploadOptions: _uploadOptions, | 443 uploadMedia: _uploadMedia, |
450 uploadMedia: _uploadMedia, | 444 downloadOptions: _downloadOptions); |
451 downloadOptions: _downloadOptions); | 445 return _response |
452 return _response.then((data) => new GoogleLongrunningOperation.fromJson(data
)); | 446 .then((data) => new GoogleLongrunningOperation.fromJson(data)); |
453 } | 447 } |
454 | 448 |
455 /** | 449 /// Lists operations that match the specified filter in the request. If the |
456 * Lists operations that match the specified filter in the request. If the | 450 /// server doesn't support this method, it returns `UNIMPLEMENTED`. |
457 * server doesn't support this method, it returns `UNIMPLEMENTED`. | 451 /// |
458 * | 452 /// NOTE: the `name` binding allows API services to override the binding |
459 * NOTE: the `name` binding allows API services to override the binding | 453 /// to use different resource name schemes, such as `users / * /operations`. |
460 * to use different resource name schemes, such as `users / * /operations`. To | 454 /// To |
461 * override the binding, API services can add a binding such as | 455 /// override the binding, API services can add a binding such as |
462 * `"/v1/{name=users / * }/operations"` to their service configuration. | 456 /// `"/v1/{name=users / * }/operations"` to their service configuration. |
463 * For backwards compatibility, the default name includes the operations | 457 /// For backwards compatibility, the default name includes the operations |
464 * collection id, however overriding users must ensure the name binding | 458 /// collection id, however overriding users must ensure the name binding |
465 * is the parent resource, without the operations collection id. | 459 /// is the parent resource, without the operations collection id. |
466 * | 460 /// |
467 * Request parameters: | 461 /// Request parameters: |
468 * | 462 /// |
469 * [name] - The name of the operation's parent resource. | 463 /// [name] - The name of the operation's parent resource. |
470 * Value must have pattern "^projects/[^/]+$". | 464 /// Value must have pattern "^projects/[^/]+$". |
471 * | 465 /// |
472 * [pageSize] - The standard list page size. | 466 /// [pageSize] - The standard list page size. |
473 * | 467 /// |
474 * [filter] - The standard list filter. | 468 /// [filter] - The standard list filter. |
475 * | 469 /// |
476 * [pageToken] - The standard list page token. | 470 /// [pageToken] - The standard list page token. |
477 * | 471 /// |
478 * Completes with a [GoogleLongrunningListOperationsResponse]. | 472 /// Completes with a [GoogleLongrunningListOperationsResponse]. |
479 * | 473 /// |
480 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 474 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
481 * error. | 475 /// an error. |
482 * | 476 /// |
483 * If the used [http.Client] completes with an error when making a REST call, | 477 /// If the used [http.Client] completes with an error when making a REST |
484 * this method will complete with the same error. | 478 /// call, this method will complete with the same error. |
485 */ | 479 async.Future<GoogleLongrunningListOperationsResponse> list(core.String name, |
486 async.Future<GoogleLongrunningListOperationsResponse> list(core.String name, {
core.int pageSize, core.String filter, core.String pageToken}) { | 480 {core.int pageSize, core.String filter, core.String pageToken}) { |
487 var _url = null; | 481 var _url = null; |
488 var _queryParams = new core.Map(); | 482 var _queryParams = new core.Map(); |
489 var _uploadMedia = null; | 483 var _uploadMedia = null; |
490 var _uploadOptions = null; | 484 var _uploadOptions = null; |
491 var _downloadOptions = commons.DownloadOptions.Metadata; | 485 var _downloadOptions = commons.DownloadOptions.Metadata; |
492 var _body = null; | 486 var _body = null; |
493 | 487 |
494 if (name == null) { | 488 if (name == null) { |
495 throw new core.ArgumentError("Parameter name is required."); | 489 throw new core.ArgumentError("Parameter name is required."); |
496 } | 490 } |
497 if (pageSize != null) { | 491 if (pageSize != null) { |
498 _queryParams["pageSize"] = ["${pageSize}"]; | 492 _queryParams["pageSize"] = ["${pageSize}"]; |
499 } | 493 } |
500 if (filter != null) { | 494 if (filter != null) { |
501 _queryParams["filter"] = [filter]; | 495 _queryParams["filter"] = [filter]; |
502 } | 496 } |
503 if (pageToken != null) { | 497 if (pageToken != null) { |
504 _queryParams["pageToken"] = [pageToken]; | 498 _queryParams["pageToken"] = [pageToken]; |
505 } | 499 } |
506 | 500 |
507 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + '/operations
'; | 501 _url = |
| 502 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + '/operations'; |
508 | 503 |
509 var _response = _requester.request(_url, | 504 var _response = _requester.request(_url, "GET", |
510 "GET", | 505 body: _body, |
511 body: _body, | 506 queryParams: _queryParams, |
512 queryParams: _queryParams, | 507 uploadOptions: _uploadOptions, |
513 uploadOptions: _uploadOptions, | 508 uploadMedia: _uploadMedia, |
514 uploadMedia: _uploadMedia, | 509 downloadOptions: _downloadOptions); |
515 downloadOptions: _downloadOptions); | 510 return _response.then( |
516 return _response.then((data) => new GoogleLongrunningListOperationsResponse.
fromJson(data)); | 511 (data) => new GoogleLongrunningListOperationsResponse.fromJson(data)); |
517 } | 512 } |
518 | |
519 } | 513 } |
520 | 514 |
521 | 515 /// The request for Datastore.AllocateIds. |
522 | |
523 /** The request for Datastore.AllocateIds. */ | |
524 class AllocateIdsRequest { | 516 class AllocateIdsRequest { |
525 /** | 517 /// A list of keys with incomplete key paths for which to allocate IDs. |
526 * A list of keys with incomplete key paths for which to allocate IDs. | 518 /// No key may be reserved/read-only. |
527 * No key may be reserved/read-only. | |
528 */ | |
529 core.List<Key> keys; | 519 core.List<Key> keys; |
530 | 520 |
531 AllocateIdsRequest(); | 521 AllocateIdsRequest(); |
532 | 522 |
533 AllocateIdsRequest.fromJson(core.Map _json) { | 523 AllocateIdsRequest.fromJson(core.Map _json) { |
534 if (_json.containsKey("keys")) { | 524 if (_json.containsKey("keys")) { |
535 keys = _json["keys"].map((value) => new Key.fromJson(value)).toList(); | 525 keys = _json["keys"].map((value) => new Key.fromJson(value)).toList(); |
536 } | 526 } |
537 } | 527 } |
538 | 528 |
539 core.Map<core.String, core.Object> toJson() { | 529 core.Map<core.String, core.Object> toJson() { |
540 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 530 final core.Map<core.String, core.Object> _json = |
| 531 new core.Map<core.String, core.Object>(); |
541 if (keys != null) { | 532 if (keys != null) { |
542 _json["keys"] = keys.map((value) => (value).toJson()).toList(); | 533 _json["keys"] = keys.map((value) => (value).toJson()).toList(); |
543 } | 534 } |
544 return _json; | 535 return _json; |
545 } | 536 } |
546 } | 537 } |
547 | 538 |
548 /** The response for Datastore.AllocateIds. */ | 539 /// The response for Datastore.AllocateIds. |
549 class AllocateIdsResponse { | 540 class AllocateIdsResponse { |
550 /** | 541 /// The keys specified in the request (in the same order), each with |
551 * The keys specified in the request (in the same order), each with | 542 /// its key path completed with a newly allocated ID. |
552 * its key path completed with a newly allocated ID. | |
553 */ | |
554 core.List<Key> keys; | 543 core.List<Key> keys; |
555 | 544 |
556 AllocateIdsResponse(); | 545 AllocateIdsResponse(); |
557 | 546 |
558 AllocateIdsResponse.fromJson(core.Map _json) { | 547 AllocateIdsResponse.fromJson(core.Map _json) { |
559 if (_json.containsKey("keys")) { | 548 if (_json.containsKey("keys")) { |
560 keys = _json["keys"].map((value) => new Key.fromJson(value)).toList(); | 549 keys = _json["keys"].map((value) => new Key.fromJson(value)).toList(); |
561 } | 550 } |
562 } | 551 } |
563 | 552 |
564 core.Map<core.String, core.Object> toJson() { | 553 core.Map<core.String, core.Object> toJson() { |
565 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 554 final core.Map<core.String, core.Object> _json = |
| 555 new core.Map<core.String, core.Object>(); |
566 if (keys != null) { | 556 if (keys != null) { |
567 _json["keys"] = keys.map((value) => (value).toJson()).toList(); | 557 _json["keys"] = keys.map((value) => (value).toJson()).toList(); |
568 } | 558 } |
569 return _json; | 559 return _json; |
570 } | 560 } |
571 } | 561 } |
572 | 562 |
573 /** An array value. */ | 563 /// An array value. |
574 class ArrayValue { | 564 class ArrayValue { |
575 /** | 565 /// Values in the array. |
576 * Values in the array. | 566 /// The order of this array may not be preserved if it contains a mix of |
577 * The order of this array may not be preserved if it contains a mix of | 567 /// indexed and unindexed values. |
578 * indexed and unindexed values. | |
579 */ | |
580 core.List<Value> values; | 568 core.List<Value> values; |
581 | 569 |
582 ArrayValue(); | 570 ArrayValue(); |
583 | 571 |
584 ArrayValue.fromJson(core.Map _json) { | 572 ArrayValue.fromJson(core.Map _json) { |
585 if (_json.containsKey("values")) { | 573 if (_json.containsKey("values")) { |
586 values = _json["values"].map((value) => new Value.fromJson(value)).toList(
); | 574 values = |
| 575 _json["values"].map((value) => new Value.fromJson(value)).toList(); |
587 } | 576 } |
588 } | 577 } |
589 | 578 |
590 core.Map<core.String, core.Object> toJson() { | 579 core.Map<core.String, core.Object> toJson() { |
591 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 580 final core.Map<core.String, core.Object> _json = |
| 581 new core.Map<core.String, core.Object>(); |
592 if (values != null) { | 582 if (values != null) { |
593 _json["values"] = values.map((value) => (value).toJson()).toList(); | 583 _json["values"] = values.map((value) => (value).toJson()).toList(); |
594 } | 584 } |
595 return _json; | 585 return _json; |
596 } | 586 } |
597 } | 587 } |
598 | 588 |
599 /** The request for Datastore.BeginTransaction. */ | 589 /// The request for Datastore.BeginTransaction. |
600 class BeginTransactionRequest { | 590 class BeginTransactionRequest { |
601 /** Options for a new transaction. */ | 591 /// Options for a new transaction. |
602 TransactionOptions transactionOptions; | 592 TransactionOptions transactionOptions; |
603 | 593 |
604 BeginTransactionRequest(); | 594 BeginTransactionRequest(); |
605 | 595 |
606 BeginTransactionRequest.fromJson(core.Map _json) { | 596 BeginTransactionRequest.fromJson(core.Map _json) { |
607 if (_json.containsKey("transactionOptions")) { | 597 if (_json.containsKey("transactionOptions")) { |
608 transactionOptions = new TransactionOptions.fromJson(_json["transactionOpt
ions"]); | 598 transactionOptions = |
| 599 new TransactionOptions.fromJson(_json["transactionOptions"]); |
609 } | 600 } |
610 } | 601 } |
611 | 602 |
612 core.Map<core.String, core.Object> toJson() { | 603 core.Map<core.String, core.Object> toJson() { |
613 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 604 final core.Map<core.String, core.Object> _json = |
| 605 new core.Map<core.String, core.Object>(); |
614 if (transactionOptions != null) { | 606 if (transactionOptions != null) { |
615 _json["transactionOptions"] = (transactionOptions).toJson(); | 607 _json["transactionOptions"] = (transactionOptions).toJson(); |
616 } | 608 } |
617 return _json; | 609 return _json; |
618 } | 610 } |
619 } | 611 } |
620 | 612 |
621 /** The response for Datastore.BeginTransaction. */ | 613 /// The response for Datastore.BeginTransaction. |
622 class BeginTransactionResponse { | 614 class BeginTransactionResponse { |
623 /** The transaction identifier (always present). */ | 615 /// The transaction identifier (always present). |
624 core.String transaction; | 616 core.String transaction; |
625 core.List<core.int> get transactionAsBytes { | 617 core.List<core.int> get transactionAsBytes { |
626 return convert.BASE64.decode(transaction); | 618 return convert.BASE64.decode(transaction); |
627 } | 619 } |
628 | 620 |
629 void set transactionAsBytes(core.List<core.int> _bytes) { | 621 void set transactionAsBytes(core.List<core.int> _bytes) { |
630 transaction = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll(
"+", "-"); | 622 transaction = |
| 623 convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-"); |
631 } | 624 } |
632 | 625 |
633 BeginTransactionResponse(); | 626 BeginTransactionResponse(); |
634 | 627 |
635 BeginTransactionResponse.fromJson(core.Map _json) { | 628 BeginTransactionResponse.fromJson(core.Map _json) { |
636 if (_json.containsKey("transaction")) { | 629 if (_json.containsKey("transaction")) { |
637 transaction = _json["transaction"]; | 630 transaction = _json["transaction"]; |
638 } | 631 } |
639 } | 632 } |
640 | 633 |
641 core.Map<core.String, core.Object> toJson() { | 634 core.Map<core.String, core.Object> toJson() { |
642 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 635 final core.Map<core.String, core.Object> _json = |
| 636 new core.Map<core.String, core.Object>(); |
643 if (transaction != null) { | 637 if (transaction != null) { |
644 _json["transaction"] = transaction; | 638 _json["transaction"] = transaction; |
645 } | 639 } |
646 return _json; | 640 return _json; |
647 } | 641 } |
648 } | 642 } |
649 | 643 |
650 /** The request for Datastore.Commit. */ | 644 /// The request for Datastore.Commit. |
651 class CommitRequest { | 645 class CommitRequest { |
652 /** | 646 /// The type of commit to perform. Defaults to `TRANSACTIONAL`. |
653 * The type of commit to perform. Defaults to `TRANSACTIONAL`. | 647 /// Possible string values are: |
654 * Possible string values are: | 648 /// - "MODE_UNSPECIFIED" : Unspecified. This value must not be used. |
655 * - "MODE_UNSPECIFIED" : Unspecified. This value must not be used. | 649 /// - "TRANSACTIONAL" : Transactional: The mutations are either all applied, |
656 * - "TRANSACTIONAL" : Transactional: The mutations are either all applied, or | 650 /// or none are applied. |
657 * none are applied. | 651 /// Learn about transactions |
658 * Learn about transactions | 652 /// [here](https://cloud.google.com/datastore/docs/concepts/transactions). |
659 * [here](https://cloud.google.com/datastore/docs/concepts/transactions). | 653 /// - "NON_TRANSACTIONAL" : Non-transactional: The mutations may not apply as |
660 * - "NON_TRANSACTIONAL" : Non-transactional: The mutations may not apply as | 654 /// all or none. |
661 * all or none. | |
662 */ | |
663 core.String mode; | 655 core.String mode; |
664 /** | 656 |
665 * The mutations to perform. | 657 /// The mutations to perform. |
666 * | 658 /// |
667 * When mode is `TRANSACTIONAL`, mutations affecting a single entity are | 659 /// When mode is `TRANSACTIONAL`, mutations affecting a single entity are |
668 * applied in order. The following sequences of mutations affecting a single | 660 /// applied in order. The following sequences of mutations affecting a single |
669 * entity are not permitted in a single `Commit` request: | 661 /// entity are not permitted in a single `Commit` request: |
670 * | 662 /// |
671 * - `insert` followed by `insert` | 663 /// - `insert` followed by `insert` |
672 * - `update` followed by `insert` | 664 /// - `update` followed by `insert` |
673 * - `upsert` followed by `insert` | 665 /// - `upsert` followed by `insert` |
674 * - `delete` followed by `update` | 666 /// - `delete` followed by `update` |
675 * | 667 /// |
676 * When mode is `NON_TRANSACTIONAL`, no two mutations may affect a single | 668 /// When mode is `NON_TRANSACTIONAL`, no two mutations may affect a single |
677 * entity. | 669 /// entity. |
678 */ | |
679 core.List<Mutation> mutations; | 670 core.List<Mutation> mutations; |
680 /** | 671 |
681 * The identifier of the transaction associated with the commit. A | 672 /// The identifier of the transaction associated with the commit. A |
682 * transaction identifier is returned by a call to | 673 /// transaction identifier is returned by a call to |
683 * Datastore.BeginTransaction. | 674 /// Datastore.BeginTransaction. |
684 */ | |
685 core.String transaction; | 675 core.String transaction; |
686 core.List<core.int> get transactionAsBytes { | 676 core.List<core.int> get transactionAsBytes { |
687 return convert.BASE64.decode(transaction); | 677 return convert.BASE64.decode(transaction); |
688 } | 678 } |
689 | 679 |
690 void set transactionAsBytes(core.List<core.int> _bytes) { | 680 void set transactionAsBytes(core.List<core.int> _bytes) { |
691 transaction = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll(
"+", "-"); | 681 transaction = |
| 682 convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-"); |
692 } | 683 } |
693 | 684 |
694 CommitRequest(); | 685 CommitRequest(); |
695 | 686 |
696 CommitRequest.fromJson(core.Map _json) { | 687 CommitRequest.fromJson(core.Map _json) { |
697 if (_json.containsKey("mode")) { | 688 if (_json.containsKey("mode")) { |
698 mode = _json["mode"]; | 689 mode = _json["mode"]; |
699 } | 690 } |
700 if (_json.containsKey("mutations")) { | 691 if (_json.containsKey("mutations")) { |
701 mutations = _json["mutations"].map((value) => new Mutation.fromJson(value)
).toList(); | 692 mutations = _json["mutations"] |
| 693 .map((value) => new Mutation.fromJson(value)) |
| 694 .toList(); |
702 } | 695 } |
703 if (_json.containsKey("transaction")) { | 696 if (_json.containsKey("transaction")) { |
704 transaction = _json["transaction"]; | 697 transaction = _json["transaction"]; |
705 } | 698 } |
706 } | 699 } |
707 | 700 |
708 core.Map<core.String, core.Object> toJson() { | 701 core.Map<core.String, core.Object> toJson() { |
709 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 702 final core.Map<core.String, core.Object> _json = |
| 703 new core.Map<core.String, core.Object>(); |
710 if (mode != null) { | 704 if (mode != null) { |
711 _json["mode"] = mode; | 705 _json["mode"] = mode; |
712 } | 706 } |
713 if (mutations != null) { | 707 if (mutations != null) { |
714 _json["mutations"] = mutations.map((value) => (value).toJson()).toList(); | 708 _json["mutations"] = mutations.map((value) => (value).toJson()).toList(); |
715 } | 709 } |
716 if (transaction != null) { | 710 if (transaction != null) { |
717 _json["transaction"] = transaction; | 711 _json["transaction"] = transaction; |
718 } | 712 } |
719 return _json; | 713 return _json; |
720 } | 714 } |
721 } | 715 } |
722 | 716 |
723 /** The response for Datastore.Commit. */ | 717 /// The response for Datastore.Commit. |
724 class CommitResponse { | 718 class CommitResponse { |
725 /** | 719 /// The number of index entries updated during the commit, or zero if none |
726 * The number of index entries updated during the commit, or zero if none were | 720 /// were |
727 * updated. | 721 /// updated. |
728 */ | |
729 core.int indexUpdates; | 722 core.int indexUpdates; |
730 /** | 723 |
731 * The result of performing the mutations. | 724 /// The result of performing the mutations. |
732 * The i-th mutation result corresponds to the i-th mutation in the request. | 725 /// The i-th mutation result corresponds to the i-th mutation in the request. |
733 */ | |
734 core.List<MutationResult> mutationResults; | 726 core.List<MutationResult> mutationResults; |
735 | 727 |
736 CommitResponse(); | 728 CommitResponse(); |
737 | 729 |
738 CommitResponse.fromJson(core.Map _json) { | 730 CommitResponse.fromJson(core.Map _json) { |
739 if (_json.containsKey("indexUpdates")) { | 731 if (_json.containsKey("indexUpdates")) { |
740 indexUpdates = _json["indexUpdates"]; | 732 indexUpdates = _json["indexUpdates"]; |
741 } | 733 } |
742 if (_json.containsKey("mutationResults")) { | 734 if (_json.containsKey("mutationResults")) { |
743 mutationResults = _json["mutationResults"].map((value) => new MutationResu
lt.fromJson(value)).toList(); | 735 mutationResults = _json["mutationResults"] |
| 736 .map((value) => new MutationResult.fromJson(value)) |
| 737 .toList(); |
744 } | 738 } |
745 } | 739 } |
746 | 740 |
747 core.Map<core.String, core.Object> toJson() { | 741 core.Map<core.String, core.Object> toJson() { |
748 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 742 final core.Map<core.String, core.Object> _json = |
| 743 new core.Map<core.String, core.Object>(); |
749 if (indexUpdates != null) { | 744 if (indexUpdates != null) { |
750 _json["indexUpdates"] = indexUpdates; | 745 _json["indexUpdates"] = indexUpdates; |
751 } | 746 } |
752 if (mutationResults != null) { | 747 if (mutationResults != null) { |
753 _json["mutationResults"] = mutationResults.map((value) => (value).toJson()
).toList(); | 748 _json["mutationResults"] = |
| 749 mutationResults.map((value) => (value).toJson()).toList(); |
754 } | 750 } |
755 return _json; | 751 return _json; |
756 } | 752 } |
757 } | 753 } |
758 | 754 |
759 /** A filter that merges multiple other filters using the given operator. */ | 755 /// A filter that merges multiple other filters using the given operator. |
760 class CompositeFilter { | 756 class CompositeFilter { |
761 /** | 757 /// The list of filters to combine. |
762 * The list of filters to combine. | 758 /// Must contain at least one filter. |
763 * Must contain at least one filter. | |
764 */ | |
765 core.List<Filter> filters; | 759 core.List<Filter> filters; |
766 /** | 760 |
767 * The operator for combining multiple filters. | 761 /// The operator for combining multiple filters. |
768 * Possible string values are: | 762 /// Possible string values are: |
769 * - "OPERATOR_UNSPECIFIED" : Unspecified. This value must not be used. | 763 /// - "OPERATOR_UNSPECIFIED" : Unspecified. This value must not be used. |
770 * - "AND" : The results are required to satisfy each of the combined filters. | 764 /// - "AND" : The results are required to satisfy each of the combined |
771 */ | 765 /// filters. |
772 core.String op; | 766 core.String op; |
773 | 767 |
774 CompositeFilter(); | 768 CompositeFilter(); |
775 | 769 |
776 CompositeFilter.fromJson(core.Map _json) { | 770 CompositeFilter.fromJson(core.Map _json) { |
777 if (_json.containsKey("filters")) { | 771 if (_json.containsKey("filters")) { |
778 filters = _json["filters"].map((value) => new Filter.fromJson(value)).toLi
st(); | 772 filters = |
| 773 _json["filters"].map((value) => new Filter.fromJson(value)).toList(); |
779 } | 774 } |
780 if (_json.containsKey("op")) { | 775 if (_json.containsKey("op")) { |
781 op = _json["op"]; | 776 op = _json["op"]; |
782 } | 777 } |
783 } | 778 } |
784 | 779 |
785 core.Map<core.String, core.Object> toJson() { | 780 core.Map<core.String, core.Object> toJson() { |
786 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 781 final core.Map<core.String, core.Object> _json = |
| 782 new core.Map<core.String, core.Object>(); |
787 if (filters != null) { | 783 if (filters != null) { |
788 _json["filters"] = filters.map((value) => (value).toJson()).toList(); | 784 _json["filters"] = filters.map((value) => (value).toJson()).toList(); |
789 } | 785 } |
790 if (op != null) { | 786 if (op != null) { |
791 _json["op"] = op; | 787 _json["op"] = op; |
792 } | 788 } |
793 return _json; | 789 return _json; |
794 } | 790 } |
795 } | 791 } |
796 | 792 |
797 /** | 793 /// A generic empty message that you can re-use to avoid defining duplicated |
798 * A generic empty message that you can re-use to avoid defining duplicated | 794 /// empty messages in your APIs. A typical example is to use it as the request |
799 * empty messages in your APIs. A typical example is to use it as the request | 795 /// or the response type of an API method. For instance: |
800 * or the response type of an API method. For instance: | 796 /// |
801 * | 797 /// service Foo { |
802 * service Foo { | 798 /// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); |
803 * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); | 799 /// } |
804 * } | 800 /// |
805 * | 801 /// The JSON representation for `Empty` is empty JSON object `{}`. |
806 * The JSON representation for `Empty` is empty JSON object `{}`. | |
807 */ | |
808 class Empty { | 802 class Empty { |
809 | |
810 Empty(); | 803 Empty(); |
811 | 804 |
812 Empty.fromJson(core.Map _json) { | 805 Empty.fromJson(core.Map _json) {} |
813 } | |
814 | 806 |
815 core.Map<core.String, core.Object> toJson() { | 807 core.Map<core.String, core.Object> toJson() { |
816 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 808 final core.Map<core.String, core.Object> _json = |
| 809 new core.Map<core.String, core.Object>(); |
817 return _json; | 810 return _json; |
818 } | 811 } |
819 } | 812 } |
820 | 813 |
821 /** | 814 /// A Datastore data object. |
822 * A Datastore data object. | 815 /// |
823 * | 816 /// An entity is limited to 1 megabyte when stored. That _roughly_ |
824 * An entity is limited to 1 megabyte when stored. That _roughly_ | 817 /// corresponds to a limit of 1 megabyte for the serialized form of this |
825 * corresponds to a limit of 1 megabyte for the serialized form of this | 818 /// message. |
826 * message. | |
827 */ | |
828 class Entity { | 819 class Entity { |
829 /** | 820 /// The entity's key. |
830 * The entity's key. | 821 /// |
831 * | 822 /// An entity must have a key, unless otherwise documented (for example, |
832 * An entity must have a key, unless otherwise documented (for example, | 823 /// an entity in `Value.entity_value` may have no key). |
833 * an entity in `Value.entity_value` may have no key). | 824 /// An entity's kind is its key path's last element's kind, |
834 * An entity's kind is its key path's last element's kind, | 825 /// or null if it has no key. |
835 * or null if it has no key. | |
836 */ | |
837 Key key; | 826 Key key; |
838 /** | 827 |
839 * The entity's properties. | 828 /// The entity's properties. |
840 * The map's keys are property names. | 829 /// The map's keys are property names. |
841 * A property name matching regex `__.*__` is reserved. | 830 /// A property name matching regex `__.*__` is reserved. |
842 * A reserved property name is forbidden in certain documented contexts. | 831 /// A reserved property name is forbidden in certain documented contexts. |
843 * The name must not contain more than 500 characters. | 832 /// The name must not contain more than 500 characters. |
844 * The name cannot be `""`. | 833 /// The name cannot be `""`. |
845 */ | |
846 core.Map<core.String, Value> properties; | 834 core.Map<core.String, Value> properties; |
847 | 835 |
848 Entity(); | 836 Entity(); |
849 | 837 |
850 Entity.fromJson(core.Map _json) { | 838 Entity.fromJson(core.Map _json) { |
851 if (_json.containsKey("key")) { | 839 if (_json.containsKey("key")) { |
852 key = new Key.fromJson(_json["key"]); | 840 key = new Key.fromJson(_json["key"]); |
853 } | 841 } |
854 if (_json.containsKey("properties")) { | 842 if (_json.containsKey("properties")) { |
855 properties = commons.mapMap<core.Map<core.String, core.Object>, Value>(_js
on["properties"], (core.Map<core.String, core.Object> item) => new Value.fromJso
n(item)); | 843 properties = commons.mapMap<core.Map<core.String, core.Object>, Value>( |
| 844 _json["properties"], |
| 845 (core.Map<core.String, core.Object> item) => |
| 846 new Value.fromJson(item)); |
856 } | 847 } |
857 } | 848 } |
858 | 849 |
859 core.Map<core.String, core.Object> toJson() { | 850 core.Map<core.String, core.Object> toJson() { |
860 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 851 final core.Map<core.String, core.Object> _json = |
| 852 new core.Map<core.String, core.Object>(); |
861 if (key != null) { | 853 if (key != null) { |
862 _json["key"] = (key).toJson(); | 854 _json["key"] = (key).toJson(); |
863 } | 855 } |
864 if (properties != null) { | 856 if (properties != null) { |
865 _json["properties"] = commons.mapMap<Value, core.Map<core.String, core.Obj
ect>>(properties, (Value item) => (item).toJson()); | 857 _json["properties"] = |
| 858 commons.mapMap<Value, core.Map<core.String, core.Object>>( |
| 859 properties, (Value item) => (item).toJson()); |
866 } | 860 } |
867 return _json; | 861 return _json; |
868 } | 862 } |
869 } | 863 } |
870 | 864 |
871 /** The result of fetching an entity from Datastore. */ | 865 /// The result of fetching an entity from Datastore. |
872 class EntityResult { | 866 class EntityResult { |
873 /** | 867 /// A cursor that points to the position after the result entity. |
874 * A cursor that points to the position after the result entity. | 868 /// Set only when the `EntityResult` is part of a `QueryResultBatch` message. |
875 * Set only when the `EntityResult` is part of a `QueryResultBatch` message. | |
876 */ | |
877 core.String cursor; | 869 core.String cursor; |
878 core.List<core.int> get cursorAsBytes { | 870 core.List<core.int> get cursorAsBytes { |
879 return convert.BASE64.decode(cursor); | 871 return convert.BASE64.decode(cursor); |
880 } | 872 } |
881 | 873 |
882 void set cursorAsBytes(core.List<core.int> _bytes) { | 874 void set cursorAsBytes(core.List<core.int> _bytes) { |
883 cursor = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+",
"-"); | 875 cursor = |
| 876 convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-"); |
884 } | 877 } |
885 /** The resulting entity. */ | 878 |
| 879 /// The resulting entity. |
886 Entity entity; | 880 Entity entity; |
887 /** | 881 |
888 * The version of the entity, a strictly positive number that monotonically | 882 /// The version of the entity, a strictly positive number that monotonically |
889 * increases with changes to the entity. | 883 /// increases with changes to the entity. |
890 * | 884 /// |
891 * This field is set for `FULL` entity | 885 /// This field is set for `FULL` entity |
892 * results. | 886 /// results. |
893 * | 887 /// |
894 * For missing entities in `LookupResponse`, this | 888 /// For missing entities in `LookupResponse`, this |
895 * is the version of the snapshot that was used to look up the entity, and it | 889 /// is the version of the snapshot that was used to look up the entity, and |
896 * is always set except for eventually consistent reads. | 890 /// it |
897 */ | 891 /// is always set except for eventually consistent reads. |
898 core.String version; | 892 core.String version; |
899 | 893 |
900 EntityResult(); | 894 EntityResult(); |
901 | 895 |
902 EntityResult.fromJson(core.Map _json) { | 896 EntityResult.fromJson(core.Map _json) { |
903 if (_json.containsKey("cursor")) { | 897 if (_json.containsKey("cursor")) { |
904 cursor = _json["cursor"]; | 898 cursor = _json["cursor"]; |
905 } | 899 } |
906 if (_json.containsKey("entity")) { | 900 if (_json.containsKey("entity")) { |
907 entity = new Entity.fromJson(_json["entity"]); | 901 entity = new Entity.fromJson(_json["entity"]); |
908 } | 902 } |
909 if (_json.containsKey("version")) { | 903 if (_json.containsKey("version")) { |
910 version = _json["version"]; | 904 version = _json["version"]; |
911 } | 905 } |
912 } | 906 } |
913 | 907 |
914 core.Map<core.String, core.Object> toJson() { | 908 core.Map<core.String, core.Object> toJson() { |
915 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 909 final core.Map<core.String, core.Object> _json = |
| 910 new core.Map<core.String, core.Object>(); |
916 if (cursor != null) { | 911 if (cursor != null) { |
917 _json["cursor"] = cursor; | 912 _json["cursor"] = cursor; |
918 } | 913 } |
919 if (entity != null) { | 914 if (entity != null) { |
920 _json["entity"] = (entity).toJson(); | 915 _json["entity"] = (entity).toJson(); |
921 } | 916 } |
922 if (version != null) { | 917 if (version != null) { |
923 _json["version"] = version; | 918 _json["version"] = version; |
924 } | 919 } |
925 return _json; | 920 return _json; |
926 } | 921 } |
927 } | 922 } |
928 | 923 |
929 /** A holder for any type of filter. */ | 924 /// A holder for any type of filter. |
930 class Filter { | 925 class Filter { |
931 /** A composite filter. */ | 926 /// A composite filter. |
932 CompositeFilter compositeFilter; | 927 CompositeFilter compositeFilter; |
933 /** A filter on a property. */ | 928 |
| 929 /// A filter on a property. |
934 PropertyFilter propertyFilter; | 930 PropertyFilter propertyFilter; |
935 | 931 |
936 Filter(); | 932 Filter(); |
937 | 933 |
938 Filter.fromJson(core.Map _json) { | 934 Filter.fromJson(core.Map _json) { |
939 if (_json.containsKey("compositeFilter")) { | 935 if (_json.containsKey("compositeFilter")) { |
940 compositeFilter = new CompositeFilter.fromJson(_json["compositeFilter"]); | 936 compositeFilter = new CompositeFilter.fromJson(_json["compositeFilter"]); |
941 } | 937 } |
942 if (_json.containsKey("propertyFilter")) { | 938 if (_json.containsKey("propertyFilter")) { |
943 propertyFilter = new PropertyFilter.fromJson(_json["propertyFilter"]); | 939 propertyFilter = new PropertyFilter.fromJson(_json["propertyFilter"]); |
944 } | 940 } |
945 } | 941 } |
946 | 942 |
947 core.Map<core.String, core.Object> toJson() { | 943 core.Map<core.String, core.Object> toJson() { |
948 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 944 final core.Map<core.String, core.Object> _json = |
| 945 new core.Map<core.String, core.Object>(); |
949 if (compositeFilter != null) { | 946 if (compositeFilter != null) { |
950 _json["compositeFilter"] = (compositeFilter).toJson(); | 947 _json["compositeFilter"] = (compositeFilter).toJson(); |
951 } | 948 } |
952 if (propertyFilter != null) { | 949 if (propertyFilter != null) { |
953 _json["propertyFilter"] = (propertyFilter).toJson(); | 950 _json["propertyFilter"] = (propertyFilter).toJson(); |
954 } | 951 } |
955 return _json; | 952 return _json; |
956 } | 953 } |
957 } | 954 } |
958 | 955 |
959 /** Metadata common to all Datastore Admin operations. */ | 956 /// Metadata common to all Datastore Admin operations. |
960 class GoogleDatastoreAdminV1beta1CommonMetadata { | 957 class GoogleDatastoreAdminV1beta1CommonMetadata { |
961 /** The time the operation ended, either successfully or otherwise. */ | 958 /// The time the operation ended, either successfully or otherwise. |
962 core.String endTime; | 959 core.String endTime; |
963 /** | 960 |
964 * The client-assigned labels which were provided when the operation was | 961 /// The client-assigned labels which were provided when the operation was |
965 * created. May also include additional labels. | 962 /// created. May also include additional labels. |
966 */ | |
967 core.Map<core.String, core.String> labels; | 963 core.Map<core.String, core.String> labels; |
968 /** | 964 |
969 * The type of the operation. Can be used as a filter in | 965 /// The type of the operation. Can be used as a filter in |
970 * ListOperationsRequest. | 966 /// ListOperationsRequest. |
971 * Possible string values are: | 967 /// Possible string values are: |
972 * - "OPERATION_TYPE_UNSPECIFIED" : Unspecified. | 968 /// - "OPERATION_TYPE_UNSPECIFIED" : Unspecified. |
973 * - "EXPORT_ENTITIES" : ExportEntities. | 969 /// - "EXPORT_ENTITIES" : ExportEntities. |
974 * - "IMPORT_ENTITIES" : ImportEntities. | 970 /// - "IMPORT_ENTITIES" : ImportEntities. |
975 * - "BUILD_INDEX" : Build an index. | 971 /// - "BUILD_INDEX" : Build an index. |
976 * - "CLEAR_INDEX" : Clear an index. | 972 /// - "CLEAR_INDEX" : Clear an index. |
977 */ | |
978 core.String operationType; | 973 core.String operationType; |
979 /** The time that work began on the operation. */ | 974 |
| 975 /// The time that work began on the operation. |
980 core.String startTime; | 976 core.String startTime; |
981 /** | 977 |
982 * The current state of the Operation. | 978 /// The current state of the Operation. |
983 * Possible string values are: | 979 /// Possible string values are: |
984 * - "STATE_UNSPECIFIED" : Unspecified. | 980 /// - "STATE_UNSPECIFIED" : Unspecified. |
985 * - "INITIALIZING" : Request is being prepared for processing. | 981 /// - "INITIALIZING" : Request is being prepared for processing. |
986 * - "PROCESSING" : Request is actively being processed. | 982 /// - "PROCESSING" : Request is actively being processed. |
987 * - "CANCELLING" : Request is in the process of being cancelled after user | 983 /// - "CANCELLING" : Request is in the process of being cancelled after user |
988 * called | 984 /// called |
989 * longrunning.Operations.CancelOperation on the operation. | 985 /// longrunning.Operations.CancelOperation on the operation. |
990 * - "FINALIZING" : Request has been processed and is in its finalization | 986 /// - "FINALIZING" : Request has been processed and is in its finalization |
991 * stage. | 987 /// stage. |
992 * - "SUCCESSFUL" : Request has completed successfully. | 988 /// - "SUCCESSFUL" : Request has completed successfully. |
993 * - "FAILED" : Request has finished being processed, but encountered an | 989 /// - "FAILED" : Request has finished being processed, but encountered an |
994 * error. | 990 /// error. |
995 * - "CANCELLED" : Request has finished being cancelled after user called | 991 /// - "CANCELLED" : Request has finished being cancelled after user called |
996 * longrunning.Operations.CancelOperation. | 992 /// longrunning.Operations.CancelOperation. |
997 */ | |
998 core.String state; | 993 core.String state; |
999 | 994 |
1000 GoogleDatastoreAdminV1beta1CommonMetadata(); | 995 GoogleDatastoreAdminV1beta1CommonMetadata(); |
1001 | 996 |
1002 GoogleDatastoreAdminV1beta1CommonMetadata.fromJson(core.Map _json) { | 997 GoogleDatastoreAdminV1beta1CommonMetadata.fromJson(core.Map _json) { |
1003 if (_json.containsKey("endTime")) { | 998 if (_json.containsKey("endTime")) { |
1004 endTime = _json["endTime"]; | 999 endTime = _json["endTime"]; |
1005 } | 1000 } |
1006 if (_json.containsKey("labels")) { | 1001 if (_json.containsKey("labels")) { |
1007 labels = _json["labels"]; | 1002 labels = _json["labels"]; |
1008 } | 1003 } |
1009 if (_json.containsKey("operationType")) { | 1004 if (_json.containsKey("operationType")) { |
1010 operationType = _json["operationType"]; | 1005 operationType = _json["operationType"]; |
1011 } | 1006 } |
1012 if (_json.containsKey("startTime")) { | 1007 if (_json.containsKey("startTime")) { |
1013 startTime = _json["startTime"]; | 1008 startTime = _json["startTime"]; |
1014 } | 1009 } |
1015 if (_json.containsKey("state")) { | 1010 if (_json.containsKey("state")) { |
1016 state = _json["state"]; | 1011 state = _json["state"]; |
1017 } | 1012 } |
1018 } | 1013 } |
1019 | 1014 |
1020 core.Map<core.String, core.Object> toJson() { | 1015 core.Map<core.String, core.Object> toJson() { |
1021 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1016 final core.Map<core.String, core.Object> _json = |
| 1017 new core.Map<core.String, core.Object>(); |
1022 if (endTime != null) { | 1018 if (endTime != null) { |
1023 _json["endTime"] = endTime; | 1019 _json["endTime"] = endTime; |
1024 } | 1020 } |
1025 if (labels != null) { | 1021 if (labels != null) { |
1026 _json["labels"] = labels; | 1022 _json["labels"] = labels; |
1027 } | 1023 } |
1028 if (operationType != null) { | 1024 if (operationType != null) { |
1029 _json["operationType"] = operationType; | 1025 _json["operationType"] = operationType; |
1030 } | 1026 } |
1031 if (startTime != null) { | 1027 if (startTime != null) { |
1032 _json["startTime"] = startTime; | 1028 _json["startTime"] = startTime; |
1033 } | 1029 } |
1034 if (state != null) { | 1030 if (state != null) { |
1035 _json["state"] = state; | 1031 _json["state"] = state; |
1036 } | 1032 } |
1037 return _json; | 1033 return _json; |
1038 } | 1034 } |
1039 } | 1035 } |
1040 | 1036 |
1041 /** | 1037 /// Identifies a subset of entities in a project. This is specified as |
1042 * Identifies a subset of entities in a project. This is specified as | 1038 /// combinations of kind + namespace (either or both of which may be all, as |
1043 * combinations of kind + namespace (either or both of which may be all, as | 1039 /// described in the following examples). |
1044 * described in the following examples). | 1040 /// Example usage: |
1045 * Example usage: | 1041 /// |
1046 * | 1042 /// Entire project: |
1047 * Entire project: | 1043 /// kinds=[], namespace_ids=[] |
1048 * kinds=[], namespace_ids=[] | 1044 /// |
1049 * | 1045 /// Kinds Foo and Bar in all namespaces: |
1050 * Kinds Foo and Bar in all namespaces: | 1046 /// kinds=['Foo', 'Bar'], namespace_ids=[] |
1051 * kinds=['Foo', 'Bar'], namespace_ids=[] | 1047 /// |
1052 * | 1048 /// Kinds Foo and Bar only in the default namespace: |
1053 * Kinds Foo and Bar only in the default namespace: | 1049 /// kinds=['Foo', 'Bar'], namespace_ids=[''] |
1054 * kinds=['Foo', 'Bar'], namespace_ids=[''] | 1050 /// |
1055 * | 1051 /// Kinds Foo and Bar in both the default and Baz namespaces: |
1056 * Kinds Foo and Bar in both the default and Baz namespaces: | 1052 /// kinds=['Foo', 'Bar'], namespace_ids=['', 'Baz'] |
1057 * kinds=['Foo', 'Bar'], namespace_ids=['', 'Baz'] | 1053 /// |
1058 * | 1054 /// The entire Baz namespace: |
1059 * The entire Baz namespace: | 1055 /// kinds=[], namespace_ids=['Baz'] |
1060 * kinds=[], namespace_ids=['Baz'] | |
1061 */ | |
1062 class GoogleDatastoreAdminV1beta1EntityFilter { | 1056 class GoogleDatastoreAdminV1beta1EntityFilter { |
1063 /** If empty, then this represents all kinds. */ | 1057 /// If empty, then this represents all kinds. |
1064 core.List<core.String> kinds; | 1058 core.List<core.String> kinds; |
1065 /** | 1059 |
1066 * An empty list represents all namespaces. This is the preferred | 1060 /// An empty list represents all namespaces. This is the preferred |
1067 * usage for projects that don't use namespaces. | 1061 /// usage for projects that don't use namespaces. |
1068 * | 1062 /// |
1069 * An empty string element represents the default namespace. This should be | 1063 /// An empty string element represents the default namespace. This should be |
1070 * used if the project has data in non-default namespaces, but doesn't want to | 1064 /// used if the project has data in non-default namespaces, but doesn't want |
1071 * include them. | 1065 /// to |
1072 * Each namespace in this list must be unique. | 1066 /// include them. |
1073 */ | 1067 /// Each namespace in this list must be unique. |
1074 core.List<core.String> namespaceIds; | 1068 core.List<core.String> namespaceIds; |
1075 | 1069 |
1076 GoogleDatastoreAdminV1beta1EntityFilter(); | 1070 GoogleDatastoreAdminV1beta1EntityFilter(); |
1077 | 1071 |
1078 GoogleDatastoreAdminV1beta1EntityFilter.fromJson(core.Map _json) { | 1072 GoogleDatastoreAdminV1beta1EntityFilter.fromJson(core.Map _json) { |
1079 if (_json.containsKey("kinds")) { | 1073 if (_json.containsKey("kinds")) { |
1080 kinds = _json["kinds"]; | 1074 kinds = _json["kinds"]; |
1081 } | 1075 } |
1082 if (_json.containsKey("namespaceIds")) { | 1076 if (_json.containsKey("namespaceIds")) { |
1083 namespaceIds = _json["namespaceIds"]; | 1077 namespaceIds = _json["namespaceIds"]; |
1084 } | 1078 } |
1085 } | 1079 } |
1086 | 1080 |
1087 core.Map<core.String, core.Object> toJson() { | 1081 core.Map<core.String, core.Object> toJson() { |
1088 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1082 final core.Map<core.String, core.Object> _json = |
| 1083 new core.Map<core.String, core.Object>(); |
1089 if (kinds != null) { | 1084 if (kinds != null) { |
1090 _json["kinds"] = kinds; | 1085 _json["kinds"] = kinds; |
1091 } | 1086 } |
1092 if (namespaceIds != null) { | 1087 if (namespaceIds != null) { |
1093 _json["namespaceIds"] = namespaceIds; | 1088 _json["namespaceIds"] = namespaceIds; |
1094 } | 1089 } |
1095 return _json; | 1090 return _json; |
1096 } | 1091 } |
1097 } | 1092 } |
1098 | 1093 |
1099 /** Metadata for ExportEntities operations. */ | 1094 /// Metadata for ExportEntities operations. |
1100 class GoogleDatastoreAdminV1beta1ExportEntitiesMetadata { | 1095 class GoogleDatastoreAdminV1beta1ExportEntitiesMetadata { |
1101 /** Metadata common to all Datastore Admin operations. */ | 1096 /// Metadata common to all Datastore Admin operations. |
1102 GoogleDatastoreAdminV1beta1CommonMetadata common; | 1097 GoogleDatastoreAdminV1beta1CommonMetadata common; |
1103 /** Description of which entities are being exported. */ | 1098 |
| 1099 /// Description of which entities are being exported. |
1104 GoogleDatastoreAdminV1beta1EntityFilter entityFilter; | 1100 GoogleDatastoreAdminV1beta1EntityFilter entityFilter; |
1105 /** | 1101 |
1106 * Location for the export metadata and data files. This will be the same | 1102 /// Location for the export metadata and data files. This will be the same |
1107 * value as the | 1103 /// value as the |
1108 * google.datastore.admin.v1beta1.ExportEntitiesRequest.output_url_prefix | 1104 /// google.datastore.admin.v1beta1.ExportEntitiesRequest.output_url_prefix |
1109 * field. The final output location is provided in | 1105 /// field. The final output location is provided in |
1110 * google.datastore.admin.v1beta1.ExportEntitiesResponse.output_url. | 1106 /// google.datastore.admin.v1beta1.ExportEntitiesResponse.output_url. |
1111 */ | |
1112 core.String outputUrlPrefix; | 1107 core.String outputUrlPrefix; |
1113 /** An estimate of the number of bytes processed. */ | 1108 |
| 1109 /// An estimate of the number of bytes processed. |
1114 GoogleDatastoreAdminV1beta1Progress progressBytes; | 1110 GoogleDatastoreAdminV1beta1Progress progressBytes; |
1115 /** An estimate of the number of entities processed. */ | 1111 |
| 1112 /// An estimate of the number of entities processed. |
1116 GoogleDatastoreAdminV1beta1Progress progressEntities; | 1113 GoogleDatastoreAdminV1beta1Progress progressEntities; |
1117 | 1114 |
1118 GoogleDatastoreAdminV1beta1ExportEntitiesMetadata(); | 1115 GoogleDatastoreAdminV1beta1ExportEntitiesMetadata(); |
1119 | 1116 |
1120 GoogleDatastoreAdminV1beta1ExportEntitiesMetadata.fromJson(core.Map _json) { | 1117 GoogleDatastoreAdminV1beta1ExportEntitiesMetadata.fromJson(core.Map _json) { |
1121 if (_json.containsKey("common")) { | 1118 if (_json.containsKey("common")) { |
1122 common = new GoogleDatastoreAdminV1beta1CommonMetadata.fromJson(_json["com
mon"]); | 1119 common = new GoogleDatastoreAdminV1beta1CommonMetadata.fromJson( |
| 1120 _json["common"]); |
1123 } | 1121 } |
1124 if (_json.containsKey("entityFilter")) { | 1122 if (_json.containsKey("entityFilter")) { |
1125 entityFilter = new GoogleDatastoreAdminV1beta1EntityFilter.fromJson(_json[
"entityFilter"]); | 1123 entityFilter = new GoogleDatastoreAdminV1beta1EntityFilter.fromJson( |
| 1124 _json["entityFilter"]); |
1126 } | 1125 } |
1127 if (_json.containsKey("outputUrlPrefix")) { | 1126 if (_json.containsKey("outputUrlPrefix")) { |
1128 outputUrlPrefix = _json["outputUrlPrefix"]; | 1127 outputUrlPrefix = _json["outputUrlPrefix"]; |
1129 } | 1128 } |
1130 if (_json.containsKey("progressBytes")) { | 1129 if (_json.containsKey("progressBytes")) { |
1131 progressBytes = new GoogleDatastoreAdminV1beta1Progress.fromJson(_json["pr
ogressBytes"]); | 1130 progressBytes = new GoogleDatastoreAdminV1beta1Progress.fromJson( |
| 1131 _json["progressBytes"]); |
1132 } | 1132 } |
1133 if (_json.containsKey("progressEntities")) { | 1133 if (_json.containsKey("progressEntities")) { |
1134 progressEntities = new GoogleDatastoreAdminV1beta1Progress.fromJson(_json[
"progressEntities"]); | 1134 progressEntities = new GoogleDatastoreAdminV1beta1Progress.fromJson( |
| 1135 _json["progressEntities"]); |
1135 } | 1136 } |
1136 } | 1137 } |
1137 | 1138 |
1138 core.Map<core.String, core.Object> toJson() { | 1139 core.Map<core.String, core.Object> toJson() { |
1139 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1140 final core.Map<core.String, core.Object> _json = |
| 1141 new core.Map<core.String, core.Object>(); |
1140 if (common != null) { | 1142 if (common != null) { |
1141 _json["common"] = (common).toJson(); | 1143 _json["common"] = (common).toJson(); |
1142 } | 1144 } |
1143 if (entityFilter != null) { | 1145 if (entityFilter != null) { |
1144 _json["entityFilter"] = (entityFilter).toJson(); | 1146 _json["entityFilter"] = (entityFilter).toJson(); |
1145 } | 1147 } |
1146 if (outputUrlPrefix != null) { | 1148 if (outputUrlPrefix != null) { |
1147 _json["outputUrlPrefix"] = outputUrlPrefix; | 1149 _json["outputUrlPrefix"] = outputUrlPrefix; |
1148 } | 1150 } |
1149 if (progressBytes != null) { | 1151 if (progressBytes != null) { |
1150 _json["progressBytes"] = (progressBytes).toJson(); | 1152 _json["progressBytes"] = (progressBytes).toJson(); |
1151 } | 1153 } |
1152 if (progressEntities != null) { | 1154 if (progressEntities != null) { |
1153 _json["progressEntities"] = (progressEntities).toJson(); | 1155 _json["progressEntities"] = (progressEntities).toJson(); |
1154 } | 1156 } |
1155 return _json; | 1157 return _json; |
1156 } | 1158 } |
1157 } | 1159 } |
1158 | 1160 |
1159 /** | 1161 /// The response for |
1160 * The response for | 1162 /// google.datastore.admin.v1beta1.DatastoreAdmin.ExportEntities. |
1161 * google.datastore.admin.v1beta1.DatastoreAdmin.ExportEntities. | |
1162 */ | |
1163 class GoogleDatastoreAdminV1beta1ExportEntitiesResponse { | 1163 class GoogleDatastoreAdminV1beta1ExportEntitiesResponse { |
1164 /** | 1164 /// Location of the output metadata file. This can be used to begin an import |
1165 * Location of the output metadata file. This can be used to begin an import | 1165 /// into Cloud Datastore (this project or another project). See |
1166 * into Cloud Datastore (this project or another project). See | 1166 /// google.datastore.admin.v1beta1.ImportEntitiesRequest.input_url. |
1167 * google.datastore.admin.v1beta1.ImportEntitiesRequest.input_url. | 1167 /// Only present if the operation completed successfully. |
1168 * Only present if the operation completed successfully. | |
1169 */ | |
1170 core.String outputUrl; | 1168 core.String outputUrl; |
1171 | 1169 |
1172 GoogleDatastoreAdminV1beta1ExportEntitiesResponse(); | 1170 GoogleDatastoreAdminV1beta1ExportEntitiesResponse(); |
1173 | 1171 |
1174 GoogleDatastoreAdminV1beta1ExportEntitiesResponse.fromJson(core.Map _json) { | 1172 GoogleDatastoreAdminV1beta1ExportEntitiesResponse.fromJson(core.Map _json) { |
1175 if (_json.containsKey("outputUrl")) { | 1173 if (_json.containsKey("outputUrl")) { |
1176 outputUrl = _json["outputUrl"]; | 1174 outputUrl = _json["outputUrl"]; |
1177 } | 1175 } |
1178 } | 1176 } |
1179 | 1177 |
1180 core.Map<core.String, core.Object> toJson() { | 1178 core.Map<core.String, core.Object> toJson() { |
1181 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1179 final core.Map<core.String, core.Object> _json = |
| 1180 new core.Map<core.String, core.Object>(); |
1182 if (outputUrl != null) { | 1181 if (outputUrl != null) { |
1183 _json["outputUrl"] = outputUrl; | 1182 _json["outputUrl"] = outputUrl; |
1184 } | 1183 } |
1185 return _json; | 1184 return _json; |
1186 } | 1185 } |
1187 } | 1186 } |
1188 | 1187 |
1189 /** Metadata for ImportEntities operations. */ | 1188 /// Metadata for ImportEntities operations. |
1190 class GoogleDatastoreAdminV1beta1ImportEntitiesMetadata { | 1189 class GoogleDatastoreAdminV1beta1ImportEntitiesMetadata { |
1191 /** Metadata common to all Datastore Admin operations. */ | 1190 /// Metadata common to all Datastore Admin operations. |
1192 GoogleDatastoreAdminV1beta1CommonMetadata common; | 1191 GoogleDatastoreAdminV1beta1CommonMetadata common; |
1193 /** Description of which entities are being imported. */ | 1192 |
| 1193 /// Description of which entities are being imported. |
1194 GoogleDatastoreAdminV1beta1EntityFilter entityFilter; | 1194 GoogleDatastoreAdminV1beta1EntityFilter entityFilter; |
1195 /** | 1195 |
1196 * The location of the import metadata file. This will be the same value as | 1196 /// The location of the import metadata file. This will be the same value as |
1197 * the google.datastore.admin.v1beta1.ExportEntitiesResponse.output_url | 1197 /// the google.datastore.admin.v1beta1.ExportEntitiesResponse.output_url |
1198 * field. | 1198 /// field. |
1199 */ | |
1200 core.String inputUrl; | 1199 core.String inputUrl; |
1201 /** An estimate of the number of bytes processed. */ | 1200 |
| 1201 /// An estimate of the number of bytes processed. |
1202 GoogleDatastoreAdminV1beta1Progress progressBytes; | 1202 GoogleDatastoreAdminV1beta1Progress progressBytes; |
1203 /** An estimate of the number of entities processed. */ | 1203 |
| 1204 /// An estimate of the number of entities processed. |
1204 GoogleDatastoreAdminV1beta1Progress progressEntities; | 1205 GoogleDatastoreAdminV1beta1Progress progressEntities; |
1205 | 1206 |
1206 GoogleDatastoreAdminV1beta1ImportEntitiesMetadata(); | 1207 GoogleDatastoreAdminV1beta1ImportEntitiesMetadata(); |
1207 | 1208 |
1208 GoogleDatastoreAdminV1beta1ImportEntitiesMetadata.fromJson(core.Map _json) { | 1209 GoogleDatastoreAdminV1beta1ImportEntitiesMetadata.fromJson(core.Map _json) { |
1209 if (_json.containsKey("common")) { | 1210 if (_json.containsKey("common")) { |
1210 common = new GoogleDatastoreAdminV1beta1CommonMetadata.fromJson(_json["com
mon"]); | 1211 common = new GoogleDatastoreAdminV1beta1CommonMetadata.fromJson( |
| 1212 _json["common"]); |
1211 } | 1213 } |
1212 if (_json.containsKey("entityFilter")) { | 1214 if (_json.containsKey("entityFilter")) { |
1213 entityFilter = new GoogleDatastoreAdminV1beta1EntityFilter.fromJson(_json[
"entityFilter"]); | 1215 entityFilter = new GoogleDatastoreAdminV1beta1EntityFilter.fromJson( |
| 1216 _json["entityFilter"]); |
1214 } | 1217 } |
1215 if (_json.containsKey("inputUrl")) { | 1218 if (_json.containsKey("inputUrl")) { |
1216 inputUrl = _json["inputUrl"]; | 1219 inputUrl = _json["inputUrl"]; |
1217 } | 1220 } |
1218 if (_json.containsKey("progressBytes")) { | 1221 if (_json.containsKey("progressBytes")) { |
1219 progressBytes = new GoogleDatastoreAdminV1beta1Progress.fromJson(_json["pr
ogressBytes"]); | 1222 progressBytes = new GoogleDatastoreAdminV1beta1Progress.fromJson( |
| 1223 _json["progressBytes"]); |
1220 } | 1224 } |
1221 if (_json.containsKey("progressEntities")) { | 1225 if (_json.containsKey("progressEntities")) { |
1222 progressEntities = new GoogleDatastoreAdminV1beta1Progress.fromJson(_json[
"progressEntities"]); | 1226 progressEntities = new GoogleDatastoreAdminV1beta1Progress.fromJson( |
| 1227 _json["progressEntities"]); |
1223 } | 1228 } |
1224 } | 1229 } |
1225 | 1230 |
1226 core.Map<core.String, core.Object> toJson() { | 1231 core.Map<core.String, core.Object> toJson() { |
1227 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1232 final core.Map<core.String, core.Object> _json = |
| 1233 new core.Map<core.String, core.Object>(); |
1228 if (common != null) { | 1234 if (common != null) { |
1229 _json["common"] = (common).toJson(); | 1235 _json["common"] = (common).toJson(); |
1230 } | 1236 } |
1231 if (entityFilter != null) { | 1237 if (entityFilter != null) { |
1232 _json["entityFilter"] = (entityFilter).toJson(); | 1238 _json["entityFilter"] = (entityFilter).toJson(); |
1233 } | 1239 } |
1234 if (inputUrl != null) { | 1240 if (inputUrl != null) { |
1235 _json["inputUrl"] = inputUrl; | 1241 _json["inputUrl"] = inputUrl; |
1236 } | 1242 } |
1237 if (progressBytes != null) { | 1243 if (progressBytes != null) { |
1238 _json["progressBytes"] = (progressBytes).toJson(); | 1244 _json["progressBytes"] = (progressBytes).toJson(); |
1239 } | 1245 } |
1240 if (progressEntities != null) { | 1246 if (progressEntities != null) { |
1241 _json["progressEntities"] = (progressEntities).toJson(); | 1247 _json["progressEntities"] = (progressEntities).toJson(); |
1242 } | 1248 } |
1243 return _json; | 1249 return _json; |
1244 } | 1250 } |
1245 } | 1251 } |
1246 | 1252 |
1247 /** Measures the progress of a particular metric. */ | 1253 /// Measures the progress of a particular metric. |
1248 class GoogleDatastoreAdminV1beta1Progress { | 1254 class GoogleDatastoreAdminV1beta1Progress { |
1249 /** Note that this may be greater than work_estimated. */ | 1255 /// Note that this may be greater than work_estimated. |
1250 core.String workCompleted; | 1256 core.String workCompleted; |
1251 /** | 1257 |
1252 * An estimate of how much work needs to be performed. May be zero if the | 1258 /// An estimate of how much work needs to be performed. May be zero if the |
1253 * work estimate is unavailable. | 1259 /// work estimate is unavailable. |
1254 */ | |
1255 core.String workEstimated; | 1260 core.String workEstimated; |
1256 | 1261 |
1257 GoogleDatastoreAdminV1beta1Progress(); | 1262 GoogleDatastoreAdminV1beta1Progress(); |
1258 | 1263 |
1259 GoogleDatastoreAdminV1beta1Progress.fromJson(core.Map _json) { | 1264 GoogleDatastoreAdminV1beta1Progress.fromJson(core.Map _json) { |
1260 if (_json.containsKey("workCompleted")) { | 1265 if (_json.containsKey("workCompleted")) { |
1261 workCompleted = _json["workCompleted"]; | 1266 workCompleted = _json["workCompleted"]; |
1262 } | 1267 } |
1263 if (_json.containsKey("workEstimated")) { | 1268 if (_json.containsKey("workEstimated")) { |
1264 workEstimated = _json["workEstimated"]; | 1269 workEstimated = _json["workEstimated"]; |
1265 } | 1270 } |
1266 } | 1271 } |
1267 | 1272 |
1268 core.Map<core.String, core.Object> toJson() { | 1273 core.Map<core.String, core.Object> toJson() { |
1269 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1274 final core.Map<core.String, core.Object> _json = |
| 1275 new core.Map<core.String, core.Object>(); |
1270 if (workCompleted != null) { | 1276 if (workCompleted != null) { |
1271 _json["workCompleted"] = workCompleted; | 1277 _json["workCompleted"] = workCompleted; |
1272 } | 1278 } |
1273 if (workEstimated != null) { | 1279 if (workEstimated != null) { |
1274 _json["workEstimated"] = workEstimated; | 1280 _json["workEstimated"] = workEstimated; |
1275 } | 1281 } |
1276 return _json; | 1282 return _json; |
1277 } | 1283 } |
1278 } | 1284 } |
1279 | 1285 |
1280 /** The response message for Operations.ListOperations. */ | 1286 /// The response message for Operations.ListOperations. |
1281 class GoogleLongrunningListOperationsResponse { | 1287 class GoogleLongrunningListOperationsResponse { |
1282 /** The standard List next-page token. */ | 1288 /// The standard List next-page token. |
1283 core.String nextPageToken; | 1289 core.String nextPageToken; |
1284 /** A list of operations that matches the specified filter in the request. */ | 1290 |
| 1291 /// A list of operations that matches the specified filter in the request. |
1285 core.List<GoogleLongrunningOperation> operations; | 1292 core.List<GoogleLongrunningOperation> operations; |
1286 | 1293 |
1287 GoogleLongrunningListOperationsResponse(); | 1294 GoogleLongrunningListOperationsResponse(); |
1288 | 1295 |
1289 GoogleLongrunningListOperationsResponse.fromJson(core.Map _json) { | 1296 GoogleLongrunningListOperationsResponse.fromJson(core.Map _json) { |
1290 if (_json.containsKey("nextPageToken")) { | 1297 if (_json.containsKey("nextPageToken")) { |
1291 nextPageToken = _json["nextPageToken"]; | 1298 nextPageToken = _json["nextPageToken"]; |
1292 } | 1299 } |
1293 if (_json.containsKey("operations")) { | 1300 if (_json.containsKey("operations")) { |
1294 operations = _json["operations"].map((value) => new GoogleLongrunningOpera
tion.fromJson(value)).toList(); | 1301 operations = _json["operations"] |
| 1302 .map((value) => new GoogleLongrunningOperation.fromJson(value)) |
| 1303 .toList(); |
1295 } | 1304 } |
1296 } | 1305 } |
1297 | 1306 |
1298 core.Map<core.String, core.Object> toJson() { | 1307 core.Map<core.String, core.Object> toJson() { |
1299 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1308 final core.Map<core.String, core.Object> _json = |
| 1309 new core.Map<core.String, core.Object>(); |
1300 if (nextPageToken != null) { | 1310 if (nextPageToken != null) { |
1301 _json["nextPageToken"] = nextPageToken; | 1311 _json["nextPageToken"] = nextPageToken; |
1302 } | 1312 } |
1303 if (operations != null) { | 1313 if (operations != null) { |
1304 _json["operations"] = operations.map((value) => (value).toJson()).toList()
; | 1314 _json["operations"] = |
| 1315 operations.map((value) => (value).toJson()).toList(); |
1305 } | 1316 } |
1306 return _json; | 1317 return _json; |
1307 } | 1318 } |
1308 } | 1319 } |
1309 | 1320 |
1310 /** | 1321 /// This resource represents a long-running operation that is the result of a |
1311 * This resource represents a long-running operation that is the result of a | 1322 /// network API call. |
1312 * network API call. | |
1313 */ | |
1314 class GoogleLongrunningOperation { | 1323 class GoogleLongrunningOperation { |
1315 /** | 1324 /// If the value is `false`, it means the operation is still in progress. |
1316 * If the value is `false`, it means the operation is still in progress. | 1325 /// If true, the operation is completed, and either `error` or `response` is |
1317 * If true, the operation is completed, and either `error` or `response` is | 1326 /// available. |
1318 * available. | |
1319 */ | |
1320 core.bool done; | 1327 core.bool done; |
1321 /** The error result of the operation in case of failure or cancellation. */ | 1328 |
| 1329 /// The error result of the operation in case of failure or cancellation. |
1322 Status error; | 1330 Status error; |
1323 /** | 1331 |
1324 * Service-specific metadata associated with the operation. It typically | 1332 /// Service-specific metadata associated with the operation. It typically |
1325 * contains progress information and common metadata such as create time. | 1333 /// contains progress information and common metadata such as create time. |
1326 * Some services might not provide such metadata. Any method that returns a | 1334 /// Some services might not provide such metadata. Any method that returns a |
1327 * long-running operation should document the metadata type, if any. | 1335 /// long-running operation should document the metadata type, if any. |
1328 * | 1336 /// |
1329 * The values for Object must be JSON objects. It can consist of `num`, | 1337 /// The values for Object must be JSON objects. It can consist of `num`, |
1330 * `String`, `bool` and `null` as well as `Map` and `List` values. | 1338 /// `String`, `bool` and `null` as well as `Map` and `List` values. |
1331 */ | |
1332 core.Map<core.String, core.Object> metadata; | 1339 core.Map<core.String, core.Object> metadata; |
1333 /** | 1340 |
1334 * The server-assigned name, which is only unique within the same service that | 1341 /// The server-assigned name, which is only unique within the same service |
1335 * originally returns it. If you use the default HTTP mapping, the | 1342 /// that |
1336 * `name` should have the format of `operations/some/unique/name`. | 1343 /// originally returns it. If you use the default HTTP mapping, the |
1337 */ | 1344 /// `name` should have the format of `operations/some/unique/name`. |
1338 core.String name; | 1345 core.String name; |
1339 /** | 1346 |
1340 * The normal response of the operation in case of success. If the original | 1347 /// The normal response of the operation in case of success. If the original |
1341 * method returns no data on success, such as `Delete`, the response is | 1348 /// method returns no data on success, such as `Delete`, the response is |
1342 * `google.protobuf.Empty`. If the original method is standard | 1349 /// `google.protobuf.Empty`. If the original method is standard |
1343 * `Get`/`Create`/`Update`, the response should be the resource. For other | 1350 /// `Get`/`Create`/`Update`, the response should be the resource. For other |
1344 * methods, the response should have the type `XxxResponse`, where `Xxx` | 1351 /// methods, the response should have the type `XxxResponse`, where `Xxx` |
1345 * is the original method name. For example, if the original method name | 1352 /// is the original method name. For example, if the original method name |
1346 * is `TakeSnapshot()`, the inferred response type is | 1353 /// is `TakeSnapshot()`, the inferred response type is |
1347 * `TakeSnapshotResponse`. | 1354 /// `TakeSnapshotResponse`. |
1348 * | 1355 /// |
1349 * The values for Object must be JSON objects. It can consist of `num`, | 1356 /// The values for Object must be JSON objects. It can consist of `num`, |
1350 * `String`, `bool` and `null` as well as `Map` and `List` values. | 1357 /// `String`, `bool` and `null` as well as `Map` and `List` values. |
1351 */ | |
1352 core.Map<core.String, core.Object> response; | 1358 core.Map<core.String, core.Object> response; |
1353 | 1359 |
1354 GoogleLongrunningOperation(); | 1360 GoogleLongrunningOperation(); |
1355 | 1361 |
1356 GoogleLongrunningOperation.fromJson(core.Map _json) { | 1362 GoogleLongrunningOperation.fromJson(core.Map _json) { |
1357 if (_json.containsKey("done")) { | 1363 if (_json.containsKey("done")) { |
1358 done = _json["done"]; | 1364 done = _json["done"]; |
1359 } | 1365 } |
1360 if (_json.containsKey("error")) { | 1366 if (_json.containsKey("error")) { |
1361 error = new Status.fromJson(_json["error"]); | 1367 error = new Status.fromJson(_json["error"]); |
1362 } | 1368 } |
1363 if (_json.containsKey("metadata")) { | 1369 if (_json.containsKey("metadata")) { |
1364 metadata = _json["metadata"]; | 1370 metadata = _json["metadata"]; |
1365 } | 1371 } |
1366 if (_json.containsKey("name")) { | 1372 if (_json.containsKey("name")) { |
1367 name = _json["name"]; | 1373 name = _json["name"]; |
1368 } | 1374 } |
1369 if (_json.containsKey("response")) { | 1375 if (_json.containsKey("response")) { |
1370 response = _json["response"]; | 1376 response = _json["response"]; |
1371 } | 1377 } |
1372 } | 1378 } |
1373 | 1379 |
1374 core.Map<core.String, core.Object> toJson() { | 1380 core.Map<core.String, core.Object> toJson() { |
1375 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1381 final core.Map<core.String, core.Object> _json = |
| 1382 new core.Map<core.String, core.Object>(); |
1376 if (done != null) { | 1383 if (done != null) { |
1377 _json["done"] = done; | 1384 _json["done"] = done; |
1378 } | 1385 } |
1379 if (error != null) { | 1386 if (error != null) { |
1380 _json["error"] = (error).toJson(); | 1387 _json["error"] = (error).toJson(); |
1381 } | 1388 } |
1382 if (metadata != null) { | 1389 if (metadata != null) { |
1383 _json["metadata"] = metadata; | 1390 _json["metadata"] = metadata; |
1384 } | 1391 } |
1385 if (name != null) { | 1392 if (name != null) { |
1386 _json["name"] = name; | 1393 _json["name"] = name; |
1387 } | 1394 } |
1388 if (response != null) { | 1395 if (response != null) { |
1389 _json["response"] = response; | 1396 _json["response"] = response; |
1390 } | 1397 } |
1391 return _json; | 1398 return _json; |
1392 } | 1399 } |
1393 } | 1400 } |
1394 | 1401 |
1395 /** | 1402 /// A [GQL |
1396 * A [GQL | 1403 /// query](https://cloud.google.com/datastore/docs/apis/gql/gql_reference). |
1397 * query](https://cloud.google.com/datastore/docs/apis/gql/gql_reference). | |
1398 */ | |
1399 class GqlQuery { | 1404 class GqlQuery { |
1400 /** | 1405 /// When false, the query string must not contain any literals and instead |
1401 * When false, the query string must not contain any literals and instead must | 1406 /// must |
1402 * bind all values. For example, | 1407 /// bind all values. For example, |
1403 * `SELECT * FROM Kind WHERE a = 'string literal'` is not allowed, while | 1408 /// `SELECT * FROM Kind WHERE a = 'string literal'` is not allowed, while |
1404 * `SELECT * FROM Kind WHERE a = @value` is. | 1409 /// `SELECT * FROM Kind WHERE a = @value` is. |
1405 */ | |
1406 core.bool allowLiterals; | 1410 core.bool allowLiterals; |
1407 /** | 1411 |
1408 * For each non-reserved named binding site in the query string, there must be | 1412 /// For each non-reserved named binding site in the query string, there must |
1409 * a named parameter with that name, but not necessarily the inverse. | 1413 /// be |
1410 * | 1414 /// a named parameter with that name, but not necessarily the inverse. |
1411 * Key must match regex `A-Za-z_$*`, must not match regex | 1415 /// |
1412 * `__.*__`, and must not be `""`. | 1416 /// Key must match regex `A-Za-z_$*`, must not match regex |
1413 */ | 1417 /// `__.*__`, and must not be `""`. |
1414 core.Map<core.String, GqlQueryParameter> namedBindings; | 1418 core.Map<core.String, GqlQueryParameter> namedBindings; |
1415 /** | 1419 |
1416 * Numbered binding site @1 references the first numbered parameter, | 1420 /// Numbered binding site @1 references the first numbered parameter, |
1417 * effectively using 1-based indexing, rather than the usual 0. | 1421 /// effectively using 1-based indexing, rather than the usual 0. |
1418 * | 1422 /// |
1419 * For each binding site numbered i in `query_string`, there must be an i-th | 1423 /// For each binding site numbered i in `query_string`, there must be an i-th |
1420 * numbered parameter. The inverse must also be true. | 1424 /// numbered parameter. The inverse must also be true. |
1421 */ | |
1422 core.List<GqlQueryParameter> positionalBindings; | 1425 core.List<GqlQueryParameter> positionalBindings; |
1423 /** | 1426 |
1424 * A string of the format described | 1427 /// A string of the format described |
1425 * [here](https://cloud.google.com/datastore/docs/apis/gql/gql_reference). | 1428 /// [here](https://cloud.google.com/datastore/docs/apis/gql/gql_reference). |
1426 */ | |
1427 core.String queryString; | 1429 core.String queryString; |
1428 | 1430 |
1429 GqlQuery(); | 1431 GqlQuery(); |
1430 | 1432 |
1431 GqlQuery.fromJson(core.Map _json) { | 1433 GqlQuery.fromJson(core.Map _json) { |
1432 if (_json.containsKey("allowLiterals")) { | 1434 if (_json.containsKey("allowLiterals")) { |
1433 allowLiterals = _json["allowLiterals"]; | 1435 allowLiterals = _json["allowLiterals"]; |
1434 } | 1436 } |
1435 if (_json.containsKey("namedBindings")) { | 1437 if (_json.containsKey("namedBindings")) { |
1436 namedBindings = commons.mapMap<core.Map<core.String, core.Object>, GqlQuer
yParameter>(_json["namedBindings"], (core.Map<core.String, core.Object> item) =>
new GqlQueryParameter.fromJson(item)); | 1438 namedBindings = |
| 1439 commons.mapMap<core.Map<core.String, core.Object>, GqlQueryParameter>( |
| 1440 _json["namedBindings"], |
| 1441 (core.Map<core.String, core.Object> item) => |
| 1442 new GqlQueryParameter.fromJson(item)); |
1437 } | 1443 } |
1438 if (_json.containsKey("positionalBindings")) { | 1444 if (_json.containsKey("positionalBindings")) { |
1439 positionalBindings = _json["positionalBindings"].map((value) => new GqlQue
ryParameter.fromJson(value)).toList(); | 1445 positionalBindings = _json["positionalBindings"] |
| 1446 .map((value) => new GqlQueryParameter.fromJson(value)) |
| 1447 .toList(); |
1440 } | 1448 } |
1441 if (_json.containsKey("queryString")) { | 1449 if (_json.containsKey("queryString")) { |
1442 queryString = _json["queryString"]; | 1450 queryString = _json["queryString"]; |
1443 } | 1451 } |
1444 } | 1452 } |
1445 | 1453 |
1446 core.Map<core.String, core.Object> toJson() { | 1454 core.Map<core.String, core.Object> toJson() { |
1447 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1455 final core.Map<core.String, core.Object> _json = |
| 1456 new core.Map<core.String, core.Object>(); |
1448 if (allowLiterals != null) { | 1457 if (allowLiterals != null) { |
1449 _json["allowLiterals"] = allowLiterals; | 1458 _json["allowLiterals"] = allowLiterals; |
1450 } | 1459 } |
1451 if (namedBindings != null) { | 1460 if (namedBindings != null) { |
1452 _json["namedBindings"] = commons.mapMap<GqlQueryParameter, core.Map<core.S
tring, core.Object>>(namedBindings, (GqlQueryParameter item) => (item).toJson())
; | 1461 _json["namedBindings"] = |
| 1462 commons.mapMap<GqlQueryParameter, core.Map<core.String, core.Object>>( |
| 1463 namedBindings, (GqlQueryParameter item) => (item).toJson()); |
1453 } | 1464 } |
1454 if (positionalBindings != null) { | 1465 if (positionalBindings != null) { |
1455 _json["positionalBindings"] = positionalBindings.map((value) => (value).to
Json()).toList(); | 1466 _json["positionalBindings"] = |
| 1467 positionalBindings.map((value) => (value).toJson()).toList(); |
1456 } | 1468 } |
1457 if (queryString != null) { | 1469 if (queryString != null) { |
1458 _json["queryString"] = queryString; | 1470 _json["queryString"] = queryString; |
1459 } | 1471 } |
1460 return _json; | 1472 return _json; |
1461 } | 1473 } |
1462 } | 1474 } |
1463 | 1475 |
1464 /** A binding parameter for a GQL query. */ | 1476 /// A binding parameter for a GQL query. |
1465 class GqlQueryParameter { | 1477 class GqlQueryParameter { |
1466 /** | 1478 /// A query cursor. Query cursors are returned in query |
1467 * A query cursor. Query cursors are returned in query | 1479 /// result batches. |
1468 * result batches. | |
1469 */ | |
1470 core.String cursor; | 1480 core.String cursor; |
1471 core.List<core.int> get cursorAsBytes { | 1481 core.List<core.int> get cursorAsBytes { |
1472 return convert.BASE64.decode(cursor); | 1482 return convert.BASE64.decode(cursor); |
1473 } | 1483 } |
1474 | 1484 |
1475 void set cursorAsBytes(core.List<core.int> _bytes) { | 1485 void set cursorAsBytes(core.List<core.int> _bytes) { |
1476 cursor = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+",
"-"); | 1486 cursor = |
| 1487 convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-"); |
1477 } | 1488 } |
1478 /** A value parameter. */ | 1489 |
| 1490 /// A value parameter. |
1479 Value value; | 1491 Value value; |
1480 | 1492 |
1481 GqlQueryParameter(); | 1493 GqlQueryParameter(); |
1482 | 1494 |
1483 GqlQueryParameter.fromJson(core.Map _json) { | 1495 GqlQueryParameter.fromJson(core.Map _json) { |
1484 if (_json.containsKey("cursor")) { | 1496 if (_json.containsKey("cursor")) { |
1485 cursor = _json["cursor"]; | 1497 cursor = _json["cursor"]; |
1486 } | 1498 } |
1487 if (_json.containsKey("value")) { | 1499 if (_json.containsKey("value")) { |
1488 value = new Value.fromJson(_json["value"]); | 1500 value = new Value.fromJson(_json["value"]); |
1489 } | 1501 } |
1490 } | 1502 } |
1491 | 1503 |
1492 core.Map<core.String, core.Object> toJson() { | 1504 core.Map<core.String, core.Object> toJson() { |
1493 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1505 final core.Map<core.String, core.Object> _json = |
| 1506 new core.Map<core.String, core.Object>(); |
1494 if (cursor != null) { | 1507 if (cursor != null) { |
1495 _json["cursor"] = cursor; | 1508 _json["cursor"] = cursor; |
1496 } | 1509 } |
1497 if (value != null) { | 1510 if (value != null) { |
1498 _json["value"] = (value).toJson(); | 1511 _json["value"] = (value).toJson(); |
1499 } | 1512 } |
1500 return _json; | 1513 return _json; |
1501 } | 1514 } |
1502 } | 1515 } |
1503 | 1516 |
1504 /** | 1517 /// A unique identifier for an entity. |
1505 * A unique identifier for an entity. | 1518 /// If a key's partition ID or any of its path kinds or names are |
1506 * If a key's partition ID or any of its path kinds or names are | 1519 /// reserved/read-only, the key is reserved/read-only. |
1507 * reserved/read-only, the key is reserved/read-only. | 1520 /// A reserved/read-only key is forbidden in certain documented contexts. |
1508 * A reserved/read-only key is forbidden in certain documented contexts. | |
1509 */ | |
1510 class Key { | 1521 class Key { |
1511 /** | 1522 /// Entities are partitioned into subsets, currently identified by a project |
1512 * Entities are partitioned into subsets, currently identified by a project | 1523 /// ID and namespace ID. |
1513 * ID and namespace ID. | 1524 /// Queries are scoped to a single partition. |
1514 * Queries are scoped to a single partition. | |
1515 */ | |
1516 PartitionId partitionId; | 1525 PartitionId partitionId; |
1517 /** | 1526 |
1518 * The entity path. | 1527 /// The entity path. |
1519 * An entity path consists of one or more elements composed of a kind and a | 1528 /// An entity path consists of one or more elements composed of a kind and a |
1520 * string or numerical identifier, which identify entities. The first | 1529 /// string or numerical identifier, which identify entities. The first |
1521 * element identifies a _root entity_, the second element identifies | 1530 /// element identifies a _root entity_, the second element identifies |
1522 * a _child_ of the root entity, the third element identifies a child of the | 1531 /// a _child_ of the root entity, the third element identifies a child of the |
1523 * second entity, and so forth. The entities identified by all prefixes of | 1532 /// second entity, and so forth. The entities identified by all prefixes of |
1524 * the path are called the element's _ancestors_. | 1533 /// the path are called the element's _ancestors_. |
1525 * | 1534 /// |
1526 * An entity path is always fully complete: *all* of the entity's ancestors | 1535 /// An entity path is always fully complete: *all* of the entity's ancestors |
1527 * are required to be in the path along with the entity identifier itself. | 1536 /// are required to be in the path along with the entity identifier itself. |
1528 * The only exception is that in some documented cases, the identifier in the | 1537 /// The only exception is that in some documented cases, the identifier in |
1529 * last path element (for the entity) itself may be omitted. For example, | 1538 /// the |
1530 * the last path element of the key of `Mutation.insert` may have no | 1539 /// last path element (for the entity) itself may be omitted. For example, |
1531 * identifier. | 1540 /// the last path element of the key of `Mutation.insert` may have no |
1532 * | 1541 /// identifier. |
1533 * A path can never be empty, and a path can have at most 100 elements. | 1542 /// |
1534 */ | 1543 /// A path can never be empty, and a path can have at most 100 elements. |
1535 core.List<PathElement> path; | 1544 core.List<PathElement> path; |
1536 | 1545 |
1537 Key(); | 1546 Key(); |
1538 | 1547 |
1539 Key.fromJson(core.Map _json) { | 1548 Key.fromJson(core.Map _json) { |
1540 if (_json.containsKey("partitionId")) { | 1549 if (_json.containsKey("partitionId")) { |
1541 partitionId = new PartitionId.fromJson(_json["partitionId"]); | 1550 partitionId = new PartitionId.fromJson(_json["partitionId"]); |
1542 } | 1551 } |
1543 if (_json.containsKey("path")) { | 1552 if (_json.containsKey("path")) { |
1544 path = _json["path"].map((value) => new PathElement.fromJson(value)).toLis
t(); | 1553 path = _json["path"] |
| 1554 .map((value) => new PathElement.fromJson(value)) |
| 1555 .toList(); |
1545 } | 1556 } |
1546 } | 1557 } |
1547 | 1558 |
1548 core.Map<core.String, core.Object> toJson() { | 1559 core.Map<core.String, core.Object> toJson() { |
1549 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1560 final core.Map<core.String, core.Object> _json = |
| 1561 new core.Map<core.String, core.Object>(); |
1550 if (partitionId != null) { | 1562 if (partitionId != null) { |
1551 _json["partitionId"] = (partitionId).toJson(); | 1563 _json["partitionId"] = (partitionId).toJson(); |
1552 } | 1564 } |
1553 if (path != null) { | 1565 if (path != null) { |
1554 _json["path"] = path.map((value) => (value).toJson()).toList(); | 1566 _json["path"] = path.map((value) => (value).toJson()).toList(); |
1555 } | 1567 } |
1556 return _json; | 1568 return _json; |
1557 } | 1569 } |
1558 } | 1570 } |
1559 | 1571 |
1560 /** A representation of a kind. */ | 1572 /// A representation of a kind. |
1561 class KindExpression { | 1573 class KindExpression { |
1562 /** The name of the kind. */ | 1574 /// The name of the kind. |
1563 core.String name; | 1575 core.String name; |
1564 | 1576 |
1565 KindExpression(); | 1577 KindExpression(); |
1566 | 1578 |
1567 KindExpression.fromJson(core.Map _json) { | 1579 KindExpression.fromJson(core.Map _json) { |
1568 if (_json.containsKey("name")) { | 1580 if (_json.containsKey("name")) { |
1569 name = _json["name"]; | 1581 name = _json["name"]; |
1570 } | 1582 } |
1571 } | 1583 } |
1572 | 1584 |
1573 core.Map<core.String, core.Object> toJson() { | 1585 core.Map<core.String, core.Object> toJson() { |
1574 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1586 final core.Map<core.String, core.Object> _json = |
| 1587 new core.Map<core.String, core.Object>(); |
1575 if (name != null) { | 1588 if (name != null) { |
1576 _json["name"] = name; | 1589 _json["name"] = name; |
1577 } | 1590 } |
1578 return _json; | 1591 return _json; |
1579 } | 1592 } |
1580 } | 1593 } |
1581 | 1594 |
1582 /** | 1595 /// An object representing a latitude/longitude pair. This is expressed as a |
1583 * An object representing a latitude/longitude pair. This is expressed as a pair | 1596 /// pair |
1584 * of doubles representing degrees latitude and degrees longitude. Unless | 1597 /// of doubles representing degrees latitude and degrees longitude. Unless |
1585 * specified otherwise, this must conform to the | 1598 /// specified otherwise, this must conform to the |
1586 * <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84 | 1599 /// <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84 |
1587 * standard</a>. Values must be within normalized ranges. | 1600 /// standard</a>. Values must be within normalized ranges. |
1588 * | 1601 /// |
1589 * Example of normalization code in Python: | 1602 /// Example of normalization code in Python: |
1590 * | 1603 /// |
1591 * def NormalizeLongitude(longitude): | 1604 /// def NormalizeLongitude(longitude): |
1592 * """Wraps decimal degrees longitude to [-180.0, 180.0].""" | 1605 /// """Wraps decimal degrees longitude to [-180.0, 180.0].""" |
1593 * q, r = divmod(longitude, 360.0) | 1606 /// q, r = divmod(longitude, 360.0) |
1594 * if r > 180.0 or (r == 180.0 and q <= -1.0): | 1607 /// if r > 180.0 or (r == 180.0 and q <= -1.0): |
1595 * return r - 360.0 | 1608 /// return r - 360.0 |
1596 * return r | 1609 /// return r |
1597 * | 1610 /// |
1598 * def NormalizeLatLng(latitude, longitude): | 1611 /// def NormalizeLatLng(latitude, longitude): |
1599 * """Wraps decimal degrees latitude and longitude to | 1612 /// """Wraps decimal degrees latitude and longitude to |
1600 * [-90.0, 90.0] and [-180.0, 180.0], respectively.""" | 1613 /// [-90.0, 90.0] and [-180.0, 180.0], respectively.""" |
1601 * r = latitude % 360.0 | 1614 /// r = latitude % 360.0 |
1602 * if r <= 90.0: | 1615 /// if r <= 90.0: |
1603 * return r, NormalizeLongitude(longitude) | 1616 /// return r, NormalizeLongitude(longitude) |
1604 * elif r >= 270.0: | 1617 /// elif r >= 270.0: |
1605 * return r - 360, NormalizeLongitude(longitude) | 1618 /// return r - 360, NormalizeLongitude(longitude) |
1606 * else: | 1619 /// else: |
1607 * return 180 - r, NormalizeLongitude(longitude + 180.0) | 1620 /// return 180 - r, NormalizeLongitude(longitude + 180.0) |
1608 * | 1621 /// |
1609 * assert 180.0 == NormalizeLongitude(180.0) | 1622 /// assert 180.0 == NormalizeLongitude(180.0) |
1610 * assert -180.0 == NormalizeLongitude(-180.0) | 1623 /// assert -180.0 == NormalizeLongitude(-180.0) |
1611 * assert -179.0 == NormalizeLongitude(181.0) | 1624 /// assert -179.0 == NormalizeLongitude(181.0) |
1612 * assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0) | 1625 /// assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0) |
1613 * assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0) | 1626 /// assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0) |
1614 * assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0) | 1627 /// assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0) |
1615 * assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0) | 1628 /// assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0) |
1616 * assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0) | 1629 /// assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0) |
1617 * assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0) | 1630 /// assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0) |
1618 * assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0) | 1631 /// assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0) |
1619 * assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0) | 1632 /// assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0) |
1620 * assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0) | 1633 /// assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0) |
1621 * assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0) | 1634 /// assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0) |
1622 */ | |
1623 class LatLng { | 1635 class LatLng { |
1624 /** The latitude in degrees. It must be in the range [-90.0, +90.0]. */ | 1636 /// The latitude in degrees. It must be in the range [-90.0, +90.0]. |
1625 core.double latitude; | 1637 core.double latitude; |
1626 /** The longitude in degrees. It must be in the range [-180.0, +180.0]. */ | 1638 |
| 1639 /// The longitude in degrees. It must be in the range [-180.0, +180.0]. |
1627 core.double longitude; | 1640 core.double longitude; |
1628 | 1641 |
1629 LatLng(); | 1642 LatLng(); |
1630 | 1643 |
1631 LatLng.fromJson(core.Map _json) { | 1644 LatLng.fromJson(core.Map _json) { |
1632 if (_json.containsKey("latitude")) { | 1645 if (_json.containsKey("latitude")) { |
1633 latitude = _json["latitude"]; | 1646 latitude = _json["latitude"]; |
1634 } | 1647 } |
1635 if (_json.containsKey("longitude")) { | 1648 if (_json.containsKey("longitude")) { |
1636 longitude = _json["longitude"]; | 1649 longitude = _json["longitude"]; |
1637 } | 1650 } |
1638 } | 1651 } |
1639 | 1652 |
1640 core.Map<core.String, core.Object> toJson() { | 1653 core.Map<core.String, core.Object> toJson() { |
1641 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1654 final core.Map<core.String, core.Object> _json = |
| 1655 new core.Map<core.String, core.Object>(); |
1642 if (latitude != null) { | 1656 if (latitude != null) { |
1643 _json["latitude"] = latitude; | 1657 _json["latitude"] = latitude; |
1644 } | 1658 } |
1645 if (longitude != null) { | 1659 if (longitude != null) { |
1646 _json["longitude"] = longitude; | 1660 _json["longitude"] = longitude; |
1647 } | 1661 } |
1648 return _json; | 1662 return _json; |
1649 } | 1663 } |
1650 } | 1664 } |
1651 | 1665 |
1652 /** The request for Datastore.Lookup. */ | 1666 /// The request for Datastore.Lookup. |
1653 class LookupRequest { | 1667 class LookupRequest { |
1654 /** Keys of entities to look up. */ | 1668 /// Keys of entities to look up. |
1655 core.List<Key> keys; | 1669 core.List<Key> keys; |
1656 /** The options for this lookup request. */ | 1670 |
| 1671 /// The options for this lookup request. |
1657 ReadOptions readOptions; | 1672 ReadOptions readOptions; |
1658 | 1673 |
1659 LookupRequest(); | 1674 LookupRequest(); |
1660 | 1675 |
1661 LookupRequest.fromJson(core.Map _json) { | 1676 LookupRequest.fromJson(core.Map _json) { |
1662 if (_json.containsKey("keys")) { | 1677 if (_json.containsKey("keys")) { |
1663 keys = _json["keys"].map((value) => new Key.fromJson(value)).toList(); | 1678 keys = _json["keys"].map((value) => new Key.fromJson(value)).toList(); |
1664 } | 1679 } |
1665 if (_json.containsKey("readOptions")) { | 1680 if (_json.containsKey("readOptions")) { |
1666 readOptions = new ReadOptions.fromJson(_json["readOptions"]); | 1681 readOptions = new ReadOptions.fromJson(_json["readOptions"]); |
1667 } | 1682 } |
1668 } | 1683 } |
1669 | 1684 |
1670 core.Map<core.String, core.Object> toJson() { | 1685 core.Map<core.String, core.Object> toJson() { |
1671 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1686 final core.Map<core.String, core.Object> _json = |
| 1687 new core.Map<core.String, core.Object>(); |
1672 if (keys != null) { | 1688 if (keys != null) { |
1673 _json["keys"] = keys.map((value) => (value).toJson()).toList(); | 1689 _json["keys"] = keys.map((value) => (value).toJson()).toList(); |
1674 } | 1690 } |
1675 if (readOptions != null) { | 1691 if (readOptions != null) { |
1676 _json["readOptions"] = (readOptions).toJson(); | 1692 _json["readOptions"] = (readOptions).toJson(); |
1677 } | 1693 } |
1678 return _json; | 1694 return _json; |
1679 } | 1695 } |
1680 } | 1696 } |
1681 | 1697 |
1682 /** The response for Datastore.Lookup. */ | 1698 /// The response for Datastore.Lookup. |
1683 class LookupResponse { | 1699 class LookupResponse { |
1684 /** | 1700 /// A list of keys that were not looked up due to resource constraints. The |
1685 * A list of keys that were not looked up due to resource constraints. The | 1701 /// order of results in this field is undefined and has no relation to the |
1686 * order of results in this field is undefined and has no relation to the | 1702 /// order of the keys in the input. |
1687 * order of the keys in the input. | |
1688 */ | |
1689 core.List<Key> deferred; | 1703 core.List<Key> deferred; |
1690 /** | 1704 |
1691 * Entities found as `ResultType.FULL` entities. The order of results in this | 1705 /// Entities found as `ResultType.FULL` entities. The order of results in |
1692 * field is undefined and has no relation to the order of the keys in the | 1706 /// this |
1693 * input. | 1707 /// field is undefined and has no relation to the order of the keys in the |
1694 */ | 1708 /// input. |
1695 core.List<EntityResult> found; | 1709 core.List<EntityResult> found; |
1696 /** | 1710 |
1697 * Entities not found as `ResultType.KEY_ONLY` entities. The order of results | 1711 /// Entities not found as `ResultType.KEY_ONLY` entities. The order of |
1698 * in this field is undefined and has no relation to the order of the keys | 1712 /// results |
1699 * in the input. | 1713 /// in this field is undefined and has no relation to the order of the keys |
1700 */ | 1714 /// in the input. |
1701 core.List<EntityResult> missing; | 1715 core.List<EntityResult> missing; |
1702 | 1716 |
1703 LookupResponse(); | 1717 LookupResponse(); |
1704 | 1718 |
1705 LookupResponse.fromJson(core.Map _json) { | 1719 LookupResponse.fromJson(core.Map _json) { |
1706 if (_json.containsKey("deferred")) { | 1720 if (_json.containsKey("deferred")) { |
1707 deferred = _json["deferred"].map((value) => new Key.fromJson(value)).toLis
t(); | 1721 deferred = |
| 1722 _json["deferred"].map((value) => new Key.fromJson(value)).toList(); |
1708 } | 1723 } |
1709 if (_json.containsKey("found")) { | 1724 if (_json.containsKey("found")) { |
1710 found = _json["found"].map((value) => new EntityResult.fromJson(value)).to
List(); | 1725 found = _json["found"] |
| 1726 .map((value) => new EntityResult.fromJson(value)) |
| 1727 .toList(); |
1711 } | 1728 } |
1712 if (_json.containsKey("missing")) { | 1729 if (_json.containsKey("missing")) { |
1713 missing = _json["missing"].map((value) => new EntityResult.fromJson(value)
).toList(); | 1730 missing = _json["missing"] |
| 1731 .map((value) => new EntityResult.fromJson(value)) |
| 1732 .toList(); |
1714 } | 1733 } |
1715 } | 1734 } |
1716 | 1735 |
1717 core.Map<core.String, core.Object> toJson() { | 1736 core.Map<core.String, core.Object> toJson() { |
1718 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1737 final core.Map<core.String, core.Object> _json = |
| 1738 new core.Map<core.String, core.Object>(); |
1719 if (deferred != null) { | 1739 if (deferred != null) { |
1720 _json["deferred"] = deferred.map((value) => (value).toJson()).toList(); | 1740 _json["deferred"] = deferred.map((value) => (value).toJson()).toList(); |
1721 } | 1741 } |
1722 if (found != null) { | 1742 if (found != null) { |
1723 _json["found"] = found.map((value) => (value).toJson()).toList(); | 1743 _json["found"] = found.map((value) => (value).toJson()).toList(); |
1724 } | 1744 } |
1725 if (missing != null) { | 1745 if (missing != null) { |
1726 _json["missing"] = missing.map((value) => (value).toJson()).toList(); | 1746 _json["missing"] = missing.map((value) => (value).toJson()).toList(); |
1727 } | 1747 } |
1728 return _json; | 1748 return _json; |
1729 } | 1749 } |
1730 } | 1750 } |
1731 | 1751 |
1732 /** A mutation to apply to an entity. */ | 1752 /// A mutation to apply to an entity. |
1733 class Mutation { | 1753 class Mutation { |
1734 /** | 1754 /// The version of the entity that this mutation is being applied to. If this |
1735 * The version of the entity that this mutation is being applied to. If this | 1755 /// does not match the current version on the server, the mutation conflicts. |
1736 * does not match the current version on the server, the mutation conflicts. | |
1737 */ | |
1738 core.String baseVersion; | 1756 core.String baseVersion; |
1739 /** | 1757 |
1740 * The key of the entity to delete. The entity may or may not already exist. | 1758 /// The key of the entity to delete. The entity may or may not already exist. |
1741 * Must have a complete key path and must not be reserved/read-only. | 1759 /// Must have a complete key path and must not be reserved/read-only. |
1742 */ | |
1743 Key delete; | 1760 Key delete; |
1744 /** | 1761 |
1745 * The entity to insert. The entity must not already exist. | 1762 /// The entity to insert. The entity must not already exist. |
1746 * The entity key's final path element may be incomplete. | 1763 /// The entity key's final path element may be incomplete. |
1747 */ | |
1748 Entity insert; | 1764 Entity insert; |
1749 /** | 1765 |
1750 * The entity to update. The entity must already exist. | 1766 /// The entity to update. The entity must already exist. |
1751 * Must have a complete key path. | 1767 /// Must have a complete key path. |
1752 */ | |
1753 Entity update; | 1768 Entity update; |
1754 /** | 1769 |
1755 * The entity to upsert. The entity may or may not already exist. | 1770 /// The entity to upsert. The entity may or may not already exist. |
1756 * The entity key's final path element may be incomplete. | 1771 /// The entity key's final path element may be incomplete. |
1757 */ | |
1758 Entity upsert; | 1772 Entity upsert; |
1759 | 1773 |
1760 Mutation(); | 1774 Mutation(); |
1761 | 1775 |
1762 Mutation.fromJson(core.Map _json) { | 1776 Mutation.fromJson(core.Map _json) { |
1763 if (_json.containsKey("baseVersion")) { | 1777 if (_json.containsKey("baseVersion")) { |
1764 baseVersion = _json["baseVersion"]; | 1778 baseVersion = _json["baseVersion"]; |
1765 } | 1779 } |
1766 if (_json.containsKey("delete")) { | 1780 if (_json.containsKey("delete")) { |
1767 delete = new Key.fromJson(_json["delete"]); | 1781 delete = new Key.fromJson(_json["delete"]); |
1768 } | 1782 } |
1769 if (_json.containsKey("insert")) { | 1783 if (_json.containsKey("insert")) { |
1770 insert = new Entity.fromJson(_json["insert"]); | 1784 insert = new Entity.fromJson(_json["insert"]); |
1771 } | 1785 } |
1772 if (_json.containsKey("update")) { | 1786 if (_json.containsKey("update")) { |
1773 update = new Entity.fromJson(_json["update"]); | 1787 update = new Entity.fromJson(_json["update"]); |
1774 } | 1788 } |
1775 if (_json.containsKey("upsert")) { | 1789 if (_json.containsKey("upsert")) { |
1776 upsert = new Entity.fromJson(_json["upsert"]); | 1790 upsert = new Entity.fromJson(_json["upsert"]); |
1777 } | 1791 } |
1778 } | 1792 } |
1779 | 1793 |
1780 core.Map<core.String, core.Object> toJson() { | 1794 core.Map<core.String, core.Object> toJson() { |
1781 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1795 final core.Map<core.String, core.Object> _json = |
| 1796 new core.Map<core.String, core.Object>(); |
1782 if (baseVersion != null) { | 1797 if (baseVersion != null) { |
1783 _json["baseVersion"] = baseVersion; | 1798 _json["baseVersion"] = baseVersion; |
1784 } | 1799 } |
1785 if (delete != null) { | 1800 if (delete != null) { |
1786 _json["delete"] = (delete).toJson(); | 1801 _json["delete"] = (delete).toJson(); |
1787 } | 1802 } |
1788 if (insert != null) { | 1803 if (insert != null) { |
1789 _json["insert"] = (insert).toJson(); | 1804 _json["insert"] = (insert).toJson(); |
1790 } | 1805 } |
1791 if (update != null) { | 1806 if (update != null) { |
1792 _json["update"] = (update).toJson(); | 1807 _json["update"] = (update).toJson(); |
1793 } | 1808 } |
1794 if (upsert != null) { | 1809 if (upsert != null) { |
1795 _json["upsert"] = (upsert).toJson(); | 1810 _json["upsert"] = (upsert).toJson(); |
1796 } | 1811 } |
1797 return _json; | 1812 return _json; |
1798 } | 1813 } |
1799 } | 1814 } |
1800 | 1815 |
1801 /** The result of applying a mutation. */ | 1816 /// The result of applying a mutation. |
1802 class MutationResult { | 1817 class MutationResult { |
1803 /** | 1818 /// Whether a conflict was detected for this mutation. Always false when a |
1804 * Whether a conflict was detected for this mutation. Always false when a | 1819 /// conflict detection strategy field is not set in the mutation. |
1805 * conflict detection strategy field is not set in the mutation. | |
1806 */ | |
1807 core.bool conflictDetected; | 1820 core.bool conflictDetected; |
1808 /** | 1821 |
1809 * The automatically allocated key. | 1822 /// The automatically allocated key. |
1810 * Set only when the mutation allocated a key. | 1823 /// Set only when the mutation allocated a key. |
1811 */ | |
1812 Key key; | 1824 Key key; |
1813 /** | 1825 |
1814 * The version of the entity on the server after processing the mutation. If | 1826 /// The version of the entity on the server after processing the mutation. If |
1815 * the mutation doesn't change anything on the server, then the version will | 1827 /// the mutation doesn't change anything on the server, then the version will |
1816 * be the version of the current entity or, if no entity is present, a version | 1828 /// be the version of the current entity or, if no entity is present, a |
1817 * that is strictly greater than the version of any previous entity and less | 1829 /// version |
1818 * than the version of any possible future entity. | 1830 /// that is strictly greater than the version of any previous entity and less |
1819 */ | 1831 /// than the version of any possible future entity. |
1820 core.String version; | 1832 core.String version; |
1821 | 1833 |
1822 MutationResult(); | 1834 MutationResult(); |
1823 | 1835 |
1824 MutationResult.fromJson(core.Map _json) { | 1836 MutationResult.fromJson(core.Map _json) { |
1825 if (_json.containsKey("conflictDetected")) { | 1837 if (_json.containsKey("conflictDetected")) { |
1826 conflictDetected = _json["conflictDetected"]; | 1838 conflictDetected = _json["conflictDetected"]; |
1827 } | 1839 } |
1828 if (_json.containsKey("key")) { | 1840 if (_json.containsKey("key")) { |
1829 key = new Key.fromJson(_json["key"]); | 1841 key = new Key.fromJson(_json["key"]); |
1830 } | 1842 } |
1831 if (_json.containsKey("version")) { | 1843 if (_json.containsKey("version")) { |
1832 version = _json["version"]; | 1844 version = _json["version"]; |
1833 } | 1845 } |
1834 } | 1846 } |
1835 | 1847 |
1836 core.Map<core.String, core.Object> toJson() { | 1848 core.Map<core.String, core.Object> toJson() { |
1837 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1849 final core.Map<core.String, core.Object> _json = |
| 1850 new core.Map<core.String, core.Object>(); |
1838 if (conflictDetected != null) { | 1851 if (conflictDetected != null) { |
1839 _json["conflictDetected"] = conflictDetected; | 1852 _json["conflictDetected"] = conflictDetected; |
1840 } | 1853 } |
1841 if (key != null) { | 1854 if (key != null) { |
1842 _json["key"] = (key).toJson(); | 1855 _json["key"] = (key).toJson(); |
1843 } | 1856 } |
1844 if (version != null) { | 1857 if (version != null) { |
1845 _json["version"] = version; | 1858 _json["version"] = version; |
1846 } | 1859 } |
1847 return _json; | 1860 return _json; |
1848 } | 1861 } |
1849 } | 1862 } |
1850 | 1863 |
1851 /** | 1864 /// A partition ID identifies a grouping of entities. The grouping is always |
1852 * A partition ID identifies a grouping of entities. The grouping is always | 1865 /// by project and namespace, however the namespace ID may be empty. |
1853 * by project and namespace, however the namespace ID may be empty. | 1866 /// |
1854 * | 1867 /// A partition ID contains several dimensions: |
1855 * A partition ID contains several dimensions: | 1868 /// project ID and namespace ID. |
1856 * project ID and namespace ID. | 1869 /// |
1857 * | 1870 /// Partition dimensions: |
1858 * Partition dimensions: | 1871 /// |
1859 * | 1872 /// - May be `""`. |
1860 * - May be `""`. | 1873 /// - Must be valid UTF-8 bytes. |
1861 * - Must be valid UTF-8 bytes. | 1874 /// - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}` |
1862 * - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}` | 1875 /// If the value of any dimension matches regex `__.*__`, the partition is |
1863 * If the value of any dimension matches regex `__.*__`, the partition is | 1876 /// reserved/read-only. |
1864 * reserved/read-only. | 1877 /// A reserved/read-only partition ID is forbidden in certain documented |
1865 * A reserved/read-only partition ID is forbidden in certain documented | 1878 /// contexts. |
1866 * contexts. | 1879 /// |
1867 * | 1880 /// Foreign partition IDs (in which the project ID does |
1868 * Foreign partition IDs (in which the project ID does | 1881 /// not match the context project ID ) are discouraged. |
1869 * not match the context project ID ) are discouraged. | 1882 /// Reads and writes of foreign partition IDs may fail if the project is not in |
1870 * Reads and writes of foreign partition IDs may fail if the project is not in | 1883 /// an active state. |
1871 * an active state. | |
1872 */ | |
1873 class PartitionId { | 1884 class PartitionId { |
1874 /** If not empty, the ID of the namespace to which the entities belong. */ | 1885 /// If not empty, the ID of the namespace to which the entities belong. |
1875 core.String namespaceId; | 1886 core.String namespaceId; |
1876 /** The ID of the project to which the entities belong. */ | 1887 |
| 1888 /// The ID of the project to which the entities belong. |
1877 core.String projectId; | 1889 core.String projectId; |
1878 | 1890 |
1879 PartitionId(); | 1891 PartitionId(); |
1880 | 1892 |
1881 PartitionId.fromJson(core.Map _json) { | 1893 PartitionId.fromJson(core.Map _json) { |
1882 if (_json.containsKey("namespaceId")) { | 1894 if (_json.containsKey("namespaceId")) { |
1883 namespaceId = _json["namespaceId"]; | 1895 namespaceId = _json["namespaceId"]; |
1884 } | 1896 } |
1885 if (_json.containsKey("projectId")) { | 1897 if (_json.containsKey("projectId")) { |
1886 projectId = _json["projectId"]; | 1898 projectId = _json["projectId"]; |
1887 } | 1899 } |
1888 } | 1900 } |
1889 | 1901 |
1890 core.Map<core.String, core.Object> toJson() { | 1902 core.Map<core.String, core.Object> toJson() { |
1891 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1903 final core.Map<core.String, core.Object> _json = |
| 1904 new core.Map<core.String, core.Object>(); |
1892 if (namespaceId != null) { | 1905 if (namespaceId != null) { |
1893 _json["namespaceId"] = namespaceId; | 1906 _json["namespaceId"] = namespaceId; |
1894 } | 1907 } |
1895 if (projectId != null) { | 1908 if (projectId != null) { |
1896 _json["projectId"] = projectId; | 1909 _json["projectId"] = projectId; |
1897 } | 1910 } |
1898 return _json; | 1911 return _json; |
1899 } | 1912 } |
1900 } | 1913 } |
1901 | 1914 |
1902 /** | 1915 /// A (kind, ID/name) pair used to construct a key path. |
1903 * A (kind, ID/name) pair used to construct a key path. | 1916 /// |
1904 * | 1917 /// If either name or ID is set, the element is complete. |
1905 * If either name or ID is set, the element is complete. | 1918 /// If neither is set, the element is incomplete. |
1906 * If neither is set, the element is incomplete. | |
1907 */ | |
1908 class PathElement { | 1919 class PathElement { |
1909 /** | 1920 /// The auto-allocated ID of the entity. |
1910 * The auto-allocated ID of the entity. | 1921 /// Never equal to zero. Values less than zero are discouraged and may not |
1911 * Never equal to zero. Values less than zero are discouraged and may not | 1922 /// be supported in the future. |
1912 * be supported in the future. | |
1913 */ | |
1914 core.String id; | 1923 core.String id; |
1915 /** | 1924 |
1916 * The kind of the entity. | 1925 /// The kind of the entity. |
1917 * A kind matching regex `__.*__` is reserved/read-only. | 1926 /// A kind matching regex `__.*__` is reserved/read-only. |
1918 * A kind must not contain more than 1500 bytes when UTF-8 encoded. | 1927 /// A kind must not contain more than 1500 bytes when UTF-8 encoded. |
1919 * Cannot be `""`. | 1928 /// Cannot be `""`. |
1920 */ | |
1921 core.String kind; | 1929 core.String kind; |
1922 /** | 1930 |
1923 * The name of the entity. | 1931 /// The name of the entity. |
1924 * A name matching regex `__.*__` is reserved/read-only. | 1932 /// A name matching regex `__.*__` is reserved/read-only. |
1925 * A name must not be more than 1500 bytes when UTF-8 encoded. | 1933 /// A name must not be more than 1500 bytes when UTF-8 encoded. |
1926 * Cannot be `""`. | 1934 /// Cannot be `""`. |
1927 */ | |
1928 core.String name; | 1935 core.String name; |
1929 | 1936 |
1930 PathElement(); | 1937 PathElement(); |
1931 | 1938 |
1932 PathElement.fromJson(core.Map _json) { | 1939 PathElement.fromJson(core.Map _json) { |
1933 if (_json.containsKey("id")) { | 1940 if (_json.containsKey("id")) { |
1934 id = _json["id"]; | 1941 id = _json["id"]; |
1935 } | 1942 } |
1936 if (_json.containsKey("kind")) { | 1943 if (_json.containsKey("kind")) { |
1937 kind = _json["kind"]; | 1944 kind = _json["kind"]; |
1938 } | 1945 } |
1939 if (_json.containsKey("name")) { | 1946 if (_json.containsKey("name")) { |
1940 name = _json["name"]; | 1947 name = _json["name"]; |
1941 } | 1948 } |
1942 } | 1949 } |
1943 | 1950 |
1944 core.Map<core.String, core.Object> toJson() { | 1951 core.Map<core.String, core.Object> toJson() { |
1945 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1952 final core.Map<core.String, core.Object> _json = |
| 1953 new core.Map<core.String, core.Object>(); |
1946 if (id != null) { | 1954 if (id != null) { |
1947 _json["id"] = id; | 1955 _json["id"] = id; |
1948 } | 1956 } |
1949 if (kind != null) { | 1957 if (kind != null) { |
1950 _json["kind"] = kind; | 1958 _json["kind"] = kind; |
1951 } | 1959 } |
1952 if (name != null) { | 1960 if (name != null) { |
1953 _json["name"] = name; | 1961 _json["name"] = name; |
1954 } | 1962 } |
1955 return _json; | 1963 return _json; |
1956 } | 1964 } |
1957 } | 1965 } |
1958 | 1966 |
1959 /** A representation of a property in a projection. */ | 1967 /// A representation of a property in a projection. |
1960 class Projection { | 1968 class Projection { |
1961 /** The property to project. */ | 1969 /// The property to project. |
1962 PropertyReference property; | 1970 PropertyReference property; |
1963 | 1971 |
1964 Projection(); | 1972 Projection(); |
1965 | 1973 |
1966 Projection.fromJson(core.Map _json) { | 1974 Projection.fromJson(core.Map _json) { |
1967 if (_json.containsKey("property")) { | 1975 if (_json.containsKey("property")) { |
1968 property = new PropertyReference.fromJson(_json["property"]); | 1976 property = new PropertyReference.fromJson(_json["property"]); |
1969 } | 1977 } |
1970 } | 1978 } |
1971 | 1979 |
1972 core.Map<core.String, core.Object> toJson() { | 1980 core.Map<core.String, core.Object> toJson() { |
1973 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1981 final core.Map<core.String, core.Object> _json = |
| 1982 new core.Map<core.String, core.Object>(); |
1974 if (property != null) { | 1983 if (property != null) { |
1975 _json["property"] = (property).toJson(); | 1984 _json["property"] = (property).toJson(); |
1976 } | 1985 } |
1977 return _json; | 1986 return _json; |
1978 } | 1987 } |
1979 } | 1988 } |
1980 | 1989 |
1981 /** A filter on a specific property. */ | 1990 /// A filter on a specific property. |
1982 class PropertyFilter { | 1991 class PropertyFilter { |
1983 /** | 1992 /// The operator to filter by. |
1984 * The operator to filter by. | 1993 /// Possible string values are: |
1985 * Possible string values are: | 1994 /// - "OPERATOR_UNSPECIFIED" : Unspecified. This value must not be used. |
1986 * - "OPERATOR_UNSPECIFIED" : Unspecified. This value must not be used. | 1995 /// - "LESS_THAN" : Less than. |
1987 * - "LESS_THAN" : Less than. | 1996 /// - "LESS_THAN_OR_EQUAL" : Less than or equal. |
1988 * - "LESS_THAN_OR_EQUAL" : Less than or equal. | 1997 /// - "GREATER_THAN" : Greater than. |
1989 * - "GREATER_THAN" : Greater than. | 1998 /// - "GREATER_THAN_OR_EQUAL" : Greater than or equal. |
1990 * - "GREATER_THAN_OR_EQUAL" : Greater than or equal. | 1999 /// - "EQUAL" : Equal. |
1991 * - "EQUAL" : Equal. | 2000 /// - "HAS_ANCESTOR" : Has ancestor. |
1992 * - "HAS_ANCESTOR" : Has ancestor. | |
1993 */ | |
1994 core.String op; | 2001 core.String op; |
1995 /** The property to filter by. */ | 2002 |
| 2003 /// The property to filter by. |
1996 PropertyReference property; | 2004 PropertyReference property; |
1997 /** The value to compare the property to. */ | 2005 |
| 2006 /// The value to compare the property to. |
1998 Value value; | 2007 Value value; |
1999 | 2008 |
2000 PropertyFilter(); | 2009 PropertyFilter(); |
2001 | 2010 |
2002 PropertyFilter.fromJson(core.Map _json) { | 2011 PropertyFilter.fromJson(core.Map _json) { |
2003 if (_json.containsKey("op")) { | 2012 if (_json.containsKey("op")) { |
2004 op = _json["op"]; | 2013 op = _json["op"]; |
2005 } | 2014 } |
2006 if (_json.containsKey("property")) { | 2015 if (_json.containsKey("property")) { |
2007 property = new PropertyReference.fromJson(_json["property"]); | 2016 property = new PropertyReference.fromJson(_json["property"]); |
2008 } | 2017 } |
2009 if (_json.containsKey("value")) { | 2018 if (_json.containsKey("value")) { |
2010 value = new Value.fromJson(_json["value"]); | 2019 value = new Value.fromJson(_json["value"]); |
2011 } | 2020 } |
2012 } | 2021 } |
2013 | 2022 |
2014 core.Map<core.String, core.Object> toJson() { | 2023 core.Map<core.String, core.Object> toJson() { |
2015 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2024 final core.Map<core.String, core.Object> _json = |
| 2025 new core.Map<core.String, core.Object>(); |
2016 if (op != null) { | 2026 if (op != null) { |
2017 _json["op"] = op; | 2027 _json["op"] = op; |
2018 } | 2028 } |
2019 if (property != null) { | 2029 if (property != null) { |
2020 _json["property"] = (property).toJson(); | 2030 _json["property"] = (property).toJson(); |
2021 } | 2031 } |
2022 if (value != null) { | 2032 if (value != null) { |
2023 _json["value"] = (value).toJson(); | 2033 _json["value"] = (value).toJson(); |
2024 } | 2034 } |
2025 return _json; | 2035 return _json; |
2026 } | 2036 } |
2027 } | 2037 } |
2028 | 2038 |
2029 /** The desired order for a specific property. */ | 2039 /// The desired order for a specific property. |
2030 class PropertyOrder { | 2040 class PropertyOrder { |
2031 /** | 2041 /// The direction to order by. Defaults to `ASCENDING`. |
2032 * The direction to order by. Defaults to `ASCENDING`. | 2042 /// Possible string values are: |
2033 * Possible string values are: | 2043 /// - "DIRECTION_UNSPECIFIED" : Unspecified. This value must not be used. |
2034 * - "DIRECTION_UNSPECIFIED" : Unspecified. This value must not be used. | 2044 /// - "ASCENDING" : Ascending. |
2035 * - "ASCENDING" : Ascending. | 2045 /// - "DESCENDING" : Descending. |
2036 * - "DESCENDING" : Descending. | |
2037 */ | |
2038 core.String direction; | 2046 core.String direction; |
2039 /** The property to order by. */ | 2047 |
| 2048 /// The property to order by. |
2040 PropertyReference property; | 2049 PropertyReference property; |
2041 | 2050 |
2042 PropertyOrder(); | 2051 PropertyOrder(); |
2043 | 2052 |
2044 PropertyOrder.fromJson(core.Map _json) { | 2053 PropertyOrder.fromJson(core.Map _json) { |
2045 if (_json.containsKey("direction")) { | 2054 if (_json.containsKey("direction")) { |
2046 direction = _json["direction"]; | 2055 direction = _json["direction"]; |
2047 } | 2056 } |
2048 if (_json.containsKey("property")) { | 2057 if (_json.containsKey("property")) { |
2049 property = new PropertyReference.fromJson(_json["property"]); | 2058 property = new PropertyReference.fromJson(_json["property"]); |
2050 } | 2059 } |
2051 } | 2060 } |
2052 | 2061 |
2053 core.Map<core.String, core.Object> toJson() { | 2062 core.Map<core.String, core.Object> toJson() { |
2054 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2063 final core.Map<core.String, core.Object> _json = |
| 2064 new core.Map<core.String, core.Object>(); |
2055 if (direction != null) { | 2065 if (direction != null) { |
2056 _json["direction"] = direction; | 2066 _json["direction"] = direction; |
2057 } | 2067 } |
2058 if (property != null) { | 2068 if (property != null) { |
2059 _json["property"] = (property).toJson(); | 2069 _json["property"] = (property).toJson(); |
2060 } | 2070 } |
2061 return _json; | 2071 return _json; |
2062 } | 2072 } |
2063 } | 2073 } |
2064 | 2074 |
2065 /** A reference to a property relative to the kind expressions. */ | 2075 /// A reference to a property relative to the kind expressions. |
2066 class PropertyReference { | 2076 class PropertyReference { |
2067 /** | 2077 /// The name of the property. |
2068 * The name of the property. | 2078 /// If name includes "."s, it may be interpreted as a property name path. |
2069 * If name includes "."s, it may be interpreted as a property name path. | |
2070 */ | |
2071 core.String name; | 2079 core.String name; |
2072 | 2080 |
2073 PropertyReference(); | 2081 PropertyReference(); |
2074 | 2082 |
2075 PropertyReference.fromJson(core.Map _json) { | 2083 PropertyReference.fromJson(core.Map _json) { |
2076 if (_json.containsKey("name")) { | 2084 if (_json.containsKey("name")) { |
2077 name = _json["name"]; | 2085 name = _json["name"]; |
2078 } | 2086 } |
2079 } | 2087 } |
2080 | 2088 |
2081 core.Map<core.String, core.Object> toJson() { | 2089 core.Map<core.String, core.Object> toJson() { |
2082 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2090 final core.Map<core.String, core.Object> _json = |
| 2091 new core.Map<core.String, core.Object>(); |
2083 if (name != null) { | 2092 if (name != null) { |
2084 _json["name"] = name; | 2093 _json["name"] = name; |
2085 } | 2094 } |
2086 return _json; | 2095 return _json; |
2087 } | 2096 } |
2088 } | 2097 } |
2089 | 2098 |
2090 /** A query for entities. */ | 2099 /// A query for entities. |
2091 class Query { | 2100 class Query { |
2092 /** | 2101 /// The properties to make distinct. The query results will contain the first |
2093 * The properties to make distinct. The query results will contain the first | 2102 /// result for each distinct combination of values for the given properties |
2094 * result for each distinct combination of values for the given properties | 2103 /// (if empty, all results are returned). |
2095 * (if empty, all results are returned). | |
2096 */ | |
2097 core.List<PropertyReference> distinctOn; | 2104 core.List<PropertyReference> distinctOn; |
2098 /** | 2105 |
2099 * An ending point for the query results. Query cursors are | 2106 /// An ending point for the query results. Query cursors are |
2100 * returned in query result batches and | 2107 /// returned in query result batches and |
2101 * [can only be used to limit the same | 2108 /// [can only be used to limit the same |
2102 * query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_lim
its_and_offsets). | 2109 /// query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_li
mits_and_offsets). |
2103 */ | |
2104 core.String endCursor; | 2110 core.String endCursor; |
2105 core.List<core.int> get endCursorAsBytes { | 2111 core.List<core.int> get endCursorAsBytes { |
2106 return convert.BASE64.decode(endCursor); | 2112 return convert.BASE64.decode(endCursor); |
2107 } | 2113 } |
2108 | 2114 |
2109 void set endCursorAsBytes(core.List<core.int> _bytes) { | 2115 void set endCursorAsBytes(core.List<core.int> _bytes) { |
2110 endCursor = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+
", "-"); | 2116 endCursor = |
| 2117 convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-"); |
2111 } | 2118 } |
2112 /** The filter to apply. */ | 2119 |
| 2120 /// The filter to apply. |
2113 Filter filter; | 2121 Filter filter; |
2114 /** | 2122 |
2115 * The kinds to query (if empty, returns entities of all kinds). | 2123 /// The kinds to query (if empty, returns entities of all kinds). |
2116 * Currently at most 1 kind may be specified. | 2124 /// Currently at most 1 kind may be specified. |
2117 */ | |
2118 core.List<KindExpression> kind; | 2125 core.List<KindExpression> kind; |
2119 /** | 2126 |
2120 * The maximum number of results to return. Applies after all other | 2127 /// The maximum number of results to return. Applies after all other |
2121 * constraints. Optional. | 2128 /// constraints. Optional. |
2122 * Unspecified is interpreted as no limit. | 2129 /// Unspecified is interpreted as no limit. |
2123 * Must be >= 0 if specified. | 2130 /// Must be >= 0 if specified. |
2124 */ | |
2125 core.int limit; | 2131 core.int limit; |
2126 /** | 2132 |
2127 * The number of results to skip. Applies before limit, but after all other | 2133 /// The number of results to skip. Applies before limit, but after all other |
2128 * constraints. Optional. Must be >= 0 if specified. | 2134 /// constraints. Optional. Must be >= 0 if specified. |
2129 */ | |
2130 core.int offset; | 2135 core.int offset; |
2131 /** | 2136 |
2132 * The order to apply to the query results (if empty, order is unspecified). | 2137 /// The order to apply to the query results (if empty, order is unspecified). |
2133 */ | |
2134 core.List<PropertyOrder> order; | 2138 core.List<PropertyOrder> order; |
2135 /** The projection to return. Defaults to returning all properties. */ | 2139 |
| 2140 /// The projection to return. Defaults to returning all properties. |
2136 core.List<Projection> projection; | 2141 core.List<Projection> projection; |
2137 /** | 2142 |
2138 * A starting point for the query results. Query cursors are | 2143 /// A starting point for the query results. Query cursors are |
2139 * returned in query result batches and | 2144 /// returned in query result batches and |
2140 * [can only be used to continue the same | 2145 /// [can only be used to continue the same |
2141 * query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_lim
its_and_offsets). | 2146 /// query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_li
mits_and_offsets). |
2142 */ | |
2143 core.String startCursor; | 2147 core.String startCursor; |
2144 core.List<core.int> get startCursorAsBytes { | 2148 core.List<core.int> get startCursorAsBytes { |
2145 return convert.BASE64.decode(startCursor); | 2149 return convert.BASE64.decode(startCursor); |
2146 } | 2150 } |
2147 | 2151 |
2148 void set startCursorAsBytes(core.List<core.int> _bytes) { | 2152 void set startCursorAsBytes(core.List<core.int> _bytes) { |
2149 startCursor = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll(
"+", "-"); | 2153 startCursor = |
| 2154 convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-"); |
2150 } | 2155 } |
2151 | 2156 |
2152 Query(); | 2157 Query(); |
2153 | 2158 |
2154 Query.fromJson(core.Map _json) { | 2159 Query.fromJson(core.Map _json) { |
2155 if (_json.containsKey("distinctOn")) { | 2160 if (_json.containsKey("distinctOn")) { |
2156 distinctOn = _json["distinctOn"].map((value) => new PropertyReference.from
Json(value)).toList(); | 2161 distinctOn = _json["distinctOn"] |
| 2162 .map((value) => new PropertyReference.fromJson(value)) |
| 2163 .toList(); |
2157 } | 2164 } |
2158 if (_json.containsKey("endCursor")) { | 2165 if (_json.containsKey("endCursor")) { |
2159 endCursor = _json["endCursor"]; | 2166 endCursor = _json["endCursor"]; |
2160 } | 2167 } |
2161 if (_json.containsKey("filter")) { | 2168 if (_json.containsKey("filter")) { |
2162 filter = new Filter.fromJson(_json["filter"]); | 2169 filter = new Filter.fromJson(_json["filter"]); |
2163 } | 2170 } |
2164 if (_json.containsKey("kind")) { | 2171 if (_json.containsKey("kind")) { |
2165 kind = _json["kind"].map((value) => new KindExpression.fromJson(value)).to
List(); | 2172 kind = _json["kind"] |
| 2173 .map((value) => new KindExpression.fromJson(value)) |
| 2174 .toList(); |
2166 } | 2175 } |
2167 if (_json.containsKey("limit")) { | 2176 if (_json.containsKey("limit")) { |
2168 limit = _json["limit"]; | 2177 limit = _json["limit"]; |
2169 } | 2178 } |
2170 if (_json.containsKey("offset")) { | 2179 if (_json.containsKey("offset")) { |
2171 offset = _json["offset"]; | 2180 offset = _json["offset"]; |
2172 } | 2181 } |
2173 if (_json.containsKey("order")) { | 2182 if (_json.containsKey("order")) { |
2174 order = _json["order"].map((value) => new PropertyOrder.fromJson(value)).t
oList(); | 2183 order = _json["order"] |
| 2184 .map((value) => new PropertyOrder.fromJson(value)) |
| 2185 .toList(); |
2175 } | 2186 } |
2176 if (_json.containsKey("projection")) { | 2187 if (_json.containsKey("projection")) { |
2177 projection = _json["projection"].map((value) => new Projection.fromJson(va
lue)).toList(); | 2188 projection = _json["projection"] |
| 2189 .map((value) => new Projection.fromJson(value)) |
| 2190 .toList(); |
2178 } | 2191 } |
2179 if (_json.containsKey("startCursor")) { | 2192 if (_json.containsKey("startCursor")) { |
2180 startCursor = _json["startCursor"]; | 2193 startCursor = _json["startCursor"]; |
2181 } | 2194 } |
2182 } | 2195 } |
2183 | 2196 |
2184 core.Map<core.String, core.Object> toJson() { | 2197 core.Map<core.String, core.Object> toJson() { |
2185 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2198 final core.Map<core.String, core.Object> _json = |
| 2199 new core.Map<core.String, core.Object>(); |
2186 if (distinctOn != null) { | 2200 if (distinctOn != null) { |
2187 _json["distinctOn"] = distinctOn.map((value) => (value).toJson()).toList()
; | 2201 _json["distinctOn"] = |
| 2202 distinctOn.map((value) => (value).toJson()).toList(); |
2188 } | 2203 } |
2189 if (endCursor != null) { | 2204 if (endCursor != null) { |
2190 _json["endCursor"] = endCursor; | 2205 _json["endCursor"] = endCursor; |
2191 } | 2206 } |
2192 if (filter != null) { | 2207 if (filter != null) { |
2193 _json["filter"] = (filter).toJson(); | 2208 _json["filter"] = (filter).toJson(); |
2194 } | 2209 } |
2195 if (kind != null) { | 2210 if (kind != null) { |
2196 _json["kind"] = kind.map((value) => (value).toJson()).toList(); | 2211 _json["kind"] = kind.map((value) => (value).toJson()).toList(); |
2197 } | 2212 } |
2198 if (limit != null) { | 2213 if (limit != null) { |
2199 _json["limit"] = limit; | 2214 _json["limit"] = limit; |
2200 } | 2215 } |
2201 if (offset != null) { | 2216 if (offset != null) { |
2202 _json["offset"] = offset; | 2217 _json["offset"] = offset; |
2203 } | 2218 } |
2204 if (order != null) { | 2219 if (order != null) { |
2205 _json["order"] = order.map((value) => (value).toJson()).toList(); | 2220 _json["order"] = order.map((value) => (value).toJson()).toList(); |
2206 } | 2221 } |
2207 if (projection != null) { | 2222 if (projection != null) { |
2208 _json["projection"] = projection.map((value) => (value).toJson()).toList()
; | 2223 _json["projection"] = |
| 2224 projection.map((value) => (value).toJson()).toList(); |
2209 } | 2225 } |
2210 if (startCursor != null) { | 2226 if (startCursor != null) { |
2211 _json["startCursor"] = startCursor; | 2227 _json["startCursor"] = startCursor; |
2212 } | 2228 } |
2213 return _json; | 2229 return _json; |
2214 } | 2230 } |
2215 } | 2231 } |
2216 | 2232 |
2217 /** A batch of results produced by a query. */ | 2233 /// A batch of results produced by a query. |
2218 class QueryResultBatch { | 2234 class QueryResultBatch { |
2219 /** | 2235 /// A cursor that points to the position after the last result in the batch. |
2220 * A cursor that points to the position after the last result in the batch. | |
2221 */ | |
2222 core.String endCursor; | 2236 core.String endCursor; |
2223 core.List<core.int> get endCursorAsBytes { | 2237 core.List<core.int> get endCursorAsBytes { |
2224 return convert.BASE64.decode(endCursor); | 2238 return convert.BASE64.decode(endCursor); |
2225 } | 2239 } |
2226 | 2240 |
2227 void set endCursorAsBytes(core.List<core.int> _bytes) { | 2241 void set endCursorAsBytes(core.List<core.int> _bytes) { |
2228 endCursor = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+
", "-"); | 2242 endCursor = |
| 2243 convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-"); |
2229 } | 2244 } |
2230 /** | 2245 |
2231 * The result type for every entity in `entity_results`. | 2246 /// The result type for every entity in `entity_results`. |
2232 * Possible string values are: | 2247 /// Possible string values are: |
2233 * - "RESULT_TYPE_UNSPECIFIED" : Unspecified. This value is never used. | 2248 /// - "RESULT_TYPE_UNSPECIFIED" : Unspecified. This value is never used. |
2234 * - "FULL" : The key and properties. | 2249 /// - "FULL" : The key and properties. |
2235 * - "PROJECTION" : A projected subset of properties. The entity may have no | 2250 /// - "PROJECTION" : A projected subset of properties. The entity may have no |
2236 * key. | 2251 /// key. |
2237 * - "KEY_ONLY" : Only the key. | 2252 /// - "KEY_ONLY" : Only the key. |
2238 */ | |
2239 core.String entityResultType; | 2253 core.String entityResultType; |
2240 /** The results for this batch. */ | 2254 |
| 2255 /// The results for this batch. |
2241 core.List<EntityResult> entityResults; | 2256 core.List<EntityResult> entityResults; |
2242 /** | 2257 |
2243 * The state of the query after the current batch. | 2258 /// The state of the query after the current batch. |
2244 * Possible string values are: | 2259 /// Possible string values are: |
2245 * - "MORE_RESULTS_TYPE_UNSPECIFIED" : Unspecified. This value is never used. | 2260 /// - "MORE_RESULTS_TYPE_UNSPECIFIED" : Unspecified. This value is never |
2246 * - "NOT_FINISHED" : There may be additional batches to fetch from this | 2261 /// used. |
2247 * query. | 2262 /// - "NOT_FINISHED" : There may be additional batches to fetch from this |
2248 * - "MORE_RESULTS_AFTER_LIMIT" : The query is finished, but there may be more | 2263 /// query. |
2249 * results after the limit. | 2264 /// - "MORE_RESULTS_AFTER_LIMIT" : The query is finished, but there may be |
2250 * - "MORE_RESULTS_AFTER_CURSOR" : The query is finished, but there may be | 2265 /// more results after the limit. |
2251 * more results after the end | 2266 /// - "MORE_RESULTS_AFTER_CURSOR" : The query is finished, but there may be |
2252 * cursor. | 2267 /// more results after the end |
2253 * - "NO_MORE_RESULTS" : The query is finished, and there are no more results. | 2268 /// cursor. |
2254 */ | 2269 /// - "NO_MORE_RESULTS" : The query is finished, and there are no more |
| 2270 /// results. |
2255 core.String moreResults; | 2271 core.String moreResults; |
2256 /** | 2272 |
2257 * A cursor that points to the position after the last skipped result. | 2273 /// A cursor that points to the position after the last skipped result. |
2258 * Will be set when `skipped_results` != 0. | 2274 /// Will be set when `skipped_results` != 0. |
2259 */ | |
2260 core.String skippedCursor; | 2275 core.String skippedCursor; |
2261 core.List<core.int> get skippedCursorAsBytes { | 2276 core.List<core.int> get skippedCursorAsBytes { |
2262 return convert.BASE64.decode(skippedCursor); | 2277 return convert.BASE64.decode(skippedCursor); |
2263 } | 2278 } |
2264 | 2279 |
2265 void set skippedCursorAsBytes(core.List<core.int> _bytes) { | 2280 void set skippedCursorAsBytes(core.List<core.int> _bytes) { |
2266 skippedCursor = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAl
l("+", "-"); | 2281 skippedCursor = |
| 2282 convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-"); |
2267 } | 2283 } |
2268 /** The number of results skipped, typically because of an offset. */ | 2284 |
| 2285 /// The number of results skipped, typically because of an offset. |
2269 core.int skippedResults; | 2286 core.int skippedResults; |
2270 /** | 2287 |
2271 * The version number of the snapshot this batch was returned from. | 2288 /// The version number of the snapshot this batch was returned from. |
2272 * This applies to the range of results from the query's `start_cursor` (or | 2289 /// This applies to the range of results from the query's `start_cursor` (or |
2273 * the beginning of the query if no cursor was given) to this batch's | 2290 /// the beginning of the query if no cursor was given) to this batch's |
2274 * `end_cursor` (not the query's `end_cursor`). | 2291 /// `end_cursor` (not the query's `end_cursor`). |
2275 * | 2292 /// |
2276 * In a single transaction, subsequent query result batches for the same query | 2293 /// In a single transaction, subsequent query result batches for the same |
2277 * can have a greater snapshot version number. Each batch's snapshot version | 2294 /// query |
2278 * is valid for all preceding batches. | 2295 /// can have a greater snapshot version number. Each batch's snapshot version |
2279 * The value will be zero for eventually consistent queries. | 2296 /// is valid for all preceding batches. |
2280 */ | 2297 /// The value will be zero for eventually consistent queries. |
2281 core.String snapshotVersion; | 2298 core.String snapshotVersion; |
2282 | 2299 |
2283 QueryResultBatch(); | 2300 QueryResultBatch(); |
2284 | 2301 |
2285 QueryResultBatch.fromJson(core.Map _json) { | 2302 QueryResultBatch.fromJson(core.Map _json) { |
2286 if (_json.containsKey("endCursor")) { | 2303 if (_json.containsKey("endCursor")) { |
2287 endCursor = _json["endCursor"]; | 2304 endCursor = _json["endCursor"]; |
2288 } | 2305 } |
2289 if (_json.containsKey("entityResultType")) { | 2306 if (_json.containsKey("entityResultType")) { |
2290 entityResultType = _json["entityResultType"]; | 2307 entityResultType = _json["entityResultType"]; |
2291 } | 2308 } |
2292 if (_json.containsKey("entityResults")) { | 2309 if (_json.containsKey("entityResults")) { |
2293 entityResults = _json["entityResults"].map((value) => new EntityResult.fro
mJson(value)).toList(); | 2310 entityResults = _json["entityResults"] |
| 2311 .map((value) => new EntityResult.fromJson(value)) |
| 2312 .toList(); |
2294 } | 2313 } |
2295 if (_json.containsKey("moreResults")) { | 2314 if (_json.containsKey("moreResults")) { |
2296 moreResults = _json["moreResults"]; | 2315 moreResults = _json["moreResults"]; |
2297 } | 2316 } |
2298 if (_json.containsKey("skippedCursor")) { | 2317 if (_json.containsKey("skippedCursor")) { |
2299 skippedCursor = _json["skippedCursor"]; | 2318 skippedCursor = _json["skippedCursor"]; |
2300 } | 2319 } |
2301 if (_json.containsKey("skippedResults")) { | 2320 if (_json.containsKey("skippedResults")) { |
2302 skippedResults = _json["skippedResults"]; | 2321 skippedResults = _json["skippedResults"]; |
2303 } | 2322 } |
2304 if (_json.containsKey("snapshotVersion")) { | 2323 if (_json.containsKey("snapshotVersion")) { |
2305 snapshotVersion = _json["snapshotVersion"]; | 2324 snapshotVersion = _json["snapshotVersion"]; |
2306 } | 2325 } |
2307 } | 2326 } |
2308 | 2327 |
2309 core.Map<core.String, core.Object> toJson() { | 2328 core.Map<core.String, core.Object> toJson() { |
2310 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2329 final core.Map<core.String, core.Object> _json = |
| 2330 new core.Map<core.String, core.Object>(); |
2311 if (endCursor != null) { | 2331 if (endCursor != null) { |
2312 _json["endCursor"] = endCursor; | 2332 _json["endCursor"] = endCursor; |
2313 } | 2333 } |
2314 if (entityResultType != null) { | 2334 if (entityResultType != null) { |
2315 _json["entityResultType"] = entityResultType; | 2335 _json["entityResultType"] = entityResultType; |
2316 } | 2336 } |
2317 if (entityResults != null) { | 2337 if (entityResults != null) { |
2318 _json["entityResults"] = entityResults.map((value) => (value).toJson()).to
List(); | 2338 _json["entityResults"] = |
| 2339 entityResults.map((value) => (value).toJson()).toList(); |
2319 } | 2340 } |
2320 if (moreResults != null) { | 2341 if (moreResults != null) { |
2321 _json["moreResults"] = moreResults; | 2342 _json["moreResults"] = moreResults; |
2322 } | 2343 } |
2323 if (skippedCursor != null) { | 2344 if (skippedCursor != null) { |
2324 _json["skippedCursor"] = skippedCursor; | 2345 _json["skippedCursor"] = skippedCursor; |
2325 } | 2346 } |
2326 if (skippedResults != null) { | 2347 if (skippedResults != null) { |
2327 _json["skippedResults"] = skippedResults; | 2348 _json["skippedResults"] = skippedResults; |
2328 } | 2349 } |
2329 if (snapshotVersion != null) { | 2350 if (snapshotVersion != null) { |
2330 _json["snapshotVersion"] = snapshotVersion; | 2351 _json["snapshotVersion"] = snapshotVersion; |
2331 } | 2352 } |
2332 return _json; | 2353 return _json; |
2333 } | 2354 } |
2334 } | 2355 } |
2335 | 2356 |
2336 /** Options specific to read-only transactions. */ | 2357 /// Options specific to read-only transactions. |
2337 class ReadOnly { | 2358 class ReadOnly { |
2338 | |
2339 ReadOnly(); | 2359 ReadOnly(); |
2340 | 2360 |
2341 ReadOnly.fromJson(core.Map _json) { | 2361 ReadOnly.fromJson(core.Map _json) {} |
2342 } | |
2343 | 2362 |
2344 core.Map<core.String, core.Object> toJson() { | 2363 core.Map<core.String, core.Object> toJson() { |
2345 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2364 final core.Map<core.String, core.Object> _json = |
| 2365 new core.Map<core.String, core.Object>(); |
2346 return _json; | 2366 return _json; |
2347 } | 2367 } |
2348 } | 2368 } |
2349 | 2369 |
2350 /** The options shared by read requests. */ | 2370 /// The options shared by read requests. |
2351 class ReadOptions { | 2371 class ReadOptions { |
2352 /** | 2372 /// The non-transactional read consistency to use. |
2353 * The non-transactional read consistency to use. | 2373 /// Cannot be set to `STRONG` for global queries. |
2354 * Cannot be set to `STRONG` for global queries. | 2374 /// Possible string values are: |
2355 * Possible string values are: | 2375 /// - "READ_CONSISTENCY_UNSPECIFIED" : Unspecified. This value must not be |
2356 * - "READ_CONSISTENCY_UNSPECIFIED" : Unspecified. This value must not be | 2376 /// used. |
2357 * used. | 2377 /// - "STRONG" : Strong consistency. |
2358 * - "STRONG" : Strong consistency. | 2378 /// - "EVENTUAL" : Eventual consistency. |
2359 * - "EVENTUAL" : Eventual consistency. | |
2360 */ | |
2361 core.String readConsistency; | 2379 core.String readConsistency; |
2362 /** | 2380 |
2363 * The identifier of the transaction in which to read. A | 2381 /// The identifier of the transaction in which to read. A |
2364 * transaction identifier is returned by a call to | 2382 /// transaction identifier is returned by a call to |
2365 * Datastore.BeginTransaction. | 2383 /// Datastore.BeginTransaction. |
2366 */ | |
2367 core.String transaction; | 2384 core.String transaction; |
2368 core.List<core.int> get transactionAsBytes { | 2385 core.List<core.int> get transactionAsBytes { |
2369 return convert.BASE64.decode(transaction); | 2386 return convert.BASE64.decode(transaction); |
2370 } | 2387 } |
2371 | 2388 |
2372 void set transactionAsBytes(core.List<core.int> _bytes) { | 2389 void set transactionAsBytes(core.List<core.int> _bytes) { |
2373 transaction = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll(
"+", "-"); | 2390 transaction = |
| 2391 convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-"); |
2374 } | 2392 } |
2375 | 2393 |
2376 ReadOptions(); | 2394 ReadOptions(); |
2377 | 2395 |
2378 ReadOptions.fromJson(core.Map _json) { | 2396 ReadOptions.fromJson(core.Map _json) { |
2379 if (_json.containsKey("readConsistency")) { | 2397 if (_json.containsKey("readConsistency")) { |
2380 readConsistency = _json["readConsistency"]; | 2398 readConsistency = _json["readConsistency"]; |
2381 } | 2399 } |
2382 if (_json.containsKey("transaction")) { | 2400 if (_json.containsKey("transaction")) { |
2383 transaction = _json["transaction"]; | 2401 transaction = _json["transaction"]; |
2384 } | 2402 } |
2385 } | 2403 } |
2386 | 2404 |
2387 core.Map<core.String, core.Object> toJson() { | 2405 core.Map<core.String, core.Object> toJson() { |
2388 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2406 final core.Map<core.String, core.Object> _json = |
| 2407 new core.Map<core.String, core.Object>(); |
2389 if (readConsistency != null) { | 2408 if (readConsistency != null) { |
2390 _json["readConsistency"] = readConsistency; | 2409 _json["readConsistency"] = readConsistency; |
2391 } | 2410 } |
2392 if (transaction != null) { | 2411 if (transaction != null) { |
2393 _json["transaction"] = transaction; | 2412 _json["transaction"] = transaction; |
2394 } | 2413 } |
2395 return _json; | 2414 return _json; |
2396 } | 2415 } |
2397 } | 2416 } |
2398 | 2417 |
2399 /** Options specific to read / write transactions. */ | 2418 /// Options specific to read / write transactions. |
2400 class ReadWrite { | 2419 class ReadWrite { |
2401 /** The transaction identifier of the transaction being retried. */ | 2420 /// The transaction identifier of the transaction being retried. |
2402 core.String previousTransaction; | 2421 core.String previousTransaction; |
2403 core.List<core.int> get previousTransactionAsBytes { | 2422 core.List<core.int> get previousTransactionAsBytes { |
2404 return convert.BASE64.decode(previousTransaction); | 2423 return convert.BASE64.decode(previousTransaction); |
2405 } | 2424 } |
2406 | 2425 |
2407 void set previousTransactionAsBytes(core.List<core.int> _bytes) { | 2426 void set previousTransactionAsBytes(core.List<core.int> _bytes) { |
2408 previousTransaction = convert.BASE64.encode(_bytes).replaceAll("/", "_").rep
laceAll("+", "-"); | 2427 previousTransaction = |
| 2428 convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-"); |
2409 } | 2429 } |
2410 | 2430 |
2411 ReadWrite(); | 2431 ReadWrite(); |
2412 | 2432 |
2413 ReadWrite.fromJson(core.Map _json) { | 2433 ReadWrite.fromJson(core.Map _json) { |
2414 if (_json.containsKey("previousTransaction")) { | 2434 if (_json.containsKey("previousTransaction")) { |
2415 previousTransaction = _json["previousTransaction"]; | 2435 previousTransaction = _json["previousTransaction"]; |
2416 } | 2436 } |
2417 } | 2437 } |
2418 | 2438 |
2419 core.Map<core.String, core.Object> toJson() { | 2439 core.Map<core.String, core.Object> toJson() { |
2420 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2440 final core.Map<core.String, core.Object> _json = |
| 2441 new core.Map<core.String, core.Object>(); |
2421 if (previousTransaction != null) { | 2442 if (previousTransaction != null) { |
2422 _json["previousTransaction"] = previousTransaction; | 2443 _json["previousTransaction"] = previousTransaction; |
2423 } | 2444 } |
2424 return _json; | 2445 return _json; |
2425 } | 2446 } |
2426 } | 2447 } |
2427 | 2448 |
2428 /** The request for Datastore.Rollback. */ | 2449 /// The request for Datastore.Rollback. |
2429 class RollbackRequest { | 2450 class RollbackRequest { |
2430 /** | 2451 /// The transaction identifier, returned by a call to |
2431 * The transaction identifier, returned by a call to | 2452 /// Datastore.BeginTransaction. |
2432 * Datastore.BeginTransaction. | |
2433 */ | |
2434 core.String transaction; | 2453 core.String transaction; |
2435 core.List<core.int> get transactionAsBytes { | 2454 core.List<core.int> get transactionAsBytes { |
2436 return convert.BASE64.decode(transaction); | 2455 return convert.BASE64.decode(transaction); |
2437 } | 2456 } |
2438 | 2457 |
2439 void set transactionAsBytes(core.List<core.int> _bytes) { | 2458 void set transactionAsBytes(core.List<core.int> _bytes) { |
2440 transaction = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll(
"+", "-"); | 2459 transaction = |
| 2460 convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-"); |
2441 } | 2461 } |
2442 | 2462 |
2443 RollbackRequest(); | 2463 RollbackRequest(); |
2444 | 2464 |
2445 RollbackRequest.fromJson(core.Map _json) { | 2465 RollbackRequest.fromJson(core.Map _json) { |
2446 if (_json.containsKey("transaction")) { | 2466 if (_json.containsKey("transaction")) { |
2447 transaction = _json["transaction"]; | 2467 transaction = _json["transaction"]; |
2448 } | 2468 } |
2449 } | 2469 } |
2450 | 2470 |
2451 core.Map<core.String, core.Object> toJson() { | 2471 core.Map<core.String, core.Object> toJson() { |
2452 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2472 final core.Map<core.String, core.Object> _json = |
| 2473 new core.Map<core.String, core.Object>(); |
2453 if (transaction != null) { | 2474 if (transaction != null) { |
2454 _json["transaction"] = transaction; | 2475 _json["transaction"] = transaction; |
2455 } | 2476 } |
2456 return _json; | 2477 return _json; |
2457 } | 2478 } |
2458 } | 2479 } |
2459 | 2480 |
2460 /** | 2481 /// The response for Datastore.Rollback. |
2461 * The response for Datastore.Rollback. | 2482 /// (an empty message). |
2462 * (an empty message). | |
2463 */ | |
2464 class RollbackResponse { | 2483 class RollbackResponse { |
2465 | |
2466 RollbackResponse(); | 2484 RollbackResponse(); |
2467 | 2485 |
2468 RollbackResponse.fromJson(core.Map _json) { | 2486 RollbackResponse.fromJson(core.Map _json) {} |
2469 } | |
2470 | 2487 |
2471 core.Map<core.String, core.Object> toJson() { | 2488 core.Map<core.String, core.Object> toJson() { |
2472 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2489 final core.Map<core.String, core.Object> _json = |
| 2490 new core.Map<core.String, core.Object>(); |
2473 return _json; | 2491 return _json; |
2474 } | 2492 } |
2475 } | 2493 } |
2476 | 2494 |
2477 /** The request for Datastore.RunQuery. */ | 2495 /// The request for Datastore.RunQuery. |
2478 class RunQueryRequest { | 2496 class RunQueryRequest { |
2479 /** The GQL query to run. */ | 2497 /// The GQL query to run. |
2480 GqlQuery gqlQuery; | 2498 GqlQuery gqlQuery; |
2481 /** | 2499 |
2482 * Entities are partitioned into subsets, identified by a partition ID. | 2500 /// Entities are partitioned into subsets, identified by a partition ID. |
2483 * Queries are scoped to a single partition. | 2501 /// Queries are scoped to a single partition. |
2484 * This partition ID is normalized with the standard default context | 2502 /// This partition ID is normalized with the standard default context |
2485 * partition ID. | 2503 /// partition ID. |
2486 */ | |
2487 PartitionId partitionId; | 2504 PartitionId partitionId; |
2488 /** The query to run. */ | 2505 |
| 2506 /// The query to run. |
2489 Query query; | 2507 Query query; |
2490 /** The options for this query. */ | 2508 |
| 2509 /// The options for this query. |
2491 ReadOptions readOptions; | 2510 ReadOptions readOptions; |
2492 | 2511 |
2493 RunQueryRequest(); | 2512 RunQueryRequest(); |
2494 | 2513 |
2495 RunQueryRequest.fromJson(core.Map _json) { | 2514 RunQueryRequest.fromJson(core.Map _json) { |
2496 if (_json.containsKey("gqlQuery")) { | 2515 if (_json.containsKey("gqlQuery")) { |
2497 gqlQuery = new GqlQuery.fromJson(_json["gqlQuery"]); | 2516 gqlQuery = new GqlQuery.fromJson(_json["gqlQuery"]); |
2498 } | 2517 } |
2499 if (_json.containsKey("partitionId")) { | 2518 if (_json.containsKey("partitionId")) { |
2500 partitionId = new PartitionId.fromJson(_json["partitionId"]); | 2519 partitionId = new PartitionId.fromJson(_json["partitionId"]); |
2501 } | 2520 } |
2502 if (_json.containsKey("query")) { | 2521 if (_json.containsKey("query")) { |
2503 query = new Query.fromJson(_json["query"]); | 2522 query = new Query.fromJson(_json["query"]); |
2504 } | 2523 } |
2505 if (_json.containsKey("readOptions")) { | 2524 if (_json.containsKey("readOptions")) { |
2506 readOptions = new ReadOptions.fromJson(_json["readOptions"]); | 2525 readOptions = new ReadOptions.fromJson(_json["readOptions"]); |
2507 } | 2526 } |
2508 } | 2527 } |
2509 | 2528 |
2510 core.Map<core.String, core.Object> toJson() { | 2529 core.Map<core.String, core.Object> toJson() { |
2511 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2530 final core.Map<core.String, core.Object> _json = |
| 2531 new core.Map<core.String, core.Object>(); |
2512 if (gqlQuery != null) { | 2532 if (gqlQuery != null) { |
2513 _json["gqlQuery"] = (gqlQuery).toJson(); | 2533 _json["gqlQuery"] = (gqlQuery).toJson(); |
2514 } | 2534 } |
2515 if (partitionId != null) { | 2535 if (partitionId != null) { |
2516 _json["partitionId"] = (partitionId).toJson(); | 2536 _json["partitionId"] = (partitionId).toJson(); |
2517 } | 2537 } |
2518 if (query != null) { | 2538 if (query != null) { |
2519 _json["query"] = (query).toJson(); | 2539 _json["query"] = (query).toJson(); |
2520 } | 2540 } |
2521 if (readOptions != null) { | 2541 if (readOptions != null) { |
2522 _json["readOptions"] = (readOptions).toJson(); | 2542 _json["readOptions"] = (readOptions).toJson(); |
2523 } | 2543 } |
2524 return _json; | 2544 return _json; |
2525 } | 2545 } |
2526 } | 2546 } |
2527 | 2547 |
2528 /** The response for Datastore.RunQuery. */ | 2548 /// The response for Datastore.RunQuery. |
2529 class RunQueryResponse { | 2549 class RunQueryResponse { |
2530 /** A batch of query results (always present). */ | 2550 /// A batch of query results (always present). |
2531 QueryResultBatch batch; | 2551 QueryResultBatch batch; |
2532 /** The parsed form of the `GqlQuery` from the request, if it was set. */ | 2552 |
| 2553 /// The parsed form of the `GqlQuery` from the request, if it was set. |
2533 Query query; | 2554 Query query; |
2534 | 2555 |
2535 RunQueryResponse(); | 2556 RunQueryResponse(); |
2536 | 2557 |
2537 RunQueryResponse.fromJson(core.Map _json) { | 2558 RunQueryResponse.fromJson(core.Map _json) { |
2538 if (_json.containsKey("batch")) { | 2559 if (_json.containsKey("batch")) { |
2539 batch = new QueryResultBatch.fromJson(_json["batch"]); | 2560 batch = new QueryResultBatch.fromJson(_json["batch"]); |
2540 } | 2561 } |
2541 if (_json.containsKey("query")) { | 2562 if (_json.containsKey("query")) { |
2542 query = new Query.fromJson(_json["query"]); | 2563 query = new Query.fromJson(_json["query"]); |
2543 } | 2564 } |
2544 } | 2565 } |
2545 | 2566 |
2546 core.Map<core.String, core.Object> toJson() { | 2567 core.Map<core.String, core.Object> toJson() { |
2547 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2568 final core.Map<core.String, core.Object> _json = |
| 2569 new core.Map<core.String, core.Object>(); |
2548 if (batch != null) { | 2570 if (batch != null) { |
2549 _json["batch"] = (batch).toJson(); | 2571 _json["batch"] = (batch).toJson(); |
2550 } | 2572 } |
2551 if (query != null) { | 2573 if (query != null) { |
2552 _json["query"] = (query).toJson(); | 2574 _json["query"] = (query).toJson(); |
2553 } | 2575 } |
2554 return _json; | 2576 return _json; |
2555 } | 2577 } |
2556 } | 2578 } |
2557 | 2579 |
2558 /** | 2580 /// The `Status` type defines a logical error model that is suitable for |
2559 * The `Status` type defines a logical error model that is suitable for | 2581 /// different |
2560 * different | 2582 /// programming environments, including REST APIs and RPC APIs. It is used by |
2561 * programming environments, including REST APIs and RPC APIs. It is used by | 2583 /// [gRPC](https://github.com/grpc). The error model is designed to be: |
2562 * [gRPC](https://github.com/grpc). The error model is designed to be: | 2584 /// |
2563 * | 2585 /// - Simple to use and understand for most users |
2564 * - Simple to use and understand for most users | 2586 /// - Flexible enough to meet unexpected needs |
2565 * - Flexible enough to meet unexpected needs | 2587 /// |
2566 * | 2588 /// # Overview |
2567 * # Overview | 2589 /// |
2568 * | 2590 /// The `Status` message contains three pieces of data: error code, error |
2569 * The `Status` message contains three pieces of data: error code, error | 2591 /// message, |
2570 * message, | 2592 /// and error details. The error code should be an enum value of |
2571 * and error details. The error code should be an enum value of | 2593 /// google.rpc.Code, but it may accept additional error codes if needed. The |
2572 * google.rpc.Code, but it may accept additional error codes if needed. The | 2594 /// error message should be a developer-facing English message that helps |
2573 * error message should be a developer-facing English message that helps | 2595 /// developers *understand* and *resolve* the error. If a localized user-facing |
2574 * developers *understand* and *resolve* the error. If a localized user-facing | 2596 /// error message is needed, put the localized message in the error details or |
2575 * error message is needed, put the localized message in the error details or | 2597 /// localize it in the client. The optional error details may contain arbitrary |
2576 * localize it in the client. The optional error details may contain arbitrary | 2598 /// information about the error. There is a predefined set of error detail |
2577 * information about the error. There is a predefined set of error detail types | 2599 /// types |
2578 * in the package `google.rpc` that can be used for common error conditions. | 2600 /// in the package `google.rpc` that can be used for common error conditions. |
2579 * | 2601 /// |
2580 * # Language mapping | 2602 /// # Language mapping |
2581 * | 2603 /// |
2582 * The `Status` message is the logical representation of the error model, but it | 2604 /// The `Status` message is the logical representation of the error model, but |
2583 * is not necessarily the actual wire format. When the `Status` message is | 2605 /// it |
2584 * exposed in different client libraries and different wire protocols, it can be | 2606 /// is not necessarily the actual wire format. When the `Status` message is |
2585 * mapped differently. For example, it will likely be mapped to some exceptions | 2607 /// exposed in different client libraries and different wire protocols, it can |
2586 * in Java, but more likely mapped to some error codes in C. | 2608 /// be |
2587 * | 2609 /// mapped differently. For example, it will likely be mapped to some |
2588 * # Other uses | 2610 /// exceptions |
2589 * | 2611 /// in Java, but more likely mapped to some error codes in C. |
2590 * The error model and the `Status` message can be used in a variety of | 2612 /// |
2591 * environments, either with or without APIs, to provide a | 2613 /// # Other uses |
2592 * consistent developer experience across different environments. | 2614 /// |
2593 * | 2615 /// The error model and the `Status` message can be used in a variety of |
2594 * Example uses of this error model include: | 2616 /// environments, either with or without APIs, to provide a |
2595 * | 2617 /// consistent developer experience across different environments. |
2596 * - Partial errors. If a service needs to return partial errors to the client, | 2618 /// |
2597 * it may embed the `Status` in the normal response to indicate the partial | 2619 /// Example uses of this error model include: |
2598 * errors. | 2620 /// |
2599 * | 2621 /// - Partial errors. If a service needs to return partial errors to the |
2600 * - Workflow errors. A typical workflow has multiple steps. Each step may | 2622 /// client, |
2601 * have a `Status` message for error reporting. | 2623 /// it may embed the `Status` in the normal response to indicate the partial |
2602 * | 2624 /// errors. |
2603 * - Batch operations. If a client uses batch request and batch response, the | 2625 /// |
2604 * `Status` message should be used directly inside batch response, one for | 2626 /// - Workflow errors. A typical workflow has multiple steps. Each step may |
2605 * each error sub-response. | 2627 /// have a `Status` message for error reporting. |
2606 * | 2628 /// |
2607 * - Asynchronous operations. If an API call embeds asynchronous operation | 2629 /// - Batch operations. If a client uses batch request and batch response, the |
2608 * results in its response, the status of those operations should be | 2630 /// `Status` message should be used directly inside batch response, one for |
2609 * represented directly using the `Status` message. | 2631 /// each error sub-response. |
2610 * | 2632 /// |
2611 * - Logging. If some API errors are stored in logs, the message `Status` could | 2633 /// - Asynchronous operations. If an API call embeds asynchronous operation |
2612 * be used directly after any stripping needed for security/privacy reasons. | 2634 /// results in its response, the status of those operations should be |
2613 */ | 2635 /// represented directly using the `Status` message. |
| 2636 /// |
| 2637 /// - Logging. If some API errors are stored in logs, the message `Status` |
| 2638 /// could |
| 2639 /// be used directly after any stripping needed for security/privacy reasons. |
2614 class Status { | 2640 class Status { |
2615 /** The status code, which should be an enum value of google.rpc.Code. */ | 2641 /// The status code, which should be an enum value of google.rpc.Code. |
2616 core.int code; | 2642 core.int code; |
2617 /** | 2643 |
2618 * A list of messages that carry the error details. There is a common set of | 2644 /// A list of messages that carry the error details. There is a common set |
2619 * message types for APIs to use. | 2645 /// of |
2620 * | 2646 /// message types for APIs to use. |
2621 * The values for Object must be JSON objects. It can consist of `num`, | 2647 /// |
2622 * `String`, `bool` and `null` as well as `Map` and `List` values. | 2648 /// The values for Object must be JSON objects. It can consist of `num`, |
2623 */ | 2649 /// `String`, `bool` and `null` as well as `Map` and `List` values. |
2624 core.List<core.Map<core.String, core.Object>> details; | 2650 core.List<core.Map<core.String, core.Object>> details; |
2625 /** | 2651 |
2626 * A developer-facing error message, which should be in English. Any | 2652 /// A developer-facing error message, which should be in English. Any |
2627 * user-facing error message should be localized and sent in the | 2653 /// user-facing error message should be localized and sent in the |
2628 * google.rpc.Status.details field, or localized by the client. | 2654 /// google.rpc.Status.details field, or localized by the client. |
2629 */ | |
2630 core.String message; | 2655 core.String message; |
2631 | 2656 |
2632 Status(); | 2657 Status(); |
2633 | 2658 |
2634 Status.fromJson(core.Map _json) { | 2659 Status.fromJson(core.Map _json) { |
2635 if (_json.containsKey("code")) { | 2660 if (_json.containsKey("code")) { |
2636 code = _json["code"]; | 2661 code = _json["code"]; |
2637 } | 2662 } |
2638 if (_json.containsKey("details")) { | 2663 if (_json.containsKey("details")) { |
2639 details = _json["details"]; | 2664 details = _json["details"]; |
2640 } | 2665 } |
2641 if (_json.containsKey("message")) { | 2666 if (_json.containsKey("message")) { |
2642 message = _json["message"]; | 2667 message = _json["message"]; |
2643 } | 2668 } |
2644 } | 2669 } |
2645 | 2670 |
2646 core.Map<core.String, core.Object> toJson() { | 2671 core.Map<core.String, core.Object> toJson() { |
2647 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2672 final core.Map<core.String, core.Object> _json = |
| 2673 new core.Map<core.String, core.Object>(); |
2648 if (code != null) { | 2674 if (code != null) { |
2649 _json["code"] = code; | 2675 _json["code"] = code; |
2650 } | 2676 } |
2651 if (details != null) { | 2677 if (details != null) { |
2652 _json["details"] = details; | 2678 _json["details"] = details; |
2653 } | 2679 } |
2654 if (message != null) { | 2680 if (message != null) { |
2655 _json["message"] = message; | 2681 _json["message"] = message; |
2656 } | 2682 } |
2657 return _json; | 2683 return _json; |
2658 } | 2684 } |
2659 } | 2685 } |
2660 | 2686 |
2661 /** | 2687 /// Options for beginning a new transaction. |
2662 * Options for beginning a new transaction. | 2688 /// |
2663 * | 2689 /// Transactions can be created explicitly with calls to |
2664 * Transactions can be created explicitly with calls to | 2690 /// Datastore.BeginTransaction or implicitly by setting |
2665 * Datastore.BeginTransaction or implicitly by setting | 2691 /// ReadOptions.new_transaction in read requests. |
2666 * ReadOptions.new_transaction in read requests. | |
2667 */ | |
2668 class TransactionOptions { | 2692 class TransactionOptions { |
2669 /** The transaction should only allow reads. */ | 2693 /// The transaction should only allow reads. |
2670 ReadOnly readOnly; | 2694 ReadOnly readOnly; |
2671 /** The transaction should allow both reads and writes. */ | 2695 |
| 2696 /// The transaction should allow both reads and writes. |
2672 ReadWrite readWrite; | 2697 ReadWrite readWrite; |
2673 | 2698 |
2674 TransactionOptions(); | 2699 TransactionOptions(); |
2675 | 2700 |
2676 TransactionOptions.fromJson(core.Map _json) { | 2701 TransactionOptions.fromJson(core.Map _json) { |
2677 if (_json.containsKey("readOnly")) { | 2702 if (_json.containsKey("readOnly")) { |
2678 readOnly = new ReadOnly.fromJson(_json["readOnly"]); | 2703 readOnly = new ReadOnly.fromJson(_json["readOnly"]); |
2679 } | 2704 } |
2680 if (_json.containsKey("readWrite")) { | 2705 if (_json.containsKey("readWrite")) { |
2681 readWrite = new ReadWrite.fromJson(_json["readWrite"]); | 2706 readWrite = new ReadWrite.fromJson(_json["readWrite"]); |
2682 } | 2707 } |
2683 } | 2708 } |
2684 | 2709 |
2685 core.Map<core.String, core.Object> toJson() { | 2710 core.Map<core.String, core.Object> toJson() { |
2686 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2711 final core.Map<core.String, core.Object> _json = |
| 2712 new core.Map<core.String, core.Object>(); |
2687 if (readOnly != null) { | 2713 if (readOnly != null) { |
2688 _json["readOnly"] = (readOnly).toJson(); | 2714 _json["readOnly"] = (readOnly).toJson(); |
2689 } | 2715 } |
2690 if (readWrite != null) { | 2716 if (readWrite != null) { |
2691 _json["readWrite"] = (readWrite).toJson(); | 2717 _json["readWrite"] = (readWrite).toJson(); |
2692 } | 2718 } |
2693 return _json; | 2719 return _json; |
2694 } | 2720 } |
2695 } | 2721 } |
2696 | 2722 |
2697 /** | 2723 /// A message that can hold any of the supported value types and associated |
2698 * A message that can hold any of the supported value types and associated | 2724 /// metadata. |
2699 * metadata. | |
2700 */ | |
2701 class Value { | 2725 class Value { |
2702 /** | 2726 /// An array value. |
2703 * An array value. | 2727 /// Cannot contain another array value. |
2704 * Cannot contain another array value. | 2728 /// A `Value` instance that sets field `array_value` must not set fields |
2705 * A `Value` instance that sets field `array_value` must not set fields | 2729 /// `meaning` or `exclude_from_indexes`. |
2706 * `meaning` or `exclude_from_indexes`. | |
2707 */ | |
2708 ArrayValue arrayValue; | 2730 ArrayValue arrayValue; |
2709 /** | 2731 |
2710 * A blob value. | 2732 /// A blob value. |
2711 * May have at most 1,000,000 bytes. | 2733 /// May have at most 1,000,000 bytes. |
2712 * When `exclude_from_indexes` is false, may have at most 1500 bytes. | 2734 /// When `exclude_from_indexes` is false, may have at most 1500 bytes. |
2713 * In JSON requests, must be base64-encoded. | 2735 /// In JSON requests, must be base64-encoded. |
2714 */ | |
2715 core.String blobValue; | 2736 core.String blobValue; |
2716 core.List<core.int> get blobValueAsBytes { | 2737 core.List<core.int> get blobValueAsBytes { |
2717 return convert.BASE64.decode(blobValue); | 2738 return convert.BASE64.decode(blobValue); |
2718 } | 2739 } |
2719 | 2740 |
2720 void set blobValueAsBytes(core.List<core.int> _bytes) { | 2741 void set blobValueAsBytes(core.List<core.int> _bytes) { |
2721 blobValue = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+
", "-"); | 2742 blobValue = |
| 2743 convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-"); |
2722 } | 2744 } |
2723 /** A boolean value. */ | 2745 |
| 2746 /// A boolean value. |
2724 core.bool booleanValue; | 2747 core.bool booleanValue; |
2725 /** A double value. */ | 2748 |
| 2749 /// A double value. |
2726 core.double doubleValue; | 2750 core.double doubleValue; |
2727 /** | 2751 |
2728 * An entity value. | 2752 /// An entity value. |
2729 * | 2753 /// |
2730 * - May have no key. | 2754 /// - May have no key. |
2731 * - May have a key with an incomplete key path. | 2755 /// - May have a key with an incomplete key path. |
2732 * - May have a reserved/read-only key. | 2756 /// - May have a reserved/read-only key. |
2733 */ | |
2734 Entity entityValue; | 2757 Entity entityValue; |
2735 /** | 2758 |
2736 * If the value should be excluded from all indexes including those defined | 2759 /// If the value should be excluded from all indexes including those defined |
2737 * explicitly. | 2760 /// explicitly. |
2738 */ | |
2739 core.bool excludeFromIndexes; | 2761 core.bool excludeFromIndexes; |
2740 /** A geo point value representing a point on the surface of Earth. */ | 2762 |
| 2763 /// A geo point value representing a point on the surface of Earth. |
2741 LatLng geoPointValue; | 2764 LatLng geoPointValue; |
2742 /** An integer value. */ | 2765 |
| 2766 /// An integer value. |
2743 core.String integerValue; | 2767 core.String integerValue; |
2744 /** A key value. */ | 2768 |
| 2769 /// A key value. |
2745 Key keyValue; | 2770 Key keyValue; |
2746 /** | 2771 |
2747 * The `meaning` field should only be populated for backwards compatibility. | 2772 /// The `meaning` field should only be populated for backwards compatibility. |
2748 */ | |
2749 core.int meaning; | 2773 core.int meaning; |
2750 /** | 2774 |
2751 * A null value. | 2775 /// A null value. |
2752 * Possible string values are: | 2776 /// Possible string values are: |
2753 * - "NULL_VALUE" : Null value. | 2777 /// - "NULL_VALUE" : Null value. |
2754 */ | |
2755 core.String nullValue; | 2778 core.String nullValue; |
2756 /** | 2779 |
2757 * A UTF-8 encoded string value. | 2780 /// A UTF-8 encoded string value. |
2758 * When `exclude_from_indexes` is false (it is indexed) , may have at most | 2781 /// When `exclude_from_indexes` is false (it is indexed) , may have at most |
2759 * 1500 bytes. | 2782 /// 1500 bytes. |
2760 * Otherwise, may be set to at least 1,000,000 bytes. | 2783 /// Otherwise, may be set to at least 1,000,000 bytes. |
2761 */ | |
2762 core.String stringValue; | 2784 core.String stringValue; |
2763 /** | 2785 |
2764 * A timestamp value. | 2786 /// A timestamp value. |
2765 * When stored in the Datastore, precise only to microseconds; | 2787 /// When stored in the Datastore, precise only to microseconds; |
2766 * any additional precision is rounded down. | 2788 /// any additional precision is rounded down. |
2767 */ | |
2768 core.String timestampValue; | 2789 core.String timestampValue; |
2769 | 2790 |
2770 Value(); | 2791 Value(); |
2771 | 2792 |
2772 Value.fromJson(core.Map _json) { | 2793 Value.fromJson(core.Map _json) { |
2773 if (_json.containsKey("arrayValue")) { | 2794 if (_json.containsKey("arrayValue")) { |
2774 arrayValue = new ArrayValue.fromJson(_json["arrayValue"]); | 2795 arrayValue = new ArrayValue.fromJson(_json["arrayValue"]); |
2775 } | 2796 } |
2776 if (_json.containsKey("blobValue")) { | 2797 if (_json.containsKey("blobValue")) { |
2777 blobValue = _json["blobValue"]; | 2798 blobValue = _json["blobValue"]; |
(...skipping 27 matching lines...) Loading... |
2805 } | 2826 } |
2806 if (_json.containsKey("stringValue")) { | 2827 if (_json.containsKey("stringValue")) { |
2807 stringValue = _json["stringValue"]; | 2828 stringValue = _json["stringValue"]; |
2808 } | 2829 } |
2809 if (_json.containsKey("timestampValue")) { | 2830 if (_json.containsKey("timestampValue")) { |
2810 timestampValue = _json["timestampValue"]; | 2831 timestampValue = _json["timestampValue"]; |
2811 } | 2832 } |
2812 } | 2833 } |
2813 | 2834 |
2814 core.Map<core.String, core.Object> toJson() { | 2835 core.Map<core.String, core.Object> toJson() { |
2815 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2836 final core.Map<core.String, core.Object> _json = |
| 2837 new core.Map<core.String, core.Object>(); |
2816 if (arrayValue != null) { | 2838 if (arrayValue != null) { |
2817 _json["arrayValue"] = (arrayValue).toJson(); | 2839 _json["arrayValue"] = (arrayValue).toJson(); |
2818 } | 2840 } |
2819 if (blobValue != null) { | 2841 if (blobValue != null) { |
2820 _json["blobValue"] = blobValue; | 2842 _json["blobValue"] = blobValue; |
2821 } | 2843 } |
2822 if (booleanValue != null) { | 2844 if (booleanValue != null) { |
2823 _json["booleanValue"] = booleanValue; | 2845 _json["booleanValue"] = booleanValue; |
2824 } | 2846 } |
2825 if (doubleValue != null) { | 2847 if (doubleValue != null) { |
(...skipping 22 matching lines...) Loading... |
2848 } | 2870 } |
2849 if (stringValue != null) { | 2871 if (stringValue != null) { |
2850 _json["stringValue"] = stringValue; | 2872 _json["stringValue"] = stringValue; |
2851 } | 2873 } |
2852 if (timestampValue != null) { | 2874 if (timestampValue != null) { |
2853 _json["timestampValue"] = timestampValue; | 2875 _json["timestampValue"] = timestampValue; |
2854 } | 2876 } |
2855 return _json; | 2877 return _json; |
2856 } | 2878 } |
2857 } | 2879 } |
OLD | NEW |