OLD | NEW |
(Empty) | |
| 1 library googleapis_beta.dns.v1beta1; |
| 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 Cloud DNS API provides services for configuring and serving |
| 18 * authoritative DNS records. |
| 19 */ |
| 20 class DnsApi { |
| 21 /** View and manage your data across Google Cloud Platform services */ |
| 22 static const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platf
orm"; |
| 23 |
| 24 /** View your DNS records hosted by Google Cloud DNS */ |
| 25 static const NdevClouddnsReadonlyScope = "https://www.googleapis.com/auth/ndev
.clouddns.readonly"; |
| 26 |
| 27 /** View and manage your DNS records hosted by Google Cloud DNS */ |
| 28 static const NdevClouddnsReadwriteScope = "https://www.googleapis.com/auth/nde
v.clouddns.readwrite"; |
| 29 |
| 30 |
| 31 final common_internal.ApiRequester _requester; |
| 32 |
| 33 ChangesResourceApi get changes => new ChangesResourceApi(_requester); |
| 34 ManagedZonesResourceApi get managedZones => new ManagedZonesResourceApi(_reque
ster); |
| 35 ProjectsResourceApi get projects => new ProjectsResourceApi(_requester); |
| 36 ResourceRecordSetsResourceApi get resourceRecordSets => new ResourceRecordSets
ResourceApi(_requester); |
| 37 |
| 38 DnsApi(http.Client client) : |
| 39 _requester = new common_internal.ApiRequester(client, "https://www.googlea
pis.com/", "/dns/v1beta1/projects/"); |
| 40 } |
| 41 |
| 42 |
| 43 /** Not documented yet. */ |
| 44 class ChangesResourceApi { |
| 45 final common_internal.ApiRequester _requester; |
| 46 |
| 47 ChangesResourceApi(common_internal.ApiRequester client) : |
| 48 _requester = client; |
| 49 |
| 50 /** |
| 51 * Atomically update the ResourceRecordSet collection. |
| 52 * |
| 53 * [request] - The metadata request object. |
| 54 * |
| 55 * Request parameters: |
| 56 * |
| 57 * [project] - Identifies the project addressed by this request. |
| 58 * |
| 59 * [managedZone] - Identifies the managed zone addressed by this request. Can |
| 60 * be the managed zone name or id. |
| 61 * |
| 62 * Completes with a [Change]. |
| 63 * |
| 64 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 65 * error. |
| 66 * |
| 67 * If the used [http.Client] completes with an error when making a REST call, |
| 68 * this method will complete with the same error. |
| 69 */ |
| 70 async.Future<Change> create(Change request, core.String project, core.String m
anagedZone) { |
| 71 var _url = null; |
| 72 var _queryParams = new core.Map(); |
| 73 var _uploadMedia = null; |
| 74 var _uploadOptions = null; |
| 75 var _downloadOptions = common.DownloadOptions.Metadata; |
| 76 var _body = null; |
| 77 |
| 78 if (request != null) { |
| 79 _body = convert.JSON.encode((request).toJson()); |
| 80 } |
| 81 if (project == null) { |
| 82 throw new core.ArgumentError("Parameter project is required."); |
| 83 } |
| 84 if (managedZone == null) { |
| 85 throw new core.ArgumentError("Parameter managedZone is required."); |
| 86 } |
| 87 |
| 88 |
| 89 _url = common_internal.Escaper.ecapeVariable('$project') + '/managedZones/'
+ common_internal.Escaper.ecapeVariable('$managedZone') + '/changes'; |
| 90 |
| 91 var _response = _requester.request(_url, |
| 92 "POST", |
| 93 body: _body, |
| 94 queryParams: _queryParams, |
| 95 uploadOptions: _uploadOptions, |
| 96 uploadMedia: _uploadMedia, |
| 97 downloadOptions: _downloadOptions); |
| 98 return _response.then((data) => new Change.fromJson(data)); |
| 99 } |
| 100 |
| 101 /** |
| 102 * Fetch the representation of an existing Change. |
| 103 * |
| 104 * Request parameters: |
| 105 * |
| 106 * [project] - Identifies the project addressed by this request. |
| 107 * |
| 108 * [managedZone] - Identifies the managed zone addressed by this request. Can |
| 109 * be the managed zone name or id. |
| 110 * |
| 111 * [changeId] - The identifier of the requested change, from a previous |
| 112 * ResourceRecordSetsChangeResponse. |
| 113 * |
| 114 * Completes with a [Change]. |
| 115 * |
| 116 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 117 * error. |
| 118 * |
| 119 * If the used [http.Client] completes with an error when making a REST call, |
| 120 * this method will complete with the same error. |
| 121 */ |
| 122 async.Future<Change> get(core.String project, core.String managedZone, core.St
ring changeId) { |
| 123 var _url = null; |
| 124 var _queryParams = new core.Map(); |
| 125 var _uploadMedia = null; |
| 126 var _uploadOptions = null; |
| 127 var _downloadOptions = common.DownloadOptions.Metadata; |
| 128 var _body = null; |
| 129 |
| 130 if (project == null) { |
| 131 throw new core.ArgumentError("Parameter project is required."); |
| 132 } |
| 133 if (managedZone == null) { |
| 134 throw new core.ArgumentError("Parameter managedZone is required."); |
| 135 } |
| 136 if (changeId == null) { |
| 137 throw new core.ArgumentError("Parameter changeId is required."); |
| 138 } |
| 139 |
| 140 |
| 141 _url = common_internal.Escaper.ecapeVariable('$project') + '/managedZones/'
+ common_internal.Escaper.ecapeVariable('$managedZone') + '/changes/' + common_i
nternal.Escaper.ecapeVariable('$changeId'); |
| 142 |
| 143 var _response = _requester.request(_url, |
| 144 "GET", |
| 145 body: _body, |
| 146 queryParams: _queryParams, |
| 147 uploadOptions: _uploadOptions, |
| 148 uploadMedia: _uploadMedia, |
| 149 downloadOptions: _downloadOptions); |
| 150 return _response.then((data) => new Change.fromJson(data)); |
| 151 } |
| 152 |
| 153 /** |
| 154 * Enumerate Changes to a ResourceRecordSet collection. |
| 155 * |
| 156 * Request parameters: |
| 157 * |
| 158 * [project] - Identifies the project addressed by this request. |
| 159 * |
| 160 * [managedZone] - Identifies the managed zone addressed by this request. Can |
| 161 * be the managed zone name or id. |
| 162 * |
| 163 * [maxResults] - Optional. Maximum number of results to be returned. If |
| 164 * unspecified, the server will decide how many results to return. |
| 165 * |
| 166 * [pageToken] - Optional. A tag returned by a previous list request that was |
| 167 * truncated. Use this parameter to continue a previous list request. |
| 168 * |
| 169 * [sortBy] - Sorting criterion. The only supported value is change sequence. |
| 170 * Possible string values are: |
| 171 * - "changeSequence" |
| 172 * |
| 173 * [sortOrder] - Sorting order direction: 'ascending' or 'descending'. |
| 174 * |
| 175 * Completes with a [ChangesListResponse]. |
| 176 * |
| 177 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 178 * error. |
| 179 * |
| 180 * If the used [http.Client] completes with an error when making a REST call, |
| 181 * this method will complete with the same error. |
| 182 */ |
| 183 async.Future<ChangesListResponse> list(core.String project, core.String manage
dZone, {core.int maxResults, core.String pageToken, core.String sortBy, core.Str
ing sortOrder}) { |
| 184 var _url = null; |
| 185 var _queryParams = new core.Map(); |
| 186 var _uploadMedia = null; |
| 187 var _uploadOptions = null; |
| 188 var _downloadOptions = common.DownloadOptions.Metadata; |
| 189 var _body = null; |
| 190 |
| 191 if (project == null) { |
| 192 throw new core.ArgumentError("Parameter project is required."); |
| 193 } |
| 194 if (managedZone == null) { |
| 195 throw new core.ArgumentError("Parameter managedZone is required."); |
| 196 } |
| 197 if (maxResults != null) { |
| 198 _queryParams["maxResults"] = ["${maxResults}"]; |
| 199 } |
| 200 if (pageToken != null) { |
| 201 _queryParams["pageToken"] = [pageToken]; |
| 202 } |
| 203 if (sortBy != null) { |
| 204 _queryParams["sortBy"] = [sortBy]; |
| 205 } |
| 206 if (sortOrder != null) { |
| 207 _queryParams["sortOrder"] = [sortOrder]; |
| 208 } |
| 209 |
| 210 |
| 211 _url = common_internal.Escaper.ecapeVariable('$project') + '/managedZones/'
+ common_internal.Escaper.ecapeVariable('$managedZone') + '/changes'; |
| 212 |
| 213 var _response = _requester.request(_url, |
| 214 "GET", |
| 215 body: _body, |
| 216 queryParams: _queryParams, |
| 217 uploadOptions: _uploadOptions, |
| 218 uploadMedia: _uploadMedia, |
| 219 downloadOptions: _downloadOptions); |
| 220 return _response.then((data) => new ChangesListResponse.fromJson(data)); |
| 221 } |
| 222 |
| 223 } |
| 224 |
| 225 |
| 226 /** Not documented yet. */ |
| 227 class ManagedZonesResourceApi { |
| 228 final common_internal.ApiRequester _requester; |
| 229 |
| 230 ManagedZonesResourceApi(common_internal.ApiRequester client) : |
| 231 _requester = client; |
| 232 |
| 233 /** |
| 234 * Create a new ManagedZone. |
| 235 * |
| 236 * [request] - The metadata request object. |
| 237 * |
| 238 * Request parameters: |
| 239 * |
| 240 * [project] - Identifies the project addressed by this request. |
| 241 * |
| 242 * Completes with a [ManagedZone]. |
| 243 * |
| 244 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 245 * error. |
| 246 * |
| 247 * If the used [http.Client] completes with an error when making a REST call, |
| 248 * this method will complete with the same error. |
| 249 */ |
| 250 async.Future<ManagedZone> create(ManagedZone request, core.String project) { |
| 251 var _url = null; |
| 252 var _queryParams = new core.Map(); |
| 253 var _uploadMedia = null; |
| 254 var _uploadOptions = null; |
| 255 var _downloadOptions = common.DownloadOptions.Metadata; |
| 256 var _body = null; |
| 257 |
| 258 if (request != null) { |
| 259 _body = convert.JSON.encode((request).toJson()); |
| 260 } |
| 261 if (project == null) { |
| 262 throw new core.ArgumentError("Parameter project is required."); |
| 263 } |
| 264 |
| 265 |
| 266 _url = common_internal.Escaper.ecapeVariable('$project') + '/managedZones'; |
| 267 |
| 268 var _response = _requester.request(_url, |
| 269 "POST", |
| 270 body: _body, |
| 271 queryParams: _queryParams, |
| 272 uploadOptions: _uploadOptions, |
| 273 uploadMedia: _uploadMedia, |
| 274 downloadOptions: _downloadOptions); |
| 275 return _response.then((data) => new ManagedZone.fromJson(data)); |
| 276 } |
| 277 |
| 278 /** |
| 279 * Delete a previously created ManagedZone. |
| 280 * |
| 281 * Request parameters: |
| 282 * |
| 283 * [project] - Identifies the project addressed by this request. |
| 284 * |
| 285 * [managedZone] - Identifies the managed zone addressed by this request. Can |
| 286 * be the managed zone name or id. |
| 287 * |
| 288 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 289 * error. |
| 290 * |
| 291 * If the used [http.Client] completes with an error when making a REST call, |
| 292 * this method will complete with the same error. |
| 293 */ |
| 294 async.Future delete(core.String project, core.String managedZone) { |
| 295 var _url = null; |
| 296 var _queryParams = new core.Map(); |
| 297 var _uploadMedia = null; |
| 298 var _uploadOptions = null; |
| 299 var _downloadOptions = common.DownloadOptions.Metadata; |
| 300 var _body = null; |
| 301 |
| 302 if (project == null) { |
| 303 throw new core.ArgumentError("Parameter project is required."); |
| 304 } |
| 305 if (managedZone == null) { |
| 306 throw new core.ArgumentError("Parameter managedZone is required."); |
| 307 } |
| 308 |
| 309 _downloadOptions = null; |
| 310 |
| 311 _url = common_internal.Escaper.ecapeVariable('$project') + '/managedZones/'
+ common_internal.Escaper.ecapeVariable('$managedZone'); |
| 312 |
| 313 var _response = _requester.request(_url, |
| 314 "DELETE", |
| 315 body: _body, |
| 316 queryParams: _queryParams, |
| 317 uploadOptions: _uploadOptions, |
| 318 uploadMedia: _uploadMedia, |
| 319 downloadOptions: _downloadOptions); |
| 320 return _response.then((data) => null); |
| 321 } |
| 322 |
| 323 /** |
| 324 * Fetch the representation of an existing ManagedZone. |
| 325 * |
| 326 * Request parameters: |
| 327 * |
| 328 * [project] - Identifies the project addressed by this request. |
| 329 * |
| 330 * [managedZone] - Identifies the managed zone addressed by this request. Can |
| 331 * be the managed zone name or id. |
| 332 * |
| 333 * Completes with a [ManagedZone]. |
| 334 * |
| 335 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 336 * error. |
| 337 * |
| 338 * If the used [http.Client] completes with an error when making a REST call, |
| 339 * this method will complete with the same error. |
| 340 */ |
| 341 async.Future<ManagedZone> get(core.String project, core.String managedZone) { |
| 342 var _url = null; |
| 343 var _queryParams = new core.Map(); |
| 344 var _uploadMedia = null; |
| 345 var _uploadOptions = null; |
| 346 var _downloadOptions = common.DownloadOptions.Metadata; |
| 347 var _body = null; |
| 348 |
| 349 if (project == null) { |
| 350 throw new core.ArgumentError("Parameter project is required."); |
| 351 } |
| 352 if (managedZone == null) { |
| 353 throw new core.ArgumentError("Parameter managedZone is required."); |
| 354 } |
| 355 |
| 356 |
| 357 _url = common_internal.Escaper.ecapeVariable('$project') + '/managedZones/'
+ common_internal.Escaper.ecapeVariable('$managedZone'); |
| 358 |
| 359 var _response = _requester.request(_url, |
| 360 "GET", |
| 361 body: _body, |
| 362 queryParams: _queryParams, |
| 363 uploadOptions: _uploadOptions, |
| 364 uploadMedia: _uploadMedia, |
| 365 downloadOptions: _downloadOptions); |
| 366 return _response.then((data) => new ManagedZone.fromJson(data)); |
| 367 } |
| 368 |
| 369 /** |
| 370 * Enumerate ManagedZones that have been created but not yet deleted. |
| 371 * |
| 372 * Request parameters: |
| 373 * |
| 374 * [project] - Identifies the project addressed by this request. |
| 375 * |
| 376 * [maxResults] - Optional. Maximum number of results to be returned. If |
| 377 * unspecified, the server will decide how many results to return. |
| 378 * |
| 379 * [pageToken] - Optional. A tag returned by a previous list request that was |
| 380 * truncated. Use this parameter to continue a previous list request. |
| 381 * |
| 382 * Completes with a [ManagedZonesListResponse]. |
| 383 * |
| 384 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 385 * error. |
| 386 * |
| 387 * If the used [http.Client] completes with an error when making a REST call, |
| 388 * this method will complete with the same error. |
| 389 */ |
| 390 async.Future<ManagedZonesListResponse> list(core.String project, {core.int max
Results, core.String pageToken}) { |
| 391 var _url = null; |
| 392 var _queryParams = new core.Map(); |
| 393 var _uploadMedia = null; |
| 394 var _uploadOptions = null; |
| 395 var _downloadOptions = common.DownloadOptions.Metadata; |
| 396 var _body = null; |
| 397 |
| 398 if (project == null) { |
| 399 throw new core.ArgumentError("Parameter project is required."); |
| 400 } |
| 401 if (maxResults != null) { |
| 402 _queryParams["maxResults"] = ["${maxResults}"]; |
| 403 } |
| 404 if (pageToken != null) { |
| 405 _queryParams["pageToken"] = [pageToken]; |
| 406 } |
| 407 |
| 408 |
| 409 _url = common_internal.Escaper.ecapeVariable('$project') + '/managedZones'; |
| 410 |
| 411 var _response = _requester.request(_url, |
| 412 "GET", |
| 413 body: _body, |
| 414 queryParams: _queryParams, |
| 415 uploadOptions: _uploadOptions, |
| 416 uploadMedia: _uploadMedia, |
| 417 downloadOptions: _downloadOptions); |
| 418 return _response.then((data) => new ManagedZonesListResponse.fromJson(data))
; |
| 419 } |
| 420 |
| 421 } |
| 422 |
| 423 |
| 424 /** Not documented yet. */ |
| 425 class ProjectsResourceApi { |
| 426 final common_internal.ApiRequester _requester; |
| 427 |
| 428 ProjectsResourceApi(common_internal.ApiRequester client) : |
| 429 _requester = client; |
| 430 |
| 431 /** |
| 432 * Fetch the representation of an existing Project. |
| 433 * |
| 434 * Request parameters: |
| 435 * |
| 436 * [project] - Identifies the project addressed by this request. |
| 437 * |
| 438 * Completes with a [Project]. |
| 439 * |
| 440 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 441 * error. |
| 442 * |
| 443 * If the used [http.Client] completes with an error when making a REST call, |
| 444 * this method will complete with the same error. |
| 445 */ |
| 446 async.Future<Project> get(core.String project) { |
| 447 var _url = null; |
| 448 var _queryParams = new core.Map(); |
| 449 var _uploadMedia = null; |
| 450 var _uploadOptions = null; |
| 451 var _downloadOptions = common.DownloadOptions.Metadata; |
| 452 var _body = null; |
| 453 |
| 454 if (project == null) { |
| 455 throw new core.ArgumentError("Parameter project is required."); |
| 456 } |
| 457 |
| 458 |
| 459 _url = common_internal.Escaper.ecapeVariable('$project'); |
| 460 |
| 461 var _response = _requester.request(_url, |
| 462 "GET", |
| 463 body: _body, |
| 464 queryParams: _queryParams, |
| 465 uploadOptions: _uploadOptions, |
| 466 uploadMedia: _uploadMedia, |
| 467 downloadOptions: _downloadOptions); |
| 468 return _response.then((data) => new Project.fromJson(data)); |
| 469 } |
| 470 |
| 471 } |
| 472 |
| 473 |
| 474 /** Not documented yet. */ |
| 475 class ResourceRecordSetsResourceApi { |
| 476 final common_internal.ApiRequester _requester; |
| 477 |
| 478 ResourceRecordSetsResourceApi(common_internal.ApiRequester client) : |
| 479 _requester = client; |
| 480 |
| 481 /** |
| 482 * Enumerate ResourceRecordSets that have been created but not yet deleted. |
| 483 * |
| 484 * Request parameters: |
| 485 * |
| 486 * [project] - Identifies the project addressed by this request. |
| 487 * |
| 488 * [managedZone] - Identifies the managed zone addressed by this request. Can |
| 489 * be the managed zone name or id. |
| 490 * |
| 491 * [maxResults] - Optional. Maximum number of results to be returned. If |
| 492 * unspecified, the server will decide how many results to return. |
| 493 * |
| 494 * [name] - Restricts the list to return only records with this fully |
| 495 * qualified domain name. |
| 496 * |
| 497 * [pageToken] - Optional. A tag returned by a previous list request that was |
| 498 * truncated. Use this parameter to continue a previous list request. |
| 499 * |
| 500 * [type] - Restricts the list to return only records of this type. If |
| 501 * present, the "name" parameter must also be present. |
| 502 * |
| 503 * Completes with a [ResourceRecordSetsListResponse]. |
| 504 * |
| 505 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 506 * error. |
| 507 * |
| 508 * If the used [http.Client] completes with an error when making a REST call, |
| 509 * this method will complete with the same error. |
| 510 */ |
| 511 async.Future<ResourceRecordSetsListResponse> list(core.String project, core.St
ring managedZone, {core.int maxResults, core.String name, core.String pageToken,
core.String type}) { |
| 512 var _url = null; |
| 513 var _queryParams = new core.Map(); |
| 514 var _uploadMedia = null; |
| 515 var _uploadOptions = null; |
| 516 var _downloadOptions = common.DownloadOptions.Metadata; |
| 517 var _body = null; |
| 518 |
| 519 if (project == null) { |
| 520 throw new core.ArgumentError("Parameter project is required."); |
| 521 } |
| 522 if (managedZone == null) { |
| 523 throw new core.ArgumentError("Parameter managedZone is required."); |
| 524 } |
| 525 if (maxResults != null) { |
| 526 _queryParams["maxResults"] = ["${maxResults}"]; |
| 527 } |
| 528 if (name != null) { |
| 529 _queryParams["name"] = [name]; |
| 530 } |
| 531 if (pageToken != null) { |
| 532 _queryParams["pageToken"] = [pageToken]; |
| 533 } |
| 534 if (type != null) { |
| 535 _queryParams["type"] = [type]; |
| 536 } |
| 537 |
| 538 |
| 539 _url = common_internal.Escaper.ecapeVariable('$project') + '/managedZones/'
+ common_internal.Escaper.ecapeVariable('$managedZone') + '/rrsets'; |
| 540 |
| 541 var _response = _requester.request(_url, |
| 542 "GET", |
| 543 body: _body, |
| 544 queryParams: _queryParams, |
| 545 uploadOptions: _uploadOptions, |
| 546 uploadMedia: _uploadMedia, |
| 547 downloadOptions: _downloadOptions); |
| 548 return _response.then((data) => new ResourceRecordSetsListResponse.fromJson(
data)); |
| 549 } |
| 550 |
| 551 } |
| 552 |
| 553 |
| 554 |
| 555 /** An atomic update to a collection of ResourceRecordSets. */ |
| 556 class Change { |
| 557 /** Which ResourceRecordSets to add? */ |
| 558 core.List<ResourceRecordSet> additions; |
| 559 |
| 560 /** Which ResourceRecordSets to remove? Must match existing data exactly. */ |
| 561 core.List<ResourceRecordSet> deletions; |
| 562 |
| 563 /** |
| 564 * Unique identifier for the resource; defined by the server (output only). |
| 565 */ |
| 566 core.String id; |
| 567 |
| 568 /** |
| 569 * Identifies what kind of resource this is. Value: the fixed string |
| 570 * "dns#change". |
| 571 */ |
| 572 core.String kind; |
| 573 |
| 574 /** |
| 575 * The time that this operation was started by the server. This is in RFC3339 |
| 576 * text format. |
| 577 */ |
| 578 core.String startTime; |
| 579 |
| 580 /** |
| 581 * Status of the operation. Can be one of the following: "PENDING" or "DONE" |
| 582 * (output only). |
| 583 */ |
| 584 core.String status; |
| 585 |
| 586 |
| 587 Change(); |
| 588 |
| 589 Change.fromJson(core.Map _json) { |
| 590 if (_json.containsKey("additions")) { |
| 591 additions = _json["additions"].map((value) => new ResourceRecordSet.fromJs
on(value)).toList(); |
| 592 } |
| 593 if (_json.containsKey("deletions")) { |
| 594 deletions = _json["deletions"].map((value) => new ResourceRecordSet.fromJs
on(value)).toList(); |
| 595 } |
| 596 if (_json.containsKey("id")) { |
| 597 id = _json["id"]; |
| 598 } |
| 599 if (_json.containsKey("kind")) { |
| 600 kind = _json["kind"]; |
| 601 } |
| 602 if (_json.containsKey("startTime")) { |
| 603 startTime = _json["startTime"]; |
| 604 } |
| 605 if (_json.containsKey("status")) { |
| 606 status = _json["status"]; |
| 607 } |
| 608 } |
| 609 |
| 610 core.Map toJson() { |
| 611 var _json = new core.Map(); |
| 612 if (additions != null) { |
| 613 _json["additions"] = additions.map((value) => (value).toJson()).toList(); |
| 614 } |
| 615 if (deletions != null) { |
| 616 _json["deletions"] = deletions.map((value) => (value).toJson()).toList(); |
| 617 } |
| 618 if (id != null) { |
| 619 _json["id"] = id; |
| 620 } |
| 621 if (kind != null) { |
| 622 _json["kind"] = kind; |
| 623 } |
| 624 if (startTime != null) { |
| 625 _json["startTime"] = startTime; |
| 626 } |
| 627 if (status != null) { |
| 628 _json["status"] = status; |
| 629 } |
| 630 return _json; |
| 631 } |
| 632 } |
| 633 |
| 634 |
| 635 /** |
| 636 * The response to a request to enumerate Changes to a ResourceRecordSets |
| 637 * collection. |
| 638 */ |
| 639 class ChangesListResponse { |
| 640 /** The requested changes. */ |
| 641 core.List<Change> changes; |
| 642 |
| 643 /** Type of resource. */ |
| 644 core.String kind; |
| 645 |
| 646 /** |
| 647 * The presence of this field indicates that there exist more results |
| 648 * following your last page of results in pagination order. To fetch them, |
| 649 * make another list request using this value as your pagination token. |
| 650 * |
| 651 * In this way you can retrieve the complete contents of even very large |
| 652 * collections one page at a time. However, if the contents of the collection |
| 653 * change between the first and last paginated list request, the set of all |
| 654 * elements returned will be an inconsistent view of the collection. There is |
| 655 * no way to retrieve a "snapshot" of collections larger than the maximum page |
| 656 * size. |
| 657 */ |
| 658 core.String nextPageToken; |
| 659 |
| 660 |
| 661 ChangesListResponse(); |
| 662 |
| 663 ChangesListResponse.fromJson(core.Map _json) { |
| 664 if (_json.containsKey("changes")) { |
| 665 changes = _json["changes"].map((value) => new Change.fromJson(value)).toLi
st(); |
| 666 } |
| 667 if (_json.containsKey("kind")) { |
| 668 kind = _json["kind"]; |
| 669 } |
| 670 if (_json.containsKey("nextPageToken")) { |
| 671 nextPageToken = _json["nextPageToken"]; |
| 672 } |
| 673 } |
| 674 |
| 675 core.Map toJson() { |
| 676 var _json = new core.Map(); |
| 677 if (changes != null) { |
| 678 _json["changes"] = changes.map((value) => (value).toJson()).toList(); |
| 679 } |
| 680 if (kind != null) { |
| 681 _json["kind"] = kind; |
| 682 } |
| 683 if (nextPageToken != null) { |
| 684 _json["nextPageToken"] = nextPageToken; |
| 685 } |
| 686 return _json; |
| 687 } |
| 688 } |
| 689 |
| 690 |
| 691 /** |
| 692 * A zone is a subtree of the DNS namespace under one administrative |
| 693 * responsibility. A ManagedZone is a resource that represents a DNS zone hosted |
| 694 * by the Cloud DNS service. |
| 695 */ |
| 696 class ManagedZone { |
| 697 /** |
| 698 * The time that this resource was created on the server. This is in RFC3339 |
| 699 * text format. Output only. |
| 700 */ |
| 701 core.String creationTime; |
| 702 |
| 703 /** |
| 704 * A string to associate with this resource for the user's convenience. Has no |
| 705 * effect on the managed zone's function. |
| 706 */ |
| 707 core.String description; |
| 708 |
| 709 /** The DNS name of this managed zone, for instance "example.com.". */ |
| 710 core.String dnsName; |
| 711 |
| 712 /** |
| 713 * Unique identifier for the resource; defined by the server (output only) |
| 714 */ |
| 715 core.String id; |
| 716 |
| 717 /** |
| 718 * Identifies what kind of resource this is. Value: the fixed string |
| 719 * "dns#managedZone". |
| 720 */ |
| 721 core.String kind; |
| 722 |
| 723 /** |
| 724 * User assigned name for this resource. Must be unique within the project. |
| 725 */ |
| 726 core.String name; |
| 727 |
| 728 /** |
| 729 * Delegate your managed_zone to these virtual name servers; defined by the |
| 730 * server (output only) |
| 731 */ |
| 732 core.List<core.String> nameServers; |
| 733 |
| 734 |
| 735 ManagedZone(); |
| 736 |
| 737 ManagedZone.fromJson(core.Map _json) { |
| 738 if (_json.containsKey("creationTime")) { |
| 739 creationTime = _json["creationTime"]; |
| 740 } |
| 741 if (_json.containsKey("description")) { |
| 742 description = _json["description"]; |
| 743 } |
| 744 if (_json.containsKey("dnsName")) { |
| 745 dnsName = _json["dnsName"]; |
| 746 } |
| 747 if (_json.containsKey("id")) { |
| 748 id = _json["id"]; |
| 749 } |
| 750 if (_json.containsKey("kind")) { |
| 751 kind = _json["kind"]; |
| 752 } |
| 753 if (_json.containsKey("name")) { |
| 754 name = _json["name"]; |
| 755 } |
| 756 if (_json.containsKey("nameServers")) { |
| 757 nameServers = _json["nameServers"]; |
| 758 } |
| 759 } |
| 760 |
| 761 core.Map toJson() { |
| 762 var _json = new core.Map(); |
| 763 if (creationTime != null) { |
| 764 _json["creationTime"] = creationTime; |
| 765 } |
| 766 if (description != null) { |
| 767 _json["description"] = description; |
| 768 } |
| 769 if (dnsName != null) { |
| 770 _json["dnsName"] = dnsName; |
| 771 } |
| 772 if (id != null) { |
| 773 _json["id"] = id; |
| 774 } |
| 775 if (kind != null) { |
| 776 _json["kind"] = kind; |
| 777 } |
| 778 if (name != null) { |
| 779 _json["name"] = name; |
| 780 } |
| 781 if (nameServers != null) { |
| 782 _json["nameServers"] = nameServers; |
| 783 } |
| 784 return _json; |
| 785 } |
| 786 } |
| 787 |
| 788 |
| 789 /** Not documented yet. */ |
| 790 class ManagedZonesListResponse { |
| 791 /** Type of resource. */ |
| 792 core.String kind; |
| 793 |
| 794 /** The managed zone resources. */ |
| 795 core.List<ManagedZone> managedZones; |
| 796 |
| 797 /** |
| 798 * The presence of this field indicates that there exist more results |
| 799 * following your last page of results in pagination order. To fetch them, |
| 800 * make another list request using this value as your page token. |
| 801 * |
| 802 * In this way you can retrieve the complete contents of even very large |
| 803 * collections one page at a time. However, if the contents of the collection |
| 804 * change between the first and last paginated list request, the set of all |
| 805 * elements returned will be an inconsistent view of the collection. There is |
| 806 * no way to retrieve a consistent snapshot of a collection larger than the |
| 807 * maximum page size. |
| 808 */ |
| 809 core.String nextPageToken; |
| 810 |
| 811 |
| 812 ManagedZonesListResponse(); |
| 813 |
| 814 ManagedZonesListResponse.fromJson(core.Map _json) { |
| 815 if (_json.containsKey("kind")) { |
| 816 kind = _json["kind"]; |
| 817 } |
| 818 if (_json.containsKey("managedZones")) { |
| 819 managedZones = _json["managedZones"].map((value) => new ManagedZone.fromJs
on(value)).toList(); |
| 820 } |
| 821 if (_json.containsKey("nextPageToken")) { |
| 822 nextPageToken = _json["nextPageToken"]; |
| 823 } |
| 824 } |
| 825 |
| 826 core.Map toJson() { |
| 827 var _json = new core.Map(); |
| 828 if (kind != null) { |
| 829 _json["kind"] = kind; |
| 830 } |
| 831 if (managedZones != null) { |
| 832 _json["managedZones"] = managedZones.map((value) => (value).toJson()).toLi
st(); |
| 833 } |
| 834 if (nextPageToken != null) { |
| 835 _json["nextPageToken"] = nextPageToken; |
| 836 } |
| 837 return _json; |
| 838 } |
| 839 } |
| 840 |
| 841 |
| 842 /** |
| 843 * A project resource. The project is a top level container for resources |
| 844 * including Cloud DNS ManagedZones. Projects can be created only in the APIs |
| 845 * console. |
| 846 */ |
| 847 class Project { |
| 848 /** User assigned unique identifier for the resource (output only). */ |
| 849 core.String id; |
| 850 |
| 851 /** |
| 852 * Identifies what kind of resource this is. Value: the fixed string |
| 853 * "dns#project". |
| 854 */ |
| 855 core.String kind; |
| 856 |
| 857 /** |
| 858 * Unique numeric identifier for the resource; defined by the server (output |
| 859 * only). |
| 860 */ |
| 861 core.String number; |
| 862 |
| 863 /** Quotas assigned to this project (output only). */ |
| 864 Quota quota; |
| 865 |
| 866 |
| 867 Project(); |
| 868 |
| 869 Project.fromJson(core.Map _json) { |
| 870 if (_json.containsKey("id")) { |
| 871 id = _json["id"]; |
| 872 } |
| 873 if (_json.containsKey("kind")) { |
| 874 kind = _json["kind"]; |
| 875 } |
| 876 if (_json.containsKey("number")) { |
| 877 number = _json["number"]; |
| 878 } |
| 879 if (_json.containsKey("quota")) { |
| 880 quota = new Quota.fromJson(_json["quota"]); |
| 881 } |
| 882 } |
| 883 |
| 884 core.Map toJson() { |
| 885 var _json = new core.Map(); |
| 886 if (id != null) { |
| 887 _json["id"] = id; |
| 888 } |
| 889 if (kind != null) { |
| 890 _json["kind"] = kind; |
| 891 } |
| 892 if (number != null) { |
| 893 _json["number"] = number; |
| 894 } |
| 895 if (quota != null) { |
| 896 _json["quota"] = (quota).toJson(); |
| 897 } |
| 898 return _json; |
| 899 } |
| 900 } |
| 901 |
| 902 |
| 903 /** Limits associated with a Project. */ |
| 904 class Quota { |
| 905 /** |
| 906 * Identifies what kind of resource this is. Value: the fixed string |
| 907 * "dns#quota". |
| 908 */ |
| 909 core.String kind; |
| 910 |
| 911 /** Maximum allowed number of managed zones in the project. */ |
| 912 core.int managedZones; |
| 913 |
| 914 /** Maximum allowed number of ResourceRecords per ResourceRecordSet. */ |
| 915 core.int resourceRecordsPerRrset; |
| 916 |
| 917 /** |
| 918 * Maximum allowed number of ResourceRecordSets to add per |
| 919 * ChangesCreateRequest. |
| 920 */ |
| 921 core.int rrsetAdditionsPerChange; |
| 922 |
| 923 /** |
| 924 * Maximum allowed number of ResourceRecordSets to delete per |
| 925 * ChangesCreateRequest. |
| 926 */ |
| 927 core.int rrsetDeletionsPerChange; |
| 928 |
| 929 /** Maximum allowed number of ResourceRecordSets per zone in the project. */ |
| 930 core.int rrsetsPerManagedZone; |
| 931 |
| 932 /** |
| 933 * Maximum allowed size for total rrdata in one ChangesCreateRequest in bytes. |
| 934 */ |
| 935 core.int totalRrdataSizePerChange; |
| 936 |
| 937 |
| 938 Quota(); |
| 939 |
| 940 Quota.fromJson(core.Map _json) { |
| 941 if (_json.containsKey("kind")) { |
| 942 kind = _json["kind"]; |
| 943 } |
| 944 if (_json.containsKey("managedZones")) { |
| 945 managedZones = _json["managedZones"]; |
| 946 } |
| 947 if (_json.containsKey("resourceRecordsPerRrset")) { |
| 948 resourceRecordsPerRrset = _json["resourceRecordsPerRrset"]; |
| 949 } |
| 950 if (_json.containsKey("rrsetAdditionsPerChange")) { |
| 951 rrsetAdditionsPerChange = _json["rrsetAdditionsPerChange"]; |
| 952 } |
| 953 if (_json.containsKey("rrsetDeletionsPerChange")) { |
| 954 rrsetDeletionsPerChange = _json["rrsetDeletionsPerChange"]; |
| 955 } |
| 956 if (_json.containsKey("rrsetsPerManagedZone")) { |
| 957 rrsetsPerManagedZone = _json["rrsetsPerManagedZone"]; |
| 958 } |
| 959 if (_json.containsKey("totalRrdataSizePerChange")) { |
| 960 totalRrdataSizePerChange = _json["totalRrdataSizePerChange"]; |
| 961 } |
| 962 } |
| 963 |
| 964 core.Map toJson() { |
| 965 var _json = new core.Map(); |
| 966 if (kind != null) { |
| 967 _json["kind"] = kind; |
| 968 } |
| 969 if (managedZones != null) { |
| 970 _json["managedZones"] = managedZones; |
| 971 } |
| 972 if (resourceRecordsPerRrset != null) { |
| 973 _json["resourceRecordsPerRrset"] = resourceRecordsPerRrset; |
| 974 } |
| 975 if (rrsetAdditionsPerChange != null) { |
| 976 _json["rrsetAdditionsPerChange"] = rrsetAdditionsPerChange; |
| 977 } |
| 978 if (rrsetDeletionsPerChange != null) { |
| 979 _json["rrsetDeletionsPerChange"] = rrsetDeletionsPerChange; |
| 980 } |
| 981 if (rrsetsPerManagedZone != null) { |
| 982 _json["rrsetsPerManagedZone"] = rrsetsPerManagedZone; |
| 983 } |
| 984 if (totalRrdataSizePerChange != null) { |
| 985 _json["totalRrdataSizePerChange"] = totalRrdataSizePerChange; |
| 986 } |
| 987 return _json; |
| 988 } |
| 989 } |
| 990 |
| 991 |
| 992 /** A unit of data that will be returned by the DNS servers. */ |
| 993 class ResourceRecordSet { |
| 994 /** |
| 995 * Identifies what kind of resource this is. Value: the fixed string |
| 996 * "dns#resourceRecordSet". |
| 997 */ |
| 998 core.String kind; |
| 999 |
| 1000 /** For example, www.example.com. */ |
| 1001 core.String name; |
| 1002 |
| 1003 /** As defined in RFC 1035 (section 5) and RFC 1034 (section 3.6.1) */ |
| 1004 core.List<core.String> rrdatas; |
| 1005 |
| 1006 /** |
| 1007 * Number of seconds that this ResourceRecordSet can be cached by resolvers. |
| 1008 */ |
| 1009 core.int ttl; |
| 1010 |
| 1011 /** One of A, AAAA, SOA, MX, NS, TXT */ |
| 1012 core.String type; |
| 1013 |
| 1014 |
| 1015 ResourceRecordSet(); |
| 1016 |
| 1017 ResourceRecordSet.fromJson(core.Map _json) { |
| 1018 if (_json.containsKey("kind")) { |
| 1019 kind = _json["kind"]; |
| 1020 } |
| 1021 if (_json.containsKey("name")) { |
| 1022 name = _json["name"]; |
| 1023 } |
| 1024 if (_json.containsKey("rrdatas")) { |
| 1025 rrdatas = _json["rrdatas"]; |
| 1026 } |
| 1027 if (_json.containsKey("ttl")) { |
| 1028 ttl = _json["ttl"]; |
| 1029 } |
| 1030 if (_json.containsKey("type")) { |
| 1031 type = _json["type"]; |
| 1032 } |
| 1033 } |
| 1034 |
| 1035 core.Map toJson() { |
| 1036 var _json = new core.Map(); |
| 1037 if (kind != null) { |
| 1038 _json["kind"] = kind; |
| 1039 } |
| 1040 if (name != null) { |
| 1041 _json["name"] = name; |
| 1042 } |
| 1043 if (rrdatas != null) { |
| 1044 _json["rrdatas"] = rrdatas; |
| 1045 } |
| 1046 if (ttl != null) { |
| 1047 _json["ttl"] = ttl; |
| 1048 } |
| 1049 if (type != null) { |
| 1050 _json["type"] = type; |
| 1051 } |
| 1052 return _json; |
| 1053 } |
| 1054 } |
| 1055 |
| 1056 |
| 1057 /** Not documented yet. */ |
| 1058 class ResourceRecordSetsListResponse { |
| 1059 /** Type of resource. */ |
| 1060 core.String kind; |
| 1061 |
| 1062 /** |
| 1063 * The presence of this field indicates that there exist more results |
| 1064 * following your last page of results in pagination order. To fetch them, |
| 1065 * make another list request using this value as your pagination token. |
| 1066 * |
| 1067 * In this way you can retrieve the complete contents of even very large |
| 1068 * collections one page at a time. However, if the contents of the collection |
| 1069 * change between the first and last paginated list request, the set of all |
| 1070 * elements returned will be an inconsistent view of the collection. There is |
| 1071 * no way to retrieve a consistent snapshot of a collection larger than the |
| 1072 * maximum page size. |
| 1073 */ |
| 1074 core.String nextPageToken; |
| 1075 |
| 1076 /** The resource record set resources. */ |
| 1077 core.List<ResourceRecordSet> rrsets; |
| 1078 |
| 1079 |
| 1080 ResourceRecordSetsListResponse(); |
| 1081 |
| 1082 ResourceRecordSetsListResponse.fromJson(core.Map _json) { |
| 1083 if (_json.containsKey("kind")) { |
| 1084 kind = _json["kind"]; |
| 1085 } |
| 1086 if (_json.containsKey("nextPageToken")) { |
| 1087 nextPageToken = _json["nextPageToken"]; |
| 1088 } |
| 1089 if (_json.containsKey("rrsets")) { |
| 1090 rrsets = _json["rrsets"].map((value) => new ResourceRecordSet.fromJson(val
ue)).toList(); |
| 1091 } |
| 1092 } |
| 1093 |
| 1094 core.Map toJson() { |
| 1095 var _json = new core.Map(); |
| 1096 if (kind != null) { |
| 1097 _json["kind"] = kind; |
| 1098 } |
| 1099 if (nextPageToken != null) { |
| 1100 _json["nextPageToken"] = nextPageToken; |
| 1101 } |
| 1102 if (rrsets != null) { |
| 1103 _json["rrsets"] = rrsets.map((value) => (value).toJson()).toList(); |
| 1104 } |
| 1105 return _json; |
| 1106 } |
| 1107 } |
| 1108 |
| 1109 |
OLD | NEW |