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

Side by Side Diff: generated/googleapis_beta/lib/dns/v2beta1.dart

Issue 2039113004: Api-roll 37: 2016-06-06 (Closed) Base URL: git@github.com:dart-lang/googleapis.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // This is a generated file (see the discoveryapis_generator project).
2
3 library googleapis_beta.dns.v2beta1;
4
5 import 'dart:core' as core;
6 import 'dart:async' as async;
7 import 'dart:convert' as convert;
8
9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons;
10 import 'package:http/http.dart' as http;
11
12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show
13 ApiRequestError, DetailedApiRequestError;
14
15 const core.String USER_AGENT = 'dart-api-client dns/v2beta1';
16
17 /** Configures and serves authoritative DNS records. */
18 class DnsApi {
19 /** View and manage your data across Google Cloud Platform services */
20 static const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platf orm";
21
22 /** View your data across Google Cloud Platform services */
23 static const CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/clo ud-platform.read-only";
24
25 /** View your DNS records hosted by Google Cloud DNS */
26 static const NdevClouddnsReadonlyScope = "https://www.googleapis.com/auth/ndev .clouddns.readonly";
27
28 /** View and manage your DNS records hosted by Google Cloud DNS */
29 static const NdevClouddnsReadwriteScope = "https://www.googleapis.com/auth/nde v.clouddns.readwrite";
30
31
32 final commons.ApiRequester _requester;
33
34 ChangesResourceApi get changes => new ChangesResourceApi(_requester);
35 DnskeysResourceApi get dnskeys => new DnskeysResourceApi(_requester);
36 ManagedZoneOperationsResourceApi get managedZoneOperations => new ManagedZoneO perationsResourceApi(_requester);
37 ManagedZonesResourceApi get managedZones => new ManagedZonesResourceApi(_reque ster);
38 ProjectsResourceApi get projects => new ProjectsResourceApi(_requester);
39 ResourceRecordSetsResourceApi get resourceRecordSets => new ResourceRecordSets ResourceApi(_requester);
40
41 DnsApi(http.Client client, {core.String rootUrl: "https://www.googleapis.com/" , core.String servicePath: "dns/v2beta1/projects/"}) :
42 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A GENT);
43 }
44
45
46 class ChangesResourceApi {
47 final commons.ApiRequester _requester;
48
49 ChangesResourceApi(commons.ApiRequester client) :
50 _requester = client;
51
52 /**
53 * Atomically update the ResourceRecordSet collection.
54 *
55 * [request] - The metadata request object.
56 *
57 * Request parameters:
58 *
59 * [project] - Identifies the project addressed by this request.
60 *
61 * [managedZone] - Identifies the managed zone addressed by this request. Can
62 * be the managed zone name or id.
63 *
64 * [clientOperationId] - For mutating operation requests only. An optional
65 * identifier specified by the client. Must be unique for operation resources
66 * in the Operations collection.
67 *
68 * Completes with a [Change].
69 *
70 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
71 * error.
72 *
73 * If the used [http.Client] completes with an error when making a REST call,
74 * this method will complete with the same error.
75 */
76 async.Future<Change> create(Change request, core.String project, core.String m anagedZone, {core.String clientOperationId}) {
77 var _url = null;
78 var _queryParams = new core.Map();
79 var _uploadMedia = null;
80 var _uploadOptions = null;
81 var _downloadOptions = commons.DownloadOptions.Metadata;
82 var _body = null;
83
84 if (request != null) {
85 _body = convert.JSON.encode((request).toJson());
86 }
87 if (project == null) {
88 throw new core.ArgumentError("Parameter project is required.");
89 }
90 if (managedZone == null) {
91 throw new core.ArgumentError("Parameter managedZone is required.");
92 }
93 if (clientOperationId != null) {
94 _queryParams["clientOperationId"] = [clientOperationId];
95 }
96
97 _url = commons.Escaper.ecapeVariable('$project') + '/managedZones/' + common s.Escaper.ecapeVariable('$managedZone') + '/changes';
98
99 var _response = _requester.request(_url,
100 "POST",
101 body: _body,
102 queryParams: _queryParams,
103 uploadOptions: _uploadOptions,
104 uploadMedia: _uploadMedia,
105 downloadOptions: _downloadOptions);
106 return _response.then((data) => new Change.fromJson(data));
107 }
108
109 /**
110 * Fetch the representation of an existing Change.
111 *
112 * Request parameters:
113 *
114 * [project] - Identifies the project addressed by this request.
115 *
116 * [managedZone] - Identifies the managed zone addressed by this request. Can
117 * be the managed zone name or id.
118 *
119 * [changeId] - The identifier of the requested change, from a previous
120 * ResourceRecordSetsChangeResponse.
121 *
122 * [clientOperationId] - For mutating operation requests only. An optional
123 * identifier specified by the client. Must be unique for operation resources
124 * in the Operations collection.
125 *
126 * Completes with a [Change].
127 *
128 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
129 * error.
130 *
131 * If the used [http.Client] completes with an error when making a REST call,
132 * this method will complete with the same error.
133 */
134 async.Future<Change> get(core.String project, core.String managedZone, core.St ring changeId, {core.String clientOperationId}) {
135 var _url = null;
136 var _queryParams = new core.Map();
137 var _uploadMedia = null;
138 var _uploadOptions = null;
139 var _downloadOptions = commons.DownloadOptions.Metadata;
140 var _body = null;
141
142 if (project == null) {
143 throw new core.ArgumentError("Parameter project is required.");
144 }
145 if (managedZone == null) {
146 throw new core.ArgumentError("Parameter managedZone is required.");
147 }
148 if (changeId == null) {
149 throw new core.ArgumentError("Parameter changeId is required.");
150 }
151 if (clientOperationId != null) {
152 _queryParams["clientOperationId"] = [clientOperationId];
153 }
154
155 _url = commons.Escaper.ecapeVariable('$project') + '/managedZones/' + common s.Escaper.ecapeVariable('$managedZone') + '/changes/' + commons.Escaper.ecapeVar iable('$changeId');
156
157 var _response = _requester.request(_url,
158 "GET",
159 body: _body,
160 queryParams: _queryParams,
161 uploadOptions: _uploadOptions,
162 uploadMedia: _uploadMedia,
163 downloadOptions: _downloadOptions);
164 return _response.then((data) => new Change.fromJson(data));
165 }
166
167 /**
168 * Enumerate Changes to a ResourceRecordSet collection.
169 *
170 * Request parameters:
171 *
172 * [project] - Identifies the project addressed by this request.
173 *
174 * [managedZone] - Identifies the managed zone addressed by this request. Can
175 * be the managed zone name or id.
176 *
177 * [maxResults] - Optional. Maximum number of results to be returned. If
178 * unspecified, the server will decide how many results to return.
179 *
180 * [pageToken] - Optional. A tag returned by a previous list request that was
181 * truncated. Use this parameter to continue a previous list request.
182 *
183 * [sortBy] - Sorting criterion. The only supported value is change sequence.
184 * Possible string values are:
185 * - "CHANGE_SEQUENCE"
186 *
187 * [sortOrder] - Sorting order direction: 'ascending' or 'descending'.
188 *
189 * Completes with a [ChangesListResponse].
190 *
191 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
192 * error.
193 *
194 * If the used [http.Client] completes with an error when making a REST call,
195 * this method will complete with the same error.
196 */
197 async.Future<ChangesListResponse> list(core.String project, core.String manage dZone, {core.int maxResults, core.String pageToken, core.String sortBy, core.Str ing sortOrder}) {
198 var _url = null;
199 var _queryParams = new core.Map();
200 var _uploadMedia = null;
201 var _uploadOptions = null;
202 var _downloadOptions = commons.DownloadOptions.Metadata;
203 var _body = null;
204
205 if (project == null) {
206 throw new core.ArgumentError("Parameter project is required.");
207 }
208 if (managedZone == null) {
209 throw new core.ArgumentError("Parameter managedZone is required.");
210 }
211 if (maxResults != null) {
212 _queryParams["maxResults"] = ["${maxResults}"];
213 }
214 if (pageToken != null) {
215 _queryParams["pageToken"] = [pageToken];
216 }
217 if (sortBy != null) {
218 _queryParams["sortBy"] = [sortBy];
219 }
220 if (sortOrder != null) {
221 _queryParams["sortOrder"] = [sortOrder];
222 }
223
224 _url = commons.Escaper.ecapeVariable('$project') + '/managedZones/' + common s.Escaper.ecapeVariable('$managedZone') + '/changes';
225
226 var _response = _requester.request(_url,
227 "GET",
228 body: _body,
229 queryParams: _queryParams,
230 uploadOptions: _uploadOptions,
231 uploadMedia: _uploadMedia,
232 downloadOptions: _downloadOptions);
233 return _response.then((data) => new ChangesListResponse.fromJson(data));
234 }
235
236 }
237
238
239 class DnskeysResourceApi {
240 final commons.ApiRequester _requester;
241
242 DnskeysResourceApi(commons.ApiRequester client) :
243 _requester = client;
244
245 /**
246 * Fetch the representation of an existing DnsKey.
247 *
248 * Request parameters:
249 *
250 * [project] - Identifies the project addressed by this request.
251 *
252 * [managedZone] - Identifies the managed zone addressed by this request. Can
253 * be the managed zone name or id.
254 *
255 * [dnsKeyId] - The identifier of the requested DnsKey.
256 *
257 * [clientOperationId] - For mutating operation requests only. An optional
258 * identifier specified by the client. Must be unique for operation resources
259 * in the Operations collection.
260 *
261 * [digestType] - An optional comma-separated list of digest types to compute
262 * and display for key signing keys. If omitted, the recommended digest type
263 * will be computed and displayed.
264 *
265 * Completes with a [DnsKey].
266 *
267 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
268 * error.
269 *
270 * If the used [http.Client] completes with an error when making a REST call,
271 * this method will complete with the same error.
272 */
273 async.Future<DnsKey> get(core.String project, core.String managedZone, core.St ring dnsKeyId, {core.String clientOperationId, core.String digestType}) {
274 var _url = null;
275 var _queryParams = new core.Map();
276 var _uploadMedia = null;
277 var _uploadOptions = null;
278 var _downloadOptions = commons.DownloadOptions.Metadata;
279 var _body = null;
280
281 if (project == null) {
282 throw new core.ArgumentError("Parameter project is required.");
283 }
284 if (managedZone == null) {
285 throw new core.ArgumentError("Parameter managedZone is required.");
286 }
287 if (dnsKeyId == null) {
288 throw new core.ArgumentError("Parameter dnsKeyId is required.");
289 }
290 if (clientOperationId != null) {
291 _queryParams["clientOperationId"] = [clientOperationId];
292 }
293 if (digestType != null) {
294 _queryParams["digestType"] = [digestType];
295 }
296
297 _url = commons.Escaper.ecapeVariable('$project') + '/managedZones/' + common s.Escaper.ecapeVariable('$managedZone') + '/dnsKeys/' + commons.Escaper.ecapeVar iable('$dnsKeyId');
298
299 var _response = _requester.request(_url,
300 "GET",
301 body: _body,
302 queryParams: _queryParams,
303 uploadOptions: _uploadOptions,
304 uploadMedia: _uploadMedia,
305 downloadOptions: _downloadOptions);
306 return _response.then((data) => new DnsKey.fromJson(data));
307 }
308
309 /**
310 * Enumerate DnsKeys to a ResourceRecordSet collection.
311 *
312 * Request parameters:
313 *
314 * [project] - Identifies the project addressed by this request.
315 *
316 * [managedZone] - Identifies the managed zone addressed by this request. Can
317 * be the managed zone name or id.
318 *
319 * [digestType] - An optional comma-separated list of digest types to compute
320 * and display for key signing keys. If omitted, the recommended digest type
321 * will be computed and displayed.
322 *
323 * [maxResults] - Optional. Maximum number of results to be returned. If
324 * unspecified, the server will decide how many results to return.
325 *
326 * [pageToken] - Optional. A tag returned by a previous list request that was
327 * truncated. Use this parameter to continue a previous list request.
328 *
329 * Completes with a [DnsKeysListResponse].
330 *
331 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
332 * error.
333 *
334 * If the used [http.Client] completes with an error when making a REST call,
335 * this method will complete with the same error.
336 */
337 async.Future<DnsKeysListResponse> list(core.String project, core.String manage dZone, {core.String digestType, core.int maxResults, core.String pageToken}) {
338 var _url = null;
339 var _queryParams = new core.Map();
340 var _uploadMedia = null;
341 var _uploadOptions = null;
342 var _downloadOptions = commons.DownloadOptions.Metadata;
343 var _body = null;
344
345 if (project == null) {
346 throw new core.ArgumentError("Parameter project is required.");
347 }
348 if (managedZone == null) {
349 throw new core.ArgumentError("Parameter managedZone is required.");
350 }
351 if (digestType != null) {
352 _queryParams["digestType"] = [digestType];
353 }
354 if (maxResults != null) {
355 _queryParams["maxResults"] = ["${maxResults}"];
356 }
357 if (pageToken != null) {
358 _queryParams["pageToken"] = [pageToken];
359 }
360
361 _url = commons.Escaper.ecapeVariable('$project') + '/managedZones/' + common s.Escaper.ecapeVariable('$managedZone') + '/dnsKeys';
362
363 var _response = _requester.request(_url,
364 "GET",
365 body: _body,
366 queryParams: _queryParams,
367 uploadOptions: _uploadOptions,
368 uploadMedia: _uploadMedia,
369 downloadOptions: _downloadOptions);
370 return _response.then((data) => new DnsKeysListResponse.fromJson(data));
371 }
372
373 }
374
375
376 class ManagedZoneOperationsResourceApi {
377 final commons.ApiRequester _requester;
378
379 ManagedZoneOperationsResourceApi(commons.ApiRequester client) :
380 _requester = client;
381
382 /**
383 * Fetch the representation of an existing Operation.
384 *
385 * Request parameters:
386 *
387 * [project] - Identifies the project addressed by this request.
388 *
389 * [managedZone] - Identifies the managed zone addressed by this request.
390 *
391 * [operation] - Identifies the operation addressed by this request.
392 *
393 * [clientOperationId] - For mutating operation requests only. An optional
394 * identifier specified by the client. Must be unique for operation resources
395 * in the Operations collection.
396 *
397 * Completes with a [Operation].
398 *
399 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
400 * error.
401 *
402 * If the used [http.Client] completes with an error when making a REST call,
403 * this method will complete with the same error.
404 */
405 async.Future<Operation> get(core.String project, core.String managedZone, core .String operation, {core.String clientOperationId}) {
406 var _url = null;
407 var _queryParams = new core.Map();
408 var _uploadMedia = null;
409 var _uploadOptions = null;
410 var _downloadOptions = commons.DownloadOptions.Metadata;
411 var _body = null;
412
413 if (project == null) {
414 throw new core.ArgumentError("Parameter project is required.");
415 }
416 if (managedZone == null) {
417 throw new core.ArgumentError("Parameter managedZone is required.");
418 }
419 if (operation == null) {
420 throw new core.ArgumentError("Parameter operation is required.");
421 }
422 if (clientOperationId != null) {
423 _queryParams["clientOperationId"] = [clientOperationId];
424 }
425
426 _url = commons.Escaper.ecapeVariable('$project') + '/managedZones/' + common s.Escaper.ecapeVariable('$managedZone') + '/operations/' + commons.Escaper.ecape Variable('$operation');
427
428 var _response = _requester.request(_url,
429 "GET",
430 body: _body,
431 queryParams: _queryParams,
432 uploadOptions: _uploadOptions,
433 uploadMedia: _uploadMedia,
434 downloadOptions: _downloadOptions);
435 return _response.then((data) => new Operation.fromJson(data));
436 }
437
438 /**
439 * Enumerate Operations for the given ManagedZone.
440 *
441 * Request parameters:
442 *
443 * [project] - Identifies the project addressed by this request.
444 *
445 * [managedZone] - Identifies the managed zone addressed by this request.
446 *
447 * [maxResults] - Optional. Maximum number of results to be returned. If
448 * unspecified, the server will decide how many results to return.
449 *
450 * [pageToken] - Optional. A tag returned by a previous list request that was
451 * truncated. Use this parameter to continue a previous list request.
452 *
453 * [sortBy] - Sorting criterion. The only supported values are START_TIME and
454 * ID.
455 * Possible string values are:
456 * - "ID"
457 * - "START_TIME"
458 *
459 * Completes with a [ManagedZoneOperationsListResponse].
460 *
461 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
462 * error.
463 *
464 * If the used [http.Client] completes with an error when making a REST call,
465 * this method will complete with the same error.
466 */
467 async.Future<ManagedZoneOperationsListResponse> list(core.String project, core .String managedZone, {core.int maxResults, core.String pageToken, core.String so rtBy}) {
468 var _url = null;
469 var _queryParams = new core.Map();
470 var _uploadMedia = null;
471 var _uploadOptions = null;
472 var _downloadOptions = commons.DownloadOptions.Metadata;
473 var _body = null;
474
475 if (project == null) {
476 throw new core.ArgumentError("Parameter project is required.");
477 }
478 if (managedZone == null) {
479 throw new core.ArgumentError("Parameter managedZone is required.");
480 }
481 if (maxResults != null) {
482 _queryParams["maxResults"] = ["${maxResults}"];
483 }
484 if (pageToken != null) {
485 _queryParams["pageToken"] = [pageToken];
486 }
487 if (sortBy != null) {
488 _queryParams["sortBy"] = [sortBy];
489 }
490
491 _url = commons.Escaper.ecapeVariable('$project') + '/managedZones/' + common s.Escaper.ecapeVariable('$managedZone') + '/operations';
492
493 var _response = _requester.request(_url,
494 "GET",
495 body: _body,
496 queryParams: _queryParams,
497 uploadOptions: _uploadOptions,
498 uploadMedia: _uploadMedia,
499 downloadOptions: _downloadOptions);
500 return _response.then((data) => new ManagedZoneOperationsListResponse.fromJs on(data));
501 }
502
503 }
504
505
506 class ManagedZonesResourceApi {
507 final commons.ApiRequester _requester;
508
509 ManagedZonesResourceApi(commons.ApiRequester client) :
510 _requester = client;
511
512 /**
513 * Create a new ManagedZone.
514 *
515 * [request] - The metadata request object.
516 *
517 * Request parameters:
518 *
519 * [project] - Identifies the project addressed by this request.
520 *
521 * [clientOperationId] - For mutating operation requests only. An optional
522 * identifier specified by the client. Must be unique for operation resources
523 * in the Operations collection.
524 *
525 * Completes with a [ManagedZone].
526 *
527 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
528 * error.
529 *
530 * If the used [http.Client] completes with an error when making a REST call,
531 * this method will complete with the same error.
532 */
533 async.Future<ManagedZone> create(ManagedZone request, core.String project, {co re.String clientOperationId}) {
534 var _url = null;
535 var _queryParams = new core.Map();
536 var _uploadMedia = null;
537 var _uploadOptions = null;
538 var _downloadOptions = commons.DownloadOptions.Metadata;
539 var _body = null;
540
541 if (request != null) {
542 _body = convert.JSON.encode((request).toJson());
543 }
544 if (project == null) {
545 throw new core.ArgumentError("Parameter project is required.");
546 }
547 if (clientOperationId != null) {
548 _queryParams["clientOperationId"] = [clientOperationId];
549 }
550
551 _url = commons.Escaper.ecapeVariable('$project') + '/managedZones';
552
553 var _response = _requester.request(_url,
554 "POST",
555 body: _body,
556 queryParams: _queryParams,
557 uploadOptions: _uploadOptions,
558 uploadMedia: _uploadMedia,
559 downloadOptions: _downloadOptions);
560 return _response.then((data) => new ManagedZone.fromJson(data));
561 }
562
563 /**
564 * Delete a previously created ManagedZone.
565 *
566 * Request parameters:
567 *
568 * [project] - Identifies the project addressed by this request.
569 *
570 * [managedZone] - Identifies the managed zone addressed by this request. Can
571 * be the managed zone name or id.
572 *
573 * [clientOperationId] - For mutating operation requests only. An optional
574 * identifier specified by the client. Must be unique for operation resources
575 * in the Operations collection.
576 *
577 * Completes with a [ManagedZonesDeleteResponse].
578 *
579 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
580 * error.
581 *
582 * If the used [http.Client] completes with an error when making a REST call,
583 * this method will complete with the same error.
584 */
585 async.Future<ManagedZonesDeleteResponse> delete(core.String project, core.Stri ng managedZone, {core.String clientOperationId}) {
586 var _url = null;
587 var _queryParams = new core.Map();
588 var _uploadMedia = null;
589 var _uploadOptions = null;
590 var _downloadOptions = commons.DownloadOptions.Metadata;
591 var _body = null;
592
593 if (project == null) {
594 throw new core.ArgumentError("Parameter project is required.");
595 }
596 if (managedZone == null) {
597 throw new core.ArgumentError("Parameter managedZone is required.");
598 }
599 if (clientOperationId != null) {
600 _queryParams["clientOperationId"] = [clientOperationId];
601 }
602
603 _url = commons.Escaper.ecapeVariable('$project') + '/managedZones/' + common s.Escaper.ecapeVariable('$managedZone');
604
605 var _response = _requester.request(_url,
606 "DELETE",
607 body: _body,
608 queryParams: _queryParams,
609 uploadOptions: _uploadOptions,
610 uploadMedia: _uploadMedia,
611 downloadOptions: _downloadOptions);
612 return _response.then((data) => new ManagedZonesDeleteResponse.fromJson(data ));
613 }
614
615 /**
616 * Fetch the representation of an existing ManagedZone.
617 *
618 * Request parameters:
619 *
620 * [project] - Identifies the project addressed by this request.
621 *
622 * [managedZone] - Identifies the managed zone addressed by this request. Can
623 * be the managed zone name or id.
624 *
625 * [clientOperationId] - For mutating operation requests only. An optional
626 * identifier specified by the client. Must be unique for operation resources
627 * in the Operations collection.
628 *
629 * Completes with a [ManagedZone].
630 *
631 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
632 * error.
633 *
634 * If the used [http.Client] completes with an error when making a REST call,
635 * this method will complete with the same error.
636 */
637 async.Future<ManagedZone> get(core.String project, core.String managedZone, {c ore.String clientOperationId}) {
638 var _url = null;
639 var _queryParams = new core.Map();
640 var _uploadMedia = null;
641 var _uploadOptions = null;
642 var _downloadOptions = commons.DownloadOptions.Metadata;
643 var _body = null;
644
645 if (project == null) {
646 throw new core.ArgumentError("Parameter project is required.");
647 }
648 if (managedZone == null) {
649 throw new core.ArgumentError("Parameter managedZone is required.");
650 }
651 if (clientOperationId != null) {
652 _queryParams["clientOperationId"] = [clientOperationId];
653 }
654
655 _url = commons.Escaper.ecapeVariable('$project') + '/managedZones/' + common s.Escaper.ecapeVariable('$managedZone');
656
657 var _response = _requester.request(_url,
658 "GET",
659 body: _body,
660 queryParams: _queryParams,
661 uploadOptions: _uploadOptions,
662 uploadMedia: _uploadMedia,
663 downloadOptions: _downloadOptions);
664 return _response.then((data) => new ManagedZone.fromJson(data));
665 }
666
667 /**
668 * Enumerate ManagedZones that have been created but not yet deleted.
669 *
670 * Request parameters:
671 *
672 * [project] - Identifies the project addressed by this request.
673 *
674 * [dnsName] - Restricts the list to return only zones with this domain name.
675 *
676 * [maxResults] - Optional. Maximum number of results to be returned. If
677 * unspecified, the server will decide how many results to return.
678 *
679 * [pageToken] - Optional. A tag returned by a previous list request that was
680 * truncated. Use this parameter to continue a previous list request.
681 *
682 * Completes with a [ManagedZonesListResponse].
683 *
684 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
685 * error.
686 *
687 * If the used [http.Client] completes with an error when making a REST call,
688 * this method will complete with the same error.
689 */
690 async.Future<ManagedZonesListResponse> list(core.String project, {core.String dnsName, core.int maxResults, core.String pageToken}) {
691 var _url = null;
692 var _queryParams = new core.Map();
693 var _uploadMedia = null;
694 var _uploadOptions = null;
695 var _downloadOptions = commons.DownloadOptions.Metadata;
696 var _body = null;
697
698 if (project == null) {
699 throw new core.ArgumentError("Parameter project is required.");
700 }
701 if (dnsName != null) {
702 _queryParams["dnsName"] = [dnsName];
703 }
704 if (maxResults != null) {
705 _queryParams["maxResults"] = ["${maxResults}"];
706 }
707 if (pageToken != null) {
708 _queryParams["pageToken"] = [pageToken];
709 }
710
711 _url = commons.Escaper.ecapeVariable('$project') + '/managedZones';
712
713 var _response = _requester.request(_url,
714 "GET",
715 body: _body,
716 queryParams: _queryParams,
717 uploadOptions: _uploadOptions,
718 uploadMedia: _uploadMedia,
719 downloadOptions: _downloadOptions);
720 return _response.then((data) => new ManagedZonesListResponse.fromJson(data)) ;
721 }
722
723 /**
724 * Update an existing ManagedZone. This method supports patch semantics.
725 *
726 * [request] - The metadata request object.
727 *
728 * Request parameters:
729 *
730 * [project] - Identifies the project addressed by this request.
731 *
732 * [managedZone] - Identifies the managed zone addressed by this request. Can
733 * be the managed zone name or id.
734 *
735 * [clientOperationId] - For mutating operation requests only. An optional
736 * identifier specified by the client. Must be unique for operation resources
737 * in the Operations collection.
738 *
739 * Completes with a [Operation].
740 *
741 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
742 * error.
743 *
744 * If the used [http.Client] completes with an error when making a REST call,
745 * this method will complete with the same error.
746 */
747 async.Future<Operation> patch(ManagedZone request, core.String project, core.S tring managedZone, {core.String clientOperationId}) {
748 var _url = null;
749 var _queryParams = new core.Map();
750 var _uploadMedia = null;
751 var _uploadOptions = null;
752 var _downloadOptions = commons.DownloadOptions.Metadata;
753 var _body = null;
754
755 if (request != null) {
756 _body = convert.JSON.encode((request).toJson());
757 }
758 if (project == null) {
759 throw new core.ArgumentError("Parameter project is required.");
760 }
761 if (managedZone == null) {
762 throw new core.ArgumentError("Parameter managedZone is required.");
763 }
764 if (clientOperationId != null) {
765 _queryParams["clientOperationId"] = [clientOperationId];
766 }
767
768 _url = commons.Escaper.ecapeVariable('$project') + '/managedZones/' + common s.Escaper.ecapeVariable('$managedZone');
769
770 var _response = _requester.request(_url,
771 "PATCH",
772 body: _body,
773 queryParams: _queryParams,
774 uploadOptions: _uploadOptions,
775 uploadMedia: _uploadMedia,
776 downloadOptions: _downloadOptions);
777 return _response.then((data) => new Operation.fromJson(data));
778 }
779
780 /**
781 * Update an existing ManagedZone.
782 *
783 * [request] - The metadata request object.
784 *
785 * Request parameters:
786 *
787 * [project] - Identifies the project addressed by this request.
788 *
789 * [managedZone] - Identifies the managed zone addressed by this request. Can
790 * be the managed zone name or id.
791 *
792 * [clientOperationId] - For mutating operation requests only. An optional
793 * identifier specified by the client. Must be unique for operation resources
794 * in the Operations collection.
795 *
796 * Completes with a [Operation].
797 *
798 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
799 * error.
800 *
801 * If the used [http.Client] completes with an error when making a REST call,
802 * this method will complete with the same error.
803 */
804 async.Future<Operation> update(ManagedZone request, core.String project, core. String managedZone, {core.String clientOperationId}) {
805 var _url = null;
806 var _queryParams = new core.Map();
807 var _uploadMedia = null;
808 var _uploadOptions = null;
809 var _downloadOptions = commons.DownloadOptions.Metadata;
810 var _body = null;
811
812 if (request != null) {
813 _body = convert.JSON.encode((request).toJson());
814 }
815 if (project == null) {
816 throw new core.ArgumentError("Parameter project is required.");
817 }
818 if (managedZone == null) {
819 throw new core.ArgumentError("Parameter managedZone is required.");
820 }
821 if (clientOperationId != null) {
822 _queryParams["clientOperationId"] = [clientOperationId];
823 }
824
825 _url = commons.Escaper.ecapeVariable('$project') + '/managedZones/' + common s.Escaper.ecapeVariable('$managedZone');
826
827 var _response = _requester.request(_url,
828 "PUT",
829 body: _body,
830 queryParams: _queryParams,
831 uploadOptions: _uploadOptions,
832 uploadMedia: _uploadMedia,
833 downloadOptions: _downloadOptions);
834 return _response.then((data) => new Operation.fromJson(data));
835 }
836
837 }
838
839
840 class ProjectsResourceApi {
841 final commons.ApiRequester _requester;
842
843 ProjectsResourceApi(commons.ApiRequester client) :
844 _requester = client;
845
846 /**
847 * Fetch the representation of an existing Project.
848 *
849 * Request parameters:
850 *
851 * [project] - Identifies the project addressed by this request.
852 *
853 * [clientOperationId] - For mutating operation requests only. An optional
854 * identifier specified by the client. Must be unique for operation resources
855 * in the Operations collection.
856 *
857 * Completes with a [Project].
858 *
859 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
860 * error.
861 *
862 * If the used [http.Client] completes with an error when making a REST call,
863 * this method will complete with the same error.
864 */
865 async.Future<Project> get(core.String project, {core.String clientOperationId} ) {
866 var _url = null;
867 var _queryParams = new core.Map();
868 var _uploadMedia = null;
869 var _uploadOptions = null;
870 var _downloadOptions = commons.DownloadOptions.Metadata;
871 var _body = null;
872
873 if (project == null) {
874 throw new core.ArgumentError("Parameter project is required.");
875 }
876 if (clientOperationId != null) {
877 _queryParams["clientOperationId"] = [clientOperationId];
878 }
879
880 _url = commons.Escaper.ecapeVariable('$project');
881
882 var _response = _requester.request(_url,
883 "GET",
884 body: _body,
885 queryParams: _queryParams,
886 uploadOptions: _uploadOptions,
887 uploadMedia: _uploadMedia,
888 downloadOptions: _downloadOptions);
889 return _response.then((data) => new Project.fromJson(data));
890 }
891
892 }
893
894
895 class ResourceRecordSetsResourceApi {
896 final commons.ApiRequester _requester;
897
898 ResourceRecordSetsResourceApi(commons.ApiRequester client) :
899 _requester = client;
900
901 /**
902 * Enumerate ResourceRecordSets that have been created but not yet deleted.
903 *
904 * Request parameters:
905 *
906 * [project] - Identifies the project addressed by this request.
907 *
908 * [managedZone] - Identifies the managed zone addressed by this request. Can
909 * be the managed zone name or id.
910 *
911 * [maxResults] - Optional. Maximum number of results to be returned. If
912 * unspecified, the server will decide how many results to return.
913 *
914 * [name] - Restricts the list to return only records with this fully
915 * qualified domain name.
916 *
917 * [pageToken] - Optional. A tag returned by a previous list request that was
918 * truncated. Use this parameter to continue a previous list request.
919 *
920 * [type] - Restricts the list to return only records of this type. If
921 * present, the "name" parameter must also be present.
922 *
923 * Completes with a [ResourceRecordSetsListResponse].
924 *
925 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
926 * error.
927 *
928 * If the used [http.Client] completes with an error when making a REST call,
929 * this method will complete with the same error.
930 */
931 async.Future<ResourceRecordSetsListResponse> list(core.String project, core.St ring managedZone, {core.int maxResults, core.String name, core.String pageToken, core.String type}) {
932 var _url = null;
933 var _queryParams = new core.Map();
934 var _uploadMedia = null;
935 var _uploadOptions = null;
936 var _downloadOptions = commons.DownloadOptions.Metadata;
937 var _body = null;
938
939 if (project == null) {
940 throw new core.ArgumentError("Parameter project is required.");
941 }
942 if (managedZone == null) {
943 throw new core.ArgumentError("Parameter managedZone is required.");
944 }
945 if (maxResults != null) {
946 _queryParams["maxResults"] = ["${maxResults}"];
947 }
948 if (name != null) {
949 _queryParams["name"] = [name];
950 }
951 if (pageToken != null) {
952 _queryParams["pageToken"] = [pageToken];
953 }
954 if (type != null) {
955 _queryParams["type"] = [type];
956 }
957
958 _url = commons.Escaper.ecapeVariable('$project') + '/managedZones/' + common s.Escaper.ecapeVariable('$managedZone') + '/rrsets';
959
960 var _response = _requester.request(_url,
961 "GET",
962 body: _body,
963 queryParams: _queryParams,
964 uploadOptions: _uploadOptions,
965 uploadMedia: _uploadMedia,
966 downloadOptions: _downloadOptions);
967 return _response.then((data) => new ResourceRecordSetsListResponse.fromJson( data));
968 }
969
970 }
971
972
973
974 /** An atomic update to a collection of ResourceRecordSets. */
975 class Change {
976 /** Which ResourceRecordSets to add? */
977 core.List<ResourceRecordSet> additions;
978 /** Which ResourceRecordSets to remove? Must match existing data exactly. */
979 core.List<ResourceRecordSet> deletions;
980 /**
981 * Unique identifier for the resource; defined by the server (output only).
982 */
983 core.String id;
984 /** If the DNS queries for the zone will be served. */
985 core.bool isServing;
986 /**
987 * Identifies what kind of resource this is. Value: the fixed string
988 * "dns#change".
989 */
990 core.String kind;
991 /**
992 * The time that this operation was started by the server (output only). This
993 * is in RFC3339 text format.
994 */
995 core.String startTime;
996 /**
997 * Status of the operation (output only).
998 * Possible string values are:
999 * - "DONE"
1000 * - "PENDING"
1001 */
1002 core.String status;
1003
1004 Change();
1005
1006 Change.fromJson(core.Map _json) {
1007 if (_json.containsKey("additions")) {
1008 additions = _json["additions"].map((value) => new ResourceRecordSet.fromJs on(value)).toList();
1009 }
1010 if (_json.containsKey("deletions")) {
1011 deletions = _json["deletions"].map((value) => new ResourceRecordSet.fromJs on(value)).toList();
1012 }
1013 if (_json.containsKey("id")) {
1014 id = _json["id"];
1015 }
1016 if (_json.containsKey("isServing")) {
1017 isServing = _json["isServing"];
1018 }
1019 if (_json.containsKey("kind")) {
1020 kind = _json["kind"];
1021 }
1022 if (_json.containsKey("startTime")) {
1023 startTime = _json["startTime"];
1024 }
1025 if (_json.containsKey("status")) {
1026 status = _json["status"];
1027 }
1028 }
1029
1030 core.Map toJson() {
1031 var _json = new core.Map();
1032 if (additions != null) {
1033 _json["additions"] = additions.map((value) => (value).toJson()).toList();
1034 }
1035 if (deletions != null) {
1036 _json["deletions"] = deletions.map((value) => (value).toJson()).toList();
1037 }
1038 if (id != null) {
1039 _json["id"] = id;
1040 }
1041 if (isServing != null) {
1042 _json["isServing"] = isServing;
1043 }
1044 if (kind != null) {
1045 _json["kind"] = kind;
1046 }
1047 if (startTime != null) {
1048 _json["startTime"] = startTime;
1049 }
1050 if (status != null) {
1051 _json["status"] = status;
1052 }
1053 return _json;
1054 }
1055 }
1056
1057 /**
1058 * The response to a request to enumerate Changes to a ResourceRecordSets
1059 * collection.
1060 */
1061 class ChangesListResponse {
1062 /** The requested changes. */
1063 core.List<Change> changes;
1064 ResponseHeader header;
1065 /** Type of resource. */
1066 core.String kind;
1067 /**
1068 * The presence of this field indicates that there exist more results
1069 * following your last page of results in pagination order. To fetch them,
1070 * make another list request using this value as your pagination token.
1071 *
1072 * In this way you can retrieve the complete contents of even very large
1073 * collections one page at a time. However, if the contents of the collection
1074 * change between the first and last paginated list request, the set of all
1075 * elements returned will be an inconsistent view of the collection. There is
1076 * no way to retrieve a "snapshot" of collections larger than the maximum page
1077 * size.
1078 */
1079 core.String nextPageToken;
1080
1081 ChangesListResponse();
1082
1083 ChangesListResponse.fromJson(core.Map _json) {
1084 if (_json.containsKey("changes")) {
1085 changes = _json["changes"].map((value) => new Change.fromJson(value)).toLi st();
1086 }
1087 if (_json.containsKey("header")) {
1088 header = new ResponseHeader.fromJson(_json["header"]);
1089 }
1090 if (_json.containsKey("kind")) {
1091 kind = _json["kind"];
1092 }
1093 if (_json.containsKey("nextPageToken")) {
1094 nextPageToken = _json["nextPageToken"];
1095 }
1096 }
1097
1098 core.Map toJson() {
1099 var _json = new core.Map();
1100 if (changes != null) {
1101 _json["changes"] = changes.map((value) => (value).toJson()).toList();
1102 }
1103 if (header != null) {
1104 _json["header"] = (header).toJson();
1105 }
1106 if (kind != null) {
1107 _json["kind"] = kind;
1108 }
1109 if (nextPageToken != null) {
1110 _json["nextPageToken"] = nextPageToken;
1111 }
1112 return _json;
1113 }
1114 }
1115
1116 /** A DNSSEC key pair. */
1117 class DnsKey {
1118 /**
1119 * String mnemonic specifying the DNSSEC algorithm of this key. Immutable
1120 * after creation time.
1121 * Possible string values are:
1122 * - "ECDSAP256SHA256"
1123 * - "ECDSAP384SHA384"
1124 * - "RSASHA1"
1125 * - "RSASHA256"
1126 * - "RSASHA512"
1127 */
1128 core.String algorithm;
1129 /**
1130 * The time that this resource was created in the control plane. This is in
1131 * RFC3339 text format. Output only.
1132 */
1133 core.String creationTime;
1134 /**
1135 * A mutable string of at most 1024 characters associated with this resource
1136 * for the user's convenience. Has no effect on the resource's function.
1137 */
1138 core.String description;
1139 /**
1140 * Cryptographic hashes of the DNSKEY resource record associated with this
1141 * DnsKey. These digests are needed to construct a DS record that points at
1142 * this DNS key. Output only.
1143 */
1144 core.List<DnsKeyDigest> digests;
1145 /**
1146 * Unique identifier for the resource; defined by the server (output only).
1147 */
1148 core.String id;
1149 /**
1150 * Active keys will be used to sign subsequent changes to the ManagedZone.
1151 * Inactive keys will still be present as DNSKEY Resource Records for the use
1152 * of resolvers validating existing signatures.
1153 */
1154 core.bool isActive;
1155 /** Length of the key in bits. Specified at creation time then immutable. */
1156 core.int keyLength;
1157 /**
1158 * The key tag is a non-cryptographic hash of the a DNSKEY resource record
1159 * associated with this DnsKey. The key tag can be used to identify a DNSKEY
1160 * more quickly (but it is not a unique identifier). In particular, the key
1161 * tag is used in a parent zone's DS record to point at the DNSKEY in this
1162 * child ManagedZone. The key tag is a number in the range [0, 65535] and the
1163 * algorithm to calculate it is specified in RFC4034 Appendix B. Output only.
1164 */
1165 core.int keyTag;
1166 /**
1167 * Identifies what kind of resource this is. Value: the fixed string
1168 * "dns#dnsKey".
1169 */
1170 core.String kind;
1171 /** Base64 encoded public half of this key. Output only. */
1172 core.String publicKey;
1173 /**
1174 * One of "KEY_SIGNING" or "ZONE_SIGNING". Keys of type KEY_SIGNING have the
1175 * Secure Entry Point flag set and, when active, will be used to sign only
1176 * resource record sets of type DNSKEY. Otherwise, the Secure Entry Point flag
1177 * will be cleared and this key will be used to sign only resource record sets
1178 * of other types. Immutable after creation time.
1179 * Possible string values are:
1180 * - "KEY_SIGNING"
1181 * - "ZONE_SIGNING"
1182 */
1183 core.String type;
1184
1185 DnsKey();
1186
1187 DnsKey.fromJson(core.Map _json) {
1188 if (_json.containsKey("algorithm")) {
1189 algorithm = _json["algorithm"];
1190 }
1191 if (_json.containsKey("creationTime")) {
1192 creationTime = _json["creationTime"];
1193 }
1194 if (_json.containsKey("description")) {
1195 description = _json["description"];
1196 }
1197 if (_json.containsKey("digests")) {
1198 digests = _json["digests"].map((value) => new DnsKeyDigest.fromJson(value) ).toList();
1199 }
1200 if (_json.containsKey("id")) {
1201 id = _json["id"];
1202 }
1203 if (_json.containsKey("isActive")) {
1204 isActive = _json["isActive"];
1205 }
1206 if (_json.containsKey("keyLength")) {
1207 keyLength = _json["keyLength"];
1208 }
1209 if (_json.containsKey("keyTag")) {
1210 keyTag = _json["keyTag"];
1211 }
1212 if (_json.containsKey("kind")) {
1213 kind = _json["kind"];
1214 }
1215 if (_json.containsKey("publicKey")) {
1216 publicKey = _json["publicKey"];
1217 }
1218 if (_json.containsKey("type")) {
1219 type = _json["type"];
1220 }
1221 }
1222
1223 core.Map toJson() {
1224 var _json = new core.Map();
1225 if (algorithm != null) {
1226 _json["algorithm"] = algorithm;
1227 }
1228 if (creationTime != null) {
1229 _json["creationTime"] = creationTime;
1230 }
1231 if (description != null) {
1232 _json["description"] = description;
1233 }
1234 if (digests != null) {
1235 _json["digests"] = digests.map((value) => (value).toJson()).toList();
1236 }
1237 if (id != null) {
1238 _json["id"] = id;
1239 }
1240 if (isActive != null) {
1241 _json["isActive"] = isActive;
1242 }
1243 if (keyLength != null) {
1244 _json["keyLength"] = keyLength;
1245 }
1246 if (keyTag != null) {
1247 _json["keyTag"] = keyTag;
1248 }
1249 if (kind != null) {
1250 _json["kind"] = kind;
1251 }
1252 if (publicKey != null) {
1253 _json["publicKey"] = publicKey;
1254 }
1255 if (type != null) {
1256 _json["type"] = type;
1257 }
1258 return _json;
1259 }
1260 }
1261
1262 class DnsKeyDigest {
1263 /**
1264 * The base-16 encoded bytes of this digest. Suitable for use in a DS resource
1265 * record.
1266 */
1267 core.String digest;
1268 /**
1269 * Specifies the algorithm used to calculate this digest.
1270 * Possible string values are:
1271 * - "SHA1"
1272 * - "SHA256"
1273 * - "SHA384"
1274 */
1275 core.String type;
1276
1277 DnsKeyDigest();
1278
1279 DnsKeyDigest.fromJson(core.Map _json) {
1280 if (_json.containsKey("digest")) {
1281 digest = _json["digest"];
1282 }
1283 if (_json.containsKey("type")) {
1284 type = _json["type"];
1285 }
1286 }
1287
1288 core.Map toJson() {
1289 var _json = new core.Map();
1290 if (digest != null) {
1291 _json["digest"] = digest;
1292 }
1293 if (type != null) {
1294 _json["type"] = type;
1295 }
1296 return _json;
1297 }
1298 }
1299
1300 /**
1301 * Parameters for DnsKey key generation. Used for generating initial keys for a
1302 * new ManagedZone and as default when adding a new DnsKey.
1303 */
1304 class DnsKeySpec {
1305 /**
1306 * String mnemonic specifying the DNSSEC algorithm of this key.
1307 * Possible string values are:
1308 * - "ECDSAP256SHA256"
1309 * - "ECDSAP384SHA384"
1310 * - "RSASHA1"
1311 * - "RSASHA256"
1312 * - "RSASHA512"
1313 */
1314 core.String algorithm;
1315 /** Length of the keys in bits. */
1316 core.int keyLength;
1317 /**
1318 * One of "KEY_SIGNING" or "ZONE_SIGNING". Keys of type KEY_SIGNING have the
1319 * Secure Entry Point flag set and, when active, will be used to sign only
1320 * resource record sets of type DNSKEY. Otherwise, the Secure Entry Point flag
1321 * will be cleared and this key will be used to sign only resource record sets
1322 * of other types.
1323 * Possible string values are:
1324 * - "KEY_SIGNING"
1325 * - "ZONE_SIGNING"
1326 */
1327 core.String keyType;
1328 /**
1329 * Identifies what kind of resource this is. Value: the fixed string
1330 * "dns#dnsKeySpec".
1331 */
1332 core.String kind;
1333
1334 DnsKeySpec();
1335
1336 DnsKeySpec.fromJson(core.Map _json) {
1337 if (_json.containsKey("algorithm")) {
1338 algorithm = _json["algorithm"];
1339 }
1340 if (_json.containsKey("keyLength")) {
1341 keyLength = _json["keyLength"];
1342 }
1343 if (_json.containsKey("keyType")) {
1344 keyType = _json["keyType"];
1345 }
1346 if (_json.containsKey("kind")) {
1347 kind = _json["kind"];
1348 }
1349 }
1350
1351 core.Map toJson() {
1352 var _json = new core.Map();
1353 if (algorithm != null) {
1354 _json["algorithm"] = algorithm;
1355 }
1356 if (keyLength != null) {
1357 _json["keyLength"] = keyLength;
1358 }
1359 if (keyType != null) {
1360 _json["keyType"] = keyType;
1361 }
1362 if (kind != null) {
1363 _json["kind"] = kind;
1364 }
1365 return _json;
1366 }
1367 }
1368
1369 /** The response to a request to enumerate DnsKeys in a ManagedZone. */
1370 class DnsKeysListResponse {
1371 /** The requested resources. */
1372 core.List<DnsKey> dnsKeys;
1373 ResponseHeader header;
1374 /** Type of resource. */
1375 core.String kind;
1376 /**
1377 * The presence of this field indicates that there exist more results
1378 * following your last page of results in pagination order. To fetch them,
1379 * make another list request using this value as your pagination token.
1380 *
1381 * In this way you can retrieve the complete contents of even very large
1382 * collections one page at a time. However, if the contents of the collection
1383 * change between the first and last paginated list request, the set of all
1384 * elements returned will be an inconsistent view of the collection. There is
1385 * no way to retrieve a "snapshot" of collections larger than the maximum page
1386 * size.
1387 */
1388 core.String nextPageToken;
1389
1390 DnsKeysListResponse();
1391
1392 DnsKeysListResponse.fromJson(core.Map _json) {
1393 if (_json.containsKey("dnsKeys")) {
1394 dnsKeys = _json["dnsKeys"].map((value) => new DnsKey.fromJson(value)).toLi st();
1395 }
1396 if (_json.containsKey("header")) {
1397 header = new ResponseHeader.fromJson(_json["header"]);
1398 }
1399 if (_json.containsKey("kind")) {
1400 kind = _json["kind"];
1401 }
1402 if (_json.containsKey("nextPageToken")) {
1403 nextPageToken = _json["nextPageToken"];
1404 }
1405 }
1406
1407 core.Map toJson() {
1408 var _json = new core.Map();
1409 if (dnsKeys != null) {
1410 _json["dnsKeys"] = dnsKeys.map((value) => (value).toJson()).toList();
1411 }
1412 if (header != null) {
1413 _json["header"] = (header).toJson();
1414 }
1415 if (kind != null) {
1416 _json["kind"] = kind;
1417 }
1418 if (nextPageToken != null) {
1419 _json["nextPageToken"] = nextPageToken;
1420 }
1421 return _json;
1422 }
1423 }
1424
1425 /**
1426 * A zone is a subtree of the DNS namespace under one administrative
1427 * responsibility. A ManagedZone is a resource that represents a DNS zone hosted
1428 * by the Cloud DNS service.
1429 */
1430 class ManagedZone {
1431 /**
1432 * The time that this resource was created on the server. This is in RFC3339
1433 * text format. Output only.
1434 */
1435 core.String creationTime;
1436 /**
1437 * A mutable string of at most 1024 characters associated with this resource
1438 * for the user's convenience. Has no effect on the managed zone's function.
1439 */
1440 core.String description;
1441 /** The DNS name of this managed zone, for instance "example.com.". */
1442 core.String dnsName;
1443 /** DNSSEC configuration. */
1444 ManagedZoneDnsSecConfig dnssecConfig;
1445 /**
1446 * Unique identifier for the resource; defined by the server (output only)
1447 */
1448 core.String id;
1449 /**
1450 * Identifies what kind of resource this is. Value: the fixed string
1451 * "dns#managedZone".
1452 */
1453 core.String kind;
1454 /**
1455 * User assigned name for this resource. Must be unique within the project.
1456 * The name must be 1-32 characters long, must begin with a letter, end with a
1457 * letter or digit, and only contain lowercase letters, digits or dashes.
1458 */
1459 core.String name;
1460 /**
1461 * Optionally specifies the NameServerSet for this ManagedZone. A
1462 * NameServerSet is a set of DNS name servers that all host the same
1463 * ManagedZones. Most users will leave this field unset.
1464 */
1465 core.String nameServerSet;
1466 /**
1467 * Delegate your managed_zone to these virtual name servers; defined by the
1468 * server (output only)
1469 */
1470 core.List<core.String> nameServers;
1471
1472 ManagedZone();
1473
1474 ManagedZone.fromJson(core.Map _json) {
1475 if (_json.containsKey("creationTime")) {
1476 creationTime = _json["creationTime"];
1477 }
1478 if (_json.containsKey("description")) {
1479 description = _json["description"];
1480 }
1481 if (_json.containsKey("dnsName")) {
1482 dnsName = _json["dnsName"];
1483 }
1484 if (_json.containsKey("dnssecConfig")) {
1485 dnssecConfig = new ManagedZoneDnsSecConfig.fromJson(_json["dnssecConfig"]) ;
1486 }
1487 if (_json.containsKey("id")) {
1488 id = _json["id"];
1489 }
1490 if (_json.containsKey("kind")) {
1491 kind = _json["kind"];
1492 }
1493 if (_json.containsKey("name")) {
1494 name = _json["name"];
1495 }
1496 if (_json.containsKey("nameServerSet")) {
1497 nameServerSet = _json["nameServerSet"];
1498 }
1499 if (_json.containsKey("nameServers")) {
1500 nameServers = _json["nameServers"];
1501 }
1502 }
1503
1504 core.Map toJson() {
1505 var _json = new core.Map();
1506 if (creationTime != null) {
1507 _json["creationTime"] = creationTime;
1508 }
1509 if (description != null) {
1510 _json["description"] = description;
1511 }
1512 if (dnsName != null) {
1513 _json["dnsName"] = dnsName;
1514 }
1515 if (dnssecConfig != null) {
1516 _json["dnssecConfig"] = (dnssecConfig).toJson();
1517 }
1518 if (id != null) {
1519 _json["id"] = id;
1520 }
1521 if (kind != null) {
1522 _json["kind"] = kind;
1523 }
1524 if (name != null) {
1525 _json["name"] = name;
1526 }
1527 if (nameServerSet != null) {
1528 _json["nameServerSet"] = nameServerSet;
1529 }
1530 if (nameServers != null) {
1531 _json["nameServers"] = nameServers;
1532 }
1533 return _json;
1534 }
1535 }
1536
1537 class ManagedZoneDnsSecConfig {
1538 /**
1539 * Specifies parameters that will be used for generating initial DnsKeys for
1540 * this ManagedZone. Output only while state is not OFF.
1541 */
1542 core.List<DnsKeySpec> defaultKeySpecs;
1543 /**
1544 * Identifies what kind of resource this is. Value: the fixed string
1545 * "dns#managedZoneDnsSecConfig".
1546 */
1547 core.String kind;
1548 /**
1549 * Specifies the mechanism used to provide authenticated denial-of-existence
1550 * responses. Output only while state is not OFF.
1551 * Possible string values are:
1552 * - "NSEC"
1553 * - "NSEC3"
1554 */
1555 core.String nonExistence;
1556 /**
1557 * Specifies whether DNSSEC is enabled, and what mode it is in.
1558 * Possible string values are:
1559 * - "OFF"
1560 * - "ON"
1561 * - "TRANSFER"
1562 */
1563 core.String state;
1564
1565 ManagedZoneDnsSecConfig();
1566
1567 ManagedZoneDnsSecConfig.fromJson(core.Map _json) {
1568 if (_json.containsKey("defaultKeySpecs")) {
1569 defaultKeySpecs = _json["defaultKeySpecs"].map((value) => new DnsKeySpec.f romJson(value)).toList();
1570 }
1571 if (_json.containsKey("kind")) {
1572 kind = _json["kind"];
1573 }
1574 if (_json.containsKey("nonExistence")) {
1575 nonExistence = _json["nonExistence"];
1576 }
1577 if (_json.containsKey("state")) {
1578 state = _json["state"];
1579 }
1580 }
1581
1582 core.Map toJson() {
1583 var _json = new core.Map();
1584 if (defaultKeySpecs != null) {
1585 _json["defaultKeySpecs"] = defaultKeySpecs.map((value) => (value).toJson() ).toList();
1586 }
1587 if (kind != null) {
1588 _json["kind"] = kind;
1589 }
1590 if (nonExistence != null) {
1591 _json["nonExistence"] = nonExistence;
1592 }
1593 if (state != null) {
1594 _json["state"] = state;
1595 }
1596 return _json;
1597 }
1598 }
1599
1600 class ManagedZoneOperationsListResponse {
1601 ResponseHeader header;
1602 /** Type of resource. */
1603 core.String kind;
1604 /**
1605 * The presence of this field indicates that there exist more results
1606 * following your last page of results in pagination order. To fetch them,
1607 * make another list request using this value as your page token.
1608 *
1609 * In this way you can retrieve the complete contents of even very large
1610 * collections one page at a time. However, if the contents of the collection
1611 * change between the first and last paginated list request, the set of all
1612 * elements returned will be an inconsistent view of the collection. There is
1613 * no way to retrieve a consistent snapshot of a collection larger than the
1614 * maximum page size.
1615 */
1616 core.String nextPageToken;
1617 /** The operation resources. */
1618 core.List<Operation> operations;
1619
1620 ManagedZoneOperationsListResponse();
1621
1622 ManagedZoneOperationsListResponse.fromJson(core.Map _json) {
1623 if (_json.containsKey("header")) {
1624 header = new ResponseHeader.fromJson(_json["header"]);
1625 }
1626 if (_json.containsKey("kind")) {
1627 kind = _json["kind"];
1628 }
1629 if (_json.containsKey("nextPageToken")) {
1630 nextPageToken = _json["nextPageToken"];
1631 }
1632 if (_json.containsKey("operations")) {
1633 operations = _json["operations"].map((value) => new Operation.fromJson(val ue)).toList();
1634 }
1635 }
1636
1637 core.Map toJson() {
1638 var _json = new core.Map();
1639 if (header != null) {
1640 _json["header"] = (header).toJson();
1641 }
1642 if (kind != null) {
1643 _json["kind"] = kind;
1644 }
1645 if (nextPageToken != null) {
1646 _json["nextPageToken"] = nextPageToken;
1647 }
1648 if (operations != null) {
1649 _json["operations"] = operations.map((value) => (value).toJson()).toList() ;
1650 }
1651 return _json;
1652 }
1653 }
1654
1655 class ManagedZonesDeleteResponse {
1656 ResponseHeader header;
1657
1658 ManagedZonesDeleteResponse();
1659
1660 ManagedZonesDeleteResponse.fromJson(core.Map _json) {
1661 if (_json.containsKey("header")) {
1662 header = new ResponseHeader.fromJson(_json["header"]);
1663 }
1664 }
1665
1666 core.Map toJson() {
1667 var _json = new core.Map();
1668 if (header != null) {
1669 _json["header"] = (header).toJson();
1670 }
1671 return _json;
1672 }
1673 }
1674
1675 class ManagedZonesListResponse {
1676 ResponseHeader header;
1677 /** Type of resource. */
1678 core.String kind;
1679 /** The managed zone resources. */
1680 core.List<ManagedZone> managedZones;
1681 /**
1682 * The presence of this field indicates that there exist more results
1683 * following your last page of results in pagination order. To fetch them,
1684 * make another list request using this value as your page token.
1685 *
1686 * In this way you can retrieve the complete contents of even very large
1687 * collections one page at a time. However, if the contents of the collection
1688 * change between the first and last paginated list request, the set of all
1689 * elements returned will be an inconsistent view of the collection. There is
1690 * no way to retrieve a consistent snapshot of a collection larger than the
1691 * maximum page size.
1692 */
1693 core.String nextPageToken;
1694
1695 ManagedZonesListResponse();
1696
1697 ManagedZonesListResponse.fromJson(core.Map _json) {
1698 if (_json.containsKey("header")) {
1699 header = new ResponseHeader.fromJson(_json["header"]);
1700 }
1701 if (_json.containsKey("kind")) {
1702 kind = _json["kind"];
1703 }
1704 if (_json.containsKey("managedZones")) {
1705 managedZones = _json["managedZones"].map((value) => new ManagedZone.fromJs on(value)).toList();
1706 }
1707 if (_json.containsKey("nextPageToken")) {
1708 nextPageToken = _json["nextPageToken"];
1709 }
1710 }
1711
1712 core.Map toJson() {
1713 var _json = new core.Map();
1714 if (header != null) {
1715 _json["header"] = (header).toJson();
1716 }
1717 if (kind != null) {
1718 _json["kind"] = kind;
1719 }
1720 if (managedZones != null) {
1721 _json["managedZones"] = managedZones.map((value) => (value).toJson()).toLi st();
1722 }
1723 if (nextPageToken != null) {
1724 _json["nextPageToken"] = nextPageToken;
1725 }
1726 return _json;
1727 }
1728 }
1729
1730 /**
1731 * An operation represents a successful mutation performed on a Cloud DNS
1732 * resource. Operations provide: - An audit log of server resource mutations. -
1733 * A way to recover/retry API calls in the case where the response is never
1734 * received by the caller. Use the caller specified client_operation_id.
1735 */
1736 class Operation {
1737 /** Only populated if the operation targeted a DnsKey (output only). */
1738 OperationDnsKeyContext dnsKeyContext;
1739 /**
1740 * Unique identifier for the resource. This is the client_operation_id if the
1741 * client specified it when the mutation was initiated, otherwise, it is
1742 * generated by the server. The name must be 1-63 characters long and match
1743 * the regular expression [-a-z0-9]? (output only)
1744 */
1745 core.String id;
1746 /**
1747 * Identifies what kind of resource this is. Value: the fixed string
1748 * "dns#operation".
1749 */
1750 core.String kind;
1751 /**
1752 * The time that this operation was started by the server. This is in RFC3339
1753 * text format (output only).
1754 */
1755 core.String startTime;
1756 /**
1757 * Status of the operation. Can be one of the following: "PENDING" or "DONE"
1758 * (output only).
1759 * Possible string values are:
1760 * - "DONE"
1761 * - "PENDING"
1762 */
1763 core.String status;
1764 /**
1765 * Type of the operation. Operations include insert, update, and delete
1766 * (output only).
1767 */
1768 core.String type;
1769 /**
1770 * User who requested the operation, for example: user@example.com.
1771 * cloud-dns-system for operations automatically done by the system. (output
1772 * only)
1773 */
1774 core.String user;
1775 /** Only populated if the operation targeted a ManagedZone (output only). */
1776 OperationManagedZoneContext zoneContext;
1777
1778 Operation();
1779
1780 Operation.fromJson(core.Map _json) {
1781 if (_json.containsKey("dnsKeyContext")) {
1782 dnsKeyContext = new OperationDnsKeyContext.fromJson(_json["dnsKeyContext"] );
1783 }
1784 if (_json.containsKey("id")) {
1785 id = _json["id"];
1786 }
1787 if (_json.containsKey("kind")) {
1788 kind = _json["kind"];
1789 }
1790 if (_json.containsKey("startTime")) {
1791 startTime = _json["startTime"];
1792 }
1793 if (_json.containsKey("status")) {
1794 status = _json["status"];
1795 }
1796 if (_json.containsKey("type")) {
1797 type = _json["type"];
1798 }
1799 if (_json.containsKey("user")) {
1800 user = _json["user"];
1801 }
1802 if (_json.containsKey("zoneContext")) {
1803 zoneContext = new OperationManagedZoneContext.fromJson(_json["zoneContext" ]);
1804 }
1805 }
1806
1807 core.Map toJson() {
1808 var _json = new core.Map();
1809 if (dnsKeyContext != null) {
1810 _json["dnsKeyContext"] = (dnsKeyContext).toJson();
1811 }
1812 if (id != null) {
1813 _json["id"] = id;
1814 }
1815 if (kind != null) {
1816 _json["kind"] = kind;
1817 }
1818 if (startTime != null) {
1819 _json["startTime"] = startTime;
1820 }
1821 if (status != null) {
1822 _json["status"] = status;
1823 }
1824 if (type != null) {
1825 _json["type"] = type;
1826 }
1827 if (user != null) {
1828 _json["user"] = user;
1829 }
1830 if (zoneContext != null) {
1831 _json["zoneContext"] = (zoneContext).toJson();
1832 }
1833 return _json;
1834 }
1835 }
1836
1837 class OperationDnsKeyContext {
1838 /** The post-operation DnsKey resource. */
1839 DnsKey newValue;
1840 /** The pre-operation DnsKey resource. */
1841 DnsKey oldValue;
1842
1843 OperationDnsKeyContext();
1844
1845 OperationDnsKeyContext.fromJson(core.Map _json) {
1846 if (_json.containsKey("newValue")) {
1847 newValue = new DnsKey.fromJson(_json["newValue"]);
1848 }
1849 if (_json.containsKey("oldValue")) {
1850 oldValue = new DnsKey.fromJson(_json["oldValue"]);
1851 }
1852 }
1853
1854 core.Map toJson() {
1855 var _json = new core.Map();
1856 if (newValue != null) {
1857 _json["newValue"] = (newValue).toJson();
1858 }
1859 if (oldValue != null) {
1860 _json["oldValue"] = (oldValue).toJson();
1861 }
1862 return _json;
1863 }
1864 }
1865
1866 class OperationManagedZoneContext {
1867 /** The post-operation ManagedZone resource. */
1868 ManagedZone newValue;
1869 /** The pre-operation ManagedZone resource. */
1870 ManagedZone oldValue;
1871
1872 OperationManagedZoneContext();
1873
1874 OperationManagedZoneContext.fromJson(core.Map _json) {
1875 if (_json.containsKey("newValue")) {
1876 newValue = new ManagedZone.fromJson(_json["newValue"]);
1877 }
1878 if (_json.containsKey("oldValue")) {
1879 oldValue = new ManagedZone.fromJson(_json["oldValue"]);
1880 }
1881 }
1882
1883 core.Map toJson() {
1884 var _json = new core.Map();
1885 if (newValue != null) {
1886 _json["newValue"] = (newValue).toJson();
1887 }
1888 if (oldValue != null) {
1889 _json["oldValue"] = (oldValue).toJson();
1890 }
1891 return _json;
1892 }
1893 }
1894
1895 /**
1896 * A project resource. The project is a top level container for resources
1897 * including Cloud DNS ManagedZones. Projects can be created only in the APIs
1898 * console.
1899 */
1900 class Project {
1901 /** User assigned unique identifier for the resource (output only). */
1902 core.String id;
1903 /**
1904 * Identifies what kind of resource this is. Value: the fixed string
1905 * "dns#project".
1906 */
1907 core.String kind;
1908 /**
1909 * Unique numeric identifier for the resource; defined by the server (output
1910 * only).
1911 */
1912 core.String number;
1913 /** Quotas assigned to this project (output only). */
1914 Quota quota;
1915
1916 Project();
1917
1918 Project.fromJson(core.Map _json) {
1919 if (_json.containsKey("id")) {
1920 id = _json["id"];
1921 }
1922 if (_json.containsKey("kind")) {
1923 kind = _json["kind"];
1924 }
1925 if (_json.containsKey("number")) {
1926 number = _json["number"];
1927 }
1928 if (_json.containsKey("quota")) {
1929 quota = new Quota.fromJson(_json["quota"]);
1930 }
1931 }
1932
1933 core.Map toJson() {
1934 var _json = new core.Map();
1935 if (id != null) {
1936 _json["id"] = id;
1937 }
1938 if (kind != null) {
1939 _json["kind"] = kind;
1940 }
1941 if (number != null) {
1942 _json["number"] = number;
1943 }
1944 if (quota != null) {
1945 _json["quota"] = (quota).toJson();
1946 }
1947 return _json;
1948 }
1949 }
1950
1951 /** Limits associated with a Project. */
1952 class Quota {
1953 /** Maximum allowed number of DnsKeys per ManagedZone. */
1954 core.int dnsKeysPerManagedZone;
1955 /**
1956 * Identifies what kind of resource this is. Value: the fixed string
1957 * "dns#quota".
1958 */
1959 core.String kind;
1960 /** Maximum allowed number of managed zones in the project. */
1961 core.int managedZones;
1962 /** Maximum allowed number of ResourceRecords per ResourceRecordSet. */
1963 core.int resourceRecordsPerRrset;
1964 /**
1965 * Maximum allowed number of ResourceRecordSets to add per
1966 * ChangesCreateRequest.
1967 */
1968 core.int rrsetAdditionsPerChange;
1969 /**
1970 * Maximum allowed number of ResourceRecordSets to delete per
1971 * ChangesCreateRequest.
1972 */
1973 core.int rrsetDeletionsPerChange;
1974 /** Maximum allowed number of ResourceRecordSets per zone in the project. */
1975 core.int rrsetsPerManagedZone;
1976 /**
1977 * Maximum allowed size for total rrdata in one ChangesCreateRequest in bytes.
1978 */
1979 core.int totalRrdataSizePerChange;
1980 /** DNSSEC algorithm and key length types that can be used for DnsKeys. */
1981 core.List<DnsKeySpec> whitelistedKeySpecs;
1982
1983 Quota();
1984
1985 Quota.fromJson(core.Map _json) {
1986 if (_json.containsKey("dnsKeysPerManagedZone")) {
1987 dnsKeysPerManagedZone = _json["dnsKeysPerManagedZone"];
1988 }
1989 if (_json.containsKey("kind")) {
1990 kind = _json["kind"];
1991 }
1992 if (_json.containsKey("managedZones")) {
1993 managedZones = _json["managedZones"];
1994 }
1995 if (_json.containsKey("resourceRecordsPerRrset")) {
1996 resourceRecordsPerRrset = _json["resourceRecordsPerRrset"];
1997 }
1998 if (_json.containsKey("rrsetAdditionsPerChange")) {
1999 rrsetAdditionsPerChange = _json["rrsetAdditionsPerChange"];
2000 }
2001 if (_json.containsKey("rrsetDeletionsPerChange")) {
2002 rrsetDeletionsPerChange = _json["rrsetDeletionsPerChange"];
2003 }
2004 if (_json.containsKey("rrsetsPerManagedZone")) {
2005 rrsetsPerManagedZone = _json["rrsetsPerManagedZone"];
2006 }
2007 if (_json.containsKey("totalRrdataSizePerChange")) {
2008 totalRrdataSizePerChange = _json["totalRrdataSizePerChange"];
2009 }
2010 if (_json.containsKey("whitelistedKeySpecs")) {
2011 whitelistedKeySpecs = _json["whitelistedKeySpecs"].map((value) => new DnsK eySpec.fromJson(value)).toList();
2012 }
2013 }
2014
2015 core.Map toJson() {
2016 var _json = new core.Map();
2017 if (dnsKeysPerManagedZone != null) {
2018 _json["dnsKeysPerManagedZone"] = dnsKeysPerManagedZone;
2019 }
2020 if (kind != null) {
2021 _json["kind"] = kind;
2022 }
2023 if (managedZones != null) {
2024 _json["managedZones"] = managedZones;
2025 }
2026 if (resourceRecordsPerRrset != null) {
2027 _json["resourceRecordsPerRrset"] = resourceRecordsPerRrset;
2028 }
2029 if (rrsetAdditionsPerChange != null) {
2030 _json["rrsetAdditionsPerChange"] = rrsetAdditionsPerChange;
2031 }
2032 if (rrsetDeletionsPerChange != null) {
2033 _json["rrsetDeletionsPerChange"] = rrsetDeletionsPerChange;
2034 }
2035 if (rrsetsPerManagedZone != null) {
2036 _json["rrsetsPerManagedZone"] = rrsetsPerManagedZone;
2037 }
2038 if (totalRrdataSizePerChange != null) {
2039 _json["totalRrdataSizePerChange"] = totalRrdataSizePerChange;
2040 }
2041 if (whitelistedKeySpecs != null) {
2042 _json["whitelistedKeySpecs"] = whitelistedKeySpecs.map((value) => (value). toJson()).toList();
2043 }
2044 return _json;
2045 }
2046 }
2047
2048 /** A unit of data that will be returned by the DNS servers. */
2049 class ResourceRecordSet {
2050 /**
2051 * Identifies what kind of resource this is. Value: the fixed string
2052 * "dns#resourceRecordSet".
2053 */
2054 core.String kind;
2055 /** For example, www.example.com. */
2056 core.String name;
2057 /** As defined in RFC 1035 (section 5) and RFC 1034 (section 3.6.1). */
2058 core.List<core.String> rrdatas;
2059 /** As defined in RFC 4034 (section 3.2). */
2060 core.List<core.String> signatureRrdatas;
2061 /**
2062 * Number of seconds that this ResourceRecordSet can be cached by resolvers.
2063 */
2064 core.int ttl;
2065 /**
2066 * The identifier of a supported record type, for example, A, AAAA, MX, TXT,
2067 * and so on.
2068 */
2069 core.String type;
2070
2071 ResourceRecordSet();
2072
2073 ResourceRecordSet.fromJson(core.Map _json) {
2074 if (_json.containsKey("kind")) {
2075 kind = _json["kind"];
2076 }
2077 if (_json.containsKey("name")) {
2078 name = _json["name"];
2079 }
2080 if (_json.containsKey("rrdatas")) {
2081 rrdatas = _json["rrdatas"];
2082 }
2083 if (_json.containsKey("signatureRrdatas")) {
2084 signatureRrdatas = _json["signatureRrdatas"];
2085 }
2086 if (_json.containsKey("ttl")) {
2087 ttl = _json["ttl"];
2088 }
2089 if (_json.containsKey("type")) {
2090 type = _json["type"];
2091 }
2092 }
2093
2094 core.Map toJson() {
2095 var _json = new core.Map();
2096 if (kind != null) {
2097 _json["kind"] = kind;
2098 }
2099 if (name != null) {
2100 _json["name"] = name;
2101 }
2102 if (rrdatas != null) {
2103 _json["rrdatas"] = rrdatas;
2104 }
2105 if (signatureRrdatas != null) {
2106 _json["signatureRrdatas"] = signatureRrdatas;
2107 }
2108 if (ttl != null) {
2109 _json["ttl"] = ttl;
2110 }
2111 if (type != null) {
2112 _json["type"] = type;
2113 }
2114 return _json;
2115 }
2116 }
2117
2118 class ResourceRecordSetsListResponse {
2119 ResponseHeader header;
2120 /** Type of resource. */
2121 core.String kind;
2122 /**
2123 * The presence of this field indicates that there exist more results
2124 * following your last page of results in pagination order. To fetch them,
2125 * make another list request using this value as your pagination token.
2126 *
2127 * In this way you can retrieve the complete contents of even very large
2128 * collections one page at a time. However, if the contents of the collection
2129 * change between the first and last paginated list request, the set of all
2130 * elements returned will be an inconsistent view of the collection. There is
2131 * no way to retrieve a consistent snapshot of a collection larger than the
2132 * maximum page size.
2133 */
2134 core.String nextPageToken;
2135 /** The resource record set resources. */
2136 core.List<ResourceRecordSet> rrsets;
2137
2138 ResourceRecordSetsListResponse();
2139
2140 ResourceRecordSetsListResponse.fromJson(core.Map _json) {
2141 if (_json.containsKey("header")) {
2142 header = new ResponseHeader.fromJson(_json["header"]);
2143 }
2144 if (_json.containsKey("kind")) {
2145 kind = _json["kind"];
2146 }
2147 if (_json.containsKey("nextPageToken")) {
2148 nextPageToken = _json["nextPageToken"];
2149 }
2150 if (_json.containsKey("rrsets")) {
2151 rrsets = _json["rrsets"].map((value) => new ResourceRecordSet.fromJson(val ue)).toList();
2152 }
2153 }
2154
2155 core.Map toJson() {
2156 var _json = new core.Map();
2157 if (header != null) {
2158 _json["header"] = (header).toJson();
2159 }
2160 if (kind != null) {
2161 _json["kind"] = kind;
2162 }
2163 if (nextPageToken != null) {
2164 _json["nextPageToken"] = nextPageToken;
2165 }
2166 if (rrsets != null) {
2167 _json["rrsets"] = rrsets.map((value) => (value).toJson()).toList();
2168 }
2169 return _json;
2170 }
2171 }
2172
2173 /** Elements common to every response. */
2174 class ResponseHeader {
2175 /**
2176 * For mutating operation requests that completed successfully. This is the
2177 * client_operation_id if the client specified it, otherwise it is generated
2178 * by the server (output only).
2179 */
2180 core.String operationId;
2181
2182 ResponseHeader();
2183
2184 ResponseHeader.fromJson(core.Map _json) {
2185 if (_json.containsKey("operationId")) {
2186 operationId = _json["operationId"];
2187 }
2188 }
2189
2190 core.Map toJson() {
2191 var _json = new core.Map();
2192 if (operationId != null) {
2193 _json["operationId"] = operationId;
2194 }
2195 return _json;
2196 }
2197 }
OLDNEW
« no previous file with comments | « generated/googleapis_beta/lib/datastore/v1beta3.dart ('k') | generated/googleapis_beta/lib/proximitybeacon/v1beta1.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698