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