Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Side by Side Diff: generated/googleapis/lib/mapsengine/v1.dart

Issue 1797933002: Api-roll 33: 2016-03-14 (Closed) Base URL: git@github.com:dart-lang/googleapis.git@master
Patch Set: Added resources/*/CHANGELOG.md, addresssed comments Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // This is a generated file (see the discoveryapis_generator project).
2
3 library googleapis.mapsengine.v1;
4
5 import 'dart:core' as core;
6 import 'dart:collection' as collection;
7 import 'dart:async' as async;
8 import 'dart:convert' as convert;
9
10 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons;
11 import 'package:crypto/crypto.dart' as crypto;
12 import 'package:http/http.dart' as http;
13
14 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show
15 ApiRequestError, DetailedApiRequestError, Media, UploadOptions,
16 ResumableUploadOptions, DownloadOptions, PartialDownloadOptions,
17 ByteRange;
18
19 const core.String USER_AGENT = 'dart-api-client mapsengine/v1';
20
21 /**
22 * The Google Maps Engine API allows developers to store and query geospatial
23 * vector and raster data.
24 */
25 class MapsengineApi {
26 /** View and manage your Google My Maps data */
27 static const MapsengineScope = "https://www.googleapis.com/auth/mapsengine";
28
29 /** View your Google My Maps data */
30 static const MapsengineReadonlyScope = "https://www.googleapis.com/auth/mapsen gine.readonly";
31
32
33 final commons.ApiRequester _requester;
34
35 AssetsResourceApi get assets => new AssetsResourceApi(_requester);
36 LayersResourceApi get layers => new LayersResourceApi(_requester);
37 MapsResourceApi get maps => new MapsResourceApi(_requester);
38 ProjectsResourceApi get projects => new ProjectsResourceApi(_requester);
39 RasterCollectionsResourceApi get rasterCollections => new RasterCollectionsRes ourceApi(_requester);
40 RastersResourceApi get rasters => new RastersResourceApi(_requester);
41 TablesResourceApi get tables => new TablesResourceApi(_requester);
42
43 MapsengineApi(http.Client client, {core.String rootUrl: "https://www.googleapi s.com/", core.String servicePath: "mapsengine/v1/"}) :
44 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A GENT);
45 }
46
47
48 class AssetsResourceApi {
49 final commons.ApiRequester _requester;
50
51 AssetsParentsResourceApi get parents => new AssetsParentsResourceApi(_requeste r);
52 AssetsPermissionsResourceApi get permissions => new AssetsPermissionsResourceA pi(_requester);
53
54 AssetsResourceApi(commons.ApiRequester client) :
55 _requester = client;
56
57 /**
58 * Return metadata for a particular asset.
59 *
60 * Request parameters:
61 *
62 * [id] - The ID of the asset.
63 *
64 * Completes with a [Asset].
65 *
66 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
67 * error.
68 *
69 * If the used [http.Client] completes with an error when making a REST call,
70 * this method will complete with the same error.
71 */
72 async.Future<Asset> get(core.String id) {
73 var _url = null;
74 var _queryParams = new core.Map();
75 var _uploadMedia = null;
76 var _uploadOptions = null;
77 var _downloadOptions = commons.DownloadOptions.Metadata;
78 var _body = null;
79
80 if (id == null) {
81 throw new core.ArgumentError("Parameter id is required.");
82 }
83
84 _url = 'assets/' + commons.Escaper.ecapeVariable('$id');
85
86 var _response = _requester.request(_url,
87 "GET",
88 body: _body,
89 queryParams: _queryParams,
90 uploadOptions: _uploadOptions,
91 uploadMedia: _uploadMedia,
92 downloadOptions: _downloadOptions);
93 return _response.then((data) => new Asset.fromJson(data));
94 }
95
96 /**
97 * Return all assets readable by the current user.
98 *
99 * Request parameters:
100 *
101 * [bbox] - A bounding box, expressed as "west,south,east,north". If set, only
102 * assets which intersect this bounding box will be returned.
103 *
104 * [createdAfter] - An RFC 3339 formatted date-time value (e.g.
105 * 1970-01-01T00:00:00Z). Returned assets will have been created at or after
106 * this time.
107 *
108 * [createdBefore] - An RFC 3339 formatted date-time value (e.g.
109 * 1970-01-01T00:00:00Z). Returned assets will have been created at or before
110 * this time.
111 *
112 * [creatorEmail] - An email address representing a user. Returned assets that
113 * have been created by the user associated with the provided email address.
114 *
115 * [maxResults] - The maximum number of items to include in a single response
116 * page. The maximum supported value is 100.
117 *
118 * [modifiedAfter] - An RFC 3339 formatted date-time value (e.g.
119 * 1970-01-01T00:00:00Z). Returned assets will have been modified at or after
120 * this time.
121 *
122 * [modifiedBefore] - An RFC 3339 formatted date-time value (e.g.
123 * 1970-01-01T00:00:00Z). Returned assets will have been modified at or before
124 * this time.
125 *
126 * [pageToken] - The continuation token, used to page through large result
127 * sets. To get the next page of results, set this parameter to the value of
128 * nextPageToken from the previous response.
129 *
130 * [projectId] - The ID of a Maps Engine project, used to filter the response.
131 * To list all available projects with their IDs, send a Projects: list
132 * request. You can also find your project ID as the value of the
133 * DashboardPlace:cid URL parameter when signed in to mapsengine.google.com.
134 *
135 * [role] - The role parameter indicates that the response should only contain
136 * assets where the current user has the specified level of access.
137 * Possible string values are:
138 * - "owner" : The user can read, write and administer the asset.
139 * - "reader" : The user can read the asset.
140 * - "writer" : The user can read and write the asset.
141 *
142 * [search] - An unstructured search string used to filter the set of results
143 * based on asset metadata.
144 *
145 * [tags] - A comma separated list of tags. Returned assets will contain all
146 * the tags from the list.
147 *
148 * [type] - A comma separated list of asset types. Returned assets will have
149 * one of the types from the provided list. Supported values are 'map',
150 * 'layer', 'rasterCollection' and 'table'.
151 *
152 * Completes with a [AssetsListResponse].
153 *
154 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
155 * error.
156 *
157 * If the used [http.Client] completes with an error when making a REST call,
158 * this method will complete with the same error.
159 */
160 async.Future<AssetsListResponse> list({core.String bbox, core.DateTime created After, core.DateTime createdBefore, core.String creatorEmail, core.int maxResult s, core.DateTime modifiedAfter, core.DateTime modifiedBefore, core.String pageTo ken, core.String projectId, core.String role, core.String search, core.String ta gs, core.String type}) {
161 var _url = null;
162 var _queryParams = new core.Map();
163 var _uploadMedia = null;
164 var _uploadOptions = null;
165 var _downloadOptions = commons.DownloadOptions.Metadata;
166 var _body = null;
167
168 if (bbox != null) {
169 _queryParams["bbox"] = [bbox];
170 }
171 if (createdAfter != null) {
172 _queryParams["createdAfter"] = [(createdAfter).toIso8601String()];
173 }
174 if (createdBefore != null) {
175 _queryParams["createdBefore"] = [(createdBefore).toIso8601String()];
176 }
177 if (creatorEmail != null) {
178 _queryParams["creatorEmail"] = [creatorEmail];
179 }
180 if (maxResults != null) {
181 _queryParams["maxResults"] = ["${maxResults}"];
182 }
183 if (modifiedAfter != null) {
184 _queryParams["modifiedAfter"] = [(modifiedAfter).toIso8601String()];
185 }
186 if (modifiedBefore != null) {
187 _queryParams["modifiedBefore"] = [(modifiedBefore).toIso8601String()];
188 }
189 if (pageToken != null) {
190 _queryParams["pageToken"] = [pageToken];
191 }
192 if (projectId != null) {
193 _queryParams["projectId"] = [projectId];
194 }
195 if (role != null) {
196 _queryParams["role"] = [role];
197 }
198 if (search != null) {
199 _queryParams["search"] = [search];
200 }
201 if (tags != null) {
202 _queryParams["tags"] = [tags];
203 }
204 if (type != null) {
205 _queryParams["type"] = [type];
206 }
207
208 _url = 'assets';
209
210 var _response = _requester.request(_url,
211 "GET",
212 body: _body,
213 queryParams: _queryParams,
214 uploadOptions: _uploadOptions,
215 uploadMedia: _uploadMedia,
216 downloadOptions: _downloadOptions);
217 return _response.then((data) => new AssetsListResponse.fromJson(data));
218 }
219
220 }
221
222
223 class AssetsParentsResourceApi {
224 final commons.ApiRequester _requester;
225
226 AssetsParentsResourceApi(commons.ApiRequester client) :
227 _requester = client;
228
229 /**
230 * Return all parent ids of the specified asset.
231 *
232 * Request parameters:
233 *
234 * [id] - The ID of the asset whose parents will be listed.
235 *
236 * [maxResults] - The maximum number of items to include in a single response
237 * page. The maximum supported value is 50.
238 *
239 * [pageToken] - The continuation token, used to page through large result
240 * sets. To get the next page of results, set this parameter to the value of
241 * nextPageToken from the previous response.
242 *
243 * Completes with a [ParentsListResponse].
244 *
245 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
246 * error.
247 *
248 * If the used [http.Client] completes with an error when making a REST call,
249 * this method will complete with the same error.
250 */
251 async.Future<ParentsListResponse> list(core.String id, {core.int maxResults, c ore.String pageToken}) {
252 var _url = null;
253 var _queryParams = new core.Map();
254 var _uploadMedia = null;
255 var _uploadOptions = null;
256 var _downloadOptions = commons.DownloadOptions.Metadata;
257 var _body = null;
258
259 if (id == null) {
260 throw new core.ArgumentError("Parameter id is required.");
261 }
262 if (maxResults != null) {
263 _queryParams["maxResults"] = ["${maxResults}"];
264 }
265 if (pageToken != null) {
266 _queryParams["pageToken"] = [pageToken];
267 }
268
269 _url = 'assets/' + commons.Escaper.ecapeVariable('$id') + '/parents';
270
271 var _response = _requester.request(_url,
272 "GET",
273 body: _body,
274 queryParams: _queryParams,
275 uploadOptions: _uploadOptions,
276 uploadMedia: _uploadMedia,
277 downloadOptions: _downloadOptions);
278 return _response.then((data) => new ParentsListResponse.fromJson(data));
279 }
280
281 }
282
283
284 class AssetsPermissionsResourceApi {
285 final commons.ApiRequester _requester;
286
287 AssetsPermissionsResourceApi(commons.ApiRequester client) :
288 _requester = client;
289
290 /**
291 * Return all of the permissions for the specified asset.
292 *
293 * Request parameters:
294 *
295 * [id] - The ID of the asset whose permissions will be listed.
296 *
297 * Completes with a [PermissionsListResponse].
298 *
299 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
300 * error.
301 *
302 * If the used [http.Client] completes with an error when making a REST call,
303 * this method will complete with the same error.
304 */
305 async.Future<PermissionsListResponse> list(core.String id) {
306 var _url = null;
307 var _queryParams = new core.Map();
308 var _uploadMedia = null;
309 var _uploadOptions = null;
310 var _downloadOptions = commons.DownloadOptions.Metadata;
311 var _body = null;
312
313 if (id == null) {
314 throw new core.ArgumentError("Parameter id is required.");
315 }
316
317 _url = 'assets/' + commons.Escaper.ecapeVariable('$id') + '/permissions';
318
319 var _response = _requester.request(_url,
320 "GET",
321 body: _body,
322 queryParams: _queryParams,
323 uploadOptions: _uploadOptions,
324 uploadMedia: _uploadMedia,
325 downloadOptions: _downloadOptions);
326 return _response.then((data) => new PermissionsListResponse.fromJson(data));
327 }
328
329 }
330
331
332 class LayersResourceApi {
333 final commons.ApiRequester _requester;
334
335 LayersParentsResourceApi get parents => new LayersParentsResourceApi(_requeste r);
336 LayersPermissionsResourceApi get permissions => new LayersPermissionsResourceA pi(_requester);
337
338 LayersResourceApi(commons.ApiRequester client) :
339 _requester = client;
340
341 /**
342 * Cancel processing on a layer asset.
343 *
344 * Request parameters:
345 *
346 * [id] - The ID of the layer.
347 *
348 * Completes with a [ProcessResponse].
349 *
350 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
351 * error.
352 *
353 * If the used [http.Client] completes with an error when making a REST call,
354 * this method will complete with the same error.
355 */
356 async.Future<ProcessResponse> cancelProcessing(core.String id) {
357 var _url = null;
358 var _queryParams = new core.Map();
359 var _uploadMedia = null;
360 var _uploadOptions = null;
361 var _downloadOptions = commons.DownloadOptions.Metadata;
362 var _body = null;
363
364 if (id == null) {
365 throw new core.ArgumentError("Parameter id is required.");
366 }
367
368 _url = 'layers/' + commons.Escaper.ecapeVariable('$id') + '/cancelProcessing ';
369
370 var _response = _requester.request(_url,
371 "POST",
372 body: _body,
373 queryParams: _queryParams,
374 uploadOptions: _uploadOptions,
375 uploadMedia: _uploadMedia,
376 downloadOptions: _downloadOptions);
377 return _response.then((data) => new ProcessResponse.fromJson(data));
378 }
379
380 /**
381 * Create a layer asset.
382 *
383 * [request] - The metadata request object.
384 *
385 * Request parameters:
386 *
387 * [process_1] - Whether to queue the created layer for processing.
388 *
389 * Completes with a [Layer].
390 *
391 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
392 * error.
393 *
394 * If the used [http.Client] completes with an error when making a REST call,
395 * this method will complete with the same error.
396 */
397 async.Future<Layer> create(Layer request, {core.bool process_1}) {
398 var _url = null;
399 var _queryParams = new core.Map();
400 var _uploadMedia = null;
401 var _uploadOptions = null;
402 var _downloadOptions = commons.DownloadOptions.Metadata;
403 var _body = null;
404
405 if (request != null) {
406 _body = convert.JSON.encode((request).toJson());
407 }
408 if (process_1 != null) {
409 _queryParams["process"] = ["${process_1}"];
410 }
411
412 _url = 'layers';
413
414 var _response = _requester.request(_url,
415 "POST",
416 body: _body,
417 queryParams: _queryParams,
418 uploadOptions: _uploadOptions,
419 uploadMedia: _uploadMedia,
420 downloadOptions: _downloadOptions);
421 return _response.then((data) => new Layer.fromJson(data));
422 }
423
424 /**
425 * Delete a layer.
426 *
427 * Request parameters:
428 *
429 * [id] - The ID of the layer. Only the layer creator or project owner are
430 * permitted to delete. If the layer is published, or included in a map, the
431 * request will fail. Unpublish the layer, and remove it from all maps prior
432 * to deleting.
433 *
434 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
435 * error.
436 *
437 * If the used [http.Client] completes with an error when making a REST call,
438 * this method will complete with the same error.
439 */
440 async.Future delete(core.String id) {
441 var _url = null;
442 var _queryParams = new core.Map();
443 var _uploadMedia = null;
444 var _uploadOptions = null;
445 var _downloadOptions = commons.DownloadOptions.Metadata;
446 var _body = null;
447
448 if (id == null) {
449 throw new core.ArgumentError("Parameter id is required.");
450 }
451
452 _downloadOptions = null;
453
454 _url = 'layers/' + commons.Escaper.ecapeVariable('$id');
455
456 var _response = _requester.request(_url,
457 "DELETE",
458 body: _body,
459 queryParams: _queryParams,
460 uploadOptions: _uploadOptions,
461 uploadMedia: _uploadMedia,
462 downloadOptions: _downloadOptions);
463 return _response.then((data) => null);
464 }
465
466 /**
467 * Return metadata for a particular layer.
468 *
469 * Request parameters:
470 *
471 * [id] - The ID of the layer.
472 *
473 * [version] - Deprecated: The version parameter indicates which version of
474 * the layer should be returned. When version is set to published, the
475 * published version of the layer will be returned. Please use the
476 * layers.getPublished endpoint instead.
477 * Possible string values are:
478 * - "draft" : The draft version.
479 * - "published" : The published version.
480 *
481 * Completes with a [Layer].
482 *
483 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
484 * error.
485 *
486 * If the used [http.Client] completes with an error when making a REST call,
487 * this method will complete with the same error.
488 */
489 async.Future<Layer> get(core.String id, {core.String version}) {
490 var _url = null;
491 var _queryParams = new core.Map();
492 var _uploadMedia = null;
493 var _uploadOptions = null;
494 var _downloadOptions = commons.DownloadOptions.Metadata;
495 var _body = null;
496
497 if (id == null) {
498 throw new core.ArgumentError("Parameter id is required.");
499 }
500 if (version != null) {
501 _queryParams["version"] = [version];
502 }
503
504 _url = 'layers/' + commons.Escaper.ecapeVariable('$id');
505
506 var _response = _requester.request(_url,
507 "GET",
508 body: _body,
509 queryParams: _queryParams,
510 uploadOptions: _uploadOptions,
511 uploadMedia: _uploadMedia,
512 downloadOptions: _downloadOptions);
513 return _response.then((data) => new Layer.fromJson(data));
514 }
515
516 /**
517 * Return the published metadata for a particular layer.
518 *
519 * Request parameters:
520 *
521 * [id] - The ID of the layer.
522 *
523 * Completes with a [PublishedLayer].
524 *
525 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
526 * error.
527 *
528 * If the used [http.Client] completes with an error when making a REST call,
529 * this method will complete with the same error.
530 */
531 async.Future<PublishedLayer> getPublished(core.String id) {
532 var _url = null;
533 var _queryParams = new core.Map();
534 var _uploadMedia = null;
535 var _uploadOptions = null;
536 var _downloadOptions = commons.DownloadOptions.Metadata;
537 var _body = null;
538
539 if (id == null) {
540 throw new core.ArgumentError("Parameter id is required.");
541 }
542
543 _url = 'layers/' + commons.Escaper.ecapeVariable('$id') + '/published';
544
545 var _response = _requester.request(_url,
546 "GET",
547 body: _body,
548 queryParams: _queryParams,
549 uploadOptions: _uploadOptions,
550 uploadMedia: _uploadMedia,
551 downloadOptions: _downloadOptions);
552 return _response.then((data) => new PublishedLayer.fromJson(data));
553 }
554
555 /**
556 * Return all layers readable by the current user.
557 *
558 * Request parameters:
559 *
560 * [bbox] - A bounding box, expressed as "west,south,east,north". If set, only
561 * assets which intersect this bounding box will be returned.
562 *
563 * [createdAfter] - An RFC 3339 formatted date-time value (e.g.
564 * 1970-01-01T00:00:00Z). Returned assets will have been created at or after
565 * this time.
566 *
567 * [createdBefore] - An RFC 3339 formatted date-time value (e.g.
568 * 1970-01-01T00:00:00Z). Returned assets will have been created at or before
569 * this time.
570 *
571 * [creatorEmail] - An email address representing a user. Returned assets that
572 * have been created by the user associated with the provided email address.
573 *
574 * [maxResults] - The maximum number of items to include in a single response
575 * page. The maximum supported value is 100.
576 *
577 * [modifiedAfter] - An RFC 3339 formatted date-time value (e.g.
578 * 1970-01-01T00:00:00Z). Returned assets will have been modified at or after
579 * this time.
580 *
581 * [modifiedBefore] - An RFC 3339 formatted date-time value (e.g.
582 * 1970-01-01T00:00:00Z). Returned assets will have been modified at or before
583 * this time.
584 *
585 * [pageToken] - The continuation token, used to page through large result
586 * sets. To get the next page of results, set this parameter to the value of
587 * nextPageToken from the previous response.
588 *
589 * [processingStatus] - null
590 * Possible string values are:
591 * - "complete" : The layer has completed processing.
592 * - "failed" : The layer has failed processing.
593 * - "notReady" : The layer is not ready for processing.
594 * - "processing" : The layer is processing.
595 * - "ready" : The layer is ready for processing.
596 *
597 * [projectId] - The ID of a Maps Engine project, used to filter the response.
598 * To list all available projects with their IDs, send a Projects: list
599 * request. You can also find your project ID as the value of the
600 * DashboardPlace:cid URL parameter when signed in to mapsengine.google.com.
601 *
602 * [role] - The role parameter indicates that the response should only contain
603 * assets where the current user has the specified level of access.
604 * Possible string values are:
605 * - "owner" : The user can read, write and administer the asset.
606 * - "reader" : The user can read the asset.
607 * - "writer" : The user can read and write the asset.
608 *
609 * [search] - An unstructured search string used to filter the set of results
610 * based on asset metadata.
611 *
612 * [tags] - A comma separated list of tags. Returned assets will contain all
613 * the tags from the list.
614 *
615 * Completes with a [LayersListResponse].
616 *
617 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
618 * error.
619 *
620 * If the used [http.Client] completes with an error when making a REST call,
621 * this method will complete with the same error.
622 */
623 async.Future<LayersListResponse> list({core.String bbox, core.DateTime created After, core.DateTime createdBefore, core.String creatorEmail, core.int maxResult s, core.DateTime modifiedAfter, core.DateTime modifiedBefore, core.String pageTo ken, core.String processingStatus, core.String projectId, core.String role, core .String search, core.String tags}) {
624 var _url = null;
625 var _queryParams = new core.Map();
626 var _uploadMedia = null;
627 var _uploadOptions = null;
628 var _downloadOptions = commons.DownloadOptions.Metadata;
629 var _body = null;
630
631 if (bbox != null) {
632 _queryParams["bbox"] = [bbox];
633 }
634 if (createdAfter != null) {
635 _queryParams["createdAfter"] = [(createdAfter).toIso8601String()];
636 }
637 if (createdBefore != null) {
638 _queryParams["createdBefore"] = [(createdBefore).toIso8601String()];
639 }
640 if (creatorEmail != null) {
641 _queryParams["creatorEmail"] = [creatorEmail];
642 }
643 if (maxResults != null) {
644 _queryParams["maxResults"] = ["${maxResults}"];
645 }
646 if (modifiedAfter != null) {
647 _queryParams["modifiedAfter"] = [(modifiedAfter).toIso8601String()];
648 }
649 if (modifiedBefore != null) {
650 _queryParams["modifiedBefore"] = [(modifiedBefore).toIso8601String()];
651 }
652 if (pageToken != null) {
653 _queryParams["pageToken"] = [pageToken];
654 }
655 if (processingStatus != null) {
656 _queryParams["processingStatus"] = [processingStatus];
657 }
658 if (projectId != null) {
659 _queryParams["projectId"] = [projectId];
660 }
661 if (role != null) {
662 _queryParams["role"] = [role];
663 }
664 if (search != null) {
665 _queryParams["search"] = [search];
666 }
667 if (tags != null) {
668 _queryParams["tags"] = [tags];
669 }
670
671 _url = 'layers';
672
673 var _response = _requester.request(_url,
674 "GET",
675 body: _body,
676 queryParams: _queryParams,
677 uploadOptions: _uploadOptions,
678 uploadMedia: _uploadMedia,
679 downloadOptions: _downloadOptions);
680 return _response.then((data) => new LayersListResponse.fromJson(data));
681 }
682
683 /**
684 * Return all published layers readable by the current user.
685 *
686 * Request parameters:
687 *
688 * [maxResults] - The maximum number of items to include in a single response
689 * page. The maximum supported value is 100.
690 *
691 * [pageToken] - The continuation token, used to page through large result
692 * sets. To get the next page of results, set this parameter to the value of
693 * nextPageToken from the previous response.
694 *
695 * [projectId] - The ID of a Maps Engine project, used to filter the response.
696 * To list all available projects with their IDs, send a Projects: list
697 * request. You can also find your project ID as the value of the
698 * DashboardPlace:cid URL parameter when signed in to mapsengine.google.com.
699 *
700 * Completes with a [PublishedLayersListResponse].
701 *
702 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
703 * error.
704 *
705 * If the used [http.Client] completes with an error when making a REST call,
706 * this method will complete with the same error.
707 */
708 async.Future<PublishedLayersListResponse> listPublished({core.int maxResults, core.String pageToken, core.String projectId}) {
709 var _url = null;
710 var _queryParams = new core.Map();
711 var _uploadMedia = null;
712 var _uploadOptions = null;
713 var _downloadOptions = commons.DownloadOptions.Metadata;
714 var _body = null;
715
716 if (maxResults != null) {
717 _queryParams["maxResults"] = ["${maxResults}"];
718 }
719 if (pageToken != null) {
720 _queryParams["pageToken"] = [pageToken];
721 }
722 if (projectId != null) {
723 _queryParams["projectId"] = [projectId];
724 }
725
726 _url = 'layers/published';
727
728 var _response = _requester.request(_url,
729 "GET",
730 body: _body,
731 queryParams: _queryParams,
732 uploadOptions: _uploadOptions,
733 uploadMedia: _uploadMedia,
734 downloadOptions: _downloadOptions);
735 return _response.then((data) => new PublishedLayersListResponse.fromJson(dat a));
736 }
737
738 /**
739 * Mutate a layer asset.
740 *
741 * [request] - The metadata request object.
742 *
743 * Request parameters:
744 *
745 * [id] - The ID of the layer.
746 *
747 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
748 * error.
749 *
750 * If the used [http.Client] completes with an error when making a REST call,
751 * this method will complete with the same error.
752 */
753 async.Future patch(Layer request, core.String id) {
754 var _url = null;
755 var _queryParams = new core.Map();
756 var _uploadMedia = null;
757 var _uploadOptions = null;
758 var _downloadOptions = commons.DownloadOptions.Metadata;
759 var _body = null;
760
761 if (request != null) {
762 _body = convert.JSON.encode((request).toJson());
763 }
764 if (id == null) {
765 throw new core.ArgumentError("Parameter id is required.");
766 }
767
768 _downloadOptions = null;
769
770 _url = 'layers/' + commons.Escaper.ecapeVariable('$id');
771
772 var _response = _requester.request(_url,
773 "PATCH",
774 body: _body,
775 queryParams: _queryParams,
776 uploadOptions: _uploadOptions,
777 uploadMedia: _uploadMedia,
778 downloadOptions: _downloadOptions);
779 return _response.then((data) => null);
780 }
781
782 /**
783 * Process a layer asset.
784 *
785 * Request parameters:
786 *
787 * [id] - The ID of the layer.
788 *
789 * Completes with a [ProcessResponse].
790 *
791 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
792 * error.
793 *
794 * If the used [http.Client] completes with an error when making a REST call,
795 * this method will complete with the same error.
796 */
797 async.Future<ProcessResponse> process(core.String id) {
798 var _url = null;
799 var _queryParams = new core.Map();
800 var _uploadMedia = null;
801 var _uploadOptions = null;
802 var _downloadOptions = commons.DownloadOptions.Metadata;
803 var _body = null;
804
805 if (id == null) {
806 throw new core.ArgumentError("Parameter id is required.");
807 }
808
809 _url = 'layers/' + commons.Escaper.ecapeVariable('$id') + '/process';
810
811 var _response = _requester.request(_url,
812 "POST",
813 body: _body,
814 queryParams: _queryParams,
815 uploadOptions: _uploadOptions,
816 uploadMedia: _uploadMedia,
817 downloadOptions: _downloadOptions);
818 return _response.then((data) => new ProcessResponse.fromJson(data));
819 }
820
821 /**
822 * Publish a layer asset.
823 *
824 * Request parameters:
825 *
826 * [id] - The ID of the layer.
827 *
828 * [force] - If set to true, the API will allow publication of the layer even
829 * if it's out of date. If not true, you'll need to reprocess any out-of-date
830 * layer before publishing.
831 *
832 * Completes with a [PublishResponse].
833 *
834 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
835 * error.
836 *
837 * If the used [http.Client] completes with an error when making a REST call,
838 * this method will complete with the same error.
839 */
840 async.Future<PublishResponse> publish(core.String id, {core.bool force}) {
841 var _url = null;
842 var _queryParams = new core.Map();
843 var _uploadMedia = null;
844 var _uploadOptions = null;
845 var _downloadOptions = commons.DownloadOptions.Metadata;
846 var _body = null;
847
848 if (id == null) {
849 throw new core.ArgumentError("Parameter id is required.");
850 }
851 if (force != null) {
852 _queryParams["force"] = ["${force}"];
853 }
854
855 _url = 'layers/' + commons.Escaper.ecapeVariable('$id') + '/publish';
856
857 var _response = _requester.request(_url,
858 "POST",
859 body: _body,
860 queryParams: _queryParams,
861 uploadOptions: _uploadOptions,
862 uploadMedia: _uploadMedia,
863 downloadOptions: _downloadOptions);
864 return _response.then((data) => new PublishResponse.fromJson(data));
865 }
866
867 /**
868 * Unpublish a layer asset.
869 *
870 * Request parameters:
871 *
872 * [id] - The ID of the layer.
873 *
874 * Completes with a [PublishResponse].
875 *
876 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
877 * error.
878 *
879 * If the used [http.Client] completes with an error when making a REST call,
880 * this method will complete with the same error.
881 */
882 async.Future<PublishResponse> unpublish(core.String id) {
883 var _url = null;
884 var _queryParams = new core.Map();
885 var _uploadMedia = null;
886 var _uploadOptions = null;
887 var _downloadOptions = commons.DownloadOptions.Metadata;
888 var _body = null;
889
890 if (id == null) {
891 throw new core.ArgumentError("Parameter id is required.");
892 }
893
894 _url = 'layers/' + commons.Escaper.ecapeVariable('$id') + '/unpublish';
895
896 var _response = _requester.request(_url,
897 "POST",
898 body: _body,
899 queryParams: _queryParams,
900 uploadOptions: _uploadOptions,
901 uploadMedia: _uploadMedia,
902 downloadOptions: _downloadOptions);
903 return _response.then((data) => new PublishResponse.fromJson(data));
904 }
905
906 }
907
908
909 class LayersParentsResourceApi {
910 final commons.ApiRequester _requester;
911
912 LayersParentsResourceApi(commons.ApiRequester client) :
913 _requester = client;
914
915 /**
916 * Return all parent ids of the specified layer.
917 *
918 * Request parameters:
919 *
920 * [id] - The ID of the layer whose parents will be listed.
921 *
922 * [maxResults] - The maximum number of items to include in a single response
923 * page. The maximum supported value is 50.
924 *
925 * [pageToken] - The continuation token, used to page through large result
926 * sets. To get the next page of results, set this parameter to the value of
927 * nextPageToken from the previous response.
928 *
929 * Completes with a [ParentsListResponse].
930 *
931 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
932 * error.
933 *
934 * If the used [http.Client] completes with an error when making a REST call,
935 * this method will complete with the same error.
936 */
937 async.Future<ParentsListResponse> list(core.String id, {core.int maxResults, c ore.String pageToken}) {
938 var _url = null;
939 var _queryParams = new core.Map();
940 var _uploadMedia = null;
941 var _uploadOptions = null;
942 var _downloadOptions = commons.DownloadOptions.Metadata;
943 var _body = null;
944
945 if (id == null) {
946 throw new core.ArgumentError("Parameter id is required.");
947 }
948 if (maxResults != null) {
949 _queryParams["maxResults"] = ["${maxResults}"];
950 }
951 if (pageToken != null) {
952 _queryParams["pageToken"] = [pageToken];
953 }
954
955 _url = 'layers/' + commons.Escaper.ecapeVariable('$id') + '/parents';
956
957 var _response = _requester.request(_url,
958 "GET",
959 body: _body,
960 queryParams: _queryParams,
961 uploadOptions: _uploadOptions,
962 uploadMedia: _uploadMedia,
963 downloadOptions: _downloadOptions);
964 return _response.then((data) => new ParentsListResponse.fromJson(data));
965 }
966
967 }
968
969
970 class LayersPermissionsResourceApi {
971 final commons.ApiRequester _requester;
972
973 LayersPermissionsResourceApi(commons.ApiRequester client) :
974 _requester = client;
975
976 /**
977 * Remove permission entries from an already existing asset.
978 *
979 * [request] - The metadata request object.
980 *
981 * Request parameters:
982 *
983 * [id] - The ID of the asset from which permissions will be removed.
984 *
985 * Completes with a [PermissionsBatchDeleteResponse].
986 *
987 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
988 * error.
989 *
990 * If the used [http.Client] completes with an error when making a REST call,
991 * this method will complete with the same error.
992 */
993 async.Future<PermissionsBatchDeleteResponse> batchDelete(PermissionsBatchDelet eRequest request, core.String id) {
994 var _url = null;
995 var _queryParams = new core.Map();
996 var _uploadMedia = null;
997 var _uploadOptions = null;
998 var _downloadOptions = commons.DownloadOptions.Metadata;
999 var _body = null;
1000
1001 if (request != null) {
1002 _body = convert.JSON.encode((request).toJson());
1003 }
1004 if (id == null) {
1005 throw new core.ArgumentError("Parameter id is required.");
1006 }
1007
1008 _url = 'layers/' + commons.Escaper.ecapeVariable('$id') + '/permissions/batc hDelete';
1009
1010 var _response = _requester.request(_url,
1011 "POST",
1012 body: _body,
1013 queryParams: _queryParams,
1014 uploadOptions: _uploadOptions,
1015 uploadMedia: _uploadMedia,
1016 downloadOptions: _downloadOptions);
1017 return _response.then((data) => new PermissionsBatchDeleteResponse.fromJson( data));
1018 }
1019
1020 /**
1021 * Add or update permission entries to an already existing asset.
1022 *
1023 * An asset can hold up to 20 different permission entries. Each batchInsert
1024 * request is atomic.
1025 *
1026 * [request] - The metadata request object.
1027 *
1028 * Request parameters:
1029 *
1030 * [id] - The ID of the asset to which permissions will be added.
1031 *
1032 * Completes with a [PermissionsBatchUpdateResponse].
1033 *
1034 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1035 * error.
1036 *
1037 * If the used [http.Client] completes with an error when making a REST call,
1038 * this method will complete with the same error.
1039 */
1040 async.Future<PermissionsBatchUpdateResponse> batchUpdate(PermissionsBatchUpdat eRequest request, core.String id) {
1041 var _url = null;
1042 var _queryParams = new core.Map();
1043 var _uploadMedia = null;
1044 var _uploadOptions = null;
1045 var _downloadOptions = commons.DownloadOptions.Metadata;
1046 var _body = null;
1047
1048 if (request != null) {
1049 _body = convert.JSON.encode((request).toJson());
1050 }
1051 if (id == null) {
1052 throw new core.ArgumentError("Parameter id is required.");
1053 }
1054
1055 _url = 'layers/' + commons.Escaper.ecapeVariable('$id') + '/permissions/batc hUpdate';
1056
1057 var _response = _requester.request(_url,
1058 "POST",
1059 body: _body,
1060 queryParams: _queryParams,
1061 uploadOptions: _uploadOptions,
1062 uploadMedia: _uploadMedia,
1063 downloadOptions: _downloadOptions);
1064 return _response.then((data) => new PermissionsBatchUpdateResponse.fromJson( data));
1065 }
1066
1067 /**
1068 * Return all of the permissions for the specified asset.
1069 *
1070 * Request parameters:
1071 *
1072 * [id] - The ID of the asset whose permissions will be listed.
1073 *
1074 * Completes with a [PermissionsListResponse].
1075 *
1076 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1077 * error.
1078 *
1079 * If the used [http.Client] completes with an error when making a REST call,
1080 * this method will complete with the same error.
1081 */
1082 async.Future<PermissionsListResponse> list(core.String id) {
1083 var _url = null;
1084 var _queryParams = new core.Map();
1085 var _uploadMedia = null;
1086 var _uploadOptions = null;
1087 var _downloadOptions = commons.DownloadOptions.Metadata;
1088 var _body = null;
1089
1090 if (id == null) {
1091 throw new core.ArgumentError("Parameter id is required.");
1092 }
1093
1094 _url = 'layers/' + commons.Escaper.ecapeVariable('$id') + '/permissions';
1095
1096 var _response = _requester.request(_url,
1097 "GET",
1098 body: _body,
1099 queryParams: _queryParams,
1100 uploadOptions: _uploadOptions,
1101 uploadMedia: _uploadMedia,
1102 downloadOptions: _downloadOptions);
1103 return _response.then((data) => new PermissionsListResponse.fromJson(data));
1104 }
1105
1106 }
1107
1108
1109 class MapsResourceApi {
1110 final commons.ApiRequester _requester;
1111
1112 MapsPermissionsResourceApi get permissions => new MapsPermissionsResourceApi(_ requester);
1113
1114 MapsResourceApi(commons.ApiRequester client) :
1115 _requester = client;
1116
1117 /**
1118 * Create a map asset.
1119 *
1120 * [request] - The metadata request object.
1121 *
1122 * Request parameters:
1123 *
1124 * Completes with a [Map].
1125 *
1126 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1127 * error.
1128 *
1129 * If the used [http.Client] completes with an error when making a REST call,
1130 * this method will complete with the same error.
1131 */
1132 async.Future<Map> create(Map request) {
1133 var _url = null;
1134 var _queryParams = new core.Map();
1135 var _uploadMedia = null;
1136 var _uploadOptions = null;
1137 var _downloadOptions = commons.DownloadOptions.Metadata;
1138 var _body = null;
1139
1140 if (request != null) {
1141 _body = convert.JSON.encode((request).toJson());
1142 }
1143
1144 _url = 'maps';
1145
1146 var _response = _requester.request(_url,
1147 "POST",
1148 body: _body,
1149 queryParams: _queryParams,
1150 uploadOptions: _uploadOptions,
1151 uploadMedia: _uploadMedia,
1152 downloadOptions: _downloadOptions);
1153 return _response.then((data) => new Map.fromJson(data));
1154 }
1155
1156 /**
1157 * Delete a map.
1158 *
1159 * Request parameters:
1160 *
1161 * [id] - The ID of the map. Only the map creator or project owner are
1162 * permitted to delete. If the map is published the request will fail.
1163 * Unpublish the map prior to deleting.
1164 *
1165 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1166 * error.
1167 *
1168 * If the used [http.Client] completes with an error when making a REST call,
1169 * this method will complete with the same error.
1170 */
1171 async.Future delete(core.String id) {
1172 var _url = null;
1173 var _queryParams = new core.Map();
1174 var _uploadMedia = null;
1175 var _uploadOptions = null;
1176 var _downloadOptions = commons.DownloadOptions.Metadata;
1177 var _body = null;
1178
1179 if (id == null) {
1180 throw new core.ArgumentError("Parameter id is required.");
1181 }
1182
1183 _downloadOptions = null;
1184
1185 _url = 'maps/' + commons.Escaper.ecapeVariable('$id');
1186
1187 var _response = _requester.request(_url,
1188 "DELETE",
1189 body: _body,
1190 queryParams: _queryParams,
1191 uploadOptions: _uploadOptions,
1192 uploadMedia: _uploadMedia,
1193 downloadOptions: _downloadOptions);
1194 return _response.then((data) => null);
1195 }
1196
1197 /**
1198 * Return metadata for a particular map.
1199 *
1200 * Request parameters:
1201 *
1202 * [id] - The ID of the map.
1203 *
1204 * [version] - Deprecated: The version parameter indicates which version of
1205 * the map should be returned. When version is set to published, the published
1206 * version of the map will be returned. Please use the maps.getPublished
1207 * endpoint instead.
1208 * Possible string values are:
1209 * - "draft" : The draft version.
1210 * - "published" : The published version.
1211 *
1212 * Completes with a [Map].
1213 *
1214 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1215 * error.
1216 *
1217 * If the used [http.Client] completes with an error when making a REST call,
1218 * this method will complete with the same error.
1219 */
1220 async.Future<Map> get(core.String id, {core.String version}) {
1221 var _url = null;
1222 var _queryParams = new core.Map();
1223 var _uploadMedia = null;
1224 var _uploadOptions = null;
1225 var _downloadOptions = commons.DownloadOptions.Metadata;
1226 var _body = null;
1227
1228 if (id == null) {
1229 throw new core.ArgumentError("Parameter id is required.");
1230 }
1231 if (version != null) {
1232 _queryParams["version"] = [version];
1233 }
1234
1235 _url = 'maps/' + commons.Escaper.ecapeVariable('$id');
1236
1237 var _response = _requester.request(_url,
1238 "GET",
1239 body: _body,
1240 queryParams: _queryParams,
1241 uploadOptions: _uploadOptions,
1242 uploadMedia: _uploadMedia,
1243 downloadOptions: _downloadOptions);
1244 return _response.then((data) => new Map.fromJson(data));
1245 }
1246
1247 /**
1248 * Return the published metadata for a particular map.
1249 *
1250 * Request parameters:
1251 *
1252 * [id] - The ID of the map.
1253 *
1254 * Completes with a [PublishedMap].
1255 *
1256 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1257 * error.
1258 *
1259 * If the used [http.Client] completes with an error when making a REST call,
1260 * this method will complete with the same error.
1261 */
1262 async.Future<PublishedMap> getPublished(core.String id) {
1263 var _url = null;
1264 var _queryParams = new core.Map();
1265 var _uploadMedia = null;
1266 var _uploadOptions = null;
1267 var _downloadOptions = commons.DownloadOptions.Metadata;
1268 var _body = null;
1269
1270 if (id == null) {
1271 throw new core.ArgumentError("Parameter id is required.");
1272 }
1273
1274 _url = 'maps/' + commons.Escaper.ecapeVariable('$id') + '/published';
1275
1276 var _response = _requester.request(_url,
1277 "GET",
1278 body: _body,
1279 queryParams: _queryParams,
1280 uploadOptions: _uploadOptions,
1281 uploadMedia: _uploadMedia,
1282 downloadOptions: _downloadOptions);
1283 return _response.then((data) => new PublishedMap.fromJson(data));
1284 }
1285
1286 /**
1287 * Return all maps readable by the current user.
1288 *
1289 * Request parameters:
1290 *
1291 * [bbox] - A bounding box, expressed as "west,south,east,north". If set, only
1292 * assets which intersect this bounding box will be returned.
1293 *
1294 * [createdAfter] - An RFC 3339 formatted date-time value (e.g.
1295 * 1970-01-01T00:00:00Z). Returned assets will have been created at or after
1296 * this time.
1297 *
1298 * [createdBefore] - An RFC 3339 formatted date-time value (e.g.
1299 * 1970-01-01T00:00:00Z). Returned assets will have been created at or before
1300 * this time.
1301 *
1302 * [creatorEmail] - An email address representing a user. Returned assets that
1303 * have been created by the user associated with the provided email address.
1304 *
1305 * [maxResults] - The maximum number of items to include in a single response
1306 * page. The maximum supported value is 100.
1307 *
1308 * [modifiedAfter] - An RFC 3339 formatted date-time value (e.g.
1309 * 1970-01-01T00:00:00Z). Returned assets will have been modified at or after
1310 * this time.
1311 *
1312 * [modifiedBefore] - An RFC 3339 formatted date-time value (e.g.
1313 * 1970-01-01T00:00:00Z). Returned assets will have been modified at or before
1314 * this time.
1315 *
1316 * [pageToken] - The continuation token, used to page through large result
1317 * sets. To get the next page of results, set this parameter to the value of
1318 * nextPageToken from the previous response.
1319 *
1320 * [processingStatus] - null
1321 * Possible string values are:
1322 * - "complete" : The map has completed processing.
1323 * - "failed" : The map has failed processing.
1324 * - "notReady" : The map is not ready for processing.
1325 * - "processing" : The map is processing.
1326 *
1327 * [projectId] - The ID of a Maps Engine project, used to filter the response.
1328 * To list all available projects with their IDs, send a Projects: list
1329 * request. You can also find your project ID as the value of the
1330 * DashboardPlace:cid URL parameter when signed in to mapsengine.google.com.
1331 *
1332 * [role] - The role parameter indicates that the response should only contain
1333 * assets where the current user has the specified level of access.
1334 * Possible string values are:
1335 * - "owner" : The user can read, write and administer the asset.
1336 * - "reader" : The user can read the asset.
1337 * - "writer" : The user can read and write the asset.
1338 *
1339 * [search] - An unstructured search string used to filter the set of results
1340 * based on asset metadata.
1341 *
1342 * [tags] - A comma separated list of tags. Returned assets will contain all
1343 * the tags from the list.
1344 *
1345 * Completes with a [MapsListResponse].
1346 *
1347 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1348 * error.
1349 *
1350 * If the used [http.Client] completes with an error when making a REST call,
1351 * this method will complete with the same error.
1352 */
1353 async.Future<MapsListResponse> list({core.String bbox, core.DateTime createdAf ter, core.DateTime createdBefore, core.String creatorEmail, core.int maxResults, core.DateTime modifiedAfter, core.DateTime modifiedBefore, core.String pageToke n, core.String processingStatus, core.String projectId, core.String role, core.S tring search, core.String tags}) {
1354 var _url = null;
1355 var _queryParams = new core.Map();
1356 var _uploadMedia = null;
1357 var _uploadOptions = null;
1358 var _downloadOptions = commons.DownloadOptions.Metadata;
1359 var _body = null;
1360
1361 if (bbox != null) {
1362 _queryParams["bbox"] = [bbox];
1363 }
1364 if (createdAfter != null) {
1365 _queryParams["createdAfter"] = [(createdAfter).toIso8601String()];
1366 }
1367 if (createdBefore != null) {
1368 _queryParams["createdBefore"] = [(createdBefore).toIso8601String()];
1369 }
1370 if (creatorEmail != null) {
1371 _queryParams["creatorEmail"] = [creatorEmail];
1372 }
1373 if (maxResults != null) {
1374 _queryParams["maxResults"] = ["${maxResults}"];
1375 }
1376 if (modifiedAfter != null) {
1377 _queryParams["modifiedAfter"] = [(modifiedAfter).toIso8601String()];
1378 }
1379 if (modifiedBefore != null) {
1380 _queryParams["modifiedBefore"] = [(modifiedBefore).toIso8601String()];
1381 }
1382 if (pageToken != null) {
1383 _queryParams["pageToken"] = [pageToken];
1384 }
1385 if (processingStatus != null) {
1386 _queryParams["processingStatus"] = [processingStatus];
1387 }
1388 if (projectId != null) {
1389 _queryParams["projectId"] = [projectId];
1390 }
1391 if (role != null) {
1392 _queryParams["role"] = [role];
1393 }
1394 if (search != null) {
1395 _queryParams["search"] = [search];
1396 }
1397 if (tags != null) {
1398 _queryParams["tags"] = [tags];
1399 }
1400
1401 _url = 'maps';
1402
1403 var _response = _requester.request(_url,
1404 "GET",
1405 body: _body,
1406 queryParams: _queryParams,
1407 uploadOptions: _uploadOptions,
1408 uploadMedia: _uploadMedia,
1409 downloadOptions: _downloadOptions);
1410 return _response.then((data) => new MapsListResponse.fromJson(data));
1411 }
1412
1413 /**
1414 * Return all published maps readable by the current user.
1415 *
1416 * Request parameters:
1417 *
1418 * [maxResults] - The maximum number of items to include in a single response
1419 * page. The maximum supported value is 100.
1420 *
1421 * [pageToken] - The continuation token, used to page through large result
1422 * sets. To get the next page of results, set this parameter to the value of
1423 * nextPageToken from the previous response.
1424 *
1425 * [projectId] - The ID of a Maps Engine project, used to filter the response.
1426 * To list all available projects with their IDs, send a Projects: list
1427 * request. You can also find your project ID as the value of the
1428 * DashboardPlace:cid URL parameter when signed in to mapsengine.google.com.
1429 *
1430 * Completes with a [PublishedMapsListResponse].
1431 *
1432 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1433 * error.
1434 *
1435 * If the used [http.Client] completes with an error when making a REST call,
1436 * this method will complete with the same error.
1437 */
1438 async.Future<PublishedMapsListResponse> listPublished({core.int maxResults, co re.String pageToken, core.String projectId}) {
1439 var _url = null;
1440 var _queryParams = new core.Map();
1441 var _uploadMedia = null;
1442 var _uploadOptions = null;
1443 var _downloadOptions = commons.DownloadOptions.Metadata;
1444 var _body = null;
1445
1446 if (maxResults != null) {
1447 _queryParams["maxResults"] = ["${maxResults}"];
1448 }
1449 if (pageToken != null) {
1450 _queryParams["pageToken"] = [pageToken];
1451 }
1452 if (projectId != null) {
1453 _queryParams["projectId"] = [projectId];
1454 }
1455
1456 _url = 'maps/published';
1457
1458 var _response = _requester.request(_url,
1459 "GET",
1460 body: _body,
1461 queryParams: _queryParams,
1462 uploadOptions: _uploadOptions,
1463 uploadMedia: _uploadMedia,
1464 downloadOptions: _downloadOptions);
1465 return _response.then((data) => new PublishedMapsListResponse.fromJson(data) );
1466 }
1467
1468 /**
1469 * Mutate a map asset.
1470 *
1471 * [request] - The metadata request object.
1472 *
1473 * Request parameters:
1474 *
1475 * [id] - The ID of the map.
1476 *
1477 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1478 * error.
1479 *
1480 * If the used [http.Client] completes with an error when making a REST call,
1481 * this method will complete with the same error.
1482 */
1483 async.Future patch(Map request, core.String id) {
1484 var _url = null;
1485 var _queryParams = new core.Map();
1486 var _uploadMedia = null;
1487 var _uploadOptions = null;
1488 var _downloadOptions = commons.DownloadOptions.Metadata;
1489 var _body = null;
1490
1491 if (request != null) {
1492 _body = convert.JSON.encode((request).toJson());
1493 }
1494 if (id == null) {
1495 throw new core.ArgumentError("Parameter id is required.");
1496 }
1497
1498 _downloadOptions = null;
1499
1500 _url = 'maps/' + commons.Escaper.ecapeVariable('$id');
1501
1502 var _response = _requester.request(_url,
1503 "PATCH",
1504 body: _body,
1505 queryParams: _queryParams,
1506 uploadOptions: _uploadOptions,
1507 uploadMedia: _uploadMedia,
1508 downloadOptions: _downloadOptions);
1509 return _response.then((data) => null);
1510 }
1511
1512 /**
1513 * Publish a map asset.
1514 *
1515 * Request parameters:
1516 *
1517 * [id] - The ID of the map.
1518 *
1519 * [force] - If set to true, the API will allow publication of the map even if
1520 * it's out of date. If false, the map must have a processingStatus of
1521 * complete before publishing.
1522 *
1523 * Completes with a [PublishResponse].
1524 *
1525 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1526 * error.
1527 *
1528 * If the used [http.Client] completes with an error when making a REST call,
1529 * this method will complete with the same error.
1530 */
1531 async.Future<PublishResponse> publish(core.String id, {core.bool force}) {
1532 var _url = null;
1533 var _queryParams = new core.Map();
1534 var _uploadMedia = null;
1535 var _uploadOptions = null;
1536 var _downloadOptions = commons.DownloadOptions.Metadata;
1537 var _body = null;
1538
1539 if (id == null) {
1540 throw new core.ArgumentError("Parameter id is required.");
1541 }
1542 if (force != null) {
1543 _queryParams["force"] = ["${force}"];
1544 }
1545
1546 _url = 'maps/' + commons.Escaper.ecapeVariable('$id') + '/publish';
1547
1548 var _response = _requester.request(_url,
1549 "POST",
1550 body: _body,
1551 queryParams: _queryParams,
1552 uploadOptions: _uploadOptions,
1553 uploadMedia: _uploadMedia,
1554 downloadOptions: _downloadOptions);
1555 return _response.then((data) => new PublishResponse.fromJson(data));
1556 }
1557
1558 /**
1559 * Unpublish a map asset.
1560 *
1561 * Request parameters:
1562 *
1563 * [id] - The ID of the map.
1564 *
1565 * Completes with a [PublishResponse].
1566 *
1567 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1568 * error.
1569 *
1570 * If the used [http.Client] completes with an error when making a REST call,
1571 * this method will complete with the same error.
1572 */
1573 async.Future<PublishResponse> unpublish(core.String id) {
1574 var _url = null;
1575 var _queryParams = new core.Map();
1576 var _uploadMedia = null;
1577 var _uploadOptions = null;
1578 var _downloadOptions = commons.DownloadOptions.Metadata;
1579 var _body = null;
1580
1581 if (id == null) {
1582 throw new core.ArgumentError("Parameter id is required.");
1583 }
1584
1585 _url = 'maps/' + commons.Escaper.ecapeVariable('$id') + '/unpublish';
1586
1587 var _response = _requester.request(_url,
1588 "POST",
1589 body: _body,
1590 queryParams: _queryParams,
1591 uploadOptions: _uploadOptions,
1592 uploadMedia: _uploadMedia,
1593 downloadOptions: _downloadOptions);
1594 return _response.then((data) => new PublishResponse.fromJson(data));
1595 }
1596
1597 }
1598
1599
1600 class MapsPermissionsResourceApi {
1601 final commons.ApiRequester _requester;
1602
1603 MapsPermissionsResourceApi(commons.ApiRequester client) :
1604 _requester = client;
1605
1606 /**
1607 * Remove permission entries from an already existing asset.
1608 *
1609 * [request] - The metadata request object.
1610 *
1611 * Request parameters:
1612 *
1613 * [id] - The ID of the asset from which permissions will be removed.
1614 *
1615 * Completes with a [PermissionsBatchDeleteResponse].
1616 *
1617 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1618 * error.
1619 *
1620 * If the used [http.Client] completes with an error when making a REST call,
1621 * this method will complete with the same error.
1622 */
1623 async.Future<PermissionsBatchDeleteResponse> batchDelete(PermissionsBatchDelet eRequest request, core.String id) {
1624 var _url = null;
1625 var _queryParams = new core.Map();
1626 var _uploadMedia = null;
1627 var _uploadOptions = null;
1628 var _downloadOptions = commons.DownloadOptions.Metadata;
1629 var _body = null;
1630
1631 if (request != null) {
1632 _body = convert.JSON.encode((request).toJson());
1633 }
1634 if (id == null) {
1635 throw new core.ArgumentError("Parameter id is required.");
1636 }
1637
1638 _url = 'maps/' + commons.Escaper.ecapeVariable('$id') + '/permissions/batchD elete';
1639
1640 var _response = _requester.request(_url,
1641 "POST",
1642 body: _body,
1643 queryParams: _queryParams,
1644 uploadOptions: _uploadOptions,
1645 uploadMedia: _uploadMedia,
1646 downloadOptions: _downloadOptions);
1647 return _response.then((data) => new PermissionsBatchDeleteResponse.fromJson( data));
1648 }
1649
1650 /**
1651 * Add or update permission entries to an already existing asset.
1652 *
1653 * An asset can hold up to 20 different permission entries. Each batchInsert
1654 * request is atomic.
1655 *
1656 * [request] - The metadata request object.
1657 *
1658 * Request parameters:
1659 *
1660 * [id] - The ID of the asset to which permissions will be added.
1661 *
1662 * Completes with a [PermissionsBatchUpdateResponse].
1663 *
1664 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1665 * error.
1666 *
1667 * If the used [http.Client] completes with an error when making a REST call,
1668 * this method will complete with the same error.
1669 */
1670 async.Future<PermissionsBatchUpdateResponse> batchUpdate(PermissionsBatchUpdat eRequest request, core.String id) {
1671 var _url = null;
1672 var _queryParams = new core.Map();
1673 var _uploadMedia = null;
1674 var _uploadOptions = null;
1675 var _downloadOptions = commons.DownloadOptions.Metadata;
1676 var _body = null;
1677
1678 if (request != null) {
1679 _body = convert.JSON.encode((request).toJson());
1680 }
1681 if (id == null) {
1682 throw new core.ArgumentError("Parameter id is required.");
1683 }
1684
1685 _url = 'maps/' + commons.Escaper.ecapeVariable('$id') + '/permissions/batchU pdate';
1686
1687 var _response = _requester.request(_url,
1688 "POST",
1689 body: _body,
1690 queryParams: _queryParams,
1691 uploadOptions: _uploadOptions,
1692 uploadMedia: _uploadMedia,
1693 downloadOptions: _downloadOptions);
1694 return _response.then((data) => new PermissionsBatchUpdateResponse.fromJson( data));
1695 }
1696
1697 /**
1698 * Return all of the permissions for the specified asset.
1699 *
1700 * Request parameters:
1701 *
1702 * [id] - The ID of the asset whose permissions will be listed.
1703 *
1704 * Completes with a [PermissionsListResponse].
1705 *
1706 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1707 * error.
1708 *
1709 * If the used [http.Client] completes with an error when making a REST call,
1710 * this method will complete with the same error.
1711 */
1712 async.Future<PermissionsListResponse> list(core.String id) {
1713 var _url = null;
1714 var _queryParams = new core.Map();
1715 var _uploadMedia = null;
1716 var _uploadOptions = null;
1717 var _downloadOptions = commons.DownloadOptions.Metadata;
1718 var _body = null;
1719
1720 if (id == null) {
1721 throw new core.ArgumentError("Parameter id is required.");
1722 }
1723
1724 _url = 'maps/' + commons.Escaper.ecapeVariable('$id') + '/permissions';
1725
1726 var _response = _requester.request(_url,
1727 "GET",
1728 body: _body,
1729 queryParams: _queryParams,
1730 uploadOptions: _uploadOptions,
1731 uploadMedia: _uploadMedia,
1732 downloadOptions: _downloadOptions);
1733 return _response.then((data) => new PermissionsListResponse.fromJson(data));
1734 }
1735
1736 }
1737
1738
1739 class ProjectsResourceApi {
1740 final commons.ApiRequester _requester;
1741
1742 ProjectsIconsResourceApi get icons => new ProjectsIconsResourceApi(_requester) ;
1743
1744 ProjectsResourceApi(commons.ApiRequester client) :
1745 _requester = client;
1746
1747 /**
1748 * Return all projects readable by the current user.
1749 *
1750 * Request parameters:
1751 *
1752 * Completes with a [ProjectsListResponse].
1753 *
1754 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1755 * error.
1756 *
1757 * If the used [http.Client] completes with an error when making a REST call,
1758 * this method will complete with the same error.
1759 */
1760 async.Future<ProjectsListResponse> list() {
1761 var _url = null;
1762 var _queryParams = new core.Map();
1763 var _uploadMedia = null;
1764 var _uploadOptions = null;
1765 var _downloadOptions = commons.DownloadOptions.Metadata;
1766 var _body = null;
1767
1768
1769 _url = 'projects';
1770
1771 var _response = _requester.request(_url,
1772 "GET",
1773 body: _body,
1774 queryParams: _queryParams,
1775 uploadOptions: _uploadOptions,
1776 uploadMedia: _uploadMedia,
1777 downloadOptions: _downloadOptions);
1778 return _response.then((data) => new ProjectsListResponse.fromJson(data));
1779 }
1780
1781 }
1782
1783
1784 class ProjectsIconsResourceApi {
1785 final commons.ApiRequester _requester;
1786
1787 ProjectsIconsResourceApi(commons.ApiRequester client) :
1788 _requester = client;
1789
1790 /**
1791 * Create an icon.
1792 *
1793 * [request] - The metadata request object.
1794 *
1795 * Request parameters:
1796 *
1797 * [projectId] - The ID of the project.
1798 *
1799 * [uploadMedia] - The media to upload.
1800 *
1801 * [uploadOptions] - Options for the media upload. Streaming Media without the
1802 * length being known ahead of time is only supported via resumable uploads.
1803 *
1804 * Completes with a [Icon].
1805 *
1806 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1807 * error.
1808 *
1809 * If the used [http.Client] completes with an error when making a REST call,
1810 * this method will complete with the same error.
1811 */
1812 async.Future<Icon> create(Icon request, core.String projectId, {commons.Upload Options uploadOptions : commons.UploadOptions.Default, commons.Media uploadMedia }) {
1813 var _url = null;
1814 var _queryParams = new core.Map();
1815 var _uploadMedia = null;
1816 var _uploadOptions = null;
1817 var _downloadOptions = commons.DownloadOptions.Metadata;
1818 var _body = null;
1819
1820 if (request != null) {
1821 _body = convert.JSON.encode((request).toJson());
1822 }
1823 if (projectId == null) {
1824 throw new core.ArgumentError("Parameter projectId is required.");
1825 }
1826
1827 _uploadMedia = uploadMedia;
1828 _uploadOptions = uploadOptions;
1829
1830 if (_uploadMedia == null) {
1831 _url = 'projects/' + commons.Escaper.ecapeVariable('$projectId') + '/icons ';
1832 } else if (_uploadOptions is commons.ResumableUploadOptions) {
1833 _url = '/resumable/upload/mapsengine/v1/projects/' + commons.Escaper.ecape Variable('$projectId') + '/icons';
1834 } else {
1835 _url = '/upload/mapsengine/v1/projects/' + commons.Escaper.ecapeVariable(' $projectId') + '/icons';
1836 }
1837
1838
1839 var _response = _requester.request(_url,
1840 "POST",
1841 body: _body,
1842 queryParams: _queryParams,
1843 uploadOptions: _uploadOptions,
1844 uploadMedia: _uploadMedia,
1845 downloadOptions: _downloadOptions);
1846 return _response.then((data) => new Icon.fromJson(data));
1847 }
1848
1849 /**
1850 * Return an icon or its associated metadata
1851 *
1852 * Request parameters:
1853 *
1854 * [projectId] - The ID of the project.
1855 *
1856 * [id] - The ID of the icon.
1857 *
1858 * [downloadOptions] - Options for downloading. A download can be either a
1859 * Metadata (default) or Media download. Partial Media downloads are possible
1860 * as well.
1861 *
1862 * Completes with a
1863 *
1864 * - [Icon] for Metadata downloads (see [downloadOptions]).
1865 *
1866 * - [commons.Media] for Media downloads (see [downloadOptions]).
1867 *
1868 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1869 * error.
1870 *
1871 * If the used [http.Client] completes with an error when making a REST call,
1872 * this method will complete with the same error.
1873 */
1874 async.Future get(core.String projectId, core.String id, {commons.DownloadOptio ns downloadOptions: commons.DownloadOptions.Metadata}) {
1875 var _url = null;
1876 var _queryParams = new core.Map();
1877 var _uploadMedia = null;
1878 var _uploadOptions = null;
1879 var _downloadOptions = commons.DownloadOptions.Metadata;
1880 var _body = null;
1881
1882 if (projectId == null) {
1883 throw new core.ArgumentError("Parameter projectId is required.");
1884 }
1885 if (id == null) {
1886 throw new core.ArgumentError("Parameter id is required.");
1887 }
1888
1889 _downloadOptions = downloadOptions;
1890
1891 _url = 'projects/' + commons.Escaper.ecapeVariable('$projectId') + '/icons/' + commons.Escaper.ecapeVariable('$id');
1892
1893 var _response = _requester.request(_url,
1894 "GET",
1895 body: _body,
1896 queryParams: _queryParams,
1897 uploadOptions: _uploadOptions,
1898 uploadMedia: _uploadMedia,
1899 downloadOptions: _downloadOptions);
1900 if (_downloadOptions == null ||
1901 _downloadOptions == commons.DownloadOptions.Metadata) {
1902 return _response.then((data) => new Icon.fromJson(data));
1903 } else {
1904 return _response;
1905 }
1906 }
1907
1908 /**
1909 * Return all icons in the current project
1910 *
1911 * Request parameters:
1912 *
1913 * [projectId] - The ID of the project.
1914 *
1915 * [maxResults] - The maximum number of items to include in a single response
1916 * page. The maximum supported value is 50.
1917 *
1918 * [pageToken] - The continuation token, used to page through large result
1919 * sets. To get the next page of results, set this parameter to the value of
1920 * nextPageToken from the previous response.
1921 *
1922 * Completes with a [IconsListResponse].
1923 *
1924 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1925 * error.
1926 *
1927 * If the used [http.Client] completes with an error when making a REST call,
1928 * this method will complete with the same error.
1929 */
1930 async.Future<IconsListResponse> list(core.String projectId, {core.int maxResul ts, core.String pageToken}) {
1931 var _url = null;
1932 var _queryParams = new core.Map();
1933 var _uploadMedia = null;
1934 var _uploadOptions = null;
1935 var _downloadOptions = commons.DownloadOptions.Metadata;
1936 var _body = null;
1937
1938 if (projectId == null) {
1939 throw new core.ArgumentError("Parameter projectId is required.");
1940 }
1941 if (maxResults != null) {
1942 _queryParams["maxResults"] = ["${maxResults}"];
1943 }
1944 if (pageToken != null) {
1945 _queryParams["pageToken"] = [pageToken];
1946 }
1947
1948 _url = 'projects/' + commons.Escaper.ecapeVariable('$projectId') + '/icons';
1949
1950 var _response = _requester.request(_url,
1951 "GET",
1952 body: _body,
1953 queryParams: _queryParams,
1954 uploadOptions: _uploadOptions,
1955 uploadMedia: _uploadMedia,
1956 downloadOptions: _downloadOptions);
1957 return _response.then((data) => new IconsListResponse.fromJson(data));
1958 }
1959
1960 }
1961
1962
1963 class RasterCollectionsResourceApi {
1964 final commons.ApiRequester _requester;
1965
1966 RasterCollectionsParentsResourceApi get parents => new RasterCollectionsParent sResourceApi(_requester);
1967 RasterCollectionsPermissionsResourceApi get permissions => new RasterCollectio nsPermissionsResourceApi(_requester);
1968 RasterCollectionsRastersResourceApi get rasters => new RasterCollectionsRaster sResourceApi(_requester);
1969
1970 RasterCollectionsResourceApi(commons.ApiRequester client) :
1971 _requester = client;
1972
1973 /**
1974 * Cancel processing on a raster collection asset.
1975 *
1976 * Request parameters:
1977 *
1978 * [id] - The ID of the raster collection.
1979 *
1980 * Completes with a [ProcessResponse].
1981 *
1982 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1983 * error.
1984 *
1985 * If the used [http.Client] completes with an error when making a REST call,
1986 * this method will complete with the same error.
1987 */
1988 async.Future<ProcessResponse> cancelProcessing(core.String id) {
1989 var _url = null;
1990 var _queryParams = new core.Map();
1991 var _uploadMedia = null;
1992 var _uploadOptions = null;
1993 var _downloadOptions = commons.DownloadOptions.Metadata;
1994 var _body = null;
1995
1996 if (id == null) {
1997 throw new core.ArgumentError("Parameter id is required.");
1998 }
1999
2000 _url = 'rasterCollections/' + commons.Escaper.ecapeVariable('$id') + '/cance lProcessing';
2001
2002 var _response = _requester.request(_url,
2003 "POST",
2004 body: _body,
2005 queryParams: _queryParams,
2006 uploadOptions: _uploadOptions,
2007 uploadMedia: _uploadMedia,
2008 downloadOptions: _downloadOptions);
2009 return _response.then((data) => new ProcessResponse.fromJson(data));
2010 }
2011
2012 /**
2013 * Create a raster collection asset.
2014 *
2015 * [request] - The metadata request object.
2016 *
2017 * Request parameters:
2018 *
2019 * Completes with a [RasterCollection].
2020 *
2021 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2022 * error.
2023 *
2024 * If the used [http.Client] completes with an error when making a REST call,
2025 * this method will complete with the same error.
2026 */
2027 async.Future<RasterCollection> create(RasterCollection request) {
2028 var _url = null;
2029 var _queryParams = new core.Map();
2030 var _uploadMedia = null;
2031 var _uploadOptions = null;
2032 var _downloadOptions = commons.DownloadOptions.Metadata;
2033 var _body = null;
2034
2035 if (request != null) {
2036 _body = convert.JSON.encode((request).toJson());
2037 }
2038
2039 _url = 'rasterCollections';
2040
2041 var _response = _requester.request(_url,
2042 "POST",
2043 body: _body,
2044 queryParams: _queryParams,
2045 uploadOptions: _uploadOptions,
2046 uploadMedia: _uploadMedia,
2047 downloadOptions: _downloadOptions);
2048 return _response.then((data) => new RasterCollection.fromJson(data));
2049 }
2050
2051 /**
2052 * Delete a raster collection.
2053 *
2054 * Request parameters:
2055 *
2056 * [id] - The ID of the raster collection. Only the raster collection creator
2057 * or project owner are permitted to delete. If the rastor collection is
2058 * included in a layer, the request will fail. Remove the raster collection
2059 * from all layers prior to deleting.
2060 *
2061 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2062 * error.
2063 *
2064 * If the used [http.Client] completes with an error when making a REST call,
2065 * this method will complete with the same error.
2066 */
2067 async.Future delete(core.String id) {
2068 var _url = null;
2069 var _queryParams = new core.Map();
2070 var _uploadMedia = null;
2071 var _uploadOptions = null;
2072 var _downloadOptions = commons.DownloadOptions.Metadata;
2073 var _body = null;
2074
2075 if (id == null) {
2076 throw new core.ArgumentError("Parameter id is required.");
2077 }
2078
2079 _downloadOptions = null;
2080
2081 _url = 'rasterCollections/' + commons.Escaper.ecapeVariable('$id');
2082
2083 var _response = _requester.request(_url,
2084 "DELETE",
2085 body: _body,
2086 queryParams: _queryParams,
2087 uploadOptions: _uploadOptions,
2088 uploadMedia: _uploadMedia,
2089 downloadOptions: _downloadOptions);
2090 return _response.then((data) => null);
2091 }
2092
2093 /**
2094 * Return metadata for a particular raster collection.
2095 *
2096 * Request parameters:
2097 *
2098 * [id] - The ID of the raster collection.
2099 *
2100 * Completes with a [RasterCollection].
2101 *
2102 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2103 * error.
2104 *
2105 * If the used [http.Client] completes with an error when making a REST call,
2106 * this method will complete with the same error.
2107 */
2108 async.Future<RasterCollection> get(core.String id) {
2109 var _url = null;
2110 var _queryParams = new core.Map();
2111 var _uploadMedia = null;
2112 var _uploadOptions = null;
2113 var _downloadOptions = commons.DownloadOptions.Metadata;
2114 var _body = null;
2115
2116 if (id == null) {
2117 throw new core.ArgumentError("Parameter id is required.");
2118 }
2119
2120 _url = 'rasterCollections/' + commons.Escaper.ecapeVariable('$id');
2121
2122 var _response = _requester.request(_url,
2123 "GET",
2124 body: _body,
2125 queryParams: _queryParams,
2126 uploadOptions: _uploadOptions,
2127 uploadMedia: _uploadMedia,
2128 downloadOptions: _downloadOptions);
2129 return _response.then((data) => new RasterCollection.fromJson(data));
2130 }
2131
2132 /**
2133 * Return all raster collections readable by the current user.
2134 *
2135 * Request parameters:
2136 *
2137 * [bbox] - A bounding box, expressed as "west,south,east,north". If set, only
2138 * assets which intersect this bounding box will be returned.
2139 *
2140 * [createdAfter] - An RFC 3339 formatted date-time value (e.g.
2141 * 1970-01-01T00:00:00Z). Returned assets will have been created at or after
2142 * this time.
2143 *
2144 * [createdBefore] - An RFC 3339 formatted date-time value (e.g.
2145 * 1970-01-01T00:00:00Z). Returned assets will have been created at or before
2146 * this time.
2147 *
2148 * [creatorEmail] - An email address representing a user. Returned assets that
2149 * have been created by the user associated with the provided email address.
2150 *
2151 * [maxResults] - The maximum number of items to include in a single response
2152 * page. The maximum supported value is 100.
2153 *
2154 * [modifiedAfter] - An RFC 3339 formatted date-time value (e.g.
2155 * 1970-01-01T00:00:00Z). Returned assets will have been modified at or after
2156 * this time.
2157 *
2158 * [modifiedBefore] - An RFC 3339 formatted date-time value (e.g.
2159 * 1970-01-01T00:00:00Z). Returned assets will have been modified at or before
2160 * this time.
2161 *
2162 * [pageToken] - The continuation token, used to page through large result
2163 * sets. To get the next page of results, set this parameter to the value of
2164 * nextPageToken from the previous response.
2165 *
2166 * [processingStatus] - null
2167 * Possible string values are:
2168 * - "complete" : The raster collection has completed processing.
2169 * - "failed" : The raster collection has failed processing.
2170 * - "notReady" : The raster collection is not ready for processing.
2171 * - "processing" : The raster collection is processing.
2172 * - "ready" : The raster collection is ready for processing.
2173 *
2174 * [projectId] - The ID of a Maps Engine project, used to filter the response.
2175 * To list all available projects with their IDs, send a Projects: list
2176 * request. You can also find your project ID as the value of the
2177 * DashboardPlace:cid URL parameter when signed in to mapsengine.google.com.
2178 *
2179 * [role] - The role parameter indicates that the response should only contain
2180 * assets where the current user has the specified level of access.
2181 * Possible string values are:
2182 * - "owner" : The user can read, write and administer the asset.
2183 * - "reader" : The user can read the asset.
2184 * - "writer" : The user can read and write the asset.
2185 *
2186 * [search] - An unstructured search string used to filter the set of results
2187 * based on asset metadata.
2188 *
2189 * [tags] - A comma separated list of tags. Returned assets will contain all
2190 * the tags from the list.
2191 *
2192 * Completes with a [RasterCollectionsListResponse].
2193 *
2194 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2195 * error.
2196 *
2197 * If the used [http.Client] completes with an error when making a REST call,
2198 * this method will complete with the same error.
2199 */
2200 async.Future<RasterCollectionsListResponse> list({core.String bbox, core.DateT ime createdAfter, core.DateTime createdBefore, core.String creatorEmail, core.in t maxResults, core.DateTime modifiedAfter, core.DateTime modifiedBefore, core.St ring pageToken, core.String processingStatus, core.String projectId, core.String role, core.String search, core.String tags}) {
2201 var _url = null;
2202 var _queryParams = new core.Map();
2203 var _uploadMedia = null;
2204 var _uploadOptions = null;
2205 var _downloadOptions = commons.DownloadOptions.Metadata;
2206 var _body = null;
2207
2208 if (bbox != null) {
2209 _queryParams["bbox"] = [bbox];
2210 }
2211 if (createdAfter != null) {
2212 _queryParams["createdAfter"] = [(createdAfter).toIso8601String()];
2213 }
2214 if (createdBefore != null) {
2215 _queryParams["createdBefore"] = [(createdBefore).toIso8601String()];
2216 }
2217 if (creatorEmail != null) {
2218 _queryParams["creatorEmail"] = [creatorEmail];
2219 }
2220 if (maxResults != null) {
2221 _queryParams["maxResults"] = ["${maxResults}"];
2222 }
2223 if (modifiedAfter != null) {
2224 _queryParams["modifiedAfter"] = [(modifiedAfter).toIso8601String()];
2225 }
2226 if (modifiedBefore != null) {
2227 _queryParams["modifiedBefore"] = [(modifiedBefore).toIso8601String()];
2228 }
2229 if (pageToken != null) {
2230 _queryParams["pageToken"] = [pageToken];
2231 }
2232 if (processingStatus != null) {
2233 _queryParams["processingStatus"] = [processingStatus];
2234 }
2235 if (projectId != null) {
2236 _queryParams["projectId"] = [projectId];
2237 }
2238 if (role != null) {
2239 _queryParams["role"] = [role];
2240 }
2241 if (search != null) {
2242 _queryParams["search"] = [search];
2243 }
2244 if (tags != null) {
2245 _queryParams["tags"] = [tags];
2246 }
2247
2248 _url = 'rasterCollections';
2249
2250 var _response = _requester.request(_url,
2251 "GET",
2252 body: _body,
2253 queryParams: _queryParams,
2254 uploadOptions: _uploadOptions,
2255 uploadMedia: _uploadMedia,
2256 downloadOptions: _downloadOptions);
2257 return _response.then((data) => new RasterCollectionsListResponse.fromJson(d ata));
2258 }
2259
2260 /**
2261 * Mutate a raster collection asset.
2262 *
2263 * [request] - The metadata request object.
2264 *
2265 * Request parameters:
2266 *
2267 * [id] - The ID of the raster collection.
2268 *
2269 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2270 * error.
2271 *
2272 * If the used [http.Client] completes with an error when making a REST call,
2273 * this method will complete with the same error.
2274 */
2275 async.Future patch(RasterCollection request, core.String id) {
2276 var _url = null;
2277 var _queryParams = new core.Map();
2278 var _uploadMedia = null;
2279 var _uploadOptions = null;
2280 var _downloadOptions = commons.DownloadOptions.Metadata;
2281 var _body = null;
2282
2283 if (request != null) {
2284 _body = convert.JSON.encode((request).toJson());
2285 }
2286 if (id == null) {
2287 throw new core.ArgumentError("Parameter id is required.");
2288 }
2289
2290 _downloadOptions = null;
2291
2292 _url = 'rasterCollections/' + commons.Escaper.ecapeVariable('$id');
2293
2294 var _response = _requester.request(_url,
2295 "PATCH",
2296 body: _body,
2297 queryParams: _queryParams,
2298 uploadOptions: _uploadOptions,
2299 uploadMedia: _uploadMedia,
2300 downloadOptions: _downloadOptions);
2301 return _response.then((data) => null);
2302 }
2303
2304 /**
2305 * Process a raster collection asset.
2306 *
2307 * Request parameters:
2308 *
2309 * [id] - The ID of the raster collection.
2310 *
2311 * Completes with a [ProcessResponse].
2312 *
2313 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2314 * error.
2315 *
2316 * If the used [http.Client] completes with an error when making a REST call,
2317 * this method will complete with the same error.
2318 */
2319 async.Future<ProcessResponse> process(core.String id) {
2320 var _url = null;
2321 var _queryParams = new core.Map();
2322 var _uploadMedia = null;
2323 var _uploadOptions = null;
2324 var _downloadOptions = commons.DownloadOptions.Metadata;
2325 var _body = null;
2326
2327 if (id == null) {
2328 throw new core.ArgumentError("Parameter id is required.");
2329 }
2330
2331 _url = 'rasterCollections/' + commons.Escaper.ecapeVariable('$id') + '/proce ss';
2332
2333 var _response = _requester.request(_url,
2334 "POST",
2335 body: _body,
2336 queryParams: _queryParams,
2337 uploadOptions: _uploadOptions,
2338 uploadMedia: _uploadMedia,
2339 downloadOptions: _downloadOptions);
2340 return _response.then((data) => new ProcessResponse.fromJson(data));
2341 }
2342
2343 }
2344
2345
2346 class RasterCollectionsParentsResourceApi {
2347 final commons.ApiRequester _requester;
2348
2349 RasterCollectionsParentsResourceApi(commons.ApiRequester client) :
2350 _requester = client;
2351
2352 /**
2353 * Return all parent ids of the specified raster collection.
2354 *
2355 * Request parameters:
2356 *
2357 * [id] - The ID of the raster collection whose parents will be listed.
2358 *
2359 * [maxResults] - The maximum number of items to include in a single response
2360 * page. The maximum supported value is 50.
2361 *
2362 * [pageToken] - The continuation token, used to page through large result
2363 * sets. To get the next page of results, set this parameter to the value of
2364 * nextPageToken from the previous response.
2365 *
2366 * Completes with a [ParentsListResponse].
2367 *
2368 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2369 * error.
2370 *
2371 * If the used [http.Client] completes with an error when making a REST call,
2372 * this method will complete with the same error.
2373 */
2374 async.Future<ParentsListResponse> list(core.String id, {core.int maxResults, c ore.String pageToken}) {
2375 var _url = null;
2376 var _queryParams = new core.Map();
2377 var _uploadMedia = null;
2378 var _uploadOptions = null;
2379 var _downloadOptions = commons.DownloadOptions.Metadata;
2380 var _body = null;
2381
2382 if (id == null) {
2383 throw new core.ArgumentError("Parameter id is required.");
2384 }
2385 if (maxResults != null) {
2386 _queryParams["maxResults"] = ["${maxResults}"];
2387 }
2388 if (pageToken != null) {
2389 _queryParams["pageToken"] = [pageToken];
2390 }
2391
2392 _url = 'rasterCollections/' + commons.Escaper.ecapeVariable('$id') + '/paren ts';
2393
2394 var _response = _requester.request(_url,
2395 "GET",
2396 body: _body,
2397 queryParams: _queryParams,
2398 uploadOptions: _uploadOptions,
2399 uploadMedia: _uploadMedia,
2400 downloadOptions: _downloadOptions);
2401 return _response.then((data) => new ParentsListResponse.fromJson(data));
2402 }
2403
2404 }
2405
2406
2407 class RasterCollectionsPermissionsResourceApi {
2408 final commons.ApiRequester _requester;
2409
2410 RasterCollectionsPermissionsResourceApi(commons.ApiRequester client) :
2411 _requester = client;
2412
2413 /**
2414 * Remove permission entries from an already existing asset.
2415 *
2416 * [request] - The metadata request object.
2417 *
2418 * Request parameters:
2419 *
2420 * [id] - The ID of the asset from which permissions will be removed.
2421 *
2422 * Completes with a [PermissionsBatchDeleteResponse].
2423 *
2424 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2425 * error.
2426 *
2427 * If the used [http.Client] completes with an error when making a REST call,
2428 * this method will complete with the same error.
2429 */
2430 async.Future<PermissionsBatchDeleteResponse> batchDelete(PermissionsBatchDelet eRequest request, core.String id) {
2431 var _url = null;
2432 var _queryParams = new core.Map();
2433 var _uploadMedia = null;
2434 var _uploadOptions = null;
2435 var _downloadOptions = commons.DownloadOptions.Metadata;
2436 var _body = null;
2437
2438 if (request != null) {
2439 _body = convert.JSON.encode((request).toJson());
2440 }
2441 if (id == null) {
2442 throw new core.ArgumentError("Parameter id is required.");
2443 }
2444
2445 _url = 'rasterCollections/' + commons.Escaper.ecapeVariable('$id') + '/permi ssions/batchDelete';
2446
2447 var _response = _requester.request(_url,
2448 "POST",
2449 body: _body,
2450 queryParams: _queryParams,
2451 uploadOptions: _uploadOptions,
2452 uploadMedia: _uploadMedia,
2453 downloadOptions: _downloadOptions);
2454 return _response.then((data) => new PermissionsBatchDeleteResponse.fromJson( data));
2455 }
2456
2457 /**
2458 * Add or update permission entries to an already existing asset.
2459 *
2460 * An asset can hold up to 20 different permission entries. Each batchInsert
2461 * request is atomic.
2462 *
2463 * [request] - The metadata request object.
2464 *
2465 * Request parameters:
2466 *
2467 * [id] - The ID of the asset to which permissions will be added.
2468 *
2469 * Completes with a [PermissionsBatchUpdateResponse].
2470 *
2471 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2472 * error.
2473 *
2474 * If the used [http.Client] completes with an error when making a REST call,
2475 * this method will complete with the same error.
2476 */
2477 async.Future<PermissionsBatchUpdateResponse> batchUpdate(PermissionsBatchUpdat eRequest request, core.String id) {
2478 var _url = null;
2479 var _queryParams = new core.Map();
2480 var _uploadMedia = null;
2481 var _uploadOptions = null;
2482 var _downloadOptions = commons.DownloadOptions.Metadata;
2483 var _body = null;
2484
2485 if (request != null) {
2486 _body = convert.JSON.encode((request).toJson());
2487 }
2488 if (id == null) {
2489 throw new core.ArgumentError("Parameter id is required.");
2490 }
2491
2492 _url = 'rasterCollections/' + commons.Escaper.ecapeVariable('$id') + '/permi ssions/batchUpdate';
2493
2494 var _response = _requester.request(_url,
2495 "POST",
2496 body: _body,
2497 queryParams: _queryParams,
2498 uploadOptions: _uploadOptions,
2499 uploadMedia: _uploadMedia,
2500 downloadOptions: _downloadOptions);
2501 return _response.then((data) => new PermissionsBatchUpdateResponse.fromJson( data));
2502 }
2503
2504 /**
2505 * Return all of the permissions for the specified asset.
2506 *
2507 * Request parameters:
2508 *
2509 * [id] - The ID of the asset whose permissions will be listed.
2510 *
2511 * Completes with a [PermissionsListResponse].
2512 *
2513 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2514 * error.
2515 *
2516 * If the used [http.Client] completes with an error when making a REST call,
2517 * this method will complete with the same error.
2518 */
2519 async.Future<PermissionsListResponse> list(core.String id) {
2520 var _url = null;
2521 var _queryParams = new core.Map();
2522 var _uploadMedia = null;
2523 var _uploadOptions = null;
2524 var _downloadOptions = commons.DownloadOptions.Metadata;
2525 var _body = null;
2526
2527 if (id == null) {
2528 throw new core.ArgumentError("Parameter id is required.");
2529 }
2530
2531 _url = 'rasterCollections/' + commons.Escaper.ecapeVariable('$id') + '/permi ssions';
2532
2533 var _response = _requester.request(_url,
2534 "GET",
2535 body: _body,
2536 queryParams: _queryParams,
2537 uploadOptions: _uploadOptions,
2538 uploadMedia: _uploadMedia,
2539 downloadOptions: _downloadOptions);
2540 return _response.then((data) => new PermissionsListResponse.fromJson(data));
2541 }
2542
2543 }
2544
2545
2546 class RasterCollectionsRastersResourceApi {
2547 final commons.ApiRequester _requester;
2548
2549 RasterCollectionsRastersResourceApi(commons.ApiRequester client) :
2550 _requester = client;
2551
2552 /**
2553 * Remove rasters from an existing raster collection.
2554 *
2555 * Up to 50 rasters can be included in a single batchDelete request. Each
2556 * batchDelete request is atomic.
2557 *
2558 * [request] - The metadata request object.
2559 *
2560 * Request parameters:
2561 *
2562 * [id] - The ID of the raster collection to which these rasters belong.
2563 *
2564 * Completes with a [RasterCollectionsRastersBatchDeleteResponse].
2565 *
2566 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2567 * error.
2568 *
2569 * If the used [http.Client] completes with an error when making a REST call,
2570 * this method will complete with the same error.
2571 */
2572 async.Future<RasterCollectionsRastersBatchDeleteResponse> batchDelete(RasterCo llectionsRasterBatchDeleteRequest request, core.String id) {
2573 var _url = null;
2574 var _queryParams = new core.Map();
2575 var _uploadMedia = null;
2576 var _uploadOptions = null;
2577 var _downloadOptions = commons.DownloadOptions.Metadata;
2578 var _body = null;
2579
2580 if (request != null) {
2581 _body = convert.JSON.encode((request).toJson());
2582 }
2583 if (id == null) {
2584 throw new core.ArgumentError("Parameter id is required.");
2585 }
2586
2587 _url = 'rasterCollections/' + commons.Escaper.ecapeVariable('$id') + '/raste rs/batchDelete';
2588
2589 var _response = _requester.request(_url,
2590 "POST",
2591 body: _body,
2592 queryParams: _queryParams,
2593 uploadOptions: _uploadOptions,
2594 uploadMedia: _uploadMedia,
2595 downloadOptions: _downloadOptions);
2596 return _response.then((data) => new RasterCollectionsRastersBatchDeleteRespo nse.fromJson(data));
2597 }
2598
2599 /**
2600 * Add rasters to an existing raster collection. Rasters must be successfully
2601 * processed in order to be added to a raster collection.
2602 *
2603 * Up to 50 rasters can be included in a single batchInsert request. Each
2604 * batchInsert request is atomic.
2605 *
2606 * [request] - The metadata request object.
2607 *
2608 * Request parameters:
2609 *
2610 * [id] - The ID of the raster collection to which these rasters belong.
2611 *
2612 * Completes with a [RasterCollectionsRastersBatchInsertResponse].
2613 *
2614 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2615 * error.
2616 *
2617 * If the used [http.Client] completes with an error when making a REST call,
2618 * this method will complete with the same error.
2619 */
2620 async.Future<RasterCollectionsRastersBatchInsertResponse> batchInsert(RasterCo llectionsRastersBatchInsertRequest request, core.String id) {
2621 var _url = null;
2622 var _queryParams = new core.Map();
2623 var _uploadMedia = null;
2624 var _uploadOptions = null;
2625 var _downloadOptions = commons.DownloadOptions.Metadata;
2626 var _body = null;
2627
2628 if (request != null) {
2629 _body = convert.JSON.encode((request).toJson());
2630 }
2631 if (id == null) {
2632 throw new core.ArgumentError("Parameter id is required.");
2633 }
2634
2635 _url = 'rasterCollections/' + commons.Escaper.ecapeVariable('$id') + '/raste rs/batchInsert';
2636
2637 var _response = _requester.request(_url,
2638 "POST",
2639 body: _body,
2640 queryParams: _queryParams,
2641 uploadOptions: _uploadOptions,
2642 uploadMedia: _uploadMedia,
2643 downloadOptions: _downloadOptions);
2644 return _response.then((data) => new RasterCollectionsRastersBatchInsertRespo nse.fromJson(data));
2645 }
2646
2647 /**
2648 * Return all rasters within a raster collection.
2649 *
2650 * Request parameters:
2651 *
2652 * [id] - The ID of the raster collection to which these rasters belong.
2653 *
2654 * [bbox] - A bounding box, expressed as "west,south,east,north". If set, only
2655 * assets which intersect this bounding box will be returned.
2656 *
2657 * [createdAfter] - An RFC 3339 formatted date-time value (e.g.
2658 * 1970-01-01T00:00:00Z). Returned assets will have been created at or after
2659 * this time.
2660 *
2661 * [createdBefore] - An RFC 3339 formatted date-time value (e.g.
2662 * 1970-01-01T00:00:00Z). Returned assets will have been created at or before
2663 * this time.
2664 *
2665 * [creatorEmail] - An email address representing a user. Returned assets that
2666 * have been created by the user associated with the provided email address.
2667 *
2668 * [maxResults] - The maximum number of items to include in a single response
2669 * page. The maximum supported value is 100.
2670 *
2671 * [modifiedAfter] - An RFC 3339 formatted date-time value (e.g.
2672 * 1970-01-01T00:00:00Z). Returned assets will have been modified at or after
2673 * this time.
2674 *
2675 * [modifiedBefore] - An RFC 3339 formatted date-time value (e.g.
2676 * 1970-01-01T00:00:00Z). Returned assets will have been modified at or before
2677 * this time.
2678 *
2679 * [pageToken] - The continuation token, used to page through large result
2680 * sets. To get the next page of results, set this parameter to the value of
2681 * nextPageToken from the previous response.
2682 *
2683 * [role] - The role parameter indicates that the response should only contain
2684 * assets where the current user has the specified level of access.
2685 * Possible string values are:
2686 * - "owner" : The user can read, write and administer the asset.
2687 * - "reader" : The user can read the asset.
2688 * - "writer" : The user can read and write the asset.
2689 *
2690 * [search] - An unstructured search string used to filter the set of results
2691 * based on asset metadata.
2692 *
2693 * [tags] - A comma separated list of tags. Returned assets will contain all
2694 * the tags from the list.
2695 *
2696 * Completes with a [RasterCollectionsRastersListResponse].
2697 *
2698 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2699 * error.
2700 *
2701 * If the used [http.Client] completes with an error when making a REST call,
2702 * this method will complete with the same error.
2703 */
2704 async.Future<RasterCollectionsRastersListResponse> list(core.String id, {core. String bbox, core.DateTime createdAfter, core.DateTime createdBefore, core.Strin g creatorEmail, core.int maxResults, core.DateTime modifiedAfter, core.DateTime modifiedBefore, core.String pageToken, core.String role, core.String search, cor e.String tags}) {
2705 var _url = null;
2706 var _queryParams = new core.Map();
2707 var _uploadMedia = null;
2708 var _uploadOptions = null;
2709 var _downloadOptions = commons.DownloadOptions.Metadata;
2710 var _body = null;
2711
2712 if (id == null) {
2713 throw new core.ArgumentError("Parameter id is required.");
2714 }
2715 if (bbox != null) {
2716 _queryParams["bbox"] = [bbox];
2717 }
2718 if (createdAfter != null) {
2719 _queryParams["createdAfter"] = [(createdAfter).toIso8601String()];
2720 }
2721 if (createdBefore != null) {
2722 _queryParams["createdBefore"] = [(createdBefore).toIso8601String()];
2723 }
2724 if (creatorEmail != null) {
2725 _queryParams["creatorEmail"] = [creatorEmail];
2726 }
2727 if (maxResults != null) {
2728 _queryParams["maxResults"] = ["${maxResults}"];
2729 }
2730 if (modifiedAfter != null) {
2731 _queryParams["modifiedAfter"] = [(modifiedAfter).toIso8601String()];
2732 }
2733 if (modifiedBefore != null) {
2734 _queryParams["modifiedBefore"] = [(modifiedBefore).toIso8601String()];
2735 }
2736 if (pageToken != null) {
2737 _queryParams["pageToken"] = [pageToken];
2738 }
2739 if (role != null) {
2740 _queryParams["role"] = [role];
2741 }
2742 if (search != null) {
2743 _queryParams["search"] = [search];
2744 }
2745 if (tags != null) {
2746 _queryParams["tags"] = [tags];
2747 }
2748
2749 _url = 'rasterCollections/' + commons.Escaper.ecapeVariable('$id') + '/raste rs';
2750
2751 var _response = _requester.request(_url,
2752 "GET",
2753 body: _body,
2754 queryParams: _queryParams,
2755 uploadOptions: _uploadOptions,
2756 uploadMedia: _uploadMedia,
2757 downloadOptions: _downloadOptions);
2758 return _response.then((data) => new RasterCollectionsRastersListResponse.fro mJson(data));
2759 }
2760
2761 }
2762
2763
2764 class RastersResourceApi {
2765 final commons.ApiRequester _requester;
2766
2767 RastersFilesResourceApi get files => new RastersFilesResourceApi(_requester);
2768 RastersParentsResourceApi get parents => new RastersParentsResourceApi(_reques ter);
2769 RastersPermissionsResourceApi get permissions => new RastersPermissionsResourc eApi(_requester);
2770
2771 RastersResourceApi(commons.ApiRequester client) :
2772 _requester = client;
2773
2774 /**
2775 * Delete a raster.
2776 *
2777 * Request parameters:
2778 *
2779 * [id] - The ID of the raster. Only the raster creator or project owner are
2780 * permitted to delete. If the raster is included in a layer or mosaic, the
2781 * request will fail. Remove it from all parents prior to deleting.
2782 *
2783 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2784 * error.
2785 *
2786 * If the used [http.Client] completes with an error when making a REST call,
2787 * this method will complete with the same error.
2788 */
2789 async.Future delete(core.String id) {
2790 var _url = null;
2791 var _queryParams = new core.Map();
2792 var _uploadMedia = null;
2793 var _uploadOptions = null;
2794 var _downloadOptions = commons.DownloadOptions.Metadata;
2795 var _body = null;
2796
2797 if (id == null) {
2798 throw new core.ArgumentError("Parameter id is required.");
2799 }
2800
2801 _downloadOptions = null;
2802
2803 _url = 'rasters/' + commons.Escaper.ecapeVariable('$id');
2804
2805 var _response = _requester.request(_url,
2806 "DELETE",
2807 body: _body,
2808 queryParams: _queryParams,
2809 uploadOptions: _uploadOptions,
2810 uploadMedia: _uploadMedia,
2811 downloadOptions: _downloadOptions);
2812 return _response.then((data) => null);
2813 }
2814
2815 /**
2816 * Return metadata for a single raster.
2817 *
2818 * Request parameters:
2819 *
2820 * [id] - The ID of the raster.
2821 *
2822 * Completes with a [Raster].
2823 *
2824 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2825 * error.
2826 *
2827 * If the used [http.Client] completes with an error when making a REST call,
2828 * this method will complete with the same error.
2829 */
2830 async.Future<Raster> get(core.String id) {
2831 var _url = null;
2832 var _queryParams = new core.Map();
2833 var _uploadMedia = null;
2834 var _uploadOptions = null;
2835 var _downloadOptions = commons.DownloadOptions.Metadata;
2836 var _body = null;
2837
2838 if (id == null) {
2839 throw new core.ArgumentError("Parameter id is required.");
2840 }
2841
2842 _url = 'rasters/' + commons.Escaper.ecapeVariable('$id');
2843
2844 var _response = _requester.request(_url,
2845 "GET",
2846 body: _body,
2847 queryParams: _queryParams,
2848 uploadOptions: _uploadOptions,
2849 uploadMedia: _uploadMedia,
2850 downloadOptions: _downloadOptions);
2851 return _response.then((data) => new Raster.fromJson(data));
2852 }
2853
2854 /**
2855 * Return all rasters readable by the current user.
2856 *
2857 * Request parameters:
2858 *
2859 * [projectId] - The ID of a Maps Engine project, used to filter the response.
2860 * To list all available projects with their IDs, send a Projects: list
2861 * request. You can also find your project ID as the value of the
2862 * DashboardPlace:cid URL parameter when signed in to mapsengine.google.com.
2863 *
2864 * [bbox] - A bounding box, expressed as "west,south,east,north". If set, only
2865 * assets which intersect this bounding box will be returned.
2866 *
2867 * [createdAfter] - An RFC 3339 formatted date-time value (e.g.
2868 * 1970-01-01T00:00:00Z). Returned assets will have been created at or after
2869 * this time.
2870 *
2871 * [createdBefore] - An RFC 3339 formatted date-time value (e.g.
2872 * 1970-01-01T00:00:00Z). Returned assets will have been created at or before
2873 * this time.
2874 *
2875 * [creatorEmail] - An email address representing a user. Returned assets that
2876 * have been created by the user associated with the provided email address.
2877 *
2878 * [maxResults] - The maximum number of items to include in a single response
2879 * page. The maximum supported value is 100.
2880 *
2881 * [modifiedAfter] - An RFC 3339 formatted date-time value (e.g.
2882 * 1970-01-01T00:00:00Z). Returned assets will have been modified at or after
2883 * this time.
2884 *
2885 * [modifiedBefore] - An RFC 3339 formatted date-time value (e.g.
2886 * 1970-01-01T00:00:00Z). Returned assets will have been modified at or before
2887 * this time.
2888 *
2889 * [pageToken] - The continuation token, used to page through large result
2890 * sets. To get the next page of results, set this parameter to the value of
2891 * nextPageToken from the previous response.
2892 *
2893 * [processingStatus] - null
2894 * Possible string values are:
2895 * - "complete" : The raster has completed processing.
2896 * - "failed" : The raster has failed processing.
2897 * - "notReady" : The raster is not ready for processing.
2898 * - "processing" : The raster is processing.
2899 * - "ready" : The raster is ready for processing.
2900 *
2901 * [role] - The role parameter indicates that the response should only contain
2902 * assets where the current user has the specified level of access.
2903 * Possible string values are:
2904 * - "owner" : The user can read, write and administer the asset.
2905 * - "reader" : The user can read the asset.
2906 * - "writer" : The user can read and write the asset.
2907 *
2908 * [search] - An unstructured search string used to filter the set of results
2909 * based on asset metadata.
2910 *
2911 * [tags] - A comma separated list of tags. Returned assets will contain all
2912 * the tags from the list.
2913 *
2914 * Completes with a [RastersListResponse].
2915 *
2916 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2917 * error.
2918 *
2919 * If the used [http.Client] completes with an error when making a REST call,
2920 * this method will complete with the same error.
2921 */
2922 async.Future<RastersListResponse> list(core.String projectId, {core.String bbo x, core.DateTime createdAfter, core.DateTime createdBefore, core.String creatorE mail, core.int maxResults, core.DateTime modifiedAfter, core.DateTime modifiedBe fore, core.String pageToken, core.String processingStatus, core.String role, cor e.String search, core.String tags}) {
2923 var _url = null;
2924 var _queryParams = new core.Map();
2925 var _uploadMedia = null;
2926 var _uploadOptions = null;
2927 var _downloadOptions = commons.DownloadOptions.Metadata;
2928 var _body = null;
2929
2930 if (projectId == null) {
2931 throw new core.ArgumentError("Parameter projectId is required.");
2932 }
2933 _queryParams["projectId"] = [projectId];
2934 if (bbox != null) {
2935 _queryParams["bbox"] = [bbox];
2936 }
2937 if (createdAfter != null) {
2938 _queryParams["createdAfter"] = [(createdAfter).toIso8601String()];
2939 }
2940 if (createdBefore != null) {
2941 _queryParams["createdBefore"] = [(createdBefore).toIso8601String()];
2942 }
2943 if (creatorEmail != null) {
2944 _queryParams["creatorEmail"] = [creatorEmail];
2945 }
2946 if (maxResults != null) {
2947 _queryParams["maxResults"] = ["${maxResults}"];
2948 }
2949 if (modifiedAfter != null) {
2950 _queryParams["modifiedAfter"] = [(modifiedAfter).toIso8601String()];
2951 }
2952 if (modifiedBefore != null) {
2953 _queryParams["modifiedBefore"] = [(modifiedBefore).toIso8601String()];
2954 }
2955 if (pageToken != null) {
2956 _queryParams["pageToken"] = [pageToken];
2957 }
2958 if (processingStatus != null) {
2959 _queryParams["processingStatus"] = [processingStatus];
2960 }
2961 if (role != null) {
2962 _queryParams["role"] = [role];
2963 }
2964 if (search != null) {
2965 _queryParams["search"] = [search];
2966 }
2967 if (tags != null) {
2968 _queryParams["tags"] = [tags];
2969 }
2970
2971 _url = 'rasters';
2972
2973 var _response = _requester.request(_url,
2974 "GET",
2975 body: _body,
2976 queryParams: _queryParams,
2977 uploadOptions: _uploadOptions,
2978 uploadMedia: _uploadMedia,
2979 downloadOptions: _downloadOptions);
2980 return _response.then((data) => new RastersListResponse.fromJson(data));
2981 }
2982
2983 /**
2984 * Mutate a raster asset.
2985 *
2986 * [request] - The metadata request object.
2987 *
2988 * Request parameters:
2989 *
2990 * [id] - The ID of the raster.
2991 *
2992 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2993 * error.
2994 *
2995 * If the used [http.Client] completes with an error when making a REST call,
2996 * this method will complete with the same error.
2997 */
2998 async.Future patch(Raster request, core.String id) {
2999 var _url = null;
3000 var _queryParams = new core.Map();
3001 var _uploadMedia = null;
3002 var _uploadOptions = null;
3003 var _downloadOptions = commons.DownloadOptions.Metadata;
3004 var _body = null;
3005
3006 if (request != null) {
3007 _body = convert.JSON.encode((request).toJson());
3008 }
3009 if (id == null) {
3010 throw new core.ArgumentError("Parameter id is required.");
3011 }
3012
3013 _downloadOptions = null;
3014
3015 _url = 'rasters/' + commons.Escaper.ecapeVariable('$id');
3016
3017 var _response = _requester.request(_url,
3018 "PATCH",
3019 body: _body,
3020 queryParams: _queryParams,
3021 uploadOptions: _uploadOptions,
3022 uploadMedia: _uploadMedia,
3023 downloadOptions: _downloadOptions);
3024 return _response.then((data) => null);
3025 }
3026
3027 /**
3028 * Process a raster asset.
3029 *
3030 * Request parameters:
3031 *
3032 * [id] - The ID of the raster.
3033 *
3034 * Completes with a [ProcessResponse].
3035 *
3036 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
3037 * error.
3038 *
3039 * If the used [http.Client] completes with an error when making a REST call,
3040 * this method will complete with the same error.
3041 */
3042 async.Future<ProcessResponse> process(core.String id) {
3043 var _url = null;
3044 var _queryParams = new core.Map();
3045 var _uploadMedia = null;
3046 var _uploadOptions = null;
3047 var _downloadOptions = commons.DownloadOptions.Metadata;
3048 var _body = null;
3049
3050 if (id == null) {
3051 throw new core.ArgumentError("Parameter id is required.");
3052 }
3053
3054 _url = 'rasters/' + commons.Escaper.ecapeVariable('$id') + '/process';
3055
3056 var _response = _requester.request(_url,
3057 "POST",
3058 body: _body,
3059 queryParams: _queryParams,
3060 uploadOptions: _uploadOptions,
3061 uploadMedia: _uploadMedia,
3062 downloadOptions: _downloadOptions);
3063 return _response.then((data) => new ProcessResponse.fromJson(data));
3064 }
3065
3066 /**
3067 * Create a skeleton raster asset for upload.
3068 *
3069 * [request] - The metadata request object.
3070 *
3071 * Request parameters:
3072 *
3073 * Completes with a [Raster].
3074 *
3075 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
3076 * error.
3077 *
3078 * If the used [http.Client] completes with an error when making a REST call,
3079 * this method will complete with the same error.
3080 */
3081 async.Future<Raster> upload(Raster request) {
3082 var _url = null;
3083 var _queryParams = new core.Map();
3084 var _uploadMedia = null;
3085 var _uploadOptions = null;
3086 var _downloadOptions = commons.DownloadOptions.Metadata;
3087 var _body = null;
3088
3089 if (request != null) {
3090 _body = convert.JSON.encode((request).toJson());
3091 }
3092
3093 _url = 'rasters/upload';
3094
3095 var _response = _requester.request(_url,
3096 "POST",
3097 body: _body,
3098 queryParams: _queryParams,
3099 uploadOptions: _uploadOptions,
3100 uploadMedia: _uploadMedia,
3101 downloadOptions: _downloadOptions);
3102 return _response.then((data) => new Raster.fromJson(data));
3103 }
3104
3105 }
3106
3107
3108 class RastersFilesResourceApi {
3109 final commons.ApiRequester _requester;
3110
3111 RastersFilesResourceApi(commons.ApiRequester client) :
3112 _requester = client;
3113
3114 /**
3115 * Upload a file to a raster asset.
3116 *
3117 * Request parameters:
3118 *
3119 * [id] - The ID of the raster asset.
3120 *
3121 * [filename] - The file name of this uploaded file.
3122 *
3123 * [uploadMedia] - The media to upload.
3124 *
3125 * [uploadOptions] - Options for the media upload. Streaming Media without the
3126 * length being known ahead of time is only supported via resumable uploads.
3127 *
3128 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
3129 * error.
3130 *
3131 * If the used [http.Client] completes with an error when making a REST call,
3132 * this method will complete with the same error.
3133 */
3134 async.Future insert(core.String id, core.String filename, {commons.UploadOptio ns uploadOptions : commons.UploadOptions.Default, commons.Media uploadMedia}) {
3135 var _url = null;
3136 var _queryParams = new core.Map();
3137 var _uploadMedia = null;
3138 var _uploadOptions = null;
3139 var _downloadOptions = commons.DownloadOptions.Metadata;
3140 var _body = null;
3141
3142 if (id == null) {
3143 throw new core.ArgumentError("Parameter id is required.");
3144 }
3145 if (filename == null) {
3146 throw new core.ArgumentError("Parameter filename is required.");
3147 }
3148 _queryParams["filename"] = [filename];
3149
3150
3151 _uploadMedia = uploadMedia;
3152 _uploadOptions = uploadOptions;
3153 _downloadOptions = null;
3154
3155 if (_uploadMedia == null) {
3156 _url = 'rasters/' + commons.Escaper.ecapeVariable('$id') + '/files';
3157 } else if (_uploadOptions is commons.ResumableUploadOptions) {
3158 _url = '/resumable/upload/mapsengine/v1/rasters/' + commons.Escaper.ecapeV ariable('$id') + '/files';
3159 } else {
3160 _url = '/upload/mapsengine/v1/rasters/' + commons.Escaper.ecapeVariable('$ id') + '/files';
3161 }
3162
3163
3164 var _response = _requester.request(_url,
3165 "POST",
3166 body: _body,
3167 queryParams: _queryParams,
3168 uploadOptions: _uploadOptions,
3169 uploadMedia: _uploadMedia,
3170 downloadOptions: _downloadOptions);
3171 return _response.then((data) => null);
3172 }
3173
3174 }
3175
3176
3177 class RastersParentsResourceApi {
3178 final commons.ApiRequester _requester;
3179
3180 RastersParentsResourceApi(commons.ApiRequester client) :
3181 _requester = client;
3182
3183 /**
3184 * Return all parent ids of the specified rasters.
3185 *
3186 * Request parameters:
3187 *
3188 * [id] - The ID of the rasters whose parents will be listed.
3189 *
3190 * [maxResults] - The maximum number of items to include in a single response
3191 * page. The maximum supported value is 50.
3192 *
3193 * [pageToken] - The continuation token, used to page through large result
3194 * sets. To get the next page of results, set this parameter to the value of
3195 * nextPageToken from the previous response.
3196 *
3197 * Completes with a [ParentsListResponse].
3198 *
3199 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
3200 * error.
3201 *
3202 * If the used [http.Client] completes with an error when making a REST call,
3203 * this method will complete with the same error.
3204 */
3205 async.Future<ParentsListResponse> list(core.String id, {core.int maxResults, c ore.String pageToken}) {
3206 var _url = null;
3207 var _queryParams = new core.Map();
3208 var _uploadMedia = null;
3209 var _uploadOptions = null;
3210 var _downloadOptions = commons.DownloadOptions.Metadata;
3211 var _body = null;
3212
3213 if (id == null) {
3214 throw new core.ArgumentError("Parameter id is required.");
3215 }
3216 if (maxResults != null) {
3217 _queryParams["maxResults"] = ["${maxResults}"];
3218 }
3219 if (pageToken != null) {
3220 _queryParams["pageToken"] = [pageToken];
3221 }
3222
3223 _url = 'rasters/' + commons.Escaper.ecapeVariable('$id') + '/parents';
3224
3225 var _response = _requester.request(_url,
3226 "GET",
3227 body: _body,
3228 queryParams: _queryParams,
3229 uploadOptions: _uploadOptions,
3230 uploadMedia: _uploadMedia,
3231 downloadOptions: _downloadOptions);
3232 return _response.then((data) => new ParentsListResponse.fromJson(data));
3233 }
3234
3235 }
3236
3237
3238 class RastersPermissionsResourceApi {
3239 final commons.ApiRequester _requester;
3240
3241 RastersPermissionsResourceApi(commons.ApiRequester client) :
3242 _requester = client;
3243
3244 /**
3245 * Remove permission entries from an already existing asset.
3246 *
3247 * [request] - The metadata request object.
3248 *
3249 * Request parameters:
3250 *
3251 * [id] - The ID of the asset from which permissions will be removed.
3252 *
3253 * Completes with a [PermissionsBatchDeleteResponse].
3254 *
3255 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
3256 * error.
3257 *
3258 * If the used [http.Client] completes with an error when making a REST call,
3259 * this method will complete with the same error.
3260 */
3261 async.Future<PermissionsBatchDeleteResponse> batchDelete(PermissionsBatchDelet eRequest request, core.String id) {
3262 var _url = null;
3263 var _queryParams = new core.Map();
3264 var _uploadMedia = null;
3265 var _uploadOptions = null;
3266 var _downloadOptions = commons.DownloadOptions.Metadata;
3267 var _body = null;
3268
3269 if (request != null) {
3270 _body = convert.JSON.encode((request).toJson());
3271 }
3272 if (id == null) {
3273 throw new core.ArgumentError("Parameter id is required.");
3274 }
3275
3276 _url = 'rasters/' + commons.Escaper.ecapeVariable('$id') + '/permissions/bat chDelete';
3277
3278 var _response = _requester.request(_url,
3279 "POST",
3280 body: _body,
3281 queryParams: _queryParams,
3282 uploadOptions: _uploadOptions,
3283 uploadMedia: _uploadMedia,
3284 downloadOptions: _downloadOptions);
3285 return _response.then((data) => new PermissionsBatchDeleteResponse.fromJson( data));
3286 }
3287
3288 /**
3289 * Add or update permission entries to an already existing asset.
3290 *
3291 * An asset can hold up to 20 different permission entries. Each batchInsert
3292 * request is atomic.
3293 *
3294 * [request] - The metadata request object.
3295 *
3296 * Request parameters:
3297 *
3298 * [id] - The ID of the asset to which permissions will be added.
3299 *
3300 * Completes with a [PermissionsBatchUpdateResponse].
3301 *
3302 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
3303 * error.
3304 *
3305 * If the used [http.Client] completes with an error when making a REST call,
3306 * this method will complete with the same error.
3307 */
3308 async.Future<PermissionsBatchUpdateResponse> batchUpdate(PermissionsBatchUpdat eRequest request, core.String id) {
3309 var _url = null;
3310 var _queryParams = new core.Map();
3311 var _uploadMedia = null;
3312 var _uploadOptions = null;
3313 var _downloadOptions = commons.DownloadOptions.Metadata;
3314 var _body = null;
3315
3316 if (request != null) {
3317 _body = convert.JSON.encode((request).toJson());
3318 }
3319 if (id == null) {
3320 throw new core.ArgumentError("Parameter id is required.");
3321 }
3322
3323 _url = 'rasters/' + commons.Escaper.ecapeVariable('$id') + '/permissions/bat chUpdate';
3324
3325 var _response = _requester.request(_url,
3326 "POST",
3327 body: _body,
3328 queryParams: _queryParams,
3329 uploadOptions: _uploadOptions,
3330 uploadMedia: _uploadMedia,
3331 downloadOptions: _downloadOptions);
3332 return _response.then((data) => new PermissionsBatchUpdateResponse.fromJson( data));
3333 }
3334
3335 /**
3336 * Return all of the permissions for the specified asset.
3337 *
3338 * Request parameters:
3339 *
3340 * [id] - The ID of the asset whose permissions will be listed.
3341 *
3342 * Completes with a [PermissionsListResponse].
3343 *
3344 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
3345 * error.
3346 *
3347 * If the used [http.Client] completes with an error when making a REST call,
3348 * this method will complete with the same error.
3349 */
3350 async.Future<PermissionsListResponse> list(core.String id) {
3351 var _url = null;
3352 var _queryParams = new core.Map();
3353 var _uploadMedia = null;
3354 var _uploadOptions = null;
3355 var _downloadOptions = commons.DownloadOptions.Metadata;
3356 var _body = null;
3357
3358 if (id == null) {
3359 throw new core.ArgumentError("Parameter id is required.");
3360 }
3361
3362 _url = 'rasters/' + commons.Escaper.ecapeVariable('$id') + '/permissions';
3363
3364 var _response = _requester.request(_url,
3365 "GET",
3366 body: _body,
3367 queryParams: _queryParams,
3368 uploadOptions: _uploadOptions,
3369 uploadMedia: _uploadMedia,
3370 downloadOptions: _downloadOptions);
3371 return _response.then((data) => new PermissionsListResponse.fromJson(data));
3372 }
3373
3374 }
3375
3376
3377 class TablesResourceApi {
3378 final commons.ApiRequester _requester;
3379
3380 TablesFeaturesResourceApi get features => new TablesFeaturesResourceApi(_reque ster);
3381 TablesFilesResourceApi get files => new TablesFilesResourceApi(_requester);
3382 TablesParentsResourceApi get parents => new TablesParentsResourceApi(_requeste r);
3383 TablesPermissionsResourceApi get permissions => new TablesPermissionsResourceA pi(_requester);
3384
3385 TablesResourceApi(commons.ApiRequester client) :
3386 _requester = client;
3387
3388 /**
3389 * Create a table asset.
3390 *
3391 * [request] - The metadata request object.
3392 *
3393 * Request parameters:
3394 *
3395 * Completes with a [Table].
3396 *
3397 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
3398 * error.
3399 *
3400 * If the used [http.Client] completes with an error when making a REST call,
3401 * this method will complete with the same error.
3402 */
3403 async.Future<Table> create(Table request) {
3404 var _url = null;
3405 var _queryParams = new core.Map();
3406 var _uploadMedia = null;
3407 var _uploadOptions = null;
3408 var _downloadOptions = commons.DownloadOptions.Metadata;
3409 var _body = null;
3410
3411 if (request != null) {
3412 _body = convert.JSON.encode((request).toJson());
3413 }
3414
3415 _url = 'tables';
3416
3417 var _response = _requester.request(_url,
3418 "POST",
3419 body: _body,
3420 queryParams: _queryParams,
3421 uploadOptions: _uploadOptions,
3422 uploadMedia: _uploadMedia,
3423 downloadOptions: _downloadOptions);
3424 return _response.then((data) => new Table.fromJson(data));
3425 }
3426
3427 /**
3428 * Delete a table.
3429 *
3430 * Request parameters:
3431 *
3432 * [id] - The ID of the table. Only the table creator or project owner are
3433 * permitted to delete. If the table is included in a layer, the request will
3434 * fail. Remove it from all layers prior to deleting.
3435 *
3436 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
3437 * error.
3438 *
3439 * If the used [http.Client] completes with an error when making a REST call,
3440 * this method will complete with the same error.
3441 */
3442 async.Future delete(core.String id) {
3443 var _url = null;
3444 var _queryParams = new core.Map();
3445 var _uploadMedia = null;
3446 var _uploadOptions = null;
3447 var _downloadOptions = commons.DownloadOptions.Metadata;
3448 var _body = null;
3449
3450 if (id == null) {
3451 throw new core.ArgumentError("Parameter id is required.");
3452 }
3453
3454 _downloadOptions = null;
3455
3456 _url = 'tables/' + commons.Escaper.ecapeVariable('$id');
3457
3458 var _response = _requester.request(_url,
3459 "DELETE",
3460 body: _body,
3461 queryParams: _queryParams,
3462 uploadOptions: _uploadOptions,
3463 uploadMedia: _uploadMedia,
3464 downloadOptions: _downloadOptions);
3465 return _response.then((data) => null);
3466 }
3467
3468 /**
3469 * Return metadata for a particular table, including the schema.
3470 *
3471 * Request parameters:
3472 *
3473 * [id] - The ID of the table.
3474 *
3475 * [version] - null
3476 * Possible string values are:
3477 * - "draft" : The draft version.
3478 * - "published" : The published version.
3479 *
3480 * Completes with a [Table].
3481 *
3482 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
3483 * error.
3484 *
3485 * If the used [http.Client] completes with an error when making a REST call,
3486 * this method will complete with the same error.
3487 */
3488 async.Future<Table> get(core.String id, {core.String version}) {
3489 var _url = null;
3490 var _queryParams = new core.Map();
3491 var _uploadMedia = null;
3492 var _uploadOptions = null;
3493 var _downloadOptions = commons.DownloadOptions.Metadata;
3494 var _body = null;
3495
3496 if (id == null) {
3497 throw new core.ArgumentError("Parameter id is required.");
3498 }
3499 if (version != null) {
3500 _queryParams["version"] = [version];
3501 }
3502
3503 _url = 'tables/' + commons.Escaper.ecapeVariable('$id');
3504
3505 var _response = _requester.request(_url,
3506 "GET",
3507 body: _body,
3508 queryParams: _queryParams,
3509 uploadOptions: _uploadOptions,
3510 uploadMedia: _uploadMedia,
3511 downloadOptions: _downloadOptions);
3512 return _response.then((data) => new Table.fromJson(data));
3513 }
3514
3515 /**
3516 * Return all tables readable by the current user.
3517 *
3518 * Request parameters:
3519 *
3520 * [bbox] - A bounding box, expressed as "west,south,east,north". If set, only
3521 * assets which intersect this bounding box will be returned.
3522 *
3523 * [createdAfter] - An RFC 3339 formatted date-time value (e.g.
3524 * 1970-01-01T00:00:00Z). Returned assets will have been created at or after
3525 * this time.
3526 *
3527 * [createdBefore] - An RFC 3339 formatted date-time value (e.g.
3528 * 1970-01-01T00:00:00Z). Returned assets will have been created at or before
3529 * this time.
3530 *
3531 * [creatorEmail] - An email address representing a user. Returned assets that
3532 * have been created by the user associated with the provided email address.
3533 *
3534 * [maxResults] - The maximum number of items to include in a single response
3535 * page. The maximum supported value is 100.
3536 *
3537 * [modifiedAfter] - An RFC 3339 formatted date-time value (e.g.
3538 * 1970-01-01T00:00:00Z). Returned assets will have been modified at or after
3539 * this time.
3540 *
3541 * [modifiedBefore] - An RFC 3339 formatted date-time value (e.g.
3542 * 1970-01-01T00:00:00Z). Returned assets will have been modified at or before
3543 * this time.
3544 *
3545 * [pageToken] - The continuation token, used to page through large result
3546 * sets. To get the next page of results, set this parameter to the value of
3547 * nextPageToken from the previous response.
3548 *
3549 * [processingStatus] - null
3550 * Possible string values are:
3551 * - "complete" : The table has completed processing.
3552 * - "failed" : The table has failed processing.
3553 * - "notReady" : The table is not ready for processing.
3554 * - "processing" : The table is processing.
3555 * - "ready" : The table is ready for processing.
3556 *
3557 * [projectId] - The ID of a Maps Engine project, used to filter the response.
3558 * To list all available projects with their IDs, send a Projects: list
3559 * request. You can also find your project ID as the value of the
3560 * DashboardPlace:cid URL parameter when signed in to mapsengine.google.com.
3561 *
3562 * [role] - The role parameter indicates that the response should only contain
3563 * assets where the current user has the specified level of access.
3564 * Possible string values are:
3565 * - "owner" : The user can read, write and administer the asset.
3566 * - "reader" : The user can read the asset.
3567 * - "writer" : The user can read and write the asset.
3568 *
3569 * [search] - An unstructured search string used to filter the set of results
3570 * based on asset metadata.
3571 *
3572 * [tags] - A comma separated list of tags. Returned assets will contain all
3573 * the tags from the list.
3574 *
3575 * Completes with a [TablesListResponse].
3576 *
3577 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
3578 * error.
3579 *
3580 * If the used [http.Client] completes with an error when making a REST call,
3581 * this method will complete with the same error.
3582 */
3583 async.Future<TablesListResponse> list({core.String bbox, core.DateTime created After, core.DateTime createdBefore, core.String creatorEmail, core.int maxResult s, core.DateTime modifiedAfter, core.DateTime modifiedBefore, core.String pageTo ken, core.String processingStatus, core.String projectId, core.String role, core .String search, core.String tags}) {
3584 var _url = null;
3585 var _queryParams = new core.Map();
3586 var _uploadMedia = null;
3587 var _uploadOptions = null;
3588 var _downloadOptions = commons.DownloadOptions.Metadata;
3589 var _body = null;
3590
3591 if (bbox != null) {
3592 _queryParams["bbox"] = [bbox];
3593 }
3594 if (createdAfter != null) {
3595 _queryParams["createdAfter"] = [(createdAfter).toIso8601String()];
3596 }
3597 if (createdBefore != null) {
3598 _queryParams["createdBefore"] = [(createdBefore).toIso8601String()];
3599 }
3600 if (creatorEmail != null) {
3601 _queryParams["creatorEmail"] = [creatorEmail];
3602 }
3603 if (maxResults != null) {
3604 _queryParams["maxResults"] = ["${maxResults}"];
3605 }
3606 if (modifiedAfter != null) {
3607 _queryParams["modifiedAfter"] = [(modifiedAfter).toIso8601String()];
3608 }
3609 if (modifiedBefore != null) {
3610 _queryParams["modifiedBefore"] = [(modifiedBefore).toIso8601String()];
3611 }
3612 if (pageToken != null) {
3613 _queryParams["pageToken"] = [pageToken];
3614 }
3615 if (processingStatus != null) {
3616 _queryParams["processingStatus"] = [processingStatus];
3617 }
3618 if (projectId != null) {
3619 _queryParams["projectId"] = [projectId];
3620 }
3621 if (role != null) {
3622 _queryParams["role"] = [role];
3623 }
3624 if (search != null) {
3625 _queryParams["search"] = [search];
3626 }
3627 if (tags != null) {
3628 _queryParams["tags"] = [tags];
3629 }
3630
3631 _url = 'tables';
3632
3633 var _response = _requester.request(_url,
3634 "GET",
3635 body: _body,
3636 queryParams: _queryParams,
3637 uploadOptions: _uploadOptions,
3638 uploadMedia: _uploadMedia,
3639 downloadOptions: _downloadOptions);
3640 return _response.then((data) => new TablesListResponse.fromJson(data));
3641 }
3642
3643 /**
3644 * Mutate a table asset.
3645 *
3646 * [request] - The metadata request object.
3647 *
3648 * Request parameters:
3649 *
3650 * [id] - The ID of the table.
3651 *
3652 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
3653 * error.
3654 *
3655 * If the used [http.Client] completes with an error when making a REST call,
3656 * this method will complete with the same error.
3657 */
3658 async.Future patch(Table request, core.String id) {
3659 var _url = null;
3660 var _queryParams = new core.Map();
3661 var _uploadMedia = null;
3662 var _uploadOptions = null;
3663 var _downloadOptions = commons.DownloadOptions.Metadata;
3664 var _body = null;
3665
3666 if (request != null) {
3667 _body = convert.JSON.encode((request).toJson());
3668 }
3669 if (id == null) {
3670 throw new core.ArgumentError("Parameter id is required.");
3671 }
3672
3673 _downloadOptions = null;
3674
3675 _url = 'tables/' + commons.Escaper.ecapeVariable('$id');
3676
3677 var _response = _requester.request(_url,
3678 "PATCH",
3679 body: _body,
3680 queryParams: _queryParams,
3681 uploadOptions: _uploadOptions,
3682 uploadMedia: _uploadMedia,
3683 downloadOptions: _downloadOptions);
3684 return _response.then((data) => null);
3685 }
3686
3687 /**
3688 * Process a table asset.
3689 *
3690 * Request parameters:
3691 *
3692 * [id] - The ID of the table.
3693 *
3694 * Completes with a [ProcessResponse].
3695 *
3696 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
3697 * error.
3698 *
3699 * If the used [http.Client] completes with an error when making a REST call,
3700 * this method will complete with the same error.
3701 */
3702 async.Future<ProcessResponse> process(core.String id) {
3703 var _url = null;
3704 var _queryParams = new core.Map();
3705 var _uploadMedia = null;
3706 var _uploadOptions = null;
3707 var _downloadOptions = commons.DownloadOptions.Metadata;
3708 var _body = null;
3709
3710 if (id == null) {
3711 throw new core.ArgumentError("Parameter id is required.");
3712 }
3713
3714 _url = 'tables/' + commons.Escaper.ecapeVariable('$id') + '/process';
3715
3716 var _response = _requester.request(_url,
3717 "POST",
3718 body: _body,
3719 queryParams: _queryParams,
3720 uploadOptions: _uploadOptions,
3721 uploadMedia: _uploadMedia,
3722 downloadOptions: _downloadOptions);
3723 return _response.then((data) => new ProcessResponse.fromJson(data));
3724 }
3725
3726 /**
3727 * Create a placeholder table asset to which table files can be uploaded.
3728 * Once the placeholder has been created, files are uploaded to the
3729 * https://www.googleapis.com/upload/mapsengine/v1/tables/table_id/files
3730 * endpoint.
3731 * See Table Upload in the Developer's Guide or Table.files: insert in the
3732 * reference documentation for more information.
3733 *
3734 * [request] - The metadata request object.
3735 *
3736 * Request parameters:
3737 *
3738 * Completes with a [Table].
3739 *
3740 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
3741 * error.
3742 *
3743 * If the used [http.Client] completes with an error when making a REST call,
3744 * this method will complete with the same error.
3745 */
3746 async.Future<Table> upload(Table request) {
3747 var _url = null;
3748 var _queryParams = new core.Map();
3749 var _uploadMedia = null;
3750 var _uploadOptions = null;
3751 var _downloadOptions = commons.DownloadOptions.Metadata;
3752 var _body = null;
3753
3754 if (request != null) {
3755 _body = convert.JSON.encode((request).toJson());
3756 }
3757
3758 _url = 'tables/upload';
3759
3760 var _response = _requester.request(_url,
3761 "POST",
3762 body: _body,
3763 queryParams: _queryParams,
3764 uploadOptions: _uploadOptions,
3765 uploadMedia: _uploadMedia,
3766 downloadOptions: _downloadOptions);
3767 return _response.then((data) => new Table.fromJson(data));
3768 }
3769
3770 }
3771
3772
3773 class TablesFeaturesResourceApi {
3774 final commons.ApiRequester _requester;
3775
3776 TablesFeaturesResourceApi(commons.ApiRequester client) :
3777 _requester = client;
3778
3779 /**
3780 * Delete all features matching the given IDs.
3781 *
3782 * [request] - The metadata request object.
3783 *
3784 * Request parameters:
3785 *
3786 * [id] - The ID of the table that contains the features to be deleted.
3787 *
3788 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
3789 * error.
3790 *
3791 * If the used [http.Client] completes with an error when making a REST call,
3792 * this method will complete with the same error.
3793 */
3794 async.Future batchDelete(FeaturesBatchDeleteRequest request, core.String id) {
3795 var _url = null;
3796 var _queryParams = new core.Map();
3797 var _uploadMedia = null;
3798 var _uploadOptions = null;
3799 var _downloadOptions = commons.DownloadOptions.Metadata;
3800 var _body = null;
3801
3802 if (request != null) {
3803 _body = convert.JSON.encode((request).toJson());
3804 }
3805 if (id == null) {
3806 throw new core.ArgumentError("Parameter id is required.");
3807 }
3808
3809 _downloadOptions = null;
3810
3811 _url = 'tables/' + commons.Escaper.ecapeVariable('$id') + '/features/batchDe lete';
3812
3813 var _response = _requester.request(_url,
3814 "POST",
3815 body: _body,
3816 queryParams: _queryParams,
3817 uploadOptions: _uploadOptions,
3818 uploadMedia: _uploadMedia,
3819 downloadOptions: _downloadOptions);
3820 return _response.then((data) => null);
3821 }
3822
3823 /**
3824 * Append features to an existing table.
3825 *
3826 * A single batchInsert request can create:
3827 *
3828 * - Up to 50 features.
3829 * - A combined total of 10 000 vertices.
3830 * Feature limits are documented in the Supported data formats and limits
3831 * article of the Google Maps Engine help center. Note that free and paid
3832 * accounts have different limits.
3833 *
3834 * For more information about inserting features, read Creating features in
3835 * the Google Maps Engine developer's guide.
3836 *
3837 * [request] - The metadata request object.
3838 *
3839 * Request parameters:
3840 *
3841 * [id] - The ID of the table to append the features to.
3842 *
3843 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
3844 * error.
3845 *
3846 * If the used [http.Client] completes with an error when making a REST call,
3847 * this method will complete with the same error.
3848 */
3849 async.Future batchInsert(FeaturesBatchInsertRequest request, core.String id) {
3850 var _url = null;
3851 var _queryParams = new core.Map();
3852 var _uploadMedia = null;
3853 var _uploadOptions = null;
3854 var _downloadOptions = commons.DownloadOptions.Metadata;
3855 var _body = null;
3856
3857 if (request != null) {
3858 _body = convert.JSON.encode((request).toJson());
3859 }
3860 if (id == null) {
3861 throw new core.ArgumentError("Parameter id is required.");
3862 }
3863
3864 _downloadOptions = null;
3865
3866 _url = 'tables/' + commons.Escaper.ecapeVariable('$id') + '/features/batchIn sert';
3867
3868 var _response = _requester.request(_url,
3869 "POST",
3870 body: _body,
3871 queryParams: _queryParams,
3872 uploadOptions: _uploadOptions,
3873 uploadMedia: _uploadMedia,
3874 downloadOptions: _downloadOptions);
3875 return _response.then((data) => null);
3876 }
3877
3878 /**
3879 * Update the supplied features.
3880 *
3881 * A single batchPatch request can update:
3882 *
3883 * - Up to 50 features.
3884 * - A combined total of 10 000 vertices.
3885 * Feature limits are documented in the Supported data formats and limits
3886 * article of the Google Maps Engine help center. Note that free and paid
3887 * accounts have different limits.
3888 *
3889 * Feature updates use HTTP PATCH semantics:
3890 *
3891 * - A supplied value replaces an existing value (if any) in that field.
3892 * - Omitted fields remain unchanged.
3893 * - Complex values in geometries and properties must be replaced as atomic
3894 * units. For example, providing just the coordinates of a geometry is not
3895 * allowed; the complete geometry, including type, must be supplied.
3896 * - Setting a property's value to null deletes that property.
3897 * For more information about updating features, read Updating features in the
3898 * Google Maps Engine developer's guide.
3899 *
3900 * [request] - The metadata request object.
3901 *
3902 * Request parameters:
3903 *
3904 * [id] - The ID of the table containing the features to be patched.
3905 *
3906 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
3907 * error.
3908 *
3909 * If the used [http.Client] completes with an error when making a REST call,
3910 * this method will complete with the same error.
3911 */
3912 async.Future batchPatch(FeaturesBatchPatchRequest request, core.String id) {
3913 var _url = null;
3914 var _queryParams = new core.Map();
3915 var _uploadMedia = null;
3916 var _uploadOptions = null;
3917 var _downloadOptions = commons.DownloadOptions.Metadata;
3918 var _body = null;
3919
3920 if (request != null) {
3921 _body = convert.JSON.encode((request).toJson());
3922 }
3923 if (id == null) {
3924 throw new core.ArgumentError("Parameter id is required.");
3925 }
3926
3927 _downloadOptions = null;
3928
3929 _url = 'tables/' + commons.Escaper.ecapeVariable('$id') + '/features/batchPa tch';
3930
3931 var _response = _requester.request(_url,
3932 "POST",
3933 body: _body,
3934 queryParams: _queryParams,
3935 uploadOptions: _uploadOptions,
3936 uploadMedia: _uploadMedia,
3937 downloadOptions: _downloadOptions);
3938 return _response.then((data) => null);
3939 }
3940
3941 /**
3942 * Return a single feature, given its ID.
3943 *
3944 * Request parameters:
3945 *
3946 * [tableId] - The ID of the table.
3947 *
3948 * [id] - The ID of the feature to get.
3949 *
3950 * [select] - A SQL-like projection clause used to specify returned
3951 * properties. If this parameter is not included, all properties are returned.
3952 *
3953 * [version] - The table version to access. See Accessing Public Data for
3954 * information.
3955 * Possible string values are:
3956 * - "draft" : The draft version.
3957 * - "published" : The published version.
3958 *
3959 * Completes with a [Feature].
3960 *
3961 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
3962 * error.
3963 *
3964 * If the used [http.Client] completes with an error when making a REST call,
3965 * this method will complete with the same error.
3966 */
3967 async.Future<Feature> get(core.String tableId, core.String id, {core.String se lect, core.String version}) {
3968 var _url = null;
3969 var _queryParams = new core.Map();
3970 var _uploadMedia = null;
3971 var _uploadOptions = null;
3972 var _downloadOptions = commons.DownloadOptions.Metadata;
3973 var _body = null;
3974
3975 if (tableId == null) {
3976 throw new core.ArgumentError("Parameter tableId is required.");
3977 }
3978 if (id == null) {
3979 throw new core.ArgumentError("Parameter id is required.");
3980 }
3981 if (select != null) {
3982 _queryParams["select"] = [select];
3983 }
3984 if (version != null) {
3985 _queryParams["version"] = [version];
3986 }
3987
3988 _url = 'tables/' + commons.Escaper.ecapeVariable('$tableId') + '/features/' + commons.Escaper.ecapeVariable('$id');
3989
3990 var _response = _requester.request(_url,
3991 "GET",
3992 body: _body,
3993 queryParams: _queryParams,
3994 uploadOptions: _uploadOptions,
3995 uploadMedia: _uploadMedia,
3996 downloadOptions: _downloadOptions);
3997 return _response.then((data) => new Feature.fromJson(data));
3998 }
3999
4000 /**
4001 * Return all features readable by the current user.
4002 *
4003 * Request parameters:
4004 *
4005 * [id] - The ID of the table to which these features belong.
4006 *
4007 * [include] - A comma separated list of optional data to include. Optional
4008 * data available: schema.
4009 *
4010 * [intersects] - A geometry literal that specifies the spatial restriction of
4011 * the query.
4012 *
4013 * [limit] - The total number of features to return from the query,
4014 * irrespective of the number of pages.
4015 *
4016 * [maxResults] - The maximum number of items to include in the response, used
4017 * for paging. The maximum supported value is 1000.
4018 *
4019 * [orderBy] - An SQL-like order by clause used to sort results. If this
4020 * parameter is not included, the order of features is undefined.
4021 *
4022 * [pageToken] - The continuation token, used to page through large result
4023 * sets. To get the next page of results, set this parameter to the value of
4024 * nextPageToken from the previous response.
4025 *
4026 * [select] - A SQL-like projection clause used to specify returned
4027 * properties. If this parameter is not included, all properties are returned.
4028 *
4029 * [version] - The table version to access. See Accessing Public Data for
4030 * information.
4031 * Possible string values are:
4032 * - "draft" : The draft version.
4033 * - "published" : The published version.
4034 *
4035 * [where] - An SQL-like predicate used to filter results.
4036 *
4037 * Completes with a [FeaturesListResponse].
4038 *
4039 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
4040 * error.
4041 *
4042 * If the used [http.Client] completes with an error when making a REST call,
4043 * this method will complete with the same error.
4044 */
4045 async.Future<FeaturesListResponse> list(core.String id, {core.String include, core.String intersects, core.int limit, core.int maxResults, core.String orderBy , core.String pageToken, core.String select, core.String version, core.String wh ere}) {
4046 var _url = null;
4047 var _queryParams = new core.Map();
4048 var _uploadMedia = null;
4049 var _uploadOptions = null;
4050 var _downloadOptions = commons.DownloadOptions.Metadata;
4051 var _body = null;
4052
4053 if (id == null) {
4054 throw new core.ArgumentError("Parameter id is required.");
4055 }
4056 if (include != null) {
4057 _queryParams["include"] = [include];
4058 }
4059 if (intersects != null) {
4060 _queryParams["intersects"] = [intersects];
4061 }
4062 if (limit != null) {
4063 _queryParams["limit"] = ["${limit}"];
4064 }
4065 if (maxResults != null) {
4066 _queryParams["maxResults"] = ["${maxResults}"];
4067 }
4068 if (orderBy != null) {
4069 _queryParams["orderBy"] = [orderBy];
4070 }
4071 if (pageToken != null) {
4072 _queryParams["pageToken"] = [pageToken];
4073 }
4074 if (select != null) {
4075 _queryParams["select"] = [select];
4076 }
4077 if (version != null) {
4078 _queryParams["version"] = [version];
4079 }
4080 if (where != null) {
4081 _queryParams["where"] = [where];
4082 }
4083
4084 _url = 'tables/' + commons.Escaper.ecapeVariable('$id') + '/features';
4085
4086 var _response = _requester.request(_url,
4087 "GET",
4088 body: _body,
4089 queryParams: _queryParams,
4090 uploadOptions: _uploadOptions,
4091 uploadMedia: _uploadMedia,
4092 downloadOptions: _downloadOptions);
4093 return _response.then((data) => new FeaturesListResponse.fromJson(data));
4094 }
4095
4096 }
4097
4098
4099 class TablesFilesResourceApi {
4100 final commons.ApiRequester _requester;
4101
4102 TablesFilesResourceApi(commons.ApiRequester client) :
4103 _requester = client;
4104
4105 /**
4106 * Upload a file to a placeholder table asset. See Table Upload in the
4107 * Developer's Guide for more information.
4108 * Supported file types are listed in the Supported data formats and limits
4109 * article of the Google Maps Engine help center.
4110 *
4111 * Request parameters:
4112 *
4113 * [id] - The ID of the table asset.
4114 *
4115 * [filename] - The file name of this uploaded file.
4116 *
4117 * [uploadMedia] - The media to upload.
4118 *
4119 * [uploadOptions] - Options for the media upload. Streaming Media without the
4120 * length being known ahead of time is only supported via resumable uploads.
4121 *
4122 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
4123 * error.
4124 *
4125 * If the used [http.Client] completes with an error when making a REST call,
4126 * this method will complete with the same error.
4127 */
4128 async.Future insert(core.String id, core.String filename, {commons.UploadOptio ns uploadOptions : commons.UploadOptions.Default, commons.Media uploadMedia}) {
4129 var _url = null;
4130 var _queryParams = new core.Map();
4131 var _uploadMedia = null;
4132 var _uploadOptions = null;
4133 var _downloadOptions = commons.DownloadOptions.Metadata;
4134 var _body = null;
4135
4136 if (id == null) {
4137 throw new core.ArgumentError("Parameter id is required.");
4138 }
4139 if (filename == null) {
4140 throw new core.ArgumentError("Parameter filename is required.");
4141 }
4142 _queryParams["filename"] = [filename];
4143
4144
4145 _uploadMedia = uploadMedia;
4146 _uploadOptions = uploadOptions;
4147 _downloadOptions = null;
4148
4149 if (_uploadMedia == null) {
4150 _url = 'tables/' + commons.Escaper.ecapeVariable('$id') + '/files';
4151 } else if (_uploadOptions is commons.ResumableUploadOptions) {
4152 _url = '/resumable/upload/mapsengine/v1/tables/' + commons.Escaper.ecapeVa riable('$id') + '/files';
4153 } else {
4154 _url = '/upload/mapsengine/v1/tables/' + commons.Escaper.ecapeVariable('$i d') + '/files';
4155 }
4156
4157
4158 var _response = _requester.request(_url,
4159 "POST",
4160 body: _body,
4161 queryParams: _queryParams,
4162 uploadOptions: _uploadOptions,
4163 uploadMedia: _uploadMedia,
4164 downloadOptions: _downloadOptions);
4165 return _response.then((data) => null);
4166 }
4167
4168 }
4169
4170
4171 class TablesParentsResourceApi {
4172 final commons.ApiRequester _requester;
4173
4174 TablesParentsResourceApi(commons.ApiRequester client) :
4175 _requester = client;
4176
4177 /**
4178 * Return all parent ids of the specified table.
4179 *
4180 * Request parameters:
4181 *
4182 * [id] - The ID of the table whose parents will be listed.
4183 *
4184 * [maxResults] - The maximum number of items to include in a single response
4185 * page. The maximum supported value is 50.
4186 *
4187 * [pageToken] - The continuation token, used to page through large result
4188 * sets. To get the next page of results, set this parameter to the value of
4189 * nextPageToken from the previous response.
4190 *
4191 * Completes with a [ParentsListResponse].
4192 *
4193 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
4194 * error.
4195 *
4196 * If the used [http.Client] completes with an error when making a REST call,
4197 * this method will complete with the same error.
4198 */
4199 async.Future<ParentsListResponse> list(core.String id, {core.int maxResults, c ore.String pageToken}) {
4200 var _url = null;
4201 var _queryParams = new core.Map();
4202 var _uploadMedia = null;
4203 var _uploadOptions = null;
4204 var _downloadOptions = commons.DownloadOptions.Metadata;
4205 var _body = null;
4206
4207 if (id == null) {
4208 throw new core.ArgumentError("Parameter id is required.");
4209 }
4210 if (maxResults != null) {
4211 _queryParams["maxResults"] = ["${maxResults}"];
4212 }
4213 if (pageToken != null) {
4214 _queryParams["pageToken"] = [pageToken];
4215 }
4216
4217 _url = 'tables/' + commons.Escaper.ecapeVariable('$id') + '/parents';
4218
4219 var _response = _requester.request(_url,
4220 "GET",
4221 body: _body,
4222 queryParams: _queryParams,
4223 uploadOptions: _uploadOptions,
4224 uploadMedia: _uploadMedia,
4225 downloadOptions: _downloadOptions);
4226 return _response.then((data) => new ParentsListResponse.fromJson(data));
4227 }
4228
4229 }
4230
4231
4232 class TablesPermissionsResourceApi {
4233 final commons.ApiRequester _requester;
4234
4235 TablesPermissionsResourceApi(commons.ApiRequester client) :
4236 _requester = client;
4237
4238 /**
4239 * Remove permission entries from an already existing asset.
4240 *
4241 * [request] - The metadata request object.
4242 *
4243 * Request parameters:
4244 *
4245 * [id] - The ID of the asset from which permissions will be removed.
4246 *
4247 * Completes with a [PermissionsBatchDeleteResponse].
4248 *
4249 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
4250 * error.
4251 *
4252 * If the used [http.Client] completes with an error when making a REST call,
4253 * this method will complete with the same error.
4254 */
4255 async.Future<PermissionsBatchDeleteResponse> batchDelete(PermissionsBatchDelet eRequest request, core.String id) {
4256 var _url = null;
4257 var _queryParams = new core.Map();
4258 var _uploadMedia = null;
4259 var _uploadOptions = null;
4260 var _downloadOptions = commons.DownloadOptions.Metadata;
4261 var _body = null;
4262
4263 if (request != null) {
4264 _body = convert.JSON.encode((request).toJson());
4265 }
4266 if (id == null) {
4267 throw new core.ArgumentError("Parameter id is required.");
4268 }
4269
4270 _url = 'tables/' + commons.Escaper.ecapeVariable('$id') + '/permissions/batc hDelete';
4271
4272 var _response = _requester.request(_url,
4273 "POST",
4274 body: _body,
4275 queryParams: _queryParams,
4276 uploadOptions: _uploadOptions,
4277 uploadMedia: _uploadMedia,
4278 downloadOptions: _downloadOptions);
4279 return _response.then((data) => new PermissionsBatchDeleteResponse.fromJson( data));
4280 }
4281
4282 /**
4283 * Add or update permission entries to an already existing asset.
4284 *
4285 * An asset can hold up to 20 different permission entries. Each batchInsert
4286 * request is atomic.
4287 *
4288 * [request] - The metadata request object.
4289 *
4290 * Request parameters:
4291 *
4292 * [id] - The ID of the asset to which permissions will be added.
4293 *
4294 * Completes with a [PermissionsBatchUpdateResponse].
4295 *
4296 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
4297 * error.
4298 *
4299 * If the used [http.Client] completes with an error when making a REST call,
4300 * this method will complete with the same error.
4301 */
4302 async.Future<PermissionsBatchUpdateResponse> batchUpdate(PermissionsBatchUpdat eRequest request, core.String id) {
4303 var _url = null;
4304 var _queryParams = new core.Map();
4305 var _uploadMedia = null;
4306 var _uploadOptions = null;
4307 var _downloadOptions = commons.DownloadOptions.Metadata;
4308 var _body = null;
4309
4310 if (request != null) {
4311 _body = convert.JSON.encode((request).toJson());
4312 }
4313 if (id == null) {
4314 throw new core.ArgumentError("Parameter id is required.");
4315 }
4316
4317 _url = 'tables/' + commons.Escaper.ecapeVariable('$id') + '/permissions/batc hUpdate';
4318
4319 var _response = _requester.request(_url,
4320 "POST",
4321 body: _body,
4322 queryParams: _queryParams,
4323 uploadOptions: _uploadOptions,
4324 uploadMedia: _uploadMedia,
4325 downloadOptions: _downloadOptions);
4326 return _response.then((data) => new PermissionsBatchUpdateResponse.fromJson( data));
4327 }
4328
4329 /**
4330 * Return all of the permissions for the specified asset.
4331 *
4332 * Request parameters:
4333 *
4334 * [id] - The ID of the asset whose permissions will be listed.
4335 *
4336 * Completes with a [PermissionsListResponse].
4337 *
4338 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
4339 * error.
4340 *
4341 * If the used [http.Client] completes with an error when making a REST call,
4342 * this method will complete with the same error.
4343 */
4344 async.Future<PermissionsListResponse> list(core.String id) {
4345 var _url = null;
4346 var _queryParams = new core.Map();
4347 var _uploadMedia = null;
4348 var _uploadOptions = null;
4349 var _downloadOptions = commons.DownloadOptions.Metadata;
4350 var _body = null;
4351
4352 if (id == null) {
4353 throw new core.ArgumentError("Parameter id is required.");
4354 }
4355
4356 _url = 'tables/' + commons.Escaper.ecapeVariable('$id') + '/permissions';
4357
4358 var _response = _requester.request(_url,
4359 "GET",
4360 body: _body,
4361 queryParams: _queryParams,
4362 uploadOptions: _uploadOptions,
4363 uploadMedia: _uploadMedia,
4364 downloadOptions: _downloadOptions);
4365 return _response.then((data) => new PermissionsListResponse.fromJson(data));
4366 }
4367
4368 }
4369
4370
4371
4372 /** Acquisition time represents acquired time of a raster. */
4373 class AcquisitionTime {
4374 /**
4375 * The end time if acquisition time is a range. The value is an RFC 3339
4376 * formatted date-time value (1970-01-01T00:00:00Z).
4377 */
4378 core.DateTime end;
4379 /**
4380 * The precision of acquisition time.
4381 * Possible string values are:
4382 * - "day"
4383 * - "hour"
4384 * - "minute"
4385 * - "month"
4386 * - "second"
4387 * - "year"
4388 */
4389 core.String precision;
4390 /**
4391 * The acquisition time, or start time if acquisition time is a range. The
4392 * value is an RFC 3339 formatted date-time value (1970-01-01T00:00:00Z).
4393 */
4394 core.DateTime start;
4395
4396 AcquisitionTime();
4397
4398 AcquisitionTime.fromJson(core.Map _json) {
4399 if (_json.containsKey("end")) {
4400 end = core.DateTime.parse(_json["end"]);
4401 }
4402 if (_json.containsKey("precision")) {
4403 precision = _json["precision"];
4404 }
4405 if (_json.containsKey("start")) {
4406 start = core.DateTime.parse(_json["start"]);
4407 }
4408 }
4409
4410 core.Map toJson() {
4411 var _json = new core.Map();
4412 if (end != null) {
4413 _json["end"] = (end).toIso8601String();
4414 }
4415 if (precision != null) {
4416 _json["precision"] = precision;
4417 }
4418 if (start != null) {
4419 _json["start"] = (start).toIso8601String();
4420 }
4421 return _json;
4422 }
4423 }
4424
4425 /**
4426 * An asset is any Google Maps Engine resource that has a globally unique ID.
4427 * Assets include maps, layers, vector tables, raster collections, and rasters.
4428 * Projects and features are not considered assets.
4429 *
4430 * More detailed information about an asset can be obtained by querying the
4431 * asset's particular endpoint.
4432 */
4433 class Asset {
4434 /**
4435 * A rectangular bounding box which contains all of the data in this asset.
4436 * The box is expressed as \"west, south, east, north\". The numbers represent
4437 * latitude and longitude in decimal degrees.
4438 */
4439 core.List<core.double> bbox;
4440 /**
4441 * The creation time of this asset. The value is an RFC 3339-formatted
4442 * date-time value (for example, 1970-01-01T00:00:00Z).
4443 */
4444 core.DateTime creationTime;
4445 /**
4446 * The email address of the creator of this asset. This is only returned on
4447 * GET requests and not LIST requests.
4448 */
4449 core.String creatorEmail;
4450 /** The asset's description. */
4451 core.String description;
4452 /** The ETag, used to refer to the current version of the asset. */
4453 core.String etag;
4454 /** The asset's globally unique ID. */
4455 core.String id;
4456 /**
4457 * The last modified time of this asset. The value is an RFC 3339-formatted
4458 * date-time value (for example, 1970-01-01T00:00:00Z).
4459 */
4460 core.DateTime lastModifiedTime;
4461 /**
4462 * The email address of the last modifier of this asset. This is only returned
4463 * on GET requests and not LIST requests.
4464 */
4465 core.String lastModifierEmail;
4466 /** The asset's name. */
4467 core.String name;
4468 /** The ID of the project to which the asset belongs. */
4469 core.String projectId;
4470 /**
4471 * The URL to query to retrieve the asset's complete object. The assets
4472 * endpoint only returns high-level information about a resource.
4473 */
4474 core.String resource;
4475 /**
4476 * An array of text strings, with each string representing a tag. More
4477 * information about tags can be found in the Tagging data article of the Maps
4478 * Engine help center.
4479 */
4480 core.List<core.String> tags;
4481 /**
4482 * The type of asset. One of raster, rasterCollection, table, map, or layer.
4483 * Possible string values are:
4484 * - "layer"
4485 * - "map"
4486 * - "raster"
4487 * - "rasterCollection"
4488 * - "table"
4489 */
4490 core.String type;
4491 /** If true, WRITERs of the asset are able to edit the asset permissions. */
4492 core.bool writersCanEditPermissions;
4493
4494 Asset();
4495
4496 Asset.fromJson(core.Map _json) {
4497 if (_json.containsKey("bbox")) {
4498 bbox = _json["bbox"];
4499 }
4500 if (_json.containsKey("creationTime")) {
4501 creationTime = core.DateTime.parse(_json["creationTime"]);
4502 }
4503 if (_json.containsKey("creatorEmail")) {
4504 creatorEmail = _json["creatorEmail"];
4505 }
4506 if (_json.containsKey("description")) {
4507 description = _json["description"];
4508 }
4509 if (_json.containsKey("etag")) {
4510 etag = _json["etag"];
4511 }
4512 if (_json.containsKey("id")) {
4513 id = _json["id"];
4514 }
4515 if (_json.containsKey("lastModifiedTime")) {
4516 lastModifiedTime = core.DateTime.parse(_json["lastModifiedTime"]);
4517 }
4518 if (_json.containsKey("lastModifierEmail")) {
4519 lastModifierEmail = _json["lastModifierEmail"];
4520 }
4521 if (_json.containsKey("name")) {
4522 name = _json["name"];
4523 }
4524 if (_json.containsKey("projectId")) {
4525 projectId = _json["projectId"];
4526 }
4527 if (_json.containsKey("resource")) {
4528 resource = _json["resource"];
4529 }
4530 if (_json.containsKey("tags")) {
4531 tags = _json["tags"];
4532 }
4533 if (_json.containsKey("type")) {
4534 type = _json["type"];
4535 }
4536 if (_json.containsKey("writersCanEditPermissions")) {
4537 writersCanEditPermissions = _json["writersCanEditPermissions"];
4538 }
4539 }
4540
4541 core.Map toJson() {
4542 var _json = new core.Map();
4543 if (bbox != null) {
4544 _json["bbox"] = bbox;
4545 }
4546 if (creationTime != null) {
4547 _json["creationTime"] = (creationTime).toIso8601String();
4548 }
4549 if (creatorEmail != null) {
4550 _json["creatorEmail"] = creatorEmail;
4551 }
4552 if (description != null) {
4553 _json["description"] = description;
4554 }
4555 if (etag != null) {
4556 _json["etag"] = etag;
4557 }
4558 if (id != null) {
4559 _json["id"] = id;
4560 }
4561 if (lastModifiedTime != null) {
4562 _json["lastModifiedTime"] = (lastModifiedTime).toIso8601String();
4563 }
4564 if (lastModifierEmail != null) {
4565 _json["lastModifierEmail"] = lastModifierEmail;
4566 }
4567 if (name != null) {
4568 _json["name"] = name;
4569 }
4570 if (projectId != null) {
4571 _json["projectId"] = projectId;
4572 }
4573 if (resource != null) {
4574 _json["resource"] = resource;
4575 }
4576 if (tags != null) {
4577 _json["tags"] = tags;
4578 }
4579 if (type != null) {
4580 _json["type"] = type;
4581 }
4582 if (writersCanEditPermissions != null) {
4583 _json["writersCanEditPermissions"] = writersCanEditPermissions;
4584 }
4585 return _json;
4586 }
4587 }
4588
4589 /** The response returned by a call to resources.List. */
4590 class AssetsListResponse {
4591 /** Assets returned. */
4592 core.List<Asset> assets;
4593 /** Next page token. */
4594 core.String nextPageToken;
4595 core.List<core.int> get nextPageTokenAsBytes {
4596 return crypto.CryptoUtils.base64StringToBytes(nextPageToken);
4597 }
4598
4599 void set nextPageTokenAsBytes(core.List<core.int> _bytes) {
4600 nextPageToken = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true);
4601 }
4602
4603 AssetsListResponse();
4604
4605 AssetsListResponse.fromJson(core.Map _json) {
4606 if (_json.containsKey("assets")) {
4607 assets = _json["assets"].map((value) => new Asset.fromJson(value)).toList( );
4608 }
4609 if (_json.containsKey("nextPageToken")) {
4610 nextPageToken = _json["nextPageToken"];
4611 }
4612 }
4613
4614 core.Map toJson() {
4615 var _json = new core.Map();
4616 if (assets != null) {
4617 _json["assets"] = assets.map((value) => (value).toJson()).toList();
4618 }
4619 if (nextPageToken != null) {
4620 _json["nextPageToken"] = nextPageToken;
4621 }
4622 return _json;
4623 }
4624 }
4625
4626 /** Border in line style. Both color and width are required. */
4627 class Border {
4628 /** Color of the border. */
4629 core.String color;
4630 /** Opacity of the border. */
4631 core.double opacity;
4632 /** Width of the border, in pixels. */
4633 core.double width;
4634
4635 Border();
4636
4637 Border.fromJson(core.Map _json) {
4638 if (_json.containsKey("color")) {
4639 color = _json["color"];
4640 }
4641 if (_json.containsKey("opacity")) {
4642 opacity = _json["opacity"];
4643 }
4644 if (_json.containsKey("width")) {
4645 width = _json["width"];
4646 }
4647 }
4648
4649 core.Map toJson() {
4650 var _json = new core.Map();
4651 if (color != null) {
4652 _json["color"] = color;
4653 }
4654 if (opacity != null) {
4655 _json["opacity"] = opacity;
4656 }
4657 if (width != null) {
4658 _json["width"] = width;
4659 }
4660 return _json;
4661 }
4662 }
4663
4664 /** Basic color used in styling. */
4665 class Color {
4666 /** The CSS style color, can be in format of "red" or "#7733EE". */
4667 core.String color;
4668 /** Opacity ranges from 0 to 1, inclusive. If not provided, default to 1. */
4669 core.double opacity;
4670
4671 Color();
4672
4673 Color.fromJson(core.Map _json) {
4674 if (_json.containsKey("color")) {
4675 color = _json["color"];
4676 }
4677 if (_json.containsKey("opacity")) {
4678 opacity = _json["opacity"];
4679 }
4680 }
4681
4682 core.Map toJson() {
4683 var _json = new core.Map();
4684 if (color != null) {
4685 _json["color"] = color;
4686 }
4687 if (opacity != null) {
4688 _json["opacity"] = opacity;
4689 }
4690 return _json;
4691 }
4692 }
4693
4694 class Datasource {
4695 /** The ID of a datasource. */
4696 core.String id;
4697
4698 Datasource();
4699
4700 Datasource.fromJson(core.Map _json) {
4701 if (_json.containsKey("id")) {
4702 id = _json["id"];
4703 }
4704 }
4705
4706 core.Map toJson() {
4707 var _json = new core.Map();
4708 if (id != null) {
4709 _json["id"] = id;
4710 }
4711 return _json;
4712 }
4713 }
4714
4715 class Datasources
4716 extends collection.ListBase<Datasource> {
4717 final core.List<Datasource> _inner;
4718
4719 Datasources() : _inner = [];
4720
4721 Datasources.fromJson(core.List json)
4722 : _inner = json.map((value) => new Datasource.fromJson(value)).toList();
4723
4724 core.List toJson() {
4725 return _inner.map((value) => (value).toJson()).toList();
4726 }
4727
4728 Datasource operator [](core.int key) => _inner[key];
4729
4730 void operator []=(core.int key, Datasource value) {
4731 _inner[key] = value;
4732 }
4733
4734 core.int get length => _inner.length;
4735
4736 void set length(core.int newLength) {
4737 _inner.length = newLength;
4738 }
4739 }
4740
4741 /** A display rule of the vector style. */
4742 class DisplayRule {
4743 /**
4744 * This display rule will only be applied to features that match all of the
4745 * filters here. If filters is empty, then the rule applies to all features.
4746 */
4747 core.List<Filter> filters;
4748 /** Style applied to lines. Required for LineString Geometry. */
4749 LineStyle lineOptions;
4750 /**
4751 * Display rule name. Name is not unique and cannot be used for identification
4752 * purpose.
4753 */
4754 core.String name;
4755 /** Style applied to points. Required for Point Geometry. */
4756 PointStyle pointOptions;
4757 /** Style applied to polygons. Required for Polygon Geometry. */
4758 PolygonStyle polygonOptions;
4759 /** The zoom levels that this display rule apply. */
4760 ZoomLevels zoomLevels;
4761
4762 DisplayRule();
4763
4764 DisplayRule.fromJson(core.Map _json) {
4765 if (_json.containsKey("filters")) {
4766 filters = _json["filters"].map((value) => new Filter.fromJson(value)).toLi st();
4767 }
4768 if (_json.containsKey("lineOptions")) {
4769 lineOptions = new LineStyle.fromJson(_json["lineOptions"]);
4770 }
4771 if (_json.containsKey("name")) {
4772 name = _json["name"];
4773 }
4774 if (_json.containsKey("pointOptions")) {
4775 pointOptions = new PointStyle.fromJson(_json["pointOptions"]);
4776 }
4777 if (_json.containsKey("polygonOptions")) {
4778 polygonOptions = new PolygonStyle.fromJson(_json["polygonOptions"]);
4779 }
4780 if (_json.containsKey("zoomLevels")) {
4781 zoomLevels = new ZoomLevels.fromJson(_json["zoomLevels"]);
4782 }
4783 }
4784
4785 core.Map toJson() {
4786 var _json = new core.Map();
4787 if (filters != null) {
4788 _json["filters"] = filters.map((value) => (value).toJson()).toList();
4789 }
4790 if (lineOptions != null) {
4791 _json["lineOptions"] = (lineOptions).toJson();
4792 }
4793 if (name != null) {
4794 _json["name"] = name;
4795 }
4796 if (pointOptions != null) {
4797 _json["pointOptions"] = (pointOptions).toJson();
4798 }
4799 if (polygonOptions != null) {
4800 _json["polygonOptions"] = (polygonOptions).toJson();
4801 }
4802 if (zoomLevels != null) {
4803 _json["zoomLevels"] = (zoomLevels).toJson();
4804 }
4805 return _json;
4806 }
4807 }
4808
4809 /** A feature within a table. */
4810 class Feature {
4811 /** The geometry member of this Feature. */
4812 GeoJsonGeometry geometry;
4813 /** Key/value pairs of this Feature. */
4814 GeoJsonProperties properties;
4815 /** Identifies this object as a feature. */
4816 core.String type;
4817
4818 Feature();
4819
4820 Feature.fromJson(core.Map _json) {
4821 if (_json.containsKey("geometry")) {
4822 geometry = new GeoJsonGeometry.fromJson(_json["geometry"]);
4823 }
4824 if (_json.containsKey("properties")) {
4825 properties = new GeoJsonProperties.fromJson(_json["properties"]);
4826 }
4827 if (_json.containsKey("type")) {
4828 type = _json["type"];
4829 }
4830 }
4831
4832 core.Map toJson() {
4833 var _json = new core.Map();
4834 if (geometry != null) {
4835 _json["geometry"] = (geometry).toJson();
4836 }
4837 if (properties != null) {
4838 _json["properties"] = properties;
4839 }
4840 if (type != null) {
4841 _json["type"] = type;
4842 }
4843 return _json;
4844 }
4845 }
4846
4847 /** A feature info contains information about individual feature. */
4848 class FeatureInfo {
4849 /**
4850 * HTML template of the info window. If not provided, a default template with
4851 * all attributes will be generated.
4852 */
4853 core.String content;
4854
4855 FeatureInfo();
4856
4857 FeatureInfo.fromJson(core.Map _json) {
4858 if (_json.containsKey("content")) {
4859 content = _json["content"];
4860 }
4861 }
4862
4863 core.Map toJson() {
4864 var _json = new core.Map();
4865 if (content != null) {
4866 _json["content"] = content;
4867 }
4868 return _json;
4869 }
4870 }
4871
4872 /** The request sent to features.BatchDelete. */
4873 class FeaturesBatchDeleteRequest {
4874 core.List<core.String> gxIds;
4875 core.List<core.String> primaryKeys;
4876
4877 FeaturesBatchDeleteRequest();
4878
4879 FeaturesBatchDeleteRequest.fromJson(core.Map _json) {
4880 if (_json.containsKey("gx_ids")) {
4881 gxIds = _json["gx_ids"];
4882 }
4883 if (_json.containsKey("primaryKeys")) {
4884 primaryKeys = _json["primaryKeys"];
4885 }
4886 }
4887
4888 core.Map toJson() {
4889 var _json = new core.Map();
4890 if (gxIds != null) {
4891 _json["gx_ids"] = gxIds;
4892 }
4893 if (primaryKeys != null) {
4894 _json["primaryKeys"] = primaryKeys;
4895 }
4896 return _json;
4897 }
4898 }
4899
4900 /** The request sent to features.Insert. */
4901 class FeaturesBatchInsertRequest {
4902 core.List<Feature> features;
4903 /**
4904 * If true, the server will normalize feature geometries. It is assumed that
4905 * the South Pole is exterior to any polygons given. See here for a list of
4906 * normalizations. If false, all feature geometries must be given already
4907 * normalized. The points in all LinearRings must be listed in
4908 * counter-clockwise order, and LinearRings may not intersect.
4909 */
4910 core.bool normalizeGeometries;
4911
4912 FeaturesBatchInsertRequest();
4913
4914 FeaturesBatchInsertRequest.fromJson(core.Map _json) {
4915 if (_json.containsKey("features")) {
4916 features = _json["features"].map((value) => new Feature.fromJson(value)).t oList();
4917 }
4918 if (_json.containsKey("normalizeGeometries")) {
4919 normalizeGeometries = _json["normalizeGeometries"];
4920 }
4921 }
4922
4923 core.Map toJson() {
4924 var _json = new core.Map();
4925 if (features != null) {
4926 _json["features"] = features.map((value) => (value).toJson()).toList();
4927 }
4928 if (normalizeGeometries != null) {
4929 _json["normalizeGeometries"] = normalizeGeometries;
4930 }
4931 return _json;
4932 }
4933 }
4934
4935 /** The request sent to features.BatchPatch. */
4936 class FeaturesBatchPatchRequest {
4937 core.List<Feature> features;
4938 /**
4939 * If true, the server will normalize feature geometries. It is assumed that
4940 * the South Pole is exterior to any polygons given. See here for a list of
4941 * normalizations. If false, all feature geometries must be given already
4942 * normalized. The points in all LinearRings must be listed in
4943 * counter-clockwise order, and LinearRings may not intersect.
4944 */
4945 core.bool normalizeGeometries;
4946
4947 FeaturesBatchPatchRequest();
4948
4949 FeaturesBatchPatchRequest.fromJson(core.Map _json) {
4950 if (_json.containsKey("features")) {
4951 features = _json["features"].map((value) => new Feature.fromJson(value)).t oList();
4952 }
4953 if (_json.containsKey("normalizeGeometries")) {
4954 normalizeGeometries = _json["normalizeGeometries"];
4955 }
4956 }
4957
4958 core.Map toJson() {
4959 var _json = new core.Map();
4960 if (features != null) {
4961 _json["features"] = features.map((value) => (value).toJson()).toList();
4962 }
4963 if (normalizeGeometries != null) {
4964 _json["normalizeGeometries"] = normalizeGeometries;
4965 }
4966 return _json;
4967 }
4968 }
4969
4970 /** The response returned by a call to features.List. */
4971 class FeaturesListResponse {
4972 /**
4973 * An indicator of the maximum rate at which queries may be made, if all
4974 * queries were as expensive as this query.
4975 */
4976 core.double allowedQueriesPerSecond;
4977 /** Resources returned. */
4978 core.List<Feature> features;
4979 /** Next page token. */
4980 core.String nextPageToken;
4981 /** The feature schema. */
4982 Schema schema;
4983 core.String type;
4984
4985 FeaturesListResponse();
4986
4987 FeaturesListResponse.fromJson(core.Map _json) {
4988 if (_json.containsKey("allowedQueriesPerSecond")) {
4989 allowedQueriesPerSecond = _json["allowedQueriesPerSecond"];
4990 }
4991 if (_json.containsKey("features")) {
4992 features = _json["features"].map((value) => new Feature.fromJson(value)).t oList();
4993 }
4994 if (_json.containsKey("nextPageToken")) {
4995 nextPageToken = _json["nextPageToken"];
4996 }
4997 if (_json.containsKey("schema")) {
4998 schema = new Schema.fromJson(_json["schema"]);
4999 }
5000 if (_json.containsKey("type")) {
5001 type = _json["type"];
5002 }
5003 }
5004
5005 core.Map toJson() {
5006 var _json = new core.Map();
5007 if (allowedQueriesPerSecond != null) {
5008 _json["allowedQueriesPerSecond"] = allowedQueriesPerSecond;
5009 }
5010 if (features != null) {
5011 _json["features"] = features.map((value) => (value).toJson()).toList();
5012 }
5013 if (nextPageToken != null) {
5014 _json["nextPageToken"] = nextPageToken;
5015 }
5016 if (schema != null) {
5017 _json["schema"] = (schema).toJson();
5018 }
5019 if (type != null) {
5020 _json["type"] = type;
5021 }
5022 return _json;
5023 }
5024 }
5025
5026 /** A single File, which is a component of an Asset. */
5027 class File {
5028 /** The name of the file. */
5029 core.String filename;
5030 /** The size of the file in bytes. */
5031 core.String size;
5032 /**
5033 * The upload status of the file.
5034 * Possible string values are:
5035 * - "canceled"
5036 * - "complete"
5037 * - "failed"
5038 * - "inProgress"
5039 */
5040 core.String uploadStatus;
5041
5042 File();
5043
5044 File.fromJson(core.Map _json) {
5045 if (_json.containsKey("filename")) {
5046 filename = _json["filename"];
5047 }
5048 if (_json.containsKey("size")) {
5049 size = _json["size"];
5050 }
5051 if (_json.containsKey("uploadStatus")) {
5052 uploadStatus = _json["uploadStatus"];
5053 }
5054 }
5055
5056 core.Map toJson() {
5057 var _json = new core.Map();
5058 if (filename != null) {
5059 _json["filename"] = filename;
5060 }
5061 if (size != null) {
5062 _json["size"] = size;
5063 }
5064 if (uploadStatus != null) {
5065 _json["uploadStatus"] = uploadStatus;
5066 }
5067 return _json;
5068 }
5069 }
5070
5071 /** Conditions for filtering features. */
5072 class Filter {
5073 /** The column name to filter on. */
5074 core.String column;
5075 /**
5076 * Operation used to evaluate the filter.
5077 * Possible string values are:
5078 * - "!="
5079 * - "<"
5080 * - "<="
5081 * - "=="
5082 * - ">"
5083 * - ">="
5084 * - "contains"
5085 * - "endsWith"
5086 * - "startsWith"
5087 */
5088 core.String operator;
5089 /**
5090 * Value to be evaluated against attribute.
5091 *
5092 * The values for Object must be JSON objects. It can consist of `num`,
5093 * `String`, `bool` and `null` as well as `Map` and `List` values.
5094 */
5095 core.Object value;
5096
5097 Filter();
5098
5099 Filter.fromJson(core.Map _json) {
5100 if (_json.containsKey("column")) {
5101 column = _json["column"];
5102 }
5103 if (_json.containsKey("operator")) {
5104 operator = _json["operator"];
5105 }
5106 if (_json.containsKey("value")) {
5107 value = _json["value"];
5108 }
5109 }
5110
5111 core.Map toJson() {
5112 var _json = new core.Map();
5113 if (column != null) {
5114 _json["column"] = column;
5115 }
5116 if (operator != null) {
5117 _json["operator"] = operator;
5118 }
5119 if (value != null) {
5120 _json["value"] = value;
5121 }
5122 return _json;
5123 }
5124 }
5125
5126 abstract class GeoJsonGeometry {
5127 GeoJsonGeometry();
5128 factory GeoJsonGeometry.fromJson(core.Map json) {
5129 var discriminant = json["type"];
5130 if (discriminant == "GeometryCollection") {
5131 return new GeoJsonGeometryCollection.fromJson(json);
5132 }
5133 if (discriminant == "LineString") {
5134 return new GeoJsonLineString.fromJson(json);
5135 }
5136 if (discriminant == "MultiLineString") {
5137 return new GeoJsonMultiLineString.fromJson(json);
5138 }
5139 if (discriminant == "MultiPoint") {
5140 return new GeoJsonMultiPoint.fromJson(json);
5141 }
5142 if (discriminant == "MultiPolygon") {
5143 return new GeoJsonMultiPolygon.fromJson(json);
5144 }
5145 if (discriminant == "Point") {
5146 return new GeoJsonPoint.fromJson(json);
5147 }
5148 if (discriminant == "Polygon") {
5149 return new GeoJsonPolygon.fromJson(json);
5150 }
5151 throw new core.ArgumentError("Invalid discriminant: $discriminant!");
5152 }
5153
5154 core.Map toJson();
5155
5156 }
5157
5158 /** A heterogenous collection of GeoJsonGeometry objects. */
5159 class GeoJsonGeometryCollection extends GeoJsonGeometry {
5160 /**
5161 * An array of geometry objects. There must be at least 2 different types of
5162 * geometries in the array.
5163 */
5164 core.List<GeoJsonGeometry> geometries;
5165 /**
5166 * Identifies this object as a GeoJsonGeometryCollection.
5167 * Possible string values are:
5168 * - "GeometryCollection"
5169 */
5170 final core.String type = "GeometryCollection";
5171
5172 GeoJsonGeometryCollection();
5173
5174 GeoJsonGeometryCollection.fromJson(core.Map _json) {
5175 if (_json.containsKey("geometries")) {
5176 geometries = _json["geometries"].map((value) => new GeoJsonGeometry.fromJs on(value)).toList();
5177 }
5178 }
5179
5180 core.Map toJson() {
5181 var _json = new core.Map();
5182 if (geometries != null) {
5183 _json["geometries"] = geometries.map((value) => (value).toJson()).toList() ;
5184 }
5185 if (type != null) {
5186 _json["type"] = type;
5187 }
5188 return _json;
5189 }
5190 }
5191
5192 class GeoJsonLineString extends GeoJsonGeometry {
5193 /** An array of two or more positions, representing a line. */
5194 core.List<GeoJsonPosition> coordinates;
5195 /**
5196 * Identifies this object as a GeoJsonLineString.
5197 * Possible string values are:
5198 * - "LineString"
5199 */
5200 final core.String type = "LineString";
5201
5202 GeoJsonLineString();
5203
5204 GeoJsonLineString.fromJson(core.Map _json) {
5205 if (_json.containsKey("coordinates")) {
5206 coordinates = _json["coordinates"].map((value) => new GeoJsonPosition.from Json(value)).toList();
5207 }
5208 }
5209
5210 core.Map toJson() {
5211 var _json = new core.Map();
5212 if (coordinates != null) {
5213 _json["coordinates"] = coordinates;
5214 }
5215 if (type != null) {
5216 _json["type"] = type;
5217 }
5218 return _json;
5219 }
5220 }
5221
5222 /** Multi Line String */
5223 class GeoJsonMultiLineString extends GeoJsonGeometry {
5224 /** An array of at least two GeoJsonLineString coordinate arrays. */
5225 core.List<core.List<GeoJsonPosition>> coordinates;
5226 /**
5227 * Identifies this object as a GeoJsonMultiLineString.
5228 * Possible string values are:
5229 * - "MultiLineString"
5230 */
5231 final core.String type = "MultiLineString";
5232
5233 GeoJsonMultiLineString();
5234
5235 GeoJsonMultiLineString.fromJson(core.Map _json) {
5236 if (_json.containsKey("coordinates")) {
5237 coordinates = _json["coordinates"].map((value) => value.map((value) => new GeoJsonPosition.fromJson(value)).toList()).toList();
5238 }
5239 }
5240
5241 core.Map toJson() {
5242 var _json = new core.Map();
5243 if (coordinates != null) {
5244 _json["coordinates"] = coordinates;
5245 }
5246 if (type != null) {
5247 _json["type"] = type;
5248 }
5249 return _json;
5250 }
5251 }
5252
5253 class GeoJsonMultiPoint extends GeoJsonGeometry {
5254 /** An array of at least two GeoJsonPoint coordinate arrays. */
5255 core.List<GeoJsonPosition> coordinates;
5256 /**
5257 * Identifies this object as a GeoJsonMultiPoint.
5258 * Possible string values are:
5259 * - "MultiPoint"
5260 */
5261 final core.String type = "MultiPoint";
5262
5263 GeoJsonMultiPoint();
5264
5265 GeoJsonMultiPoint.fromJson(core.Map _json) {
5266 if (_json.containsKey("coordinates")) {
5267 coordinates = _json["coordinates"].map((value) => new GeoJsonPosition.from Json(value)).toList();
5268 }
5269 }
5270
5271 core.Map toJson() {
5272 var _json = new core.Map();
5273 if (coordinates != null) {
5274 _json["coordinates"] = coordinates;
5275 }
5276 if (type != null) {
5277 _json["type"] = type;
5278 }
5279 return _json;
5280 }
5281 }
5282
5283 class GeoJsonMultiPolygon extends GeoJsonGeometry {
5284 /** An array of at least two GeoJsonPolygon coordinate arrays. */
5285 core.List<core.List<core.List<GeoJsonPosition>>> coordinates;
5286 /**
5287 * Identifies this object as a GeoJsonMultiPolygon.
5288 * Possible string values are:
5289 * - "MultiPolygon"
5290 */
5291 final core.String type = "MultiPolygon";
5292
5293 GeoJsonMultiPolygon();
5294
5295 GeoJsonMultiPolygon.fromJson(core.Map _json) {
5296 if (_json.containsKey("coordinates")) {
5297 coordinates = _json["coordinates"].map((value) => value.map((value) => val ue.map((value) => new GeoJsonPosition.fromJson(value)).toList()).toList()).toLis t();
5298 }
5299 }
5300
5301 core.Map toJson() {
5302 var _json = new core.Map();
5303 if (coordinates != null) {
5304 _json["coordinates"] = coordinates;
5305 }
5306 if (type != null) {
5307 _json["type"] = type;
5308 }
5309 return _json;
5310 }
5311 }
5312
5313 class GeoJsonPoint extends GeoJsonGeometry {
5314 /** A single GeoJsonPosition, specifying the location of the point. */
5315 GeoJsonPosition coordinates;
5316 /**
5317 * Identifies this object as a GeoJsonPoint.
5318 * Possible string values are:
5319 * - "Point"
5320 */
5321 final core.String type = "Point";
5322
5323 GeoJsonPoint();
5324
5325 GeoJsonPoint.fromJson(core.Map _json) {
5326 if (_json.containsKey("coordinates")) {
5327 coordinates = new GeoJsonPosition.fromJson(_json["coordinates"]);
5328 }
5329 }
5330
5331 core.Map toJson() {
5332 var _json = new core.Map();
5333 if (coordinates != null) {
5334 _json["coordinates"] = coordinates;
5335 }
5336 if (type != null) {
5337 _json["type"] = type;
5338 }
5339 return _json;
5340 }
5341 }
5342
5343 class GeoJsonPolygon extends GeoJsonGeometry {
5344 /**
5345 * An array of LinearRings. A LinearRing is a GeoJsonLineString which is
5346 * closed (that is, the first and last GeoJsonPositions are equal), and which
5347 * contains at least four GeoJsonPositions. For polygons with multiple rings,
5348 * the first LinearRing is the exterior ring, and any subsequent rings are
5349 * interior rings (that is, holes).
5350 */
5351 core.List<core.List<GeoJsonPosition>> coordinates;
5352 /**
5353 * Identifies this object as a GeoJsonPolygon.
5354 * Possible string values are:
5355 * - "Polygon"
5356 */
5357 final core.String type = "Polygon";
5358
5359 GeoJsonPolygon();
5360
5361 GeoJsonPolygon.fromJson(core.Map _json) {
5362 if (_json.containsKey("coordinates")) {
5363 coordinates = _json["coordinates"].map((value) => value.map((value) => new GeoJsonPosition.fromJson(value)).toList()).toList();
5364 }
5365 }
5366
5367 core.Map toJson() {
5368 var _json = new core.Map();
5369 if (coordinates != null) {
5370 _json["coordinates"] = coordinates;
5371 }
5372 if (type != null) {
5373 _json["type"] = type;
5374 }
5375 return _json;
5376 }
5377 }
5378
5379 /**
5380 * A position represents a geographical position as an array containing a
5381 * longitude and a latitude, and optionally an altitude, in that order. All
5382 * Geometry objects make use of positions to represent geometries as nested
5383 * arrays. The structure of the array is governed by the type of the geometry.
5384 */
5385 class GeoJsonPosition
5386 extends collection.ListBase<core.double> {
5387 final core.List<core.double> _inner;
5388
5389 GeoJsonPosition() : _inner = [];
5390
5391 GeoJsonPosition.fromJson(core.List json)
5392 : _inner = json.map((value) => value).toList();
5393
5394 core.List toJson() {
5395 return _inner.map((value) => value).toList();
5396 }
5397
5398 core.double operator [](core.int key) => _inner[key];
5399
5400 void operator []=(core.int key, core.double value) {
5401 _inner[key] = value;
5402 }
5403
5404 core.int get length => _inner.length;
5405
5406 void set length(core.int newLength) {
5407 _inner.length = newLength;
5408 }
5409 }
5410
5411 /**
5412 * The properties associated with a feature.
5413 *
5414 * An arbitrary key-value pair. The key must be the name of a column in the
5415 * table's schema, and the type of the value must correspond to the type
5416 * specified in the schema.
5417 */
5418 class GeoJsonProperties
5419 extends collection.MapBase<core.String, core.Object> {
5420 final core.Map _innerMap = {};
5421
5422 GeoJsonProperties();
5423
5424 GeoJsonProperties.fromJson(core.Map _json) {
5425 _json.forEach((core.String key, value) {
5426 this[key] = value;
5427 });
5428 }
5429
5430 core.Map toJson() {
5431 var _json = {};
5432 this.forEach((core.String key, value) {
5433 _json[key] = value;
5434 });
5435 return _json;
5436 }
5437
5438 core.Object operator [](core.Object key)
5439 => _innerMap[key];
5440
5441 operator []=(core.String key, core.Object value) {
5442 _innerMap[key] = value;
5443 }
5444
5445 void clear() {
5446 _innerMap.clear();
5447 }
5448
5449 core.Iterable<core.String> get keys => _innerMap.keys;
5450
5451 core.Object remove(core.Object key) => _innerMap.remove(key);
5452 }
5453
5454 /**
5455 * An icon is a user-uploaded image that can be used to style point geometries.
5456 */
5457 class Icon {
5458 /** The description of this Icon, supplied by the author. */
5459 core.String description;
5460 /** An ID used to refer to this Icon. */
5461 core.String id;
5462 /** The name of this Icon, supplied by the author. */
5463 core.String name;
5464
5465 Icon();
5466
5467 Icon.fromJson(core.Map _json) {
5468 if (_json.containsKey("description")) {
5469 description = _json["description"];
5470 }
5471 if (_json.containsKey("id")) {
5472 id = _json["id"];
5473 }
5474 if (_json.containsKey("name")) {
5475 name = _json["name"];
5476 }
5477 }
5478
5479 core.Map toJson() {
5480 var _json = new core.Map();
5481 if (description != null) {
5482 _json["description"] = description;
5483 }
5484 if (id != null) {
5485 _json["id"] = id;
5486 }
5487 if (name != null) {
5488 _json["name"] = name;
5489 }
5490 return _json;
5491 }
5492 }
5493
5494 /** Style for icon, this is part of point style. */
5495 class IconStyle {
5496 /** Custom icon id. */
5497 core.String id;
5498 /**
5499 * Stock icon name. To use a stock icon, prefix it with 'gx_'. See Stock icon
5500 * names for valid icon names. For example, to specify small_red, set name to
5501 * 'gx_small_red'.
5502 */
5503 core.String name;
5504 /** A scalable shape. */
5505 ScaledShape scaledShape;
5506 /**
5507 * The function used to scale shapes. Required when a scaledShape is
5508 * specified.
5509 */
5510 ScalingFunction scalingFunction;
5511
5512 IconStyle();
5513
5514 IconStyle.fromJson(core.Map _json) {
5515 if (_json.containsKey("id")) {
5516 id = _json["id"];
5517 }
5518 if (_json.containsKey("name")) {
5519 name = _json["name"];
5520 }
5521 if (_json.containsKey("scaledShape")) {
5522 scaledShape = new ScaledShape.fromJson(_json["scaledShape"]);
5523 }
5524 if (_json.containsKey("scalingFunction")) {
5525 scalingFunction = new ScalingFunction.fromJson(_json["scalingFunction"]);
5526 }
5527 }
5528
5529 core.Map toJson() {
5530 var _json = new core.Map();
5531 if (id != null) {
5532 _json["id"] = id;
5533 }
5534 if (name != null) {
5535 _json["name"] = name;
5536 }
5537 if (scaledShape != null) {
5538 _json["scaledShape"] = (scaledShape).toJson();
5539 }
5540 if (scalingFunction != null) {
5541 _json["scalingFunction"] = (scalingFunction).toJson();
5542 }
5543 return _json;
5544 }
5545 }
5546
5547 /** The response returned by a call to icons.List. */
5548 class IconsListResponse {
5549 /** Resources returned. */
5550 core.List<Icon> icons;
5551 /** Next page token. */
5552 core.String nextPageToken;
5553
5554 IconsListResponse();
5555
5556 IconsListResponse.fromJson(core.Map _json) {
5557 if (_json.containsKey("icons")) {
5558 icons = _json["icons"].map((value) => new Icon.fromJson(value)).toList();
5559 }
5560 if (_json.containsKey("nextPageToken")) {
5561 nextPageToken = _json["nextPageToken"];
5562 }
5563 }
5564
5565 core.Map toJson() {
5566 var _json = new core.Map();
5567 if (icons != null) {
5568 _json["icons"] = icons.map((value) => (value).toJson()).toList();
5569 }
5570 if (nextPageToken != null) {
5571 _json["nextPageToken"] = nextPageToken;
5572 }
5573 return _json;
5574 }
5575 }
5576
5577 /** Text label style. */
5578 class LabelStyle {
5579 /** Color of the text. If not provided, default to black. */
5580 core.String color;
5581 /** The column value of the feature to be displayed. */
5582 core.String column;
5583 /**
5584 * Font style of the label, defaults to 'normal'.
5585 * Possible string values are:
5586 * - "italic"
5587 * - "normal"
5588 */
5589 core.String fontStyle;
5590 /**
5591 * Font weight of the label, defaults to 'normal'.
5592 * Possible string values are:
5593 * - "bold"
5594 * - "normal"
5595 */
5596 core.String fontWeight;
5597 /** Opacity of the text. */
5598 core.double opacity;
5599 /** Outline color of the text. */
5600 Color outline;
5601 /**
5602 * Font size of the label, in pixels. 8 <= size <= 15. If not provided, a
5603 * default size will be provided.
5604 */
5605 core.double size;
5606
5607 LabelStyle();
5608
5609 LabelStyle.fromJson(core.Map _json) {
5610 if (_json.containsKey("color")) {
5611 color = _json["color"];
5612 }
5613 if (_json.containsKey("column")) {
5614 column = _json["column"];
5615 }
5616 if (_json.containsKey("fontStyle")) {
5617 fontStyle = _json["fontStyle"];
5618 }
5619 if (_json.containsKey("fontWeight")) {
5620 fontWeight = _json["fontWeight"];
5621 }
5622 if (_json.containsKey("opacity")) {
5623 opacity = _json["opacity"];
5624 }
5625 if (_json.containsKey("outline")) {
5626 outline = new Color.fromJson(_json["outline"]);
5627 }
5628 if (_json.containsKey("size")) {
5629 size = _json["size"];
5630 }
5631 }
5632
5633 core.Map toJson() {
5634 var _json = new core.Map();
5635 if (color != null) {
5636 _json["color"] = color;
5637 }
5638 if (column != null) {
5639 _json["column"] = column;
5640 }
5641 if (fontStyle != null) {
5642 _json["fontStyle"] = fontStyle;
5643 }
5644 if (fontWeight != null) {
5645 _json["fontWeight"] = fontWeight;
5646 }
5647 if (opacity != null) {
5648 _json["opacity"] = opacity;
5649 }
5650 if (outline != null) {
5651 _json["outline"] = (outline).toJson();
5652 }
5653 if (size != null) {
5654 _json["size"] = size;
5655 }
5656 return _json;
5657 }
5658 }
5659
5660 /** A rectangular geographic bounds. */
5661 class LatLngBox
5662 extends collection.ListBase<core.double> {
5663 final core.List<core.double> _inner;
5664
5665 LatLngBox() : _inner = [];
5666
5667 LatLngBox.fromJson(core.List json)
5668 : _inner = json.map((value) => value).toList();
5669
5670 core.List toJson() {
5671 return _inner.map((value) => value).toList();
5672 }
5673
5674 core.double operator [](core.int key) => _inner[key];
5675
5676 void operator []=(core.int key, core.double value) {
5677 _inner[key] = value;
5678 }
5679
5680 core.int get length => _inner.length;
5681
5682 void set length(core.int newLength) {
5683 _inner.length = newLength;
5684 }
5685 }
5686
5687 /**
5688 * A Layer combines multiple datasources, with styling information, for
5689 * presentation on a map.
5690 */
5691 class Layer {
5692 /**
5693 * A rectangular bounding box which contains all of the data in this Layer.
5694 * The box is expressed as \"west, south, east, north\". The numbers represent
5695 * latitude and longitude in decimal degrees.
5696 */
5697 core.List<core.double> bbox;
5698 /**
5699 * The creation time of this layer. The value is an RFC 3339 formatted
5700 * date-time value (e.g. 1970-01-01T00:00:00Z).
5701 */
5702 core.DateTime creationTime;
5703 /**
5704 * The email address of the creator of this layer. This is only returned on
5705 * GET requests and not LIST requests.
5706 */
5707 core.String creatorEmail;
5708 /**
5709 * Deprecated: The type of the datasources used to build this Layer. Note:
5710 * This has been replaced by layerType, but is still available for now to
5711 * maintain backward compatibility.
5712 * Possible string values are:
5713 * - "image"
5714 * - "table"
5715 */
5716 core.String datasourceType;
5717 /**
5718 * An array of datasources used to build this layer. If layerType is "image",
5719 * or layerType is not specified and datasourceType is "image", then each
5720 * element in this array is a reference to an Image or RasterCollection. If
5721 * layerType is "vector", or layerType is not specified and datasourceType is
5722 * "table" then each element in this array is a reference to a Vector Table.
5723 */
5724 Datasources datasources;
5725 /** The description of this Layer, supplied by the author. */
5726 core.String description;
5727 /**
5728 * Deprecated: The name of an access list of the Map Editor type. The user on
5729 * whose behalf the request is being sent must be an editor on that access
5730 * list. Note: Google Maps Engine no longer uses access lists. Instead, each
5731 * asset has its own list of permissions. For backward compatibility, the API
5732 * still accepts access lists for projects that are already using access
5733 * lists. If you created a GME account/project after July 14th, 2014, you will
5734 * not be able to send API requests that include access lists. Note: This is
5735 * an input field only. It is not returned in response to a list or get
5736 * request.
5737 */
5738 core.String draftAccessList;
5739 /** The ETag, used to refer to the current version of the asset. */
5740 core.String etag;
5741 /** A globally unique ID, used to refer to this Layer. */
5742 core.String id;
5743 /**
5744 * The last modified time of this layer. The value is an RFC 3339 formatted
5745 * date-time value (e.g. 1970-01-01T00:00:00Z).
5746 */
5747 core.DateTime lastModifiedTime;
5748 /**
5749 * The email address of the last modifier of this layer. This is only returned
5750 * on GET requests and not LIST requests.
5751 */
5752 core.String lastModifierEmail;
5753 /**
5754 * The type of the datasources used to build this Layer. This should be used
5755 * instead of datasourceType. At least one of layerType and datasourceType and
5756 * must be specified, but layerType takes precedence.
5757 * Possible string values are:
5758 * - "image"
5759 * - "vector"
5760 */
5761 core.String layerType;
5762 /** The name of this Layer, supplied by the author. */
5763 core.String name;
5764 /**
5765 * The processing status of this layer.
5766 * Possible string values are:
5767 * - "complete"
5768 * - "failed"
5769 * - "notReady"
5770 * - "processing"
5771 * - "ready"
5772 */
5773 core.String processingStatus;
5774 /** The ID of the project that this Layer is in. */
5775 core.String projectId;
5776 /**
5777 * Deprecated: The access list to whom view permissions are granted. The value
5778 * must be the name of a Maps Engine access list of the Map Viewer type, and
5779 * the user must be a viewer on that list. Note: Google Maps Engine no longer
5780 * uses access lists. Instead, each asset has its own list of permissions. For
5781 * backward compatibility, the API still accepts access lists for projects
5782 * that are already using access lists. If you created a GME account/project
5783 * after July 14th, 2014, you will not be able to send API requests that
5784 * include access lists. Note: This is an input field only. It is not returned
5785 * in response to a list or get request.
5786 */
5787 core.String publishedAccessList;
5788 /**
5789 * The publishing status of this layer.
5790 * Possible string values are:
5791 * - "notPublished"
5792 * - "published"
5793 */
5794 core.String publishingStatus;
5795 /**
5796 * The styling information for a vector layer. Note: Style information is
5797 * returned in response to a get request but not a list request. After
5798 * requesting a list of layers, you'll need to send a get request to retrieve
5799 * the VectorStyles for each layer.
5800 */
5801 VectorStyle style;
5802 /** Tags of this Layer. */
5803 Tags tags;
5804 /** If true, WRITERs of the asset are able to edit the asset permissions. */
5805 core.bool writersCanEditPermissions;
5806
5807 Layer();
5808
5809 Layer.fromJson(core.Map _json) {
5810 if (_json.containsKey("bbox")) {
5811 bbox = _json["bbox"];
5812 }
5813 if (_json.containsKey("creationTime")) {
5814 creationTime = core.DateTime.parse(_json["creationTime"]);
5815 }
5816 if (_json.containsKey("creatorEmail")) {
5817 creatorEmail = _json["creatorEmail"];
5818 }
5819 if (_json.containsKey("datasourceType")) {
5820 datasourceType = _json["datasourceType"];
5821 }
5822 if (_json.containsKey("datasources")) {
5823 datasources = new Datasources.fromJson(_json["datasources"]);
5824 }
5825 if (_json.containsKey("description")) {
5826 description = _json["description"];
5827 }
5828 if (_json.containsKey("draftAccessList")) {
5829 draftAccessList = _json["draftAccessList"];
5830 }
5831 if (_json.containsKey("etag")) {
5832 etag = _json["etag"];
5833 }
5834 if (_json.containsKey("id")) {
5835 id = _json["id"];
5836 }
5837 if (_json.containsKey("lastModifiedTime")) {
5838 lastModifiedTime = core.DateTime.parse(_json["lastModifiedTime"]);
5839 }
5840 if (_json.containsKey("lastModifierEmail")) {
5841 lastModifierEmail = _json["lastModifierEmail"];
5842 }
5843 if (_json.containsKey("layerType")) {
5844 layerType = _json["layerType"];
5845 }
5846 if (_json.containsKey("name")) {
5847 name = _json["name"];
5848 }
5849 if (_json.containsKey("processingStatus")) {
5850 processingStatus = _json["processingStatus"];
5851 }
5852 if (_json.containsKey("projectId")) {
5853 projectId = _json["projectId"];
5854 }
5855 if (_json.containsKey("publishedAccessList")) {
5856 publishedAccessList = _json["publishedAccessList"];
5857 }
5858 if (_json.containsKey("publishingStatus")) {
5859 publishingStatus = _json["publishingStatus"];
5860 }
5861 if (_json.containsKey("style")) {
5862 style = new VectorStyle.fromJson(_json["style"]);
5863 }
5864 if (_json.containsKey("tags")) {
5865 tags = new Tags.fromJson(_json["tags"]);
5866 }
5867 if (_json.containsKey("writersCanEditPermissions")) {
5868 writersCanEditPermissions = _json["writersCanEditPermissions"];
5869 }
5870 }
5871
5872 core.Map toJson() {
5873 var _json = new core.Map();
5874 if (bbox != null) {
5875 _json["bbox"] = bbox;
5876 }
5877 if (creationTime != null) {
5878 _json["creationTime"] = (creationTime).toIso8601String();
5879 }
5880 if (creatorEmail != null) {
5881 _json["creatorEmail"] = creatorEmail;
5882 }
5883 if (datasourceType != null) {
5884 _json["datasourceType"] = datasourceType;
5885 }
5886 if (datasources != null) {
5887 _json["datasources"] = (datasources).toJson();
5888 }
5889 if (description != null) {
5890 _json["description"] = description;
5891 }
5892 if (draftAccessList != null) {
5893 _json["draftAccessList"] = draftAccessList;
5894 }
5895 if (etag != null) {
5896 _json["etag"] = etag;
5897 }
5898 if (id != null) {
5899 _json["id"] = id;
5900 }
5901 if (lastModifiedTime != null) {
5902 _json["lastModifiedTime"] = (lastModifiedTime).toIso8601String();
5903 }
5904 if (lastModifierEmail != null) {
5905 _json["lastModifierEmail"] = lastModifierEmail;
5906 }
5907 if (layerType != null) {
5908 _json["layerType"] = layerType;
5909 }
5910 if (name != null) {
5911 _json["name"] = name;
5912 }
5913 if (processingStatus != null) {
5914 _json["processingStatus"] = processingStatus;
5915 }
5916 if (projectId != null) {
5917 _json["projectId"] = projectId;
5918 }
5919 if (publishedAccessList != null) {
5920 _json["publishedAccessList"] = publishedAccessList;
5921 }
5922 if (publishingStatus != null) {
5923 _json["publishingStatus"] = publishingStatus;
5924 }
5925 if (style != null) {
5926 _json["style"] = (style).toJson();
5927 }
5928 if (tags != null) {
5929 _json["tags"] = tags;
5930 }
5931 if (writersCanEditPermissions != null) {
5932 _json["writersCanEditPermissions"] = writersCanEditPermissions;
5933 }
5934 return _json;
5935 }
5936 }
5937
5938 /**
5939 * The response returned by a call to layers.List. Note: The list response does
5940 * not include all the fields available in a layer. Refer to the layer resource
5941 * description for details of the fields that are not included. You'll need to
5942 * send a get request to retrieve the additional fields for each layer.
5943 */
5944 class LayersListResponse {
5945 /** Resources returned. */
5946 core.List<Layer> layers;
5947 /** Next page token. */
5948 core.String nextPageToken;
5949 core.List<core.int> get nextPageTokenAsBytes {
5950 return crypto.CryptoUtils.base64StringToBytes(nextPageToken);
5951 }
5952
5953 void set nextPageTokenAsBytes(core.List<core.int> _bytes) {
5954 nextPageToken = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true);
5955 }
5956
5957 LayersListResponse();
5958
5959 LayersListResponse.fromJson(core.Map _json) {
5960 if (_json.containsKey("layers")) {
5961 layers = _json["layers"].map((value) => new Layer.fromJson(value)).toList( );
5962 }
5963 if (_json.containsKey("nextPageToken")) {
5964 nextPageToken = _json["nextPageToken"];
5965 }
5966 }
5967
5968 core.Map toJson() {
5969 var _json = new core.Map();
5970 if (layers != null) {
5971 _json["layers"] = layers.map((value) => (value).toJson()).toList();
5972 }
5973 if (nextPageToken != null) {
5974 _json["nextPageToken"] = nextPageToken;
5975 }
5976 return _json;
5977 }
5978 }
5979
5980 /** Stroke of the line. */
5981 class LineStyleStroke {
5982 /** Color of the line. */
5983 core.String color;
5984 /** Opacity of the line. */
5985 core.double opacity;
5986 /**
5987 * Width of the line, in pixels. 0 <= width <= 10. If width is set to 0, the
5988 * line will be invisible.
5989 */
5990 core.double width;
5991
5992 LineStyleStroke();
5993
5994 LineStyleStroke.fromJson(core.Map _json) {
5995 if (_json.containsKey("color")) {
5996 color = _json["color"];
5997 }
5998 if (_json.containsKey("opacity")) {
5999 opacity = _json["opacity"];
6000 }
6001 if (_json.containsKey("width")) {
6002 width = _json["width"];
6003 }
6004 }
6005
6006 core.Map toJson() {
6007 var _json = new core.Map();
6008 if (color != null) {
6009 _json["color"] = color;
6010 }
6011 if (opacity != null) {
6012 _json["opacity"] = opacity;
6013 }
6014 if (width != null) {
6015 _json["width"] = width;
6016 }
6017 return _json;
6018 }
6019 }
6020
6021 /** Style for lines. */
6022 class LineStyle {
6023 /** Border of the line. 0 < border.width <= 5. */
6024 Border border;
6025 /**
6026 * Dash defines the pattern of the line, the values are pixel lengths of
6027 * alternating dash and gap. If dash is not provided, then it means a solid
6028 * line. Dash can contain up to 10 values and must contain even number of
6029 * values.
6030 */
6031 core.List<core.double> dash;
6032 /** Label style for the line. */
6033 LabelStyle label;
6034 /** Stroke of the line. */
6035 LineStyleStroke stroke;
6036
6037 LineStyle();
6038
6039 LineStyle.fromJson(core.Map _json) {
6040 if (_json.containsKey("border")) {
6041 border = new Border.fromJson(_json["border"]);
6042 }
6043 if (_json.containsKey("dash")) {
6044 dash = _json["dash"];
6045 }
6046 if (_json.containsKey("label")) {
6047 label = new LabelStyle.fromJson(_json["label"]);
6048 }
6049 if (_json.containsKey("stroke")) {
6050 stroke = new LineStyleStroke.fromJson(_json["stroke"]);
6051 }
6052 }
6053
6054 core.Map toJson() {
6055 var _json = new core.Map();
6056 if (border != null) {
6057 _json["border"] = (border).toJson();
6058 }
6059 if (dash != null) {
6060 _json["dash"] = dash;
6061 }
6062 if (label != null) {
6063 _json["label"] = (label).toJson();
6064 }
6065 if (stroke != null) {
6066 _json["stroke"] = (stroke).toJson();
6067 }
6068 return _json;
6069 }
6070 }
6071
6072 /** A Map is a collection of Layers, optionally contained within folders. */
6073 class Map {
6074 /**
6075 * A rectangular bounding box which contains all of the data in this Map. The
6076 * box is expressed as \"west, south, east, north\". The numbers represent
6077 * latitude and longitude in decimal degrees.
6078 */
6079 core.List<core.double> bbox;
6080 /** The contents of this Map. */
6081 MapContents contents;
6082 /**
6083 * The creation time of this map. The value is an RFC 3339 formatted date-time
6084 * value (e.g. 1970-01-01T00:00:00Z).
6085 */
6086 core.DateTime creationTime;
6087 /**
6088 * The email address of the creator of this map. This is only returned on GET
6089 * requests and not LIST requests.
6090 */
6091 core.String creatorEmail;
6092 /**
6093 * An array of four numbers (west, south, east, north) which defines the
6094 * rectangular bounding box of the default viewport. The numbers represent
6095 * latitude and longitude in decimal degrees.
6096 */
6097 LatLngBox defaultViewport;
6098 /** The description of this Map, supplied by the author. */
6099 core.String description;
6100 /**
6101 * Deprecated: The name of an access list of the Map Editor type. The user on
6102 * whose behalf the request is being sent must be an editor on that access
6103 * list. Note: Google Maps Engine no longer uses access lists. Instead, each
6104 * asset has its own list of permissions. For backward compatibility, the API
6105 * still accepts access lists for projects that are already using access
6106 * lists. If you created a GME account/project after July 14th, 2014, you will
6107 * not be able to send API requests that include access lists. Note: This is
6108 * an input field only. It is not returned in response to a list or get
6109 * request.
6110 */
6111 core.String draftAccessList;
6112 /** The ETag, used to refer to the current version of the asset. */
6113 core.String etag;
6114 /** A globally unique ID, used to refer to this Map. */
6115 core.String id;
6116 /**
6117 * The last modified time of this map. The value is an RFC 3339 formatted
6118 * date-time value (e.g. 1970-01-01T00:00:00Z).
6119 */
6120 core.DateTime lastModifiedTime;
6121 /**
6122 * The email address of the last modifier of this map. This is only returned
6123 * on GET requests and not LIST requests.
6124 */
6125 core.String lastModifierEmail;
6126 /** The name of this Map, supplied by the author. */
6127 core.String name;
6128 /**
6129 * The processing status of this map. Map processing is automatically started
6130 * once a map becomes ready for processing.
6131 * Possible string values are:
6132 * - "complete"
6133 * - "failed"
6134 * - "notReady"
6135 * - "processing"
6136 * - "ready"
6137 */
6138 core.String processingStatus;
6139 /** The ID of the project that this Map is in. */
6140 core.String projectId;
6141 /**
6142 * Deprecated: The access list to whom view permissions are granted. The value
6143 * must be the name of a Maps Engine access list of the Map Viewer type, and
6144 * the user must be a viewer on that list. Note: Google Maps Engine no longer
6145 * uses access lists. Instead, each asset has its own list of permissions. For
6146 * backward compatibility, the API still accepts access lists for projects
6147 * that are already using access lists. If you created a GME account/project
6148 * after July 14th, 2014, you will not be able to send API requests that
6149 * include access lists. This is an input field only. It is not returned in
6150 * response to a list or get request.
6151 */
6152 core.String publishedAccessList;
6153 /**
6154 * The publishing status of this map.
6155 * Possible string values are:
6156 * - "notPublished"
6157 * - "published"
6158 */
6159 core.String publishingStatus;
6160 /** Tags of this Map. */
6161 Tags tags;
6162 /**
6163 * Deprecated: An array containing the available versions of this Map.
6164 * Currently may only contain "published". The publishingStatus field should
6165 * be used instead.
6166 */
6167 core.List<core.String> versions;
6168 /** If true, WRITERs of the asset are able to edit the asset permissions. */
6169 core.bool writersCanEditPermissions;
6170
6171 Map();
6172
6173 Map.fromJson(core.Map _json) {
6174 if (_json.containsKey("bbox")) {
6175 bbox = _json["bbox"];
6176 }
6177 if (_json.containsKey("contents")) {
6178 contents = new MapContents.fromJson(_json["contents"]);
6179 }
6180 if (_json.containsKey("creationTime")) {
6181 creationTime = core.DateTime.parse(_json["creationTime"]);
6182 }
6183 if (_json.containsKey("creatorEmail")) {
6184 creatorEmail = _json["creatorEmail"];
6185 }
6186 if (_json.containsKey("defaultViewport")) {
6187 defaultViewport = new LatLngBox.fromJson(_json["defaultViewport"]);
6188 }
6189 if (_json.containsKey("description")) {
6190 description = _json["description"];
6191 }
6192 if (_json.containsKey("draftAccessList")) {
6193 draftAccessList = _json["draftAccessList"];
6194 }
6195 if (_json.containsKey("etag")) {
6196 etag = _json["etag"];
6197 }
6198 if (_json.containsKey("id")) {
6199 id = _json["id"];
6200 }
6201 if (_json.containsKey("lastModifiedTime")) {
6202 lastModifiedTime = core.DateTime.parse(_json["lastModifiedTime"]);
6203 }
6204 if (_json.containsKey("lastModifierEmail")) {
6205 lastModifierEmail = _json["lastModifierEmail"];
6206 }
6207 if (_json.containsKey("name")) {
6208 name = _json["name"];
6209 }
6210 if (_json.containsKey("processingStatus")) {
6211 processingStatus = _json["processingStatus"];
6212 }
6213 if (_json.containsKey("projectId")) {
6214 projectId = _json["projectId"];
6215 }
6216 if (_json.containsKey("publishedAccessList")) {
6217 publishedAccessList = _json["publishedAccessList"];
6218 }
6219 if (_json.containsKey("publishingStatus")) {
6220 publishingStatus = _json["publishingStatus"];
6221 }
6222 if (_json.containsKey("tags")) {
6223 tags = new Tags.fromJson(_json["tags"]);
6224 }
6225 if (_json.containsKey("versions")) {
6226 versions = _json["versions"];
6227 }
6228 if (_json.containsKey("writersCanEditPermissions")) {
6229 writersCanEditPermissions = _json["writersCanEditPermissions"];
6230 }
6231 }
6232
6233 core.Map toJson() {
6234 var _json = new core.Map();
6235 if (bbox != null) {
6236 _json["bbox"] = bbox;
6237 }
6238 if (contents != null) {
6239 _json["contents"] = (contents).toJson();
6240 }
6241 if (creationTime != null) {
6242 _json["creationTime"] = (creationTime).toIso8601String();
6243 }
6244 if (creatorEmail != null) {
6245 _json["creatorEmail"] = creatorEmail;
6246 }
6247 if (defaultViewport != null) {
6248 _json["defaultViewport"] = defaultViewport;
6249 }
6250 if (description != null) {
6251 _json["description"] = description;
6252 }
6253 if (draftAccessList != null) {
6254 _json["draftAccessList"] = draftAccessList;
6255 }
6256 if (etag != null) {
6257 _json["etag"] = etag;
6258 }
6259 if (id != null) {
6260 _json["id"] = id;
6261 }
6262 if (lastModifiedTime != null) {
6263 _json["lastModifiedTime"] = (lastModifiedTime).toIso8601String();
6264 }
6265 if (lastModifierEmail != null) {
6266 _json["lastModifierEmail"] = lastModifierEmail;
6267 }
6268 if (name != null) {
6269 _json["name"] = name;
6270 }
6271 if (processingStatus != null) {
6272 _json["processingStatus"] = processingStatus;
6273 }
6274 if (projectId != null) {
6275 _json["projectId"] = projectId;
6276 }
6277 if (publishedAccessList != null) {
6278 _json["publishedAccessList"] = publishedAccessList;
6279 }
6280 if (publishingStatus != null) {
6281 _json["publishingStatus"] = publishingStatus;
6282 }
6283 if (tags != null) {
6284 _json["tags"] = tags;
6285 }
6286 if (versions != null) {
6287 _json["versions"] = versions;
6288 }
6289 if (writersCanEditPermissions != null) {
6290 _json["writersCanEditPermissions"] = writersCanEditPermissions;
6291 }
6292 return _json;
6293 }
6294 }
6295
6296 class MapContents
6297 extends collection.ListBase<MapItem> {
6298 final core.List<MapItem> _inner;
6299
6300 MapContents() : _inner = [];
6301
6302 MapContents.fromJson(core.List json)
6303 : _inner = json.map((value) => new MapItem.fromJson(value)).toList();
6304
6305 core.List toJson() {
6306 return _inner.map((value) => (value).toJson()).toList();
6307 }
6308
6309 MapItem operator [](core.int key) => _inner[key];
6310
6311 void operator []=(core.int key, MapItem value) {
6312 _inner[key] = value;
6313 }
6314
6315 core.int get length => _inner.length;
6316
6317 void set length(core.int newLength) {
6318 _inner.length = newLength;
6319 }
6320 }
6321
6322 class MapFolder extends MapItem {
6323 core.List<MapItem> contents;
6324 /**
6325 * An array of four numbers (west, south, east, north) which defines the
6326 * rectangular bounding box of the default viewport. The numbers represent
6327 * latitude and longitude in decimal degrees.
6328 */
6329 core.List<core.double> defaultViewport;
6330 /**
6331 * The expandability setting of this MapFolder. If true, the folder can be
6332 * expanded.
6333 */
6334 core.bool expandable;
6335 /** A user defined alias for this MapFolder, specific to this Map. */
6336 core.String key;
6337 /** The name of this MapFolder. */
6338 core.String name;
6339 /**
6340 * Identifies this object as a MapFolder.
6341 * Possible string values are:
6342 * - "folder"
6343 */
6344 final core.String type = "folder";
6345 /**
6346 * The visibility setting of this MapFolder. One of "defaultOn" or
6347 * "defaultOff".
6348 */
6349 core.String visibility;
6350
6351 MapFolder();
6352
6353 MapFolder.fromJson(core.Map _json) {
6354 if (_json.containsKey("contents")) {
6355 contents = _json["contents"].map((value) => new MapItem.fromJson(value)).t oList();
6356 }
6357 if (_json.containsKey("defaultViewport")) {
6358 defaultViewport = _json["defaultViewport"];
6359 }
6360 if (_json.containsKey("expandable")) {
6361 expandable = _json["expandable"];
6362 }
6363 if (_json.containsKey("key")) {
6364 key = _json["key"];
6365 }
6366 if (_json.containsKey("name")) {
6367 name = _json["name"];
6368 }
6369 if (_json.containsKey("visibility")) {
6370 visibility = _json["visibility"];
6371 }
6372 }
6373
6374 core.Map toJson() {
6375 var _json = new core.Map();
6376 if (contents != null) {
6377 _json["contents"] = contents.map((value) => (value).toJson()).toList();
6378 }
6379 if (defaultViewport != null) {
6380 _json["defaultViewport"] = defaultViewport;
6381 }
6382 if (expandable != null) {
6383 _json["expandable"] = expandable;
6384 }
6385 if (key != null) {
6386 _json["key"] = key;
6387 }
6388 if (name != null) {
6389 _json["name"] = name;
6390 }
6391 if (type != null) {
6392 _json["type"] = type;
6393 }
6394 if (visibility != null) {
6395 _json["visibility"] = visibility;
6396 }
6397 return _json;
6398 }
6399 }
6400
6401 abstract class MapItem {
6402 MapItem();
6403 factory MapItem.fromJson(core.Map json) {
6404 var discriminant = json["type"];
6405 if (discriminant == "folder") {
6406 return new MapFolder.fromJson(json);
6407 }
6408 if (discriminant == "kmlLink") {
6409 return new MapKmlLink.fromJson(json);
6410 }
6411 if (discriminant == "layer") {
6412 return new MapLayer.fromJson(json);
6413 }
6414 throw new core.ArgumentError("Invalid discriminant: $discriminant!");
6415 }
6416
6417 core.Map toJson();
6418
6419 }
6420
6421 class MapKmlLink extends MapItem {
6422 /**
6423 * An array of four numbers (west, south, east, north) which defines the
6424 * rectangular bounding box of the default viewport. The numbers represent
6425 * latitude and longitude in decimal degrees.
6426 */
6427 core.List<core.double> defaultViewport;
6428 /** The URL to the KML file represented by this MapKmlLink. */
6429 core.String kmlUrl;
6430 /** The name of this MapKmlLink. */
6431 core.String name;
6432 /**
6433 * Identifies this object as a MapKmlLink.
6434 * Possible string values are:
6435 * - "kmlLink"
6436 */
6437 final core.String type = "kmlLink";
6438 /**
6439 * The visibility setting of this MapKmlLink. One of "defaultOn" or
6440 * "defaultOff".
6441 */
6442 core.String visibility;
6443
6444 MapKmlLink();
6445
6446 MapKmlLink.fromJson(core.Map _json) {
6447 if (_json.containsKey("defaultViewport")) {
6448 defaultViewport = _json["defaultViewport"];
6449 }
6450 if (_json.containsKey("kmlUrl")) {
6451 kmlUrl = _json["kmlUrl"];
6452 }
6453 if (_json.containsKey("name")) {
6454 name = _json["name"];
6455 }
6456 if (_json.containsKey("visibility")) {
6457 visibility = _json["visibility"];
6458 }
6459 }
6460
6461 core.Map toJson() {
6462 var _json = new core.Map();
6463 if (defaultViewport != null) {
6464 _json["defaultViewport"] = defaultViewport;
6465 }
6466 if (kmlUrl != null) {
6467 _json["kmlUrl"] = kmlUrl;
6468 }
6469 if (name != null) {
6470 _json["name"] = name;
6471 }
6472 if (type != null) {
6473 _json["type"] = type;
6474 }
6475 if (visibility != null) {
6476 _json["visibility"] = visibility;
6477 }
6478 return _json;
6479 }
6480 }
6481
6482 class MapLayer extends MapItem {
6483 /**
6484 * An array of four numbers (west, south, east, north) which defines the
6485 * rectangular bounding box of the default viewport. The numbers represent
6486 * latitude and longitude in decimal degrees.
6487 */
6488 core.List<core.double> defaultViewport;
6489 /**
6490 * The ID of this MapLayer. This ID can be used to request more details about
6491 * the layer.
6492 */
6493 core.String id;
6494 /** A user defined alias for this MapLayer, specific to this Map. */
6495 core.String key;
6496 /** The name of this MapLayer. */
6497 core.String name;
6498 /**
6499 * Identifies this object as a MapLayer.
6500 * Possible string values are:
6501 * - "layer"
6502 */
6503 final core.String type = "layer";
6504 /**
6505 * The visibility setting of this MapLayer. One of "defaultOn" or
6506 * "defaultOff".
6507 */
6508 core.String visibility;
6509
6510 MapLayer();
6511
6512 MapLayer.fromJson(core.Map _json) {
6513 if (_json.containsKey("defaultViewport")) {
6514 defaultViewport = _json["defaultViewport"];
6515 }
6516 if (_json.containsKey("id")) {
6517 id = _json["id"];
6518 }
6519 if (_json.containsKey("key")) {
6520 key = _json["key"];
6521 }
6522 if (_json.containsKey("name")) {
6523 name = _json["name"];
6524 }
6525 if (_json.containsKey("visibility")) {
6526 visibility = _json["visibility"];
6527 }
6528 }
6529
6530 core.Map toJson() {
6531 var _json = new core.Map();
6532 if (defaultViewport != null) {
6533 _json["defaultViewport"] = defaultViewport;
6534 }
6535 if (id != null) {
6536 _json["id"] = id;
6537 }
6538 if (key != null) {
6539 _json["key"] = key;
6540 }
6541 if (name != null) {
6542 _json["name"] = name;
6543 }
6544 if (type != null) {
6545 _json["type"] = type;
6546 }
6547 if (visibility != null) {
6548 _json["visibility"] = visibility;
6549 }
6550 return _json;
6551 }
6552 }
6553
6554 /** The response returned by a call to maps.List. */
6555 class MapsListResponse {
6556 /** Resources returned. */
6557 core.List<Map> maps;
6558 /** Next page token. */
6559 core.String nextPageToken;
6560 core.List<core.int> get nextPageTokenAsBytes {
6561 return crypto.CryptoUtils.base64StringToBytes(nextPageToken);
6562 }
6563
6564 void set nextPageTokenAsBytes(core.List<core.int> _bytes) {
6565 nextPageToken = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true);
6566 }
6567
6568 MapsListResponse();
6569
6570 MapsListResponse.fromJson(core.Map _json) {
6571 if (_json.containsKey("maps")) {
6572 maps = _json["maps"].map((value) => new Map.fromJson(value)).toList();
6573 }
6574 if (_json.containsKey("nextPageToken")) {
6575 nextPageToken = _json["nextPageToken"];
6576 }
6577 }
6578
6579 core.Map toJson() {
6580 var _json = new core.Map();
6581 if (maps != null) {
6582 _json["maps"] = maps.map((value) => (value).toJson()).toList();
6583 }
6584 if (nextPageToken != null) {
6585 _json["nextPageToken"] = nextPageToken;
6586 }
6587 return _json;
6588 }
6589 }
6590
6591 /** A list of the parents of an asset. */
6592 class Parent {
6593 /** The ID of this parent. */
6594 core.String id;
6595
6596 Parent();
6597
6598 Parent.fromJson(core.Map _json) {
6599 if (_json.containsKey("id")) {
6600 id = _json["id"];
6601 }
6602 }
6603
6604 core.Map toJson() {
6605 var _json = new core.Map();
6606 if (id != null) {
6607 _json["id"] = id;
6608 }
6609 return _json;
6610 }
6611 }
6612
6613 /** The response returned by a call to parents.List. */
6614 class ParentsListResponse {
6615 /** Next page token. */
6616 core.String nextPageToken;
6617 /** The parent assets. */
6618 core.List<Parent> parents;
6619
6620 ParentsListResponse();
6621
6622 ParentsListResponse.fromJson(core.Map _json) {
6623 if (_json.containsKey("nextPageToken")) {
6624 nextPageToken = _json["nextPageToken"];
6625 }
6626 if (_json.containsKey("parents")) {
6627 parents = _json["parents"].map((value) => new Parent.fromJson(value)).toLi st();
6628 }
6629 }
6630
6631 core.Map toJson() {
6632 var _json = new core.Map();
6633 if (nextPageToken != null) {
6634 _json["nextPageToken"] = nextPageToken;
6635 }
6636 if (parents != null) {
6637 _json["parents"] = parents.map((value) => (value).toJson()).toList();
6638 }
6639 return _json;
6640 }
6641 }
6642
6643 /**
6644 * A permission defines the user or group that has access to an asset, and the
6645 * type of access they have.
6646 */
6647 class Permission {
6648 /**
6649 * Indicates whether a public asset is listed and can be found via a web
6650 * search (value true), or is visible only to people who have a link to the
6651 * asset (value false).
6652 */
6653 core.bool discoverable;
6654 /**
6655 * The unique identifier of the permission. This could be the email address of
6656 * the user or group this permission refers to, or the string "anyone" for
6657 * public permissions.
6658 */
6659 core.String id;
6660 /**
6661 * The type of access granted to this user or group.
6662 * Possible string values are:
6663 * - "owner"
6664 * - "reader"
6665 * - "viewer"
6666 * - "writer"
6667 */
6668 core.String role;
6669 /**
6670 * The account type.
6671 * Possible string values are:
6672 * - "anyone"
6673 * - "group"
6674 * - "user"
6675 */
6676 core.String type;
6677
6678 Permission();
6679
6680 Permission.fromJson(core.Map _json) {
6681 if (_json.containsKey("discoverable")) {
6682 discoverable = _json["discoverable"];
6683 }
6684 if (_json.containsKey("id")) {
6685 id = _json["id"];
6686 }
6687 if (_json.containsKey("role")) {
6688 role = _json["role"];
6689 }
6690 if (_json.containsKey("type")) {
6691 type = _json["type"];
6692 }
6693 }
6694
6695 core.Map toJson() {
6696 var _json = new core.Map();
6697 if (discoverable != null) {
6698 _json["discoverable"] = discoverable;
6699 }
6700 if (id != null) {
6701 _json["id"] = id;
6702 }
6703 if (role != null) {
6704 _json["role"] = role;
6705 }
6706 if (type != null) {
6707 _json["type"] = type;
6708 }
6709 return _json;
6710 }
6711 }
6712
6713 /** The request sent to mapsengine.permissions.batchDelete. */
6714 class PermissionsBatchDeleteRequest {
6715 /**
6716 * An array of permission ids to be removed. This could be the email address
6717 * of the user or group this permission refers to, or the string "anyone" for
6718 * public permissions.
6719 */
6720 core.List<core.String> ids;
6721
6722 PermissionsBatchDeleteRequest();
6723
6724 PermissionsBatchDeleteRequest.fromJson(core.Map _json) {
6725 if (_json.containsKey("ids")) {
6726 ids = _json["ids"];
6727 }
6728 }
6729
6730 core.Map toJson() {
6731 var _json = new core.Map();
6732 if (ids != null) {
6733 _json["ids"] = ids;
6734 }
6735 return _json;
6736 }
6737 }
6738
6739 /** The response returned by a call to mapsengine.permissions.batchDelete. */
6740 class PermissionsBatchDeleteResponse {
6741
6742 PermissionsBatchDeleteResponse();
6743
6744 PermissionsBatchDeleteResponse.fromJson(core.Map _json) {
6745 }
6746
6747 core.Map toJson() {
6748 var _json = new core.Map();
6749 return _json;
6750 }
6751 }
6752
6753 /** The request sent to mapsengine.permissions.batchUpdate. */
6754 class PermissionsBatchUpdateRequest {
6755 /** The permissions to be inserted or updated. */
6756 core.List<Permission> permissions;
6757
6758 PermissionsBatchUpdateRequest();
6759
6760 PermissionsBatchUpdateRequest.fromJson(core.Map _json) {
6761 if (_json.containsKey("permissions")) {
6762 permissions = _json["permissions"].map((value) => new Permission.fromJson( value)).toList();
6763 }
6764 }
6765
6766 core.Map toJson() {
6767 var _json = new core.Map();
6768 if (permissions != null) {
6769 _json["permissions"] = permissions.map((value) => (value).toJson()).toList ();
6770 }
6771 return _json;
6772 }
6773 }
6774
6775 /** The response returned by a call to mapsengine.permissions.batchUpdate. */
6776 class PermissionsBatchUpdateResponse {
6777
6778 PermissionsBatchUpdateResponse();
6779
6780 PermissionsBatchUpdateResponse.fromJson(core.Map _json) {
6781 }
6782
6783 core.Map toJson() {
6784 var _json = new core.Map();
6785 return _json;
6786 }
6787 }
6788
6789 class PermissionsListResponse {
6790 /** The set of permissions associated with this asset. */
6791 core.List<Permission> permissions;
6792
6793 PermissionsListResponse();
6794
6795 PermissionsListResponse.fromJson(core.Map _json) {
6796 if (_json.containsKey("permissions")) {
6797 permissions = _json["permissions"].map((value) => new Permission.fromJson( value)).toList();
6798 }
6799 }
6800
6801 core.Map toJson() {
6802 var _json = new core.Map();
6803 if (permissions != null) {
6804 _json["permissions"] = permissions.map((value) => (value).toJson()).toList ();
6805 }
6806 return _json;
6807 }
6808 }
6809
6810 /** Style for points. */
6811 class PointStyle {
6812 /**
6813 * Icon for the point; if it isn't null, exactly one of 'name', 'id' or
6814 * 'scaledShape' must be set.
6815 */
6816 IconStyle icon;
6817 /** Label style for the point. */
6818 LabelStyle label;
6819
6820 PointStyle();
6821
6822 PointStyle.fromJson(core.Map _json) {
6823 if (_json.containsKey("icon")) {
6824 icon = new IconStyle.fromJson(_json["icon"]);
6825 }
6826 if (_json.containsKey("label")) {
6827 label = new LabelStyle.fromJson(_json["label"]);
6828 }
6829 }
6830
6831 core.Map toJson() {
6832 var _json = new core.Map();
6833 if (icon != null) {
6834 _json["icon"] = (icon).toJson();
6835 }
6836 if (label != null) {
6837 _json["label"] = (label).toJson();
6838 }
6839 return _json;
6840 }
6841 }
6842
6843 /** Style for polygons. */
6844 class PolygonStyle {
6845 /**
6846 * Fill color of the polygon. If not provided, the polygon will be transparent
6847 * and not visible if there is no border.
6848 */
6849 Color fill;
6850 /** Label style for the polygon. */
6851 LabelStyle label;
6852 /** Border of the polygon. 0 < border.width <= 10. */
6853 Border stroke;
6854
6855 PolygonStyle();
6856
6857 PolygonStyle.fromJson(core.Map _json) {
6858 if (_json.containsKey("fill")) {
6859 fill = new Color.fromJson(_json["fill"]);
6860 }
6861 if (_json.containsKey("label")) {
6862 label = new LabelStyle.fromJson(_json["label"]);
6863 }
6864 if (_json.containsKey("stroke")) {
6865 stroke = new Border.fromJson(_json["stroke"]);
6866 }
6867 }
6868
6869 core.Map toJson() {
6870 var _json = new core.Map();
6871 if (fill != null) {
6872 _json["fill"] = (fill).toJson();
6873 }
6874 if (label != null) {
6875 _json["label"] = (label).toJson();
6876 }
6877 if (stroke != null) {
6878 _json["stroke"] = (stroke).toJson();
6879 }
6880 return _json;
6881 }
6882 }
6883
6884 /** The response returned by a call to any asset's Process method. */
6885 class ProcessResponse {
6886
6887 ProcessResponse();
6888
6889 ProcessResponse.fromJson(core.Map _json) {
6890 }
6891
6892 core.Map toJson() {
6893 var _json = new core.Map();
6894 return _json;
6895 }
6896 }
6897
6898 /** A Maps Engine project groups a collection of resources. */
6899 class Project {
6900 /** An ID used to refer to this Maps Engine project. */
6901 core.String id;
6902 /** A user provided name for this Maps Engine project. */
6903 core.String name;
6904
6905 Project();
6906
6907 Project.fromJson(core.Map _json) {
6908 if (_json.containsKey("id")) {
6909 id = _json["id"];
6910 }
6911 if (_json.containsKey("name")) {
6912 name = _json["name"];
6913 }
6914 }
6915
6916 core.Map toJson() {
6917 var _json = new core.Map();
6918 if (id != null) {
6919 _json["id"] = id;
6920 }
6921 if (name != null) {
6922 _json["name"] = name;
6923 }
6924 return _json;
6925 }
6926 }
6927
6928 /** The response returned by a call to projects.List. */
6929 class ProjectsListResponse {
6930 /** Projects returned. */
6931 core.List<Project> projects;
6932
6933 ProjectsListResponse();
6934
6935 ProjectsListResponse.fromJson(core.Map _json) {
6936 if (_json.containsKey("projects")) {
6937 projects = _json["projects"].map((value) => new Project.fromJson(value)).t oList();
6938 }
6939 }
6940
6941 core.Map toJson() {
6942 var _json = new core.Map();
6943 if (projects != null) {
6944 _json["projects"] = projects.map((value) => (value).toJson()).toList();
6945 }
6946 return _json;
6947 }
6948 }
6949
6950 /** The response returned by a call to any asset's Publish method. */
6951 class PublishResponse {
6952
6953 PublishResponse();
6954
6955 PublishResponse.fromJson(core.Map _json) {
6956 }
6957
6958 core.Map toJson() {
6959 var _json = new core.Map();
6960 return _json;
6961 }
6962 }
6963
6964 /** The published version of a layer. */
6965 class PublishedLayer {
6966 /** The description of this Layer, supplied by the author. */
6967 core.String description;
6968 /** A globally unique ID, used to refer to this Layer. */
6969 core.String id;
6970 /**
6971 * The type of the datasources used to build this Layer. This should be used
6972 * instead of datasourceType. At least one of layerType and datasourceType and
6973 * must be specified, but layerType takes precedence.
6974 * Possible string values are:
6975 * - "image"
6976 * - "vector"
6977 */
6978 core.String layerType;
6979 /** The name of this Layer, supplied by the author. */
6980 core.String name;
6981 /** The ID of the project that this Layer is in. */
6982 core.String projectId;
6983
6984 PublishedLayer();
6985
6986 PublishedLayer.fromJson(core.Map _json) {
6987 if (_json.containsKey("description")) {
6988 description = _json["description"];
6989 }
6990 if (_json.containsKey("id")) {
6991 id = _json["id"];
6992 }
6993 if (_json.containsKey("layerType")) {
6994 layerType = _json["layerType"];
6995 }
6996 if (_json.containsKey("name")) {
6997 name = _json["name"];
6998 }
6999 if (_json.containsKey("projectId")) {
7000 projectId = _json["projectId"];
7001 }
7002 }
7003
7004 core.Map toJson() {
7005 var _json = new core.Map();
7006 if (description != null) {
7007 _json["description"] = description;
7008 }
7009 if (id != null) {
7010 _json["id"] = id;
7011 }
7012 if (layerType != null) {
7013 _json["layerType"] = layerType;
7014 }
7015 if (name != null) {
7016 _json["name"] = name;
7017 }
7018 if (projectId != null) {
7019 _json["projectId"] = projectId;
7020 }
7021 return _json;
7022 }
7023 }
7024
7025 /** The response returned by a call to layers.List.published. */
7026 class PublishedLayersListResponse {
7027 /** Resources returned. */
7028 core.List<PublishedLayer> layers;
7029 /** Next page token. */
7030 core.String nextPageToken;
7031 core.List<core.int> get nextPageTokenAsBytes {
7032 return crypto.CryptoUtils.base64StringToBytes(nextPageToken);
7033 }
7034
7035 void set nextPageTokenAsBytes(core.List<core.int> _bytes) {
7036 nextPageToken = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true);
7037 }
7038
7039 PublishedLayersListResponse();
7040
7041 PublishedLayersListResponse.fromJson(core.Map _json) {
7042 if (_json.containsKey("layers")) {
7043 layers = _json["layers"].map((value) => new PublishedLayer.fromJson(value) ).toList();
7044 }
7045 if (_json.containsKey("nextPageToken")) {
7046 nextPageToken = _json["nextPageToken"];
7047 }
7048 }
7049
7050 core.Map toJson() {
7051 var _json = new core.Map();
7052 if (layers != null) {
7053 _json["layers"] = layers.map((value) => (value).toJson()).toList();
7054 }
7055 if (nextPageToken != null) {
7056 _json["nextPageToken"] = nextPageToken;
7057 }
7058 return _json;
7059 }
7060 }
7061
7062 /** The published version of a map asset. */
7063 class PublishedMap {
7064 /** The contents of this Map. */
7065 MapContents contents;
7066 /**
7067 * An array of four numbers (west, south, east, north) which defines the
7068 * rectangular bounding box of the default viewport. The numbers represent
7069 * latitude and longitude in decimal degrees.
7070 */
7071 LatLngBox defaultViewport;
7072 /** The description of this Map, supplied by the author. */
7073 core.String description;
7074 /** A globally unique ID, used to refer to this Map. */
7075 core.String id;
7076 /** The name of this Map, supplied by the author. */
7077 core.String name;
7078 /** The ID of the project that this Map is in. */
7079 core.String projectId;
7080
7081 PublishedMap();
7082
7083 PublishedMap.fromJson(core.Map _json) {
7084 if (_json.containsKey("contents")) {
7085 contents = new MapContents.fromJson(_json["contents"]);
7086 }
7087 if (_json.containsKey("defaultViewport")) {
7088 defaultViewport = new LatLngBox.fromJson(_json["defaultViewport"]);
7089 }
7090 if (_json.containsKey("description")) {
7091 description = _json["description"];
7092 }
7093 if (_json.containsKey("id")) {
7094 id = _json["id"];
7095 }
7096 if (_json.containsKey("name")) {
7097 name = _json["name"];
7098 }
7099 if (_json.containsKey("projectId")) {
7100 projectId = _json["projectId"];
7101 }
7102 }
7103
7104 core.Map toJson() {
7105 var _json = new core.Map();
7106 if (contents != null) {
7107 _json["contents"] = (contents).toJson();
7108 }
7109 if (defaultViewport != null) {
7110 _json["defaultViewport"] = defaultViewport;
7111 }
7112 if (description != null) {
7113 _json["description"] = description;
7114 }
7115 if (id != null) {
7116 _json["id"] = id;
7117 }
7118 if (name != null) {
7119 _json["name"] = name;
7120 }
7121 if (projectId != null) {
7122 _json["projectId"] = projectId;
7123 }
7124 return _json;
7125 }
7126 }
7127
7128 /** The response returned by a call to maps.List.published. */
7129 class PublishedMapsListResponse {
7130 /** Resources returned. */
7131 core.List<PublishedMap> maps;
7132 /** Next page token. */
7133 core.String nextPageToken;
7134 core.List<core.int> get nextPageTokenAsBytes {
7135 return crypto.CryptoUtils.base64StringToBytes(nextPageToken);
7136 }
7137
7138 void set nextPageTokenAsBytes(core.List<core.int> _bytes) {
7139 nextPageToken = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true);
7140 }
7141
7142 PublishedMapsListResponse();
7143
7144 PublishedMapsListResponse.fromJson(core.Map _json) {
7145 if (_json.containsKey("maps")) {
7146 maps = _json["maps"].map((value) => new PublishedMap.fromJson(value)).toLi st();
7147 }
7148 if (_json.containsKey("nextPageToken")) {
7149 nextPageToken = _json["nextPageToken"];
7150 }
7151 }
7152
7153 core.Map toJson() {
7154 var _json = new core.Map();
7155 if (maps != null) {
7156 _json["maps"] = maps.map((value) => (value).toJson()).toList();
7157 }
7158 if (nextPageToken != null) {
7159 _json["nextPageToken"] = nextPageToken;
7160 }
7161 return _json;
7162 }
7163 }
7164
7165 /** A geo-referenced raster. */
7166 class Raster {
7167 /** The acquisition time of this Raster. */
7168 AcquisitionTime acquisitionTime;
7169 /** The name of the attribution to be used for this Raster. */
7170 core.String attribution;
7171 /**
7172 * A rectangular bounding box which contains all of the data in this Raster.
7173 * The box is expressed as \"west, south, east, north\". The numbers represent
7174 * latitudes and longitudes in decimal degrees.
7175 */
7176 core.List<core.double> bbox;
7177 /**
7178 * The creation time of this raster. The value is an RFC 3339 formatted
7179 * date-time value (e.g. 1970-01-01T00:00:00Z).
7180 */
7181 core.DateTime creationTime;
7182 /**
7183 * The email address of the creator of this raster. This is only returned on
7184 * GET requests and not LIST requests.
7185 */
7186 core.String creatorEmail;
7187 /** The description of this Raster, supplied by the author. */
7188 core.String description;
7189 /**
7190 * Deprecated: The name of an access list of the Map Editor type. The user on
7191 * whose behalf the request is being sent must be an editor on that access
7192 * list. Note: Google Maps Engine no longer uses access lists. Instead, each
7193 * asset has its own list of permissions. For backward compatibility, the API
7194 * still accepts access lists for projects that are already using access
7195 * lists. If you created a GME account/project after July 14th, 2014, you will
7196 * not be able to send API requests that include access lists. Note: This is
7197 * an input field only. It is not returned in response to a list or get
7198 * request.
7199 */
7200 core.String draftAccessList;
7201 /** The ETag, used to refer to the current version of the asset. */
7202 core.String etag;
7203 /** The files associated with this Raster. */
7204 core.List<File> files;
7205 /** A globally unique ID, used to refer to this Raster. */
7206 core.String id;
7207 /**
7208 * The last modified time of this raster. The value is an RFC 3339 formatted
7209 * date-time value (e.g. 1970-01-01T00:00:00Z).
7210 */
7211 core.DateTime lastModifiedTime;
7212 /**
7213 * The email address of the last modifier of this raster. This is only
7214 * returned on GET requests and not LIST requests.
7215 */
7216 core.String lastModifierEmail;
7217 /** The mask processing type of this Raster. */
7218 core.String maskType;
7219 /** The name of this Raster, supplied by the author. */
7220 core.String name;
7221 /**
7222 * The processing status of this Raster.
7223 * Possible string values are:
7224 * - "complete"
7225 * - "failed"
7226 * - "notReady"
7227 * - "processing"
7228 * - "ready"
7229 */
7230 core.String processingStatus;
7231 /** The ID of the project that this Raster is in. */
7232 core.String projectId;
7233 /**
7234 * The type of this Raster. Always "image" today.
7235 * Possible string values are:
7236 * - "image"
7237 */
7238 core.String rasterType;
7239 /** Tags of this Raster. */
7240 Tags tags;
7241 /** If true, WRITERs of the asset are able to edit the asset permissions. */
7242 core.bool writersCanEditPermissions;
7243
7244 Raster();
7245
7246 Raster.fromJson(core.Map _json) {
7247 if (_json.containsKey("acquisitionTime")) {
7248 acquisitionTime = new AcquisitionTime.fromJson(_json["acquisitionTime"]);
7249 }
7250 if (_json.containsKey("attribution")) {
7251 attribution = _json["attribution"];
7252 }
7253 if (_json.containsKey("bbox")) {
7254 bbox = _json["bbox"];
7255 }
7256 if (_json.containsKey("creationTime")) {
7257 creationTime = core.DateTime.parse(_json["creationTime"]);
7258 }
7259 if (_json.containsKey("creatorEmail")) {
7260 creatorEmail = _json["creatorEmail"];
7261 }
7262 if (_json.containsKey("description")) {
7263 description = _json["description"];
7264 }
7265 if (_json.containsKey("draftAccessList")) {
7266 draftAccessList = _json["draftAccessList"];
7267 }
7268 if (_json.containsKey("etag")) {
7269 etag = _json["etag"];
7270 }
7271 if (_json.containsKey("files")) {
7272 files = _json["files"].map((value) => new File.fromJson(value)).toList();
7273 }
7274 if (_json.containsKey("id")) {
7275 id = _json["id"];
7276 }
7277 if (_json.containsKey("lastModifiedTime")) {
7278 lastModifiedTime = core.DateTime.parse(_json["lastModifiedTime"]);
7279 }
7280 if (_json.containsKey("lastModifierEmail")) {
7281 lastModifierEmail = _json["lastModifierEmail"];
7282 }
7283 if (_json.containsKey("maskType")) {
7284 maskType = _json["maskType"];
7285 }
7286 if (_json.containsKey("name")) {
7287 name = _json["name"];
7288 }
7289 if (_json.containsKey("processingStatus")) {
7290 processingStatus = _json["processingStatus"];
7291 }
7292 if (_json.containsKey("projectId")) {
7293 projectId = _json["projectId"];
7294 }
7295 if (_json.containsKey("rasterType")) {
7296 rasterType = _json["rasterType"];
7297 }
7298 if (_json.containsKey("tags")) {
7299 tags = new Tags.fromJson(_json["tags"]);
7300 }
7301 if (_json.containsKey("writersCanEditPermissions")) {
7302 writersCanEditPermissions = _json["writersCanEditPermissions"];
7303 }
7304 }
7305
7306 core.Map toJson() {
7307 var _json = new core.Map();
7308 if (acquisitionTime != null) {
7309 _json["acquisitionTime"] = (acquisitionTime).toJson();
7310 }
7311 if (attribution != null) {
7312 _json["attribution"] = attribution;
7313 }
7314 if (bbox != null) {
7315 _json["bbox"] = bbox;
7316 }
7317 if (creationTime != null) {
7318 _json["creationTime"] = (creationTime).toIso8601String();
7319 }
7320 if (creatorEmail != null) {
7321 _json["creatorEmail"] = creatorEmail;
7322 }
7323 if (description != null) {
7324 _json["description"] = description;
7325 }
7326 if (draftAccessList != null) {
7327 _json["draftAccessList"] = draftAccessList;
7328 }
7329 if (etag != null) {
7330 _json["etag"] = etag;
7331 }
7332 if (files != null) {
7333 _json["files"] = files.map((value) => (value).toJson()).toList();
7334 }
7335 if (id != null) {
7336 _json["id"] = id;
7337 }
7338 if (lastModifiedTime != null) {
7339 _json["lastModifiedTime"] = (lastModifiedTime).toIso8601String();
7340 }
7341 if (lastModifierEmail != null) {
7342 _json["lastModifierEmail"] = lastModifierEmail;
7343 }
7344 if (maskType != null) {
7345 _json["maskType"] = maskType;
7346 }
7347 if (name != null) {
7348 _json["name"] = name;
7349 }
7350 if (processingStatus != null) {
7351 _json["processingStatus"] = processingStatus;
7352 }
7353 if (projectId != null) {
7354 _json["projectId"] = projectId;
7355 }
7356 if (rasterType != null) {
7357 _json["rasterType"] = rasterType;
7358 }
7359 if (tags != null) {
7360 _json["tags"] = tags;
7361 }
7362 if (writersCanEditPermissions != null) {
7363 _json["writersCanEditPermissions"] = writersCanEditPermissions;
7364 }
7365 return _json;
7366 }
7367 }
7368
7369 /**
7370 * A raster collection groups multiple Raster resources for inclusion in a
7371 * Layer.
7372 */
7373 class RasterCollection {
7374 /**
7375 * The name of the attribution to be used for this RasterCollection. Note:
7376 * Attribution is returned in response to a get request but not a list
7377 * request. After requesting a list of raster collections, you'll need to send
7378 * a get request to retrieve the attribution for each raster collection.
7379 */
7380 core.String attribution;
7381 /**
7382 * A rectangular bounding box which contains all of the data in this
7383 * RasterCollection. The box is expressed as \"west, south, east, north\". The
7384 * numbers represent latitude and longitude in decimal degrees.
7385 */
7386 core.List<core.double> bbox;
7387 /**
7388 * The creation time of this RasterCollection. The value is an RFC 3339
7389 * formatted date-time value (e.g. 1970-01-01T00:00:00Z).
7390 */
7391 core.DateTime creationTime;
7392 /**
7393 * The email address of the creator of this raster collection. This is only
7394 * returned on GET requests and not LIST requests.
7395 */
7396 core.String creatorEmail;
7397 /** The description of this RasterCollection, supplied by the author. */
7398 core.String description;
7399 /**
7400 * Deprecated: The name of an access list of the Map Editor type. The user on
7401 * whose behalf the request is being sent must be an editor on that access
7402 * list. Note: Google Maps Engine no longer uses access lists. Instead, each
7403 * asset has its own list of permissions. For backward compatibility, the API
7404 * still accepts access lists for projects that are already using access
7405 * lists. If you created a GME account/project after July 14th, 2014, you will
7406 * not be able to send API requests that include access lists. Note: This is
7407 * an input field only. It is not returned in response to a list or get
7408 * request.
7409 */
7410 core.String draftAccessList;
7411 /** The ETag, used to refer to the current version of the asset. */
7412 core.String etag;
7413 /** A globally unique ID, used to refer to this RasterCollection. */
7414 core.String id;
7415 /**
7416 * The last modified time of this RasterCollection. The value is an RFC 3339
7417 * formatted date-time value (e.g. 1970-01-01T00:00:00Z).
7418 */
7419 core.DateTime lastModifiedTime;
7420 /**
7421 * The email address of the last modifier of this raster collection. This is
7422 * only returned on GET requests and not LIST requests.
7423 */
7424 core.String lastModifierEmail;
7425 /** True if this RasterCollection is a mosaic. */
7426 core.bool mosaic;
7427 /** The name of this RasterCollection, supplied by the author. */
7428 core.String name;
7429 /**
7430 * The processing status of this RasterCollection.
7431 * Possible string values are:
7432 * - "complete"
7433 * - "failed"
7434 * - "notReady"
7435 * - "processing"
7436 * - "ready"
7437 */
7438 core.String processingStatus;
7439 /** The ID of the project that this RasterCollection is in. */
7440 core.String projectId;
7441 /**
7442 * The type of rasters contained within this RasterCollection.
7443 * Possible string values are:
7444 * - "image"
7445 */
7446 core.String rasterType;
7447 /** Tags of this RasterCollection. */
7448 Tags tags;
7449 /** If true, WRITERs of the asset are able to edit the asset permissions. */
7450 core.bool writersCanEditPermissions;
7451
7452 RasterCollection();
7453
7454 RasterCollection.fromJson(core.Map _json) {
7455 if (_json.containsKey("attribution")) {
7456 attribution = _json["attribution"];
7457 }
7458 if (_json.containsKey("bbox")) {
7459 bbox = _json["bbox"];
7460 }
7461 if (_json.containsKey("creationTime")) {
7462 creationTime = core.DateTime.parse(_json["creationTime"]);
7463 }
7464 if (_json.containsKey("creatorEmail")) {
7465 creatorEmail = _json["creatorEmail"];
7466 }
7467 if (_json.containsKey("description")) {
7468 description = _json["description"];
7469 }
7470 if (_json.containsKey("draftAccessList")) {
7471 draftAccessList = _json["draftAccessList"];
7472 }
7473 if (_json.containsKey("etag")) {
7474 etag = _json["etag"];
7475 }
7476 if (_json.containsKey("id")) {
7477 id = _json["id"];
7478 }
7479 if (_json.containsKey("lastModifiedTime")) {
7480 lastModifiedTime = core.DateTime.parse(_json["lastModifiedTime"]);
7481 }
7482 if (_json.containsKey("lastModifierEmail")) {
7483 lastModifierEmail = _json["lastModifierEmail"];
7484 }
7485 if (_json.containsKey("mosaic")) {
7486 mosaic = _json["mosaic"];
7487 }
7488 if (_json.containsKey("name")) {
7489 name = _json["name"];
7490 }
7491 if (_json.containsKey("processingStatus")) {
7492 processingStatus = _json["processingStatus"];
7493 }
7494 if (_json.containsKey("projectId")) {
7495 projectId = _json["projectId"];
7496 }
7497 if (_json.containsKey("rasterType")) {
7498 rasterType = _json["rasterType"];
7499 }
7500 if (_json.containsKey("tags")) {
7501 tags = new Tags.fromJson(_json["tags"]);
7502 }
7503 if (_json.containsKey("writersCanEditPermissions")) {
7504 writersCanEditPermissions = _json["writersCanEditPermissions"];
7505 }
7506 }
7507
7508 core.Map toJson() {
7509 var _json = new core.Map();
7510 if (attribution != null) {
7511 _json["attribution"] = attribution;
7512 }
7513 if (bbox != null) {
7514 _json["bbox"] = bbox;
7515 }
7516 if (creationTime != null) {
7517 _json["creationTime"] = (creationTime).toIso8601String();
7518 }
7519 if (creatorEmail != null) {
7520 _json["creatorEmail"] = creatorEmail;
7521 }
7522 if (description != null) {
7523 _json["description"] = description;
7524 }
7525 if (draftAccessList != null) {
7526 _json["draftAccessList"] = draftAccessList;
7527 }
7528 if (etag != null) {
7529 _json["etag"] = etag;
7530 }
7531 if (id != null) {
7532 _json["id"] = id;
7533 }
7534 if (lastModifiedTime != null) {
7535 _json["lastModifiedTime"] = (lastModifiedTime).toIso8601String();
7536 }
7537 if (lastModifierEmail != null) {
7538 _json["lastModifierEmail"] = lastModifierEmail;
7539 }
7540 if (mosaic != null) {
7541 _json["mosaic"] = mosaic;
7542 }
7543 if (name != null) {
7544 _json["name"] = name;
7545 }
7546 if (processingStatus != null) {
7547 _json["processingStatus"] = processingStatus;
7548 }
7549 if (projectId != null) {
7550 _json["projectId"] = projectId;
7551 }
7552 if (rasterType != null) {
7553 _json["rasterType"] = rasterType;
7554 }
7555 if (tags != null) {
7556 _json["tags"] = tags;
7557 }
7558 if (writersCanEditPermissions != null) {
7559 _json["writersCanEditPermissions"] = writersCanEditPermissions;
7560 }
7561 return _json;
7562 }
7563 }
7564
7565 /**
7566 * The response returned by a call to raster_collections.List. Note: The list
7567 * response does not include all the fields available in a raster collection.
7568 * Refer to the RasterCollection resource description for details of the fields
7569 * that are not included. You'll need to send a get request to retrieve the
7570 * additional fields for each raster collection.
7571 */
7572 class RasterCollectionsListResponse {
7573 /** Next page token. */
7574 core.String nextPageToken;
7575 core.List<core.int> get nextPageTokenAsBytes {
7576 return crypto.CryptoUtils.base64StringToBytes(nextPageToken);
7577 }
7578
7579 void set nextPageTokenAsBytes(core.List<core.int> _bytes) {
7580 nextPageToken = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true);
7581 }
7582 /** Resources returned. */
7583 core.List<RasterCollection> rasterCollections;
7584
7585 RasterCollectionsListResponse();
7586
7587 RasterCollectionsListResponse.fromJson(core.Map _json) {
7588 if (_json.containsKey("nextPageToken")) {
7589 nextPageToken = _json["nextPageToken"];
7590 }
7591 if (_json.containsKey("rasterCollections")) {
7592 rasterCollections = _json["rasterCollections"].map((value) => new RasterCo llection.fromJson(value)).toList();
7593 }
7594 }
7595
7596 core.Map toJson() {
7597 var _json = new core.Map();
7598 if (nextPageToken != null) {
7599 _json["nextPageToken"] = nextPageToken;
7600 }
7601 if (rasterCollections != null) {
7602 _json["rasterCollections"] = rasterCollections.map((value) => (value).toJs on()).toList();
7603 }
7604 return _json;
7605 }
7606 }
7607
7608 /** A raster resource. */
7609 class RasterCollectionsRaster {
7610 /**
7611 * A rectangular bounding box which contains all of the data in this Raster.
7612 * The box is expressed as \"west, south, east, north\". The numbers represent
7613 * latitudes and longitudes in decimal degrees.
7614 */
7615 core.List<core.double> bbox;
7616 /**
7617 * The creation time of this raster. The value is an RFC 3339 formatted
7618 * date-time value (e.g. 1970-01-01T00:00:00Z).
7619 */
7620 core.DateTime creationTime;
7621 /** The description of this Raster, supplied by the author. */
7622 core.String description;
7623 /** A globally unique ID, used to refer to this Raster. */
7624 core.String id;
7625 /**
7626 * The last modified time of this raster. The value is an RFC 3339 formatted
7627 * date-time value (e.g. 1970-01-01T00:00:00Z).
7628 */
7629 core.DateTime lastModifiedTime;
7630 /** The name of this Raster, supplied by the author. */
7631 core.String name;
7632 /** The ID of the project that this Raster is in. */
7633 core.String projectId;
7634 /** The type of this Raster. Always "image" today. */
7635 core.String rasterType;
7636 /** Tags of this Raster. */
7637 core.List<core.String> tags;
7638
7639 RasterCollectionsRaster();
7640
7641 RasterCollectionsRaster.fromJson(core.Map _json) {
7642 if (_json.containsKey("bbox")) {
7643 bbox = _json["bbox"];
7644 }
7645 if (_json.containsKey("creationTime")) {
7646 creationTime = core.DateTime.parse(_json["creationTime"]);
7647 }
7648 if (_json.containsKey("description")) {
7649 description = _json["description"];
7650 }
7651 if (_json.containsKey("id")) {
7652 id = _json["id"];
7653 }
7654 if (_json.containsKey("lastModifiedTime")) {
7655 lastModifiedTime = core.DateTime.parse(_json["lastModifiedTime"]);
7656 }
7657 if (_json.containsKey("name")) {
7658 name = _json["name"];
7659 }
7660 if (_json.containsKey("projectId")) {
7661 projectId = _json["projectId"];
7662 }
7663 if (_json.containsKey("rasterType")) {
7664 rasterType = _json["rasterType"];
7665 }
7666 if (_json.containsKey("tags")) {
7667 tags = _json["tags"];
7668 }
7669 }
7670
7671 core.Map toJson() {
7672 var _json = new core.Map();
7673 if (bbox != null) {
7674 _json["bbox"] = bbox;
7675 }
7676 if (creationTime != null) {
7677 _json["creationTime"] = (creationTime).toIso8601String();
7678 }
7679 if (description != null) {
7680 _json["description"] = description;
7681 }
7682 if (id != null) {
7683 _json["id"] = id;
7684 }
7685 if (lastModifiedTime != null) {
7686 _json["lastModifiedTime"] = (lastModifiedTime).toIso8601String();
7687 }
7688 if (name != null) {
7689 _json["name"] = name;
7690 }
7691 if (projectId != null) {
7692 _json["projectId"] = projectId;
7693 }
7694 if (rasterType != null) {
7695 _json["rasterType"] = rasterType;
7696 }
7697 if (tags != null) {
7698 _json["tags"] = tags;
7699 }
7700 return _json;
7701 }
7702 }
7703
7704 /** The request sent to rasterCollections.Rasters.BatchDelete. */
7705 class RasterCollectionsRasterBatchDeleteRequest {
7706 /** An array of Raster asset IDs to be removed from this RasterCollection. */
7707 core.List<core.String> ids;
7708
7709 RasterCollectionsRasterBatchDeleteRequest();
7710
7711 RasterCollectionsRasterBatchDeleteRequest.fromJson(core.Map _json) {
7712 if (_json.containsKey("ids")) {
7713 ids = _json["ids"];
7714 }
7715 }
7716
7717 core.Map toJson() {
7718 var _json = new core.Map();
7719 if (ids != null) {
7720 _json["ids"] = ids;
7721 }
7722 return _json;
7723 }
7724 }
7725
7726 /**
7727 * The response returned by a call to rasterCollections.rasters.batchDelete.
7728 */
7729 class RasterCollectionsRastersBatchDeleteResponse {
7730
7731 RasterCollectionsRastersBatchDeleteResponse();
7732
7733 RasterCollectionsRastersBatchDeleteResponse.fromJson(core.Map _json) {
7734 }
7735
7736 core.Map toJson() {
7737 var _json = new core.Map();
7738 return _json;
7739 }
7740 }
7741
7742 /** The request sent to rasterCollections.Rasters.BatchInsert. */
7743 class RasterCollectionsRastersBatchInsertRequest {
7744 /** An array of Raster asset IDs to be added to this RasterCollection. */
7745 core.List<core.String> ids;
7746
7747 RasterCollectionsRastersBatchInsertRequest();
7748
7749 RasterCollectionsRastersBatchInsertRequest.fromJson(core.Map _json) {
7750 if (_json.containsKey("ids")) {
7751 ids = _json["ids"];
7752 }
7753 }
7754
7755 core.Map toJson() {
7756 var _json = new core.Map();
7757 if (ids != null) {
7758 _json["ids"] = ids;
7759 }
7760 return _json;
7761 }
7762 }
7763
7764 /**
7765 * The response returned by a call to rasterCollections.rasters.batchInsert.
7766 */
7767 class RasterCollectionsRastersBatchInsertResponse {
7768
7769 RasterCollectionsRastersBatchInsertResponse();
7770
7771 RasterCollectionsRastersBatchInsertResponse.fromJson(core.Map _json) {
7772 }
7773
7774 core.Map toJson() {
7775 var _json = new core.Map();
7776 return _json;
7777 }
7778 }
7779
7780 /** The response returned by a call to rasterCollections.rasters.List. */
7781 class RasterCollectionsRastersListResponse {
7782 /** Next page token. */
7783 core.String nextPageToken;
7784 /** Resources returned. */
7785 core.List<RasterCollectionsRaster> rasters;
7786
7787 RasterCollectionsRastersListResponse();
7788
7789 RasterCollectionsRastersListResponse.fromJson(core.Map _json) {
7790 if (_json.containsKey("nextPageToken")) {
7791 nextPageToken = _json["nextPageToken"];
7792 }
7793 if (_json.containsKey("rasters")) {
7794 rasters = _json["rasters"].map((value) => new RasterCollectionsRaster.from Json(value)).toList();
7795 }
7796 }
7797
7798 core.Map toJson() {
7799 var _json = new core.Map();
7800 if (nextPageToken != null) {
7801 _json["nextPageToken"] = nextPageToken;
7802 }
7803 if (rasters != null) {
7804 _json["rasters"] = rasters.map((value) => (value).toJson()).toList();
7805 }
7806 return _json;
7807 }
7808 }
7809
7810 /** The response returned by a call to rasters.List. */
7811 class RastersListResponse {
7812 /** Next page token. */
7813 core.String nextPageToken;
7814 /** Resources returned. */
7815 core.List<Raster> rasters;
7816
7817 RastersListResponse();
7818
7819 RastersListResponse.fromJson(core.Map _json) {
7820 if (_json.containsKey("nextPageToken")) {
7821 nextPageToken = _json["nextPageToken"];
7822 }
7823 if (_json.containsKey("rasters")) {
7824 rasters = _json["rasters"].map((value) => new Raster.fromJson(value)).toLi st();
7825 }
7826 }
7827
7828 core.Map toJson() {
7829 var _json = new core.Map();
7830 if (nextPageToken != null) {
7831 _json["nextPageToken"] = nextPageToken;
7832 }
7833 if (rasters != null) {
7834 _json["rasters"] = rasters.map((value) => (value).toJson()).toList();
7835 }
7836 return _json;
7837 }
7838 }
7839
7840 /** Parameters for styling points as scaled shapes. */
7841 class ScaledShape {
7842 /**
7843 * Border color/width of the shape. If not specified the shape won't have a
7844 * border.
7845 */
7846 Border border;
7847 /**
7848 * The fill color of the shape. If not specified the shape will be transparent
7849 * (although the borders may not be).
7850 */
7851 Color fill;
7852 /**
7853 * Name of the shape.
7854 * Possible string values are:
7855 * - "circle"
7856 */
7857 core.String shape;
7858
7859 ScaledShape();
7860
7861 ScaledShape.fromJson(core.Map _json) {
7862 if (_json.containsKey("border")) {
7863 border = new Border.fromJson(_json["border"]);
7864 }
7865 if (_json.containsKey("fill")) {
7866 fill = new Color.fromJson(_json["fill"]);
7867 }
7868 if (_json.containsKey("shape")) {
7869 shape = _json["shape"];
7870 }
7871 }
7872
7873 core.Map toJson() {
7874 var _json = new core.Map();
7875 if (border != null) {
7876 _json["border"] = (border).toJson();
7877 }
7878 if (fill != null) {
7879 _json["fill"] = (fill).toJson();
7880 }
7881 if (shape != null) {
7882 _json["shape"] = shape;
7883 }
7884 return _json;
7885 }
7886 }
7887
7888 /** Parameters for scaling scaled shapes. */
7889 class ScalingFunction {
7890 /** Name of the numeric column used to scale a shape. */
7891 core.String column;
7892 /**
7893 * The type of scaling function to use. Defaults to SQRT. Currently only
7894 * linear and square root scaling are supported.
7895 * Possible string values are:
7896 * - "linear"
7897 * - "sqrt"
7898 */
7899 core.String scalingType;
7900 /**
7901 * The range of shape sizes, in pixels. For circles, the size corresponds to
7902 * the diameter.
7903 */
7904 SizeRange sizeRange;
7905 /** The range of values to display across the size range. */
7906 ValueRange valueRange;
7907
7908 ScalingFunction();
7909
7910 ScalingFunction.fromJson(core.Map _json) {
7911 if (_json.containsKey("column")) {
7912 column = _json["column"];
7913 }
7914 if (_json.containsKey("scalingType")) {
7915 scalingType = _json["scalingType"];
7916 }
7917 if (_json.containsKey("sizeRange")) {
7918 sizeRange = new SizeRange.fromJson(_json["sizeRange"]);
7919 }
7920 if (_json.containsKey("valueRange")) {
7921 valueRange = new ValueRange.fromJson(_json["valueRange"]);
7922 }
7923 }
7924
7925 core.Map toJson() {
7926 var _json = new core.Map();
7927 if (column != null) {
7928 _json["column"] = column;
7929 }
7930 if (scalingType != null) {
7931 _json["scalingType"] = scalingType;
7932 }
7933 if (sizeRange != null) {
7934 _json["sizeRange"] = (sizeRange).toJson();
7935 }
7936 if (valueRange != null) {
7937 _json["valueRange"] = (valueRange).toJson();
7938 }
7939 return _json;
7940 }
7941 }
7942
7943 /**
7944 * A schema indicating the properties which may be associated with features
7945 * within a Table, and the types of those properties.
7946 */
7947 class Schema {
7948 /**
7949 * An array of TableColumn objects. The first object in the array must be
7950 * named geometry and be of type points, lineStrings, polygons, or
7951 * mixedGeometry.
7952 */
7953 core.List<TableColumn> columns;
7954 /**
7955 * The name of the column that contains a feature's geometry. This field can
7956 * be omitted during table create; Google Maps Engine supports only a single
7957 * geometry column, which must be named geometry and be the first object in
7958 * the columns array.
7959 */
7960 core.String primaryGeometry;
7961 /**
7962 * The name of the column that contains the unique identifier of a Feature.
7963 */
7964 core.String primaryKey;
7965
7966 Schema();
7967
7968 Schema.fromJson(core.Map _json) {
7969 if (_json.containsKey("columns")) {
7970 columns = _json["columns"].map((value) => new TableColumn.fromJson(value)) .toList();
7971 }
7972 if (_json.containsKey("primaryGeometry")) {
7973 primaryGeometry = _json["primaryGeometry"];
7974 }
7975 if (_json.containsKey("primaryKey")) {
7976 primaryKey = _json["primaryKey"];
7977 }
7978 }
7979
7980 core.Map toJson() {
7981 var _json = new core.Map();
7982 if (columns != null) {
7983 _json["columns"] = columns.map((value) => (value).toJson()).toList();
7984 }
7985 if (primaryGeometry != null) {
7986 _json["primaryGeometry"] = primaryGeometry;
7987 }
7988 if (primaryKey != null) {
7989 _json["primaryKey"] = primaryKey;
7990 }
7991 return _json;
7992 }
7993 }
7994
7995 /**
7996 * Scaled shape size range in pixels. For circles, size corresponds to diameter.
7997 */
7998 class SizeRange {
7999 /** Maximum size, in pixels. */
8000 core.double max;
8001 /** Minimum size, in pixels. */
8002 core.double min;
8003
8004 SizeRange();
8005
8006 SizeRange.fromJson(core.Map _json) {
8007 if (_json.containsKey("max")) {
8008 max = _json["max"];
8009 }
8010 if (_json.containsKey("min")) {
8011 min = _json["min"];
8012 }
8013 }
8014
8015 core.Map toJson() {
8016 var _json = new core.Map();
8017 if (max != null) {
8018 _json["max"] = max;
8019 }
8020 if (min != null) {
8021 _json["min"] = min;
8022 }
8023 return _json;
8024 }
8025 }
8026
8027 /** A collection of geographic features, and associated metadata. */
8028 class Table {
8029 /**
8030 * A rectangular bounding box which contains all of the data in this Table.
8031 * The box is expressed as \"west, south, east, north\". The numbers represent
8032 * latitude and longitude in decimal degrees.
8033 */
8034 core.List<core.double> bbox;
8035 /**
8036 * The creation time of this table. The value is an RFC 3339 formatted
8037 * date-time value (e.g. 1970-01-01T00:00:00Z).
8038 */
8039 core.DateTime creationTime;
8040 /**
8041 * The email address of the creator of this table. This is only returned on
8042 * GET requests and not LIST requests.
8043 */
8044 core.String creatorEmail;
8045 /** The description of this table, supplied by the author. */
8046 core.String description;
8047 /**
8048 * Deprecated: The name of an access list of the Map Editor type. The user on
8049 * whose behalf the request is being sent must be an editor on that access
8050 * list. Note: Google Maps Engine no longer uses access lists. Instead, each
8051 * asset has its own list of permissions. For backward compatibility, the API
8052 * still accepts access lists for projects that are already using access
8053 * lists. If you created a GME account/project after July 14th, 2014, you will
8054 * not be able to send API requests that include access lists. Note: This is
8055 * an input field only. It is not returned in response to a list or get
8056 * request.
8057 */
8058 core.String draftAccessList;
8059 /** The ETag, used to refer to the current version of the asset. */
8060 core.String etag;
8061 /** The files associated with this table. */
8062 core.List<File> files;
8063 /** A globally unique ID, used to refer to this table. */
8064 core.String id;
8065 /**
8066 * The last modified time of this table. The value is an RFC 3339 formatted
8067 * date-time value (e.g. 1970-01-01T00:00:00Z).
8068 */
8069 core.DateTime lastModifiedTime;
8070 /**
8071 * The email address of the last modifier of this table. This is only returned
8072 * on GET requests and not LIST requests.
8073 */
8074 core.String lastModifierEmail;
8075 /** The name of this table, supplied by the author. */
8076 core.String name;
8077 /**
8078 * The processing status of this table.
8079 * Possible string values are:
8080 * - "complete"
8081 * - "failed"
8082 * - "notReady"
8083 * - "processing"
8084 * - "ready"
8085 */
8086 core.String processingStatus;
8087 /** The ID of the project to which the table belongs. */
8088 core.String projectId;
8089 /**
8090 * Deprecated: The access list to whom view permissions are granted. The value
8091 * must be the name of a Maps Engine access list of the Map Viewer type, and
8092 * the user must be a viewer on that list. Note: Google Maps Engine no longer
8093 * uses access lists. Instead, each asset has its own list of permissions. For
8094 * backward compatibility, the API still accepts access lists for projects
8095 * that are already using access lists. If you created a GME account/project
8096 * after July 14th, 2014, you will not be able to send API requests that
8097 * include access lists. Note: This is an input field only. It is not returned
8098 * in response to a list or get request.
8099 */
8100 core.String publishedAccessList;
8101 /**
8102 * The schema for this table. Note: The schema is returned in response to a
8103 * get request but not a list request. After requesting a list of tables,
8104 * you'll need to send a get request to retrieve the schema for each table.
8105 */
8106 Schema schema;
8107 /**
8108 * Encoding of the uploaded files. Valid values include UTF-8, CP1251, ISO
8109 * 8859-1, and Shift_JIS.
8110 */
8111 core.String sourceEncoding;
8112 /**
8113 * An array of text strings, with each string representing a tag. More
8114 * information about tags can be found in the Tagging data article of the Maps
8115 * Engine help center.
8116 */
8117 Tags tags;
8118 /** If true, WRITERs of the asset are able to edit the asset permissions. */
8119 core.bool writersCanEditPermissions;
8120
8121 Table();
8122
8123 Table.fromJson(core.Map _json) {
8124 if (_json.containsKey("bbox")) {
8125 bbox = _json["bbox"];
8126 }
8127 if (_json.containsKey("creationTime")) {
8128 creationTime = core.DateTime.parse(_json["creationTime"]);
8129 }
8130 if (_json.containsKey("creatorEmail")) {
8131 creatorEmail = _json["creatorEmail"];
8132 }
8133 if (_json.containsKey("description")) {
8134 description = _json["description"];
8135 }
8136 if (_json.containsKey("draftAccessList")) {
8137 draftAccessList = _json["draftAccessList"];
8138 }
8139 if (_json.containsKey("etag")) {
8140 etag = _json["etag"];
8141 }
8142 if (_json.containsKey("files")) {
8143 files = _json["files"].map((value) => new File.fromJson(value)).toList();
8144 }
8145 if (_json.containsKey("id")) {
8146 id = _json["id"];
8147 }
8148 if (_json.containsKey("lastModifiedTime")) {
8149 lastModifiedTime = core.DateTime.parse(_json["lastModifiedTime"]);
8150 }
8151 if (_json.containsKey("lastModifierEmail")) {
8152 lastModifierEmail = _json["lastModifierEmail"];
8153 }
8154 if (_json.containsKey("name")) {
8155 name = _json["name"];
8156 }
8157 if (_json.containsKey("processingStatus")) {
8158 processingStatus = _json["processingStatus"];
8159 }
8160 if (_json.containsKey("projectId")) {
8161 projectId = _json["projectId"];
8162 }
8163 if (_json.containsKey("publishedAccessList")) {
8164 publishedAccessList = _json["publishedAccessList"];
8165 }
8166 if (_json.containsKey("schema")) {
8167 schema = new Schema.fromJson(_json["schema"]);
8168 }
8169 if (_json.containsKey("sourceEncoding")) {
8170 sourceEncoding = _json["sourceEncoding"];
8171 }
8172 if (_json.containsKey("tags")) {
8173 tags = new Tags.fromJson(_json["tags"]);
8174 }
8175 if (_json.containsKey("writersCanEditPermissions")) {
8176 writersCanEditPermissions = _json["writersCanEditPermissions"];
8177 }
8178 }
8179
8180 core.Map toJson() {
8181 var _json = new core.Map();
8182 if (bbox != null) {
8183 _json["bbox"] = bbox;
8184 }
8185 if (creationTime != null) {
8186 _json["creationTime"] = (creationTime).toIso8601String();
8187 }
8188 if (creatorEmail != null) {
8189 _json["creatorEmail"] = creatorEmail;
8190 }
8191 if (description != null) {
8192 _json["description"] = description;
8193 }
8194 if (draftAccessList != null) {
8195 _json["draftAccessList"] = draftAccessList;
8196 }
8197 if (etag != null) {
8198 _json["etag"] = etag;
8199 }
8200 if (files != null) {
8201 _json["files"] = files.map((value) => (value).toJson()).toList();
8202 }
8203 if (id != null) {
8204 _json["id"] = id;
8205 }
8206 if (lastModifiedTime != null) {
8207 _json["lastModifiedTime"] = (lastModifiedTime).toIso8601String();
8208 }
8209 if (lastModifierEmail != null) {
8210 _json["lastModifierEmail"] = lastModifierEmail;
8211 }
8212 if (name != null) {
8213 _json["name"] = name;
8214 }
8215 if (processingStatus != null) {
8216 _json["processingStatus"] = processingStatus;
8217 }
8218 if (projectId != null) {
8219 _json["projectId"] = projectId;
8220 }
8221 if (publishedAccessList != null) {
8222 _json["publishedAccessList"] = publishedAccessList;
8223 }
8224 if (schema != null) {
8225 _json["schema"] = (schema).toJson();
8226 }
8227 if (sourceEncoding != null) {
8228 _json["sourceEncoding"] = sourceEncoding;
8229 }
8230 if (tags != null) {
8231 _json["tags"] = tags;
8232 }
8233 if (writersCanEditPermissions != null) {
8234 _json["writersCanEditPermissions"] = writersCanEditPermissions;
8235 }
8236 return _json;
8237 }
8238 }
8239
8240 class TableColumn {
8241 /** The column name. */
8242 core.String name;
8243 /**
8244 * The type of data stored in this column.
8245 * Possible string values are:
8246 * - "datetime"
8247 * - "double"
8248 * - "integer"
8249 * - "lineStrings"
8250 * - "mixedGeometry"
8251 * - "points"
8252 * - "polygons"
8253 * - "string"
8254 */
8255 core.String type;
8256
8257 TableColumn();
8258
8259 TableColumn.fromJson(core.Map _json) {
8260 if (_json.containsKey("name")) {
8261 name = _json["name"];
8262 }
8263 if (_json.containsKey("type")) {
8264 type = _json["type"];
8265 }
8266 }
8267
8268 core.Map toJson() {
8269 var _json = new core.Map();
8270 if (name != null) {
8271 _json["name"] = name;
8272 }
8273 if (type != null) {
8274 _json["type"] = type;
8275 }
8276 return _json;
8277 }
8278 }
8279
8280 /**
8281 * The response returned by a call to tables.List. Note: The list response does
8282 * not include all the fields available in a table. Refer to the table resource
8283 * description for details of the fields that are not included. You'll need to
8284 * send a get request to retrieve the additional fields for each table.
8285 */
8286 class TablesListResponse {
8287 /** Next page token. */
8288 core.String nextPageToken;
8289 core.List<core.int> get nextPageTokenAsBytes {
8290 return crypto.CryptoUtils.base64StringToBytes(nextPageToken);
8291 }
8292
8293 void set nextPageTokenAsBytes(core.List<core.int> _bytes) {
8294 nextPageToken = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true);
8295 }
8296 /** Resources returned. */
8297 core.List<Table> tables;
8298
8299 TablesListResponse();
8300
8301 TablesListResponse.fromJson(core.Map _json) {
8302 if (_json.containsKey("nextPageToken")) {
8303 nextPageToken = _json["nextPageToken"];
8304 }
8305 if (_json.containsKey("tables")) {
8306 tables = _json["tables"].map((value) => new Table.fromJson(value)).toList( );
8307 }
8308 }
8309
8310 core.Map toJson() {
8311 var _json = new core.Map();
8312 if (nextPageToken != null) {
8313 _json["nextPageToken"] = nextPageToken;
8314 }
8315 if (tables != null) {
8316 _json["tables"] = tables.map((value) => (value).toJson()).toList();
8317 }
8318 return _json;
8319 }
8320 }
8321
8322 class Tags
8323 extends collection.ListBase<core.String> {
8324 final core.List<core.String> _inner;
8325
8326 Tags() : _inner = [];
8327
8328 Tags.fromJson(core.List json)
8329 : _inner = json.map((value) => value).toList();
8330
8331 core.List toJson() {
8332 return _inner.map((value) => value).toList();
8333 }
8334
8335 core.String operator [](core.int key) => _inner[key];
8336
8337 void operator []=(core.int key, core.String value) {
8338 _inner[key] = value;
8339 }
8340
8341 core.int get length => _inner.length;
8342
8343 void set length(core.int newLength) {
8344 _inner.length = newLength;
8345 }
8346 }
8347
8348 /**
8349 * Range of values used for scaling shapes. The min/max values will be drawn as
8350 * shapes with the min/max size.
8351 */
8352 class ValueRange {
8353 /** Maximum value. */
8354 core.double max;
8355 /** Minimum value. */
8356 core.double min;
8357
8358 ValueRange();
8359
8360 ValueRange.fromJson(core.Map _json) {
8361 if (_json.containsKey("max")) {
8362 max = _json["max"];
8363 }
8364 if (_json.containsKey("min")) {
8365 min = _json["min"];
8366 }
8367 }
8368
8369 core.Map toJson() {
8370 var _json = new core.Map();
8371 if (max != null) {
8372 _json["max"] = max;
8373 }
8374 if (min != null) {
8375 _json["min"] = min;
8376 }
8377 return _json;
8378 }
8379 }
8380
8381 /** A vector style contains styling information for vector layer. */
8382 class VectorStyle {
8383 core.List<DisplayRule> displayRules;
8384 /**
8385 * Individual feature info, this is called Info Window in Maps Engine UI. If
8386 * not provided, a default template with all attributes will be generated.
8387 */
8388 FeatureInfo featureInfo;
8389 /**
8390 * The type of the vector style. Currently, only displayRule is supported.
8391 * Possible string values are:
8392 * - "displayRule"
8393 */
8394 core.String type;
8395
8396 VectorStyle();
8397
8398 VectorStyle.fromJson(core.Map _json) {
8399 if (_json.containsKey("displayRules")) {
8400 displayRules = _json["displayRules"].map((value) => new DisplayRule.fromJs on(value)).toList();
8401 }
8402 if (_json.containsKey("featureInfo")) {
8403 featureInfo = new FeatureInfo.fromJson(_json["featureInfo"]);
8404 }
8405 if (_json.containsKey("type")) {
8406 type = _json["type"];
8407 }
8408 }
8409
8410 core.Map toJson() {
8411 var _json = new core.Map();
8412 if (displayRules != null) {
8413 _json["displayRules"] = displayRules.map((value) => (value).toJson()).toLi st();
8414 }
8415 if (featureInfo != null) {
8416 _json["featureInfo"] = (featureInfo).toJson();
8417 }
8418 if (type != null) {
8419 _json["type"] = type;
8420 }
8421 return _json;
8422 }
8423 }
8424
8425 /**
8426 * Zoom level range. Zoom levels are restricted between 0 and 24, inclusive.
8427 */
8428 class ZoomLevels {
8429 /** Maximum zoom level. */
8430 core.int max;
8431 /** Minimum zoom level. */
8432 core.int min;
8433
8434 ZoomLevels();
8435
8436 ZoomLevels.fromJson(core.Map _json) {
8437 if (_json.containsKey("max")) {
8438 max = _json["max"];
8439 }
8440 if (_json.containsKey("min")) {
8441 min = _json["min"];
8442 }
8443 }
8444
8445 core.Map toJson() {
8446 var _json = new core.Map();
8447 if (max != null) {
8448 _json["max"] = max;
8449 }
8450 if (min != null) {
8451 _json["min"] = min;
8452 }
8453 return _json;
8454 }
8455 }
OLDNEW
« no previous file with comments | « generated/googleapis/lib/identitytoolkit/v3.dart ('k') | generated/googleapis/lib/oauth2/v2.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698