@googleapis/dns 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/v2beta1.ts ADDED
@@ -0,0 +1,4436 @@
1
+ // Copyright 2020 Google LLC
2
+ // Licensed under the Apache License, Version 2.0 (the "License");
3
+ // you may not use this file except in compliance with the License.
4
+ // You may obtain a copy of the License at
5
+ //
6
+ // http://www.apache.org/licenses/LICENSE-2.0
7
+ //
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
13
+
14
+ /* eslint-disable @typescript-eslint/no-explicit-any */
15
+ /* eslint-disable @typescript-eslint/class-name-casing */
16
+ /* eslint-disable @typescript-eslint/no-unused-vars */
17
+ /* eslint-disable @typescript-eslint/no-empty-interface */
18
+ /* eslint-disable @typescript-eslint/no-namespace */
19
+ /* eslint-disable no-irregular-whitespace */
20
+
21
+ import {
22
+ OAuth2Client,
23
+ JWT,
24
+ Compute,
25
+ UserRefreshClient,
26
+ GaxiosPromise,
27
+ GoogleConfigurable,
28
+ createAPIRequest,
29
+ MethodOptions,
30
+ StreamMethodOptions,
31
+ GlobalOptions,
32
+ GoogleAuth,
33
+ BodyResponseCallback,
34
+ APIRequestContext,
35
+ } from 'googleapis-common';
36
+ import {Readable} from 'stream';
37
+
38
+ export namespace dns_v2beta1 {
39
+ export interface Options extends GlobalOptions {
40
+ version: 'v2beta1';
41
+ }
42
+
43
+ interface StandardParameters {
44
+ /**
45
+ * Auth client or API Key for the request
46
+ */
47
+ auth?:
48
+ | string
49
+ | OAuth2Client
50
+ | JWT
51
+ | Compute
52
+ | UserRefreshClient
53
+ | GoogleAuth;
54
+
55
+ /**
56
+ * V1 error format.
57
+ */
58
+ '$.xgafv'?: string;
59
+ /**
60
+ * OAuth access token.
61
+ */
62
+ access_token?: string;
63
+ /**
64
+ * Data format for response.
65
+ */
66
+ alt?: string;
67
+ /**
68
+ * JSONP
69
+ */
70
+ callback?: string;
71
+ /**
72
+ * Selector specifying which fields to include in a partial response.
73
+ */
74
+ fields?: string;
75
+ /**
76
+ * API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
77
+ */
78
+ key?: string;
79
+ /**
80
+ * OAuth 2.0 token for the current user.
81
+ */
82
+ oauth_token?: string;
83
+ /**
84
+ * Returns response with indentations and line breaks.
85
+ */
86
+ prettyPrint?: boolean;
87
+ /**
88
+ * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
89
+ */
90
+ quotaUser?: string;
91
+ /**
92
+ * Legacy upload protocol for media (e.g. "media", "multipart").
93
+ */
94
+ uploadType?: string;
95
+ /**
96
+ * Upload protocol for media (e.g. "raw", "multipart").
97
+ */
98
+ upload_protocol?: string;
99
+ }
100
+
101
+ /**
102
+ * Cloud DNS API
103
+ *
104
+ *
105
+ *
106
+ * @example
107
+ * const {google} = require('googleapis');
108
+ * const dns = google.dns('v2beta1');
109
+ *
110
+ * @namespace dns
111
+ * @type {Function}
112
+ * @version v2beta1
113
+ * @variation v2beta1
114
+ * @param {object=} options Options for Dns
115
+ */
116
+ export class Dns {
117
+ context: APIRequestContext;
118
+ changes: Resource$Changes;
119
+ dnsKeys: Resource$Dnskeys;
120
+ managedZoneOperations: Resource$Managedzoneoperations;
121
+ managedZones: Resource$Managedzones;
122
+ policies: Resource$Policies;
123
+ projects: Resource$Projects;
124
+ resourceRecordSets: Resource$Resourcerecordsets;
125
+
126
+ constructor(options: GlobalOptions, google?: GoogleConfigurable) {
127
+ this.context = {
128
+ _options: options || {},
129
+ google,
130
+ };
131
+
132
+ this.changes = new Resource$Changes(this.context);
133
+ this.dnsKeys = new Resource$Dnskeys(this.context);
134
+ this.managedZoneOperations = new Resource$Managedzoneoperations(
135
+ this.context
136
+ );
137
+ this.managedZones = new Resource$Managedzones(this.context);
138
+ this.policies = new Resource$Policies(this.context);
139
+ this.projects = new Resource$Projects(this.context);
140
+ this.resourceRecordSets = new Resource$Resourcerecordsets(this.context);
141
+ }
142
+ }
143
+
144
+ /**
145
+ * A Change represents a set of ResourceRecordSet additions and deletions applied atomically to a ManagedZone. ResourceRecordSets within a ManagedZone are modified by creating a new Change element in the Changes collection. In turn the Changes collection also records the past modifications to the ResourceRecordSets in a ManagedZone. The current state of the ManagedZone is the sum effect of applying all Change elements in the Changes collection in sequence.
146
+ */
147
+ export interface Schema$Change {
148
+ /**
149
+ * Which ResourceRecordSets to add?
150
+ */
151
+ additions?: Schema$ResourceRecordSet[];
152
+ /**
153
+ * Which ResourceRecordSets to remove? Must match existing data exactly.
154
+ */
155
+ deletions?: Schema$ResourceRecordSet[];
156
+ /**
157
+ * Unique identifier for the resource; defined by the server (output only).
158
+ */
159
+ id?: string | null;
160
+ /**
161
+ * If the DNS queries for the zone will be served.
162
+ */
163
+ isServing?: boolean | null;
164
+ kind?: string | null;
165
+ /**
166
+ * The time that this operation was started by the server (output only). This is in RFC3339 text format.
167
+ */
168
+ startTime?: string | null;
169
+ /**
170
+ * Status of the operation (output only). A status of "done" means that the request to update the authoritative servers has been sent but the servers might not be updated yet.
171
+ */
172
+ status?: string | null;
173
+ }
174
+ /**
175
+ * The response to a request to enumerate Changes to a ResourceRecordSets collection.
176
+ */
177
+ export interface Schema$ChangesListResponse {
178
+ /**
179
+ * The requested changes.
180
+ */
181
+ changes?: Schema$Change[];
182
+ header?: Schema$ResponseHeader;
183
+ /**
184
+ * Type of resource.
185
+ */
186
+ kind?: string | null;
187
+ /**
188
+ * The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your pagination token. In this way you can retrieve the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned will be an inconsistent view of the collection. There is no way to retrieve a "snapshot" of collections larger than the maximum page size.
189
+ */
190
+ nextPageToken?: string | null;
191
+ }
192
+ /**
193
+ * A DNSSEC key pair.
194
+ */
195
+ export interface Schema$DnsKey {
196
+ /**
197
+ * String mnemonic specifying the DNSSEC algorithm of this key. Immutable after creation time.
198
+ */
199
+ algorithm?: string | null;
200
+ /**
201
+ * The time that this resource was created in the control plane. This is in RFC3339 text format. Output only.
202
+ */
203
+ creationTime?: string | null;
204
+ /**
205
+ * A mutable string of at most 1024 characters associated with this resource for the user's convenience. Has no effect on the resource's function.
206
+ */
207
+ description?: string | null;
208
+ /**
209
+ * Cryptographic hashes of the DNSKEY resource record associated with this DnsKey. These digests are needed to construct a DS record that points at this DNS key. Output only.
210
+ */
211
+ digests?: Schema$DnsKeyDigest[];
212
+ /**
213
+ * Unique identifier for the resource; defined by the server (output only).
214
+ */
215
+ id?: string | null;
216
+ /**
217
+ * Active keys will be used to sign subsequent changes to the ManagedZone. Inactive keys will still be present as DNSKEY Resource Records for the use of resolvers validating existing signatures.
218
+ */
219
+ isActive?: boolean | null;
220
+ /**
221
+ * Length of the key in bits. Specified at creation time then immutable.
222
+ */
223
+ keyLength?: number | null;
224
+ /**
225
+ * The key tag is a non-cryptographic hash of the a DNSKEY resource record associated with this DnsKey. The key tag can be used to identify a DNSKEY more quickly (but it is not a unique identifier). In particular, the key tag is used in a parent zone's DS record to point at the DNSKEY in this child ManagedZone. The key tag is a number in the range [0, 65535] and the algorithm to calculate it is specified in RFC4034 Appendix B. Output only.
226
+ */
227
+ keyTag?: number | null;
228
+ kind?: string | null;
229
+ /**
230
+ * Base64 encoded public half of this key. Output only.
231
+ */
232
+ publicKey?: string | null;
233
+ /**
234
+ * One of "KEY_SIGNING" or "ZONE_SIGNING". Keys of type KEY_SIGNING have the Secure Entry Point flag set and, when active, will be used to sign only resource record sets of type DNSKEY. Otherwise, the Secure Entry Point flag will be cleared and this key will be used to sign only resource record sets of other types. Immutable after creation time.
235
+ */
236
+ type?: string | null;
237
+ }
238
+ export interface Schema$DnsKeyDigest {
239
+ /**
240
+ * The base-16 encoded bytes of this digest. Suitable for use in a DS resource record.
241
+ */
242
+ digest?: string | null;
243
+ /**
244
+ * Specifies the algorithm used to calculate this digest.
245
+ */
246
+ type?: string | null;
247
+ }
248
+ /**
249
+ * The response to a request to enumerate DnsKeys in a ManagedZone.
250
+ */
251
+ export interface Schema$DnsKeysListResponse {
252
+ /**
253
+ * The requested resources.
254
+ */
255
+ dnsKeys?: Schema$DnsKey[];
256
+ header?: Schema$ResponseHeader;
257
+ /**
258
+ * Type of resource.
259
+ */
260
+ kind?: string | null;
261
+ /**
262
+ * The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your pagination token. In this way you can retrieve the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned will be an inconsistent view of the collection. There is no way to retrieve a "snapshot" of collections larger than the maximum page size.
263
+ */
264
+ nextPageToken?: string | null;
265
+ }
266
+ /**
267
+ * Parameters for DnsKey key generation. Used for generating initial keys for a new ManagedZone and as default when adding a new DnsKey.
268
+ */
269
+ export interface Schema$DnsKeySpec {
270
+ /**
271
+ * String mnemonic specifying the DNSSEC algorithm of this key.
272
+ */
273
+ algorithm?: string | null;
274
+ /**
275
+ * Length of the keys in bits.
276
+ */
277
+ keyLength?: number | null;
278
+ /**
279
+ * Specifies whether this is a key signing key (KSK) or a zone signing key (ZSK). Key signing keys have the Secure Entry Point flag set and, when active, will only be used to sign resource record sets of type DNSKEY. Zone signing keys do not have the Secure Entry Point flag set and will be used to sign all other types of resource record sets.
280
+ */
281
+ keyType?: string | null;
282
+ kind?: string | null;
283
+ }
284
+ /**
285
+ * A zone is a subtree of the DNS namespace under one administrative responsibility. A ManagedZone is a resource that represents a DNS zone hosted by the Cloud DNS service.
286
+ */
287
+ export interface Schema$ManagedZone {
288
+ /**
289
+ * The time that this resource was created on the server. This is in RFC3339 text format. Output only.
290
+ */
291
+ creationTime?: string | null;
292
+ /**
293
+ * A mutable string of at most 1024 characters associated with this resource for the user's convenience. Has no effect on the managed zone's function.
294
+ */
295
+ description?: string | null;
296
+ /**
297
+ * The DNS name of this managed zone, for instance "example.com.".
298
+ */
299
+ dnsName?: string | null;
300
+ /**
301
+ * DNSSEC configuration.
302
+ */
303
+ dnssecConfig?: Schema$ManagedZoneDnsSecConfig;
304
+ /**
305
+ * The presence for this field indicates that outbound forwarding is enabled for this zone. The value of this field contains the set of destinations to forward to.
306
+ */
307
+ forwardingConfig?: Schema$ManagedZoneForwardingConfig;
308
+ /**
309
+ * Unique identifier for the resource; defined by the server (output only)
310
+ */
311
+ id?: string | null;
312
+ kind?: string | null;
313
+ /**
314
+ * User labels.
315
+ */
316
+ labels?: {[key: string]: string} | null;
317
+ /**
318
+ * User assigned name for this resource. Must be unique within the project. The name must be 1-63 characters long, must begin with a letter, end with a letter or digit, and only contain lowercase letters, digits or dashes.
319
+ */
320
+ name?: string | null;
321
+ /**
322
+ * Delegate your managed_zone to these virtual name servers; defined by the server (output only)
323
+ */
324
+ nameServers?: string[] | null;
325
+ /**
326
+ * Optionally specifies the NameServerSet for this ManagedZone. A NameServerSet is a set of DNS name servers that all host the same ManagedZones. Most users will leave this field unset.
327
+ */
328
+ nameServerSet?: string | null;
329
+ /**
330
+ * The presence of this field indicates that DNS Peering is enabled for this zone. The value of this field contains the network to peer with.
331
+ */
332
+ peeringConfig?: Schema$ManagedZonePeeringConfig;
333
+ /**
334
+ * For privately visible zones, the set of Virtual Private Cloud resources that the zone is visible from.
335
+ */
336
+ privateVisibilityConfig?: Schema$ManagedZonePrivateVisibilityConfig;
337
+ /**
338
+ * The presence of this field indicates that this is a managed reverse lookup zone and Cloud DNS will resolve reverse lookup queries using automatically configured records for VPC resources. This only applies to networks listed under private_visibility_config.
339
+ */
340
+ reverseLookupConfig?: Schema$ManagedZoneReverseLookupConfig;
341
+ /**
342
+ * The zone's visibility: public zones are exposed to the Internet, while private zones are visible only to Virtual Private Cloud resources.
343
+ */
344
+ visibility?: string | null;
345
+ }
346
+ export interface Schema$ManagedZoneDnsSecConfig {
347
+ /**
348
+ * Specifies parameters for generating initial DnsKeys for this ManagedZone. Can only be changed while the state is OFF.
349
+ */
350
+ defaultKeySpecs?: Schema$DnsKeySpec[];
351
+ kind?: string | null;
352
+ /**
353
+ * Specifies the mechanism for authenticated denial-of-existence responses. Can only be changed while the state is OFF.
354
+ */
355
+ nonExistence?: string | null;
356
+ /**
357
+ * Specifies whether DNSSEC is enabled, and what mode it is in.
358
+ */
359
+ state?: string | null;
360
+ }
361
+ export interface Schema$ManagedZoneForwardingConfig {
362
+ kind?: string | null;
363
+ /**
364
+ * List of target name servers to forward to. Cloud DNS will select the best available name server if more than one target is given.
365
+ */
366
+ targetNameServers?: Schema$ManagedZoneForwardingConfigNameServerTarget[];
367
+ }
368
+ export interface Schema$ManagedZoneForwardingConfigNameServerTarget {
369
+ /**
370
+ * Forwarding path for this NameServerTarget. If unset or set to DEFAULT, Cloud DNS will make forwarding decision based on address ranges, i.e. RFC1918 addresses go to the VPC, non-RFC1918 addresses go to the Internet. When set to PRIVATE, Cloud DNS will always send queries through VPC for this target.
371
+ */
372
+ forwardingPath?: string | null;
373
+ /**
374
+ * IPv4 address of a target name server.
375
+ */
376
+ ipv4Address?: string | null;
377
+ kind?: string | null;
378
+ }
379
+ export interface Schema$ManagedZoneOperationsListResponse {
380
+ header?: Schema$ResponseHeader;
381
+ kind?: string | null;
382
+ /**
383
+ * The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your page token. In this way you can retrieve the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned will be an inconsistent view of the collection. There is no way to retrieve a consistent snapshot of a collection larger than the maximum page size.
384
+ */
385
+ nextPageToken?: string | null;
386
+ /**
387
+ * The operation resources.
388
+ */
389
+ operations?: Schema$Operation[];
390
+ }
391
+ export interface Schema$ManagedZonePeeringConfig {
392
+ kind?: string | null;
393
+ /**
394
+ * The network with which to peer.
395
+ */
396
+ targetNetwork?: Schema$ManagedZonePeeringConfigTargetNetwork;
397
+ }
398
+ export interface Schema$ManagedZonePeeringConfigTargetNetwork {
399
+ /**
400
+ * The time at which the zone was deactivated, in RFC 3339 date-time format. An empty string indicates that the peering connection is active. The producer network can deactivate a zone. The zone is automatically deactivated if the producer network that the zone targeted is deleted. Output only.
401
+ */
402
+ deactivateTime?: string | null;
403
+ kind?: string | null;
404
+ /**
405
+ * The fully qualified URL of the VPC network to forward queries to. This should be formatted like https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}
406
+ */
407
+ networkUrl?: string | null;
408
+ }
409
+ export interface Schema$ManagedZonePrivateVisibilityConfig {
410
+ kind?: string | null;
411
+ /**
412
+ * The list of VPC networks that can see this zone.
413
+ */
414
+ networks?: Schema$ManagedZonePrivateVisibilityConfigNetwork[];
415
+ }
416
+ export interface Schema$ManagedZonePrivateVisibilityConfigNetwork {
417
+ kind?: string | null;
418
+ /**
419
+ * The fully qualified URL of the VPC network to bind to. This should be formatted like https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}
420
+ */
421
+ networkUrl?: string | null;
422
+ }
423
+ export interface Schema$ManagedZoneReverseLookupConfig {
424
+ kind?: string | null;
425
+ }
426
+ export interface Schema$ManagedZonesListResponse {
427
+ header?: Schema$ResponseHeader;
428
+ /**
429
+ * Type of resource.
430
+ */
431
+ kind?: string | null;
432
+ /**
433
+ * The managed zone resources.
434
+ */
435
+ managedZones?: Schema$ManagedZone[];
436
+ /**
437
+ * The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your page token. In this way you can retrieve the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned will be an inconsistent view of the collection. There is no way to retrieve a consistent snapshot of a collection larger than the maximum page size.
438
+ */
439
+ nextPageToken?: string | null;
440
+ }
441
+ /**
442
+ * An operation represents a successful mutation performed on a Cloud DNS resource. Operations provide: - An audit log of server resource mutations. - A way to recover/retry API calls in the case where the response is never received by the caller. Use the caller specified client_operation_id.
443
+ */
444
+ export interface Schema$Operation {
445
+ /**
446
+ * Only populated if the operation targeted a DnsKey (output only).
447
+ */
448
+ dnsKeyContext?: Schema$OperationDnsKeyContext;
449
+ /**
450
+ * Unique identifier for the resource. This is the client_operation_id if the client specified it when the mutation was initiated, otherwise, it is generated by the server. The name must be 1-63 characters long and match the regular expression [-a-z0-9]? (output only)
451
+ */
452
+ id?: string | null;
453
+ kind?: string | null;
454
+ /**
455
+ * The time that this operation was started by the server. This is in RFC3339 text format (output only).
456
+ */
457
+ startTime?: string | null;
458
+ /**
459
+ * Status of the operation. Can be one of the following: "PENDING" or "DONE" (output only). A status of "DONE" means that the request to update the authoritative servers has been sent, but the servers might not be updated yet.
460
+ */
461
+ status?: string | null;
462
+ /**
463
+ * Type of the operation. Operations include insert, update, and delete (output only).
464
+ */
465
+ type?: string | null;
466
+ /**
467
+ * User who requested the operation, for example: user@example.com. cloud-dns-system for operations automatically done by the system. (output only)
468
+ */
469
+ user?: string | null;
470
+ /**
471
+ * Only populated if the operation targeted a ManagedZone (output only).
472
+ */
473
+ zoneContext?: Schema$OperationManagedZoneContext;
474
+ }
475
+ export interface Schema$OperationDnsKeyContext {
476
+ /**
477
+ * The post-operation DnsKey resource.
478
+ */
479
+ newValue?: Schema$DnsKey;
480
+ /**
481
+ * The pre-operation DnsKey resource.
482
+ */
483
+ oldValue?: Schema$DnsKey;
484
+ }
485
+ export interface Schema$OperationManagedZoneContext {
486
+ /**
487
+ * The post-operation ManagedZone resource.
488
+ */
489
+ newValue?: Schema$ManagedZone;
490
+ /**
491
+ * The pre-operation ManagedZone resource.
492
+ */
493
+ oldValue?: Schema$ManagedZone;
494
+ }
495
+ export interface Schema$PoliciesListResponse {
496
+ header?: Schema$ResponseHeader;
497
+ /**
498
+ * Type of resource.
499
+ */
500
+ kind?: string | null;
501
+ /**
502
+ * The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your page token. In this way you can retrieve the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned will be an inconsistent view of the collection. There is no way to retrieve a consistent snapshot of a collection larger than the maximum page size.
503
+ */
504
+ nextPageToken?: string | null;
505
+ /**
506
+ * The policy resources.
507
+ */
508
+ policies?: Schema$Policy[];
509
+ }
510
+ export interface Schema$PoliciesPatchResponse {
511
+ header?: Schema$ResponseHeader;
512
+ policy?: Schema$Policy;
513
+ }
514
+ export interface Schema$PoliciesUpdateResponse {
515
+ header?: Schema$ResponseHeader;
516
+ policy?: Schema$Policy;
517
+ }
518
+ /**
519
+ * A policy is a collection of DNS rules applied to one or more Virtual Private Cloud resources.
520
+ */
521
+ export interface Schema$Policy {
522
+ /**
523
+ * Sets an alternative name server for the associated networks. When specified, all DNS queries are forwarded to a name server that you choose. Names such as .internal are not available when an alternative name server is specified.
524
+ */
525
+ alternativeNameServerConfig?: Schema$PolicyAlternativeNameServerConfig;
526
+ /**
527
+ * A mutable string of at most 1024 characters associated with this resource for the user's convenience. Has no effect on the policy's function.
528
+ */
529
+ description?: string | null;
530
+ /**
531
+ * Allows networks bound to this policy to receive DNS queries sent by VMs or applications over VPN connections. When enabled, a virtual IP address will be allocated from each of the sub-networks that are bound to this policy.
532
+ */
533
+ enableInboundForwarding?: boolean | null;
534
+ /**
535
+ * Controls whether logging is enabled for the networks bound to this policy. Defaults to no logging if not set.
536
+ */
537
+ enableLogging?: boolean | null;
538
+ /**
539
+ * Unique identifier for the resource; defined by the server (output only).
540
+ */
541
+ id?: string | null;
542
+ kind?: string | null;
543
+ /**
544
+ * User assigned name for this policy.
545
+ */
546
+ name?: string | null;
547
+ /**
548
+ * List of network names specifying networks to which this policy is applied.
549
+ */
550
+ networks?: Schema$PolicyNetwork[];
551
+ }
552
+ export interface Schema$PolicyAlternativeNameServerConfig {
553
+ kind?: string | null;
554
+ /**
555
+ * Sets an alternative name server for the associated networks. When specified, all DNS queries are forwarded to a name server that you choose. Names such as .internal are not available when an alternative name server is specified.
556
+ */
557
+ targetNameServers?: Schema$PolicyAlternativeNameServerConfigTargetNameServer[];
558
+ }
559
+ export interface Schema$PolicyAlternativeNameServerConfigTargetNameServer {
560
+ /**
561
+ * Forwarding path for this TargetNameServer. If unset or set to DEFAULT, Cloud DNS will make forwarding decision based on address ranges, i.e. RFC1918 addresses go to the VPC, non-RFC1918 addresses go to the Internet. When set to PRIVATE, Cloud DNS will always send queries through VPC for this target.
562
+ */
563
+ forwardingPath?: string | null;
564
+ /**
565
+ * IPv4 address to forward to.
566
+ */
567
+ ipv4Address?: string | null;
568
+ kind?: string | null;
569
+ }
570
+ export interface Schema$PolicyNetwork {
571
+ kind?: string | null;
572
+ /**
573
+ * The fully qualified URL of the VPC network to bind to. This should be formatted like https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}
574
+ */
575
+ networkUrl?: string | null;
576
+ }
577
+ /**
578
+ * A project resource. The project is a top level container for resources including Cloud DNS ManagedZones. Projects can be created only in the APIs console.
579
+ */
580
+ export interface Schema$Project {
581
+ /**
582
+ * User assigned unique identifier for the resource (output only).
583
+ */
584
+ id?: string | null;
585
+ kind?: string | null;
586
+ /**
587
+ * Unique numeric identifier for the resource; defined by the server (output only).
588
+ */
589
+ number?: string | null;
590
+ /**
591
+ * Quotas assigned to this project (output only).
592
+ */
593
+ quota?: Schema$Quota;
594
+ }
595
+ /**
596
+ * Limits associated with a Project.
597
+ */
598
+ export interface Schema$Quota {
599
+ /**
600
+ * Maximum allowed number of DnsKeys per ManagedZone.
601
+ */
602
+ dnsKeysPerManagedZone?: number | null;
603
+ kind?: string | null;
604
+ /**
605
+ * Maximum allowed number of managed zones in the project.
606
+ */
607
+ managedZones?: number | null;
608
+ /**
609
+ * Maximum allowed number of managed zones which can be attached to a network.
610
+ */
611
+ managedZonesPerNetwork?: number | null;
612
+ /**
613
+ * Maximum allowed number of networks to which a privately scoped zone can be attached.
614
+ */
615
+ networksPerManagedZone?: number | null;
616
+ /**
617
+ * Maximum allowed number of networks per policy.
618
+ */
619
+ networksPerPolicy?: number | null;
620
+ /**
621
+ * Maximum allowed number of policies per project.
622
+ */
623
+ policies?: number | null;
624
+ /**
625
+ * Maximum allowed number of ResourceRecords per ResourceRecordSet.
626
+ */
627
+ resourceRecordsPerRrset?: number | null;
628
+ /**
629
+ * Maximum allowed number of ResourceRecordSets to add per ChangesCreateRequest.
630
+ */
631
+ rrsetAdditionsPerChange?: number | null;
632
+ /**
633
+ * Maximum allowed number of ResourceRecordSets to delete per ChangesCreateRequest.
634
+ */
635
+ rrsetDeletionsPerChange?: number | null;
636
+ /**
637
+ * Maximum allowed number of ResourceRecordSets per zone in the project.
638
+ */
639
+ rrsetsPerManagedZone?: number | null;
640
+ /**
641
+ * Maximum allowed number of target name servers per managed forwarding zone.
642
+ */
643
+ targetNameServersPerManagedZone?: number | null;
644
+ /**
645
+ * Maximum allowed number of alternative target name servers per policy.
646
+ */
647
+ targetNameServersPerPolicy?: number | null;
648
+ /**
649
+ * Maximum allowed size for total rrdata in one ChangesCreateRequest in bytes.
650
+ */
651
+ totalRrdataSizePerChange?: number | null;
652
+ /**
653
+ * DNSSEC algorithm and key length types that can be used for DnsKeys.
654
+ */
655
+ whitelistedKeySpecs?: Schema$DnsKeySpec[];
656
+ }
657
+ /**
658
+ * A unit of data that will be returned by the DNS servers.
659
+ */
660
+ export interface Schema$ResourceRecordSet {
661
+ kind?: string | null;
662
+ /**
663
+ * For example, www.example.com.
664
+ */
665
+ name?: string | null;
666
+ /**
667
+ * As defined in RFC 1035 (section 5) and RFC 1034 (section 3.6.1) -- see <a href="/dns/records/json-record">examples</a>.
668
+ */
669
+ rrdatas?: string[] | null;
670
+ /**
671
+ * As defined in RFC 4034 (section 3.2).
672
+ */
673
+ signatureRrdatas?: string[] | null;
674
+ /**
675
+ * Number of seconds that this ResourceRecordSet can be cached by resolvers.
676
+ */
677
+ ttl?: number | null;
678
+ /**
679
+ * The identifier of a supported record type. See the list of <a href="/dns/docs/overview#supported_dns_record_types">Supported DNS record types</a>.
680
+ */
681
+ type?: string | null;
682
+ }
683
+ export interface Schema$ResourceRecordSetsListResponse {
684
+ header?: Schema$ResponseHeader;
685
+ /**
686
+ * Type of resource.
687
+ */
688
+ kind?: string | null;
689
+ /**
690
+ * The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your pagination token. In this way you can retrieve the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned will be an inconsistent view of the collection. There is no way to retrieve a consistent snapshot of a collection larger than the maximum page size.
691
+ */
692
+ nextPageToken?: string | null;
693
+ /**
694
+ * The resource record set resources.
695
+ */
696
+ rrsets?: Schema$ResourceRecordSet[];
697
+ }
698
+ /**
699
+ * Elements common to every response.
700
+ */
701
+ export interface Schema$ResponseHeader {
702
+ /**
703
+ * For mutating operation requests that completed successfully. This is the client_operation_id if the client specified it, otherwise it is generated by the server (output only).
704
+ */
705
+ operationId?: string | null;
706
+ }
707
+
708
+ export class Resource$Changes {
709
+ context: APIRequestContext;
710
+ constructor(context: APIRequestContext) {
711
+ this.context = context;
712
+ }
713
+
714
+ /**
715
+ * dns.changes.create
716
+ * @desc Atomically update the ResourceRecordSet collection.
717
+ * @example
718
+ * // Before running the sample:
719
+ * // - Enable the API at:
720
+ * // https://console.developers.google.com/apis/api/dns.googleapis.com
721
+ * // - Login into gcloud by running:
722
+ * // `$ gcloud auth application-default login`
723
+ * // - Install the npm module by running:
724
+ * // `$ npm install googleapis`
725
+ *
726
+ * const {google} = require('googleapis');
727
+ * const dns = google.dns('v2beta1');
728
+ *
729
+ * async function main() {
730
+ * const auth = new google.auth.GoogleAuth({
731
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
732
+ * scopes: [
733
+ * 'https://www.googleapis.com/auth/cloud-platform',
734
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
735
+ * ],
736
+ * });
737
+ *
738
+ * // Acquire an auth client, and bind it to all future calls
739
+ * const authClient = await auth.getClient();
740
+ * google.options({auth: authClient});
741
+ *
742
+ * // Do the magic
743
+ * const res = await dns.changes.create({
744
+ * // For mutating operation requests only. An optional identifier
745
+ * // specified by the client. Must be unique for operation resources in the
746
+ * // Operations collection.
747
+ * clientOperationId: 'placeholder-value',
748
+ * // Identifies the managed zone addressed by this request. Can be the managed
749
+ * // zone name or id.
750
+ * managedZone: 'placeholder-value',
751
+ * // Identifies the project addressed by this request.
752
+ * project: 'placeholder-value',
753
+ *
754
+ * // Request body metadata
755
+ * requestBody: {
756
+ * // request body parameters
757
+ * // {
758
+ * // "additions": [],
759
+ * // "deletions": [],
760
+ * // "id": "my_id",
761
+ * // "isServing": false,
762
+ * // "kind": "my_kind",
763
+ * // "startTime": "my_startTime",
764
+ * // "status": "my_status"
765
+ * // }
766
+ * },
767
+ * });
768
+ * console.log(res.data);
769
+ *
770
+ * // Example response
771
+ * // {
772
+ * // "additions": [],
773
+ * // "deletions": [],
774
+ * // "id": "my_id",
775
+ * // "isServing": false,
776
+ * // "kind": "my_kind",
777
+ * // "startTime": "my_startTime",
778
+ * // "status": "my_status"
779
+ * // }
780
+ * }
781
+ *
782
+ * main().catch(e => {
783
+ * console.error(e);
784
+ * throw e;
785
+ * });
786
+ *
787
+ * @alias dns.changes.create
788
+ * @memberOf! ()
789
+ *
790
+ * @param {object} params Parameters for request
791
+ * @param {string=} params.clientOperationId For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
792
+ * @param {string} params.managedZone Identifies the managed zone addressed by this request. Can be the managed zone name or id.
793
+ * @param {string} params.project Identifies the project addressed by this request.
794
+ * @param {().Change} params.requestBody Request body data
795
+ * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
796
+ * @param {callback} callback The callback that handles the response.
797
+ * @return {object} Request object
798
+ */
799
+ create(
800
+ params: Params$Resource$Changes$Create,
801
+ options: StreamMethodOptions
802
+ ): GaxiosPromise<Readable>;
803
+ create(
804
+ params?: Params$Resource$Changes$Create,
805
+ options?: MethodOptions
806
+ ): GaxiosPromise<Schema$Change>;
807
+ create(
808
+ params: Params$Resource$Changes$Create,
809
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
810
+ callback: BodyResponseCallback<Readable>
811
+ ): void;
812
+ create(
813
+ params: Params$Resource$Changes$Create,
814
+ options: MethodOptions | BodyResponseCallback<Schema$Change>,
815
+ callback: BodyResponseCallback<Schema$Change>
816
+ ): void;
817
+ create(
818
+ params: Params$Resource$Changes$Create,
819
+ callback: BodyResponseCallback<Schema$Change>
820
+ ): void;
821
+ create(callback: BodyResponseCallback<Schema$Change>): void;
822
+ create(
823
+ paramsOrCallback?:
824
+ | Params$Resource$Changes$Create
825
+ | BodyResponseCallback<Schema$Change>
826
+ | BodyResponseCallback<Readable>,
827
+ optionsOrCallback?:
828
+ | MethodOptions
829
+ | StreamMethodOptions
830
+ | BodyResponseCallback<Schema$Change>
831
+ | BodyResponseCallback<Readable>,
832
+ callback?:
833
+ | BodyResponseCallback<Schema$Change>
834
+ | BodyResponseCallback<Readable>
835
+ ): void | GaxiosPromise<Schema$Change> | GaxiosPromise<Readable> {
836
+ let params = (paramsOrCallback || {}) as Params$Resource$Changes$Create;
837
+ let options = (optionsOrCallback || {}) as MethodOptions;
838
+
839
+ if (typeof paramsOrCallback === 'function') {
840
+ callback = paramsOrCallback;
841
+ params = {} as Params$Resource$Changes$Create;
842
+ options = {};
843
+ }
844
+
845
+ if (typeof optionsOrCallback === 'function') {
846
+ callback = optionsOrCallback;
847
+ options = {};
848
+ }
849
+
850
+ const rootUrl = options.rootUrl || 'https://dns.googleapis.com/';
851
+ const parameters = {
852
+ options: Object.assign(
853
+ {
854
+ url: (
855
+ rootUrl +
856
+ '/dns/v2beta1/projects/{project}/managedZones/{managedZone}/changes'
857
+ ).replace(/([^:]\/)\/+/g, '$1'),
858
+ method: 'POST',
859
+ },
860
+ options
861
+ ),
862
+ params,
863
+ requiredParams: ['project', 'managedZone'],
864
+ pathParams: ['managedZone', 'project'],
865
+ context: this.context,
866
+ };
867
+ if (callback) {
868
+ createAPIRequest<Schema$Change>(
869
+ parameters,
870
+ callback as BodyResponseCallback<{} | void>
871
+ );
872
+ } else {
873
+ return createAPIRequest<Schema$Change>(parameters);
874
+ }
875
+ }
876
+
877
+ /**
878
+ * dns.changes.get
879
+ * @desc Fetch the representation of an existing Change.
880
+ * @example
881
+ * // Before running the sample:
882
+ * // - Enable the API at:
883
+ * // https://console.developers.google.com/apis/api/dns.googleapis.com
884
+ * // - Login into gcloud by running:
885
+ * // `$ gcloud auth application-default login`
886
+ * // - Install the npm module by running:
887
+ * // `$ npm install googleapis`
888
+ *
889
+ * const {google} = require('googleapis');
890
+ * const dns = google.dns('v2beta1');
891
+ *
892
+ * async function main() {
893
+ * const auth = new google.auth.GoogleAuth({
894
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
895
+ * scopes: [
896
+ * 'https://www.googleapis.com/auth/cloud-platform',
897
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
898
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readonly',
899
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
900
+ * ],
901
+ * });
902
+ *
903
+ * // Acquire an auth client, and bind it to all future calls
904
+ * const authClient = await auth.getClient();
905
+ * google.options({auth: authClient});
906
+ *
907
+ * // Do the magic
908
+ * const res = await dns.changes.get({
909
+ * // The identifier of the requested change, from a previous
910
+ * // ResourceRecordSetsChangeResponse.
911
+ * changeId: 'placeholder-value',
912
+ * // For mutating operation requests only. An optional identifier
913
+ * // specified by the client. Must be unique for operation resources in the
914
+ * // Operations collection.
915
+ * clientOperationId: 'placeholder-value',
916
+ * // Identifies the managed zone addressed by this request. Can be the managed
917
+ * // zone name or id.
918
+ * managedZone: 'placeholder-value',
919
+ * // Identifies the project addressed by this request.
920
+ * project: 'placeholder-value',
921
+ * });
922
+ * console.log(res.data);
923
+ *
924
+ * // Example response
925
+ * // {
926
+ * // "additions": [],
927
+ * // "deletions": [],
928
+ * // "id": "my_id",
929
+ * // "isServing": false,
930
+ * // "kind": "my_kind",
931
+ * // "startTime": "my_startTime",
932
+ * // "status": "my_status"
933
+ * // }
934
+ * }
935
+ *
936
+ * main().catch(e => {
937
+ * console.error(e);
938
+ * throw e;
939
+ * });
940
+ *
941
+ * @alias dns.changes.get
942
+ * @memberOf! ()
943
+ *
944
+ * @param {object} params Parameters for request
945
+ * @param {string} params.changeId The identifier of the requested change, from a previous ResourceRecordSetsChangeResponse.
946
+ * @param {string=} params.clientOperationId For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
947
+ * @param {string} params.managedZone Identifies the managed zone addressed by this request. Can be the managed zone name or id.
948
+ * @param {string} params.project Identifies the project addressed by this request.
949
+ * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
950
+ * @param {callback} callback The callback that handles the response.
951
+ * @return {object} Request object
952
+ */
953
+ get(
954
+ params: Params$Resource$Changes$Get,
955
+ options: StreamMethodOptions
956
+ ): GaxiosPromise<Readable>;
957
+ get(
958
+ params?: Params$Resource$Changes$Get,
959
+ options?: MethodOptions
960
+ ): GaxiosPromise<Schema$Change>;
961
+ get(
962
+ params: Params$Resource$Changes$Get,
963
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
964
+ callback: BodyResponseCallback<Readable>
965
+ ): void;
966
+ get(
967
+ params: Params$Resource$Changes$Get,
968
+ options: MethodOptions | BodyResponseCallback<Schema$Change>,
969
+ callback: BodyResponseCallback<Schema$Change>
970
+ ): void;
971
+ get(
972
+ params: Params$Resource$Changes$Get,
973
+ callback: BodyResponseCallback<Schema$Change>
974
+ ): void;
975
+ get(callback: BodyResponseCallback<Schema$Change>): void;
976
+ get(
977
+ paramsOrCallback?:
978
+ | Params$Resource$Changes$Get
979
+ | BodyResponseCallback<Schema$Change>
980
+ | BodyResponseCallback<Readable>,
981
+ optionsOrCallback?:
982
+ | MethodOptions
983
+ | StreamMethodOptions
984
+ | BodyResponseCallback<Schema$Change>
985
+ | BodyResponseCallback<Readable>,
986
+ callback?:
987
+ | BodyResponseCallback<Schema$Change>
988
+ | BodyResponseCallback<Readable>
989
+ ): void | GaxiosPromise<Schema$Change> | GaxiosPromise<Readable> {
990
+ let params = (paramsOrCallback || {}) as Params$Resource$Changes$Get;
991
+ let options = (optionsOrCallback || {}) as MethodOptions;
992
+
993
+ if (typeof paramsOrCallback === 'function') {
994
+ callback = paramsOrCallback;
995
+ params = {} as Params$Resource$Changes$Get;
996
+ options = {};
997
+ }
998
+
999
+ if (typeof optionsOrCallback === 'function') {
1000
+ callback = optionsOrCallback;
1001
+ options = {};
1002
+ }
1003
+
1004
+ const rootUrl = options.rootUrl || 'https://dns.googleapis.com/';
1005
+ const parameters = {
1006
+ options: Object.assign(
1007
+ {
1008
+ url: (
1009
+ rootUrl +
1010
+ '/dns/v2beta1/projects/{project}/managedZones/{managedZone}/changes/{changeId}'
1011
+ ).replace(/([^:]\/)\/+/g, '$1'),
1012
+ method: 'GET',
1013
+ },
1014
+ options
1015
+ ),
1016
+ params,
1017
+ requiredParams: ['project', 'managedZone', 'changeId'],
1018
+ pathParams: ['changeId', 'managedZone', 'project'],
1019
+ context: this.context,
1020
+ };
1021
+ if (callback) {
1022
+ createAPIRequest<Schema$Change>(
1023
+ parameters,
1024
+ callback as BodyResponseCallback<{} | void>
1025
+ );
1026
+ } else {
1027
+ return createAPIRequest<Schema$Change>(parameters);
1028
+ }
1029
+ }
1030
+
1031
+ /**
1032
+ * dns.changes.list
1033
+ * @desc Enumerate Changes to a ResourceRecordSet collection.
1034
+ * @example
1035
+ * // Before running the sample:
1036
+ * // - Enable the API at:
1037
+ * // https://console.developers.google.com/apis/api/dns.googleapis.com
1038
+ * // - Login into gcloud by running:
1039
+ * // `$ gcloud auth application-default login`
1040
+ * // - Install the npm module by running:
1041
+ * // `$ npm install googleapis`
1042
+ *
1043
+ * const {google} = require('googleapis');
1044
+ * const dns = google.dns('v2beta1');
1045
+ *
1046
+ * async function main() {
1047
+ * const auth = new google.auth.GoogleAuth({
1048
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1049
+ * scopes: [
1050
+ * 'https://www.googleapis.com/auth/cloud-platform',
1051
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
1052
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readonly',
1053
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
1054
+ * ],
1055
+ * });
1056
+ *
1057
+ * // Acquire an auth client, and bind it to all future calls
1058
+ * const authClient = await auth.getClient();
1059
+ * google.options({auth: authClient});
1060
+ *
1061
+ * // Do the magic
1062
+ * const res = await dns.changes.list({
1063
+ * // Identifies the managed zone addressed by this request. Can be the managed
1064
+ * // zone name or id.
1065
+ * managedZone: 'placeholder-value',
1066
+ * // Optional. Maximum number of results to be returned. If unspecified, the
1067
+ * // server will decide how many results to return.
1068
+ * maxResults: 'placeholder-value',
1069
+ * // Optional. A tag returned by a previous list request that was truncated.
1070
+ * // Use this parameter to continue a previous list request.
1071
+ * pageToken: 'placeholder-value',
1072
+ * // Identifies the project addressed by this request.
1073
+ * project: 'placeholder-value',
1074
+ * // Sorting criterion. The only supported value is change sequence.
1075
+ * sortBy: 'placeholder-value',
1076
+ * // Sorting order direction: 'ascending' or 'descending'.
1077
+ * sortOrder: 'placeholder-value',
1078
+ * });
1079
+ * console.log(res.data);
1080
+ *
1081
+ * // Example response
1082
+ * // {
1083
+ * // "changes": [],
1084
+ * // "header": {},
1085
+ * // "kind": "my_kind",
1086
+ * // "nextPageToken": "my_nextPageToken"
1087
+ * // }
1088
+ * }
1089
+ *
1090
+ * main().catch(e => {
1091
+ * console.error(e);
1092
+ * throw e;
1093
+ * });
1094
+ *
1095
+ * @alias dns.changes.list
1096
+ * @memberOf! ()
1097
+ *
1098
+ * @param {object} params Parameters for request
1099
+ * @param {string} params.managedZone Identifies the managed zone addressed by this request. Can be the managed zone name or id.
1100
+ * @param {integer=} params.maxResults Optional. Maximum number of results to be returned. If unspecified, the server will decide how many results to return.
1101
+ * @param {string=} params.pageToken Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.
1102
+ * @param {string} params.project Identifies the project addressed by this request.
1103
+ * @param {string=} params.sortBy Sorting criterion. The only supported value is change sequence.
1104
+ * @param {string=} params.sortOrder Sorting order direction: 'ascending' or 'descending'.
1105
+ * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
1106
+ * @param {callback} callback The callback that handles the response.
1107
+ * @return {object} Request object
1108
+ */
1109
+ list(
1110
+ params: Params$Resource$Changes$List,
1111
+ options: StreamMethodOptions
1112
+ ): GaxiosPromise<Readable>;
1113
+ list(
1114
+ params?: Params$Resource$Changes$List,
1115
+ options?: MethodOptions
1116
+ ): GaxiosPromise<Schema$ChangesListResponse>;
1117
+ list(
1118
+ params: Params$Resource$Changes$List,
1119
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
1120
+ callback: BodyResponseCallback<Readable>
1121
+ ): void;
1122
+ list(
1123
+ params: Params$Resource$Changes$List,
1124
+ options: MethodOptions | BodyResponseCallback<Schema$ChangesListResponse>,
1125
+ callback: BodyResponseCallback<Schema$ChangesListResponse>
1126
+ ): void;
1127
+ list(
1128
+ params: Params$Resource$Changes$List,
1129
+ callback: BodyResponseCallback<Schema$ChangesListResponse>
1130
+ ): void;
1131
+ list(callback: BodyResponseCallback<Schema$ChangesListResponse>): void;
1132
+ list(
1133
+ paramsOrCallback?:
1134
+ | Params$Resource$Changes$List
1135
+ | BodyResponseCallback<Schema$ChangesListResponse>
1136
+ | BodyResponseCallback<Readable>,
1137
+ optionsOrCallback?:
1138
+ | MethodOptions
1139
+ | StreamMethodOptions
1140
+ | BodyResponseCallback<Schema$ChangesListResponse>
1141
+ | BodyResponseCallback<Readable>,
1142
+ callback?:
1143
+ | BodyResponseCallback<Schema$ChangesListResponse>
1144
+ | BodyResponseCallback<Readable>
1145
+ ):
1146
+ | void
1147
+ | GaxiosPromise<Schema$ChangesListResponse>
1148
+ | GaxiosPromise<Readable> {
1149
+ let params = (paramsOrCallback || {}) as Params$Resource$Changes$List;
1150
+ let options = (optionsOrCallback || {}) as MethodOptions;
1151
+
1152
+ if (typeof paramsOrCallback === 'function') {
1153
+ callback = paramsOrCallback;
1154
+ params = {} as Params$Resource$Changes$List;
1155
+ options = {};
1156
+ }
1157
+
1158
+ if (typeof optionsOrCallback === 'function') {
1159
+ callback = optionsOrCallback;
1160
+ options = {};
1161
+ }
1162
+
1163
+ const rootUrl = options.rootUrl || 'https://dns.googleapis.com/';
1164
+ const parameters = {
1165
+ options: Object.assign(
1166
+ {
1167
+ url: (
1168
+ rootUrl +
1169
+ '/dns/v2beta1/projects/{project}/managedZones/{managedZone}/changes'
1170
+ ).replace(/([^:]\/)\/+/g, '$1'),
1171
+ method: 'GET',
1172
+ },
1173
+ options
1174
+ ),
1175
+ params,
1176
+ requiredParams: ['project', 'managedZone'],
1177
+ pathParams: ['managedZone', 'project'],
1178
+ context: this.context,
1179
+ };
1180
+ if (callback) {
1181
+ createAPIRequest<Schema$ChangesListResponse>(
1182
+ parameters,
1183
+ callback as BodyResponseCallback<{} | void>
1184
+ );
1185
+ } else {
1186
+ return createAPIRequest<Schema$ChangesListResponse>(parameters);
1187
+ }
1188
+ }
1189
+ }
1190
+
1191
+ export interface Params$Resource$Changes$Create extends StandardParameters {
1192
+ /**
1193
+ * For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
1194
+ */
1195
+ clientOperationId?: string;
1196
+ /**
1197
+ * Identifies the managed zone addressed by this request. Can be the managed zone name or id.
1198
+ */
1199
+ managedZone?: string;
1200
+ /**
1201
+ * Identifies the project addressed by this request.
1202
+ */
1203
+ project?: string;
1204
+
1205
+ /**
1206
+ * Request body metadata
1207
+ */
1208
+ requestBody?: Schema$Change;
1209
+ }
1210
+ export interface Params$Resource$Changes$Get extends StandardParameters {
1211
+ /**
1212
+ * The identifier of the requested change, from a previous ResourceRecordSetsChangeResponse.
1213
+ */
1214
+ changeId?: string;
1215
+ /**
1216
+ * For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
1217
+ */
1218
+ clientOperationId?: string;
1219
+ /**
1220
+ * Identifies the managed zone addressed by this request. Can be the managed zone name or id.
1221
+ */
1222
+ managedZone?: string;
1223
+ /**
1224
+ * Identifies the project addressed by this request.
1225
+ */
1226
+ project?: string;
1227
+ }
1228
+ export interface Params$Resource$Changes$List extends StandardParameters {
1229
+ /**
1230
+ * Identifies the managed zone addressed by this request. Can be the managed zone name or id.
1231
+ */
1232
+ managedZone?: string;
1233
+ /**
1234
+ * Optional. Maximum number of results to be returned. If unspecified, the server will decide how many results to return.
1235
+ */
1236
+ maxResults?: number;
1237
+ /**
1238
+ * Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.
1239
+ */
1240
+ pageToken?: string;
1241
+ /**
1242
+ * Identifies the project addressed by this request.
1243
+ */
1244
+ project?: string;
1245
+ /**
1246
+ * Sorting criterion. The only supported value is change sequence.
1247
+ */
1248
+ sortBy?: string;
1249
+ /**
1250
+ * Sorting order direction: 'ascending' or 'descending'.
1251
+ */
1252
+ sortOrder?: string;
1253
+ }
1254
+
1255
+ export class Resource$Dnskeys {
1256
+ context: APIRequestContext;
1257
+ constructor(context: APIRequestContext) {
1258
+ this.context = context;
1259
+ }
1260
+
1261
+ /**
1262
+ * dns.dnsKeys.get
1263
+ * @desc Fetch the representation of an existing DnsKey.
1264
+ * @example
1265
+ * // Before running the sample:
1266
+ * // - Enable the API at:
1267
+ * // https://console.developers.google.com/apis/api/dns.googleapis.com
1268
+ * // - Login into gcloud by running:
1269
+ * // `$ gcloud auth application-default login`
1270
+ * // - Install the npm module by running:
1271
+ * // `$ npm install googleapis`
1272
+ *
1273
+ * const {google} = require('googleapis');
1274
+ * const dns = google.dns('v2beta1');
1275
+ *
1276
+ * async function main() {
1277
+ * const auth = new google.auth.GoogleAuth({
1278
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1279
+ * scopes: [
1280
+ * 'https://www.googleapis.com/auth/cloud-platform',
1281
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
1282
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readonly',
1283
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
1284
+ * ],
1285
+ * });
1286
+ *
1287
+ * // Acquire an auth client, and bind it to all future calls
1288
+ * const authClient = await auth.getClient();
1289
+ * google.options({auth: authClient});
1290
+ *
1291
+ * // Do the magic
1292
+ * const res = await dns.dnsKeys.get({
1293
+ * // For mutating operation requests only. An optional identifier
1294
+ * // specified by the client. Must be unique for operation resources in the
1295
+ * // Operations collection.
1296
+ * clientOperationId: 'placeholder-value',
1297
+ * // An optional comma-separated list of digest types to compute and display
1298
+ * // for key signing keys. If omitted, the recommended digest type will be
1299
+ * // computed and displayed.
1300
+ * digestType: 'placeholder-value',
1301
+ * // The identifier of the requested DnsKey.
1302
+ * dnsKeyId: 'placeholder-value',
1303
+ * // Identifies the managed zone addressed by this request. Can be the managed
1304
+ * // zone name or id.
1305
+ * managedZone: 'placeholder-value',
1306
+ * // Identifies the project addressed by this request.
1307
+ * project: 'placeholder-value',
1308
+ * });
1309
+ * console.log(res.data);
1310
+ *
1311
+ * // Example response
1312
+ * // {
1313
+ * // "algorithm": "my_algorithm",
1314
+ * // "creationTime": "my_creationTime",
1315
+ * // "description": "my_description",
1316
+ * // "digests": [],
1317
+ * // "id": "my_id",
1318
+ * // "isActive": false,
1319
+ * // "keyLength": 0,
1320
+ * // "keyTag": 0,
1321
+ * // "kind": "my_kind",
1322
+ * // "publicKey": "my_publicKey",
1323
+ * // "type": "my_type"
1324
+ * // }
1325
+ * }
1326
+ *
1327
+ * main().catch(e => {
1328
+ * console.error(e);
1329
+ * throw e;
1330
+ * });
1331
+ *
1332
+ * @alias dns.dnsKeys.get
1333
+ * @memberOf! ()
1334
+ *
1335
+ * @param {object} params Parameters for request
1336
+ * @param {string=} params.clientOperationId For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
1337
+ * @param {string=} params.digestType An optional comma-separated list of digest types to compute and display for key signing keys. If omitted, the recommended digest type will be computed and displayed.
1338
+ * @param {string} params.dnsKeyId The identifier of the requested DnsKey.
1339
+ * @param {string} params.managedZone Identifies the managed zone addressed by this request. Can be the managed zone name or id.
1340
+ * @param {string} params.project Identifies the project addressed by this request.
1341
+ * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
1342
+ * @param {callback} callback The callback that handles the response.
1343
+ * @return {object} Request object
1344
+ */
1345
+ get(
1346
+ params: Params$Resource$Dnskeys$Get,
1347
+ options: StreamMethodOptions
1348
+ ): GaxiosPromise<Readable>;
1349
+ get(
1350
+ params?: Params$Resource$Dnskeys$Get,
1351
+ options?: MethodOptions
1352
+ ): GaxiosPromise<Schema$DnsKey>;
1353
+ get(
1354
+ params: Params$Resource$Dnskeys$Get,
1355
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
1356
+ callback: BodyResponseCallback<Readable>
1357
+ ): void;
1358
+ get(
1359
+ params: Params$Resource$Dnskeys$Get,
1360
+ options: MethodOptions | BodyResponseCallback<Schema$DnsKey>,
1361
+ callback: BodyResponseCallback<Schema$DnsKey>
1362
+ ): void;
1363
+ get(
1364
+ params: Params$Resource$Dnskeys$Get,
1365
+ callback: BodyResponseCallback<Schema$DnsKey>
1366
+ ): void;
1367
+ get(callback: BodyResponseCallback<Schema$DnsKey>): void;
1368
+ get(
1369
+ paramsOrCallback?:
1370
+ | Params$Resource$Dnskeys$Get
1371
+ | BodyResponseCallback<Schema$DnsKey>
1372
+ | BodyResponseCallback<Readable>,
1373
+ optionsOrCallback?:
1374
+ | MethodOptions
1375
+ | StreamMethodOptions
1376
+ | BodyResponseCallback<Schema$DnsKey>
1377
+ | BodyResponseCallback<Readable>,
1378
+ callback?:
1379
+ | BodyResponseCallback<Schema$DnsKey>
1380
+ | BodyResponseCallback<Readable>
1381
+ ): void | GaxiosPromise<Schema$DnsKey> | GaxiosPromise<Readable> {
1382
+ let params = (paramsOrCallback || {}) as Params$Resource$Dnskeys$Get;
1383
+ let options = (optionsOrCallback || {}) as MethodOptions;
1384
+
1385
+ if (typeof paramsOrCallback === 'function') {
1386
+ callback = paramsOrCallback;
1387
+ params = {} as Params$Resource$Dnskeys$Get;
1388
+ options = {};
1389
+ }
1390
+
1391
+ if (typeof optionsOrCallback === 'function') {
1392
+ callback = optionsOrCallback;
1393
+ options = {};
1394
+ }
1395
+
1396
+ const rootUrl = options.rootUrl || 'https://dns.googleapis.com/';
1397
+ const parameters = {
1398
+ options: Object.assign(
1399
+ {
1400
+ url: (
1401
+ rootUrl +
1402
+ '/dns/v2beta1/projects/{project}/managedZones/{managedZone}/dnsKeys/{dnsKeyId}'
1403
+ ).replace(/([^:]\/)\/+/g, '$1'),
1404
+ method: 'GET',
1405
+ },
1406
+ options
1407
+ ),
1408
+ params,
1409
+ requiredParams: ['project', 'managedZone', 'dnsKeyId'],
1410
+ pathParams: ['dnsKeyId', 'managedZone', 'project'],
1411
+ context: this.context,
1412
+ };
1413
+ if (callback) {
1414
+ createAPIRequest<Schema$DnsKey>(
1415
+ parameters,
1416
+ callback as BodyResponseCallback<{} | void>
1417
+ );
1418
+ } else {
1419
+ return createAPIRequest<Schema$DnsKey>(parameters);
1420
+ }
1421
+ }
1422
+
1423
+ /**
1424
+ * dns.dnsKeys.list
1425
+ * @desc Enumerate DnsKeys to a ResourceRecordSet collection.
1426
+ * @example
1427
+ * // Before running the sample:
1428
+ * // - Enable the API at:
1429
+ * // https://console.developers.google.com/apis/api/dns.googleapis.com
1430
+ * // - Login into gcloud by running:
1431
+ * // `$ gcloud auth application-default login`
1432
+ * // - Install the npm module by running:
1433
+ * // `$ npm install googleapis`
1434
+ *
1435
+ * const {google} = require('googleapis');
1436
+ * const dns = google.dns('v2beta1');
1437
+ *
1438
+ * async function main() {
1439
+ * const auth = new google.auth.GoogleAuth({
1440
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1441
+ * scopes: [
1442
+ * 'https://www.googleapis.com/auth/cloud-platform',
1443
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
1444
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readonly',
1445
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
1446
+ * ],
1447
+ * });
1448
+ *
1449
+ * // Acquire an auth client, and bind it to all future calls
1450
+ * const authClient = await auth.getClient();
1451
+ * google.options({auth: authClient});
1452
+ *
1453
+ * // Do the magic
1454
+ * const res = await dns.dnsKeys.list({
1455
+ * // An optional comma-separated list of digest types to compute and display
1456
+ * // for key signing keys. If omitted, the recommended digest type will be
1457
+ * // computed and displayed.
1458
+ * digestType: 'placeholder-value',
1459
+ * // Identifies the managed zone addressed by this request. Can be the managed
1460
+ * // zone name or id.
1461
+ * managedZone: 'placeholder-value',
1462
+ * // Optional. Maximum number of results to be returned. If unspecified, the
1463
+ * // server will decide how many results to return.
1464
+ * maxResults: 'placeholder-value',
1465
+ * // Optional. A tag returned by a previous list request that was truncated.
1466
+ * // Use this parameter to continue a previous list request.
1467
+ * pageToken: 'placeholder-value',
1468
+ * // Identifies the project addressed by this request.
1469
+ * project: 'placeholder-value',
1470
+ * });
1471
+ * console.log(res.data);
1472
+ *
1473
+ * // Example response
1474
+ * // {
1475
+ * // "dnsKeys": [],
1476
+ * // "header": {},
1477
+ * // "kind": "my_kind",
1478
+ * // "nextPageToken": "my_nextPageToken"
1479
+ * // }
1480
+ * }
1481
+ *
1482
+ * main().catch(e => {
1483
+ * console.error(e);
1484
+ * throw e;
1485
+ * });
1486
+ *
1487
+ * @alias dns.dnsKeys.list
1488
+ * @memberOf! ()
1489
+ *
1490
+ * @param {object} params Parameters for request
1491
+ * @param {string=} params.digestType An optional comma-separated list of digest types to compute and display for key signing keys. If omitted, the recommended digest type will be computed and displayed.
1492
+ * @param {string} params.managedZone Identifies the managed zone addressed by this request. Can be the managed zone name or id.
1493
+ * @param {integer=} params.maxResults Optional. Maximum number of results to be returned. If unspecified, the server will decide how many results to return.
1494
+ * @param {string=} params.pageToken Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.
1495
+ * @param {string} params.project Identifies the project addressed by this request.
1496
+ * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
1497
+ * @param {callback} callback The callback that handles the response.
1498
+ * @return {object} Request object
1499
+ */
1500
+ list(
1501
+ params: Params$Resource$Dnskeys$List,
1502
+ options: StreamMethodOptions
1503
+ ): GaxiosPromise<Readable>;
1504
+ list(
1505
+ params?: Params$Resource$Dnskeys$List,
1506
+ options?: MethodOptions
1507
+ ): GaxiosPromise<Schema$DnsKeysListResponse>;
1508
+ list(
1509
+ params: Params$Resource$Dnskeys$List,
1510
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
1511
+ callback: BodyResponseCallback<Readable>
1512
+ ): void;
1513
+ list(
1514
+ params: Params$Resource$Dnskeys$List,
1515
+ options: MethodOptions | BodyResponseCallback<Schema$DnsKeysListResponse>,
1516
+ callback: BodyResponseCallback<Schema$DnsKeysListResponse>
1517
+ ): void;
1518
+ list(
1519
+ params: Params$Resource$Dnskeys$List,
1520
+ callback: BodyResponseCallback<Schema$DnsKeysListResponse>
1521
+ ): void;
1522
+ list(callback: BodyResponseCallback<Schema$DnsKeysListResponse>): void;
1523
+ list(
1524
+ paramsOrCallback?:
1525
+ | Params$Resource$Dnskeys$List
1526
+ | BodyResponseCallback<Schema$DnsKeysListResponse>
1527
+ | BodyResponseCallback<Readable>,
1528
+ optionsOrCallback?:
1529
+ | MethodOptions
1530
+ | StreamMethodOptions
1531
+ | BodyResponseCallback<Schema$DnsKeysListResponse>
1532
+ | BodyResponseCallback<Readable>,
1533
+ callback?:
1534
+ | BodyResponseCallback<Schema$DnsKeysListResponse>
1535
+ | BodyResponseCallback<Readable>
1536
+ ):
1537
+ | void
1538
+ | GaxiosPromise<Schema$DnsKeysListResponse>
1539
+ | GaxiosPromise<Readable> {
1540
+ let params = (paramsOrCallback || {}) as Params$Resource$Dnskeys$List;
1541
+ let options = (optionsOrCallback || {}) as MethodOptions;
1542
+
1543
+ if (typeof paramsOrCallback === 'function') {
1544
+ callback = paramsOrCallback;
1545
+ params = {} as Params$Resource$Dnskeys$List;
1546
+ options = {};
1547
+ }
1548
+
1549
+ if (typeof optionsOrCallback === 'function') {
1550
+ callback = optionsOrCallback;
1551
+ options = {};
1552
+ }
1553
+
1554
+ const rootUrl = options.rootUrl || 'https://dns.googleapis.com/';
1555
+ const parameters = {
1556
+ options: Object.assign(
1557
+ {
1558
+ url: (
1559
+ rootUrl +
1560
+ '/dns/v2beta1/projects/{project}/managedZones/{managedZone}/dnsKeys'
1561
+ ).replace(/([^:]\/)\/+/g, '$1'),
1562
+ method: 'GET',
1563
+ },
1564
+ options
1565
+ ),
1566
+ params,
1567
+ requiredParams: ['project', 'managedZone'],
1568
+ pathParams: ['managedZone', 'project'],
1569
+ context: this.context,
1570
+ };
1571
+ if (callback) {
1572
+ createAPIRequest<Schema$DnsKeysListResponse>(
1573
+ parameters,
1574
+ callback as BodyResponseCallback<{} | void>
1575
+ );
1576
+ } else {
1577
+ return createAPIRequest<Schema$DnsKeysListResponse>(parameters);
1578
+ }
1579
+ }
1580
+ }
1581
+
1582
+ export interface Params$Resource$Dnskeys$Get extends StandardParameters {
1583
+ /**
1584
+ * For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
1585
+ */
1586
+ clientOperationId?: string;
1587
+ /**
1588
+ * An optional comma-separated list of digest types to compute and display for key signing keys. If omitted, the recommended digest type will be computed and displayed.
1589
+ */
1590
+ digestType?: string;
1591
+ /**
1592
+ * The identifier of the requested DnsKey.
1593
+ */
1594
+ dnsKeyId?: string;
1595
+ /**
1596
+ * Identifies the managed zone addressed by this request. Can be the managed zone name or id.
1597
+ */
1598
+ managedZone?: string;
1599
+ /**
1600
+ * Identifies the project addressed by this request.
1601
+ */
1602
+ project?: string;
1603
+ }
1604
+ export interface Params$Resource$Dnskeys$List extends StandardParameters {
1605
+ /**
1606
+ * An optional comma-separated list of digest types to compute and display for key signing keys. If omitted, the recommended digest type will be computed and displayed.
1607
+ */
1608
+ digestType?: string;
1609
+ /**
1610
+ * Identifies the managed zone addressed by this request. Can be the managed zone name or id.
1611
+ */
1612
+ managedZone?: string;
1613
+ /**
1614
+ * Optional. Maximum number of results to be returned. If unspecified, the server will decide how many results to return.
1615
+ */
1616
+ maxResults?: number;
1617
+ /**
1618
+ * Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.
1619
+ */
1620
+ pageToken?: string;
1621
+ /**
1622
+ * Identifies the project addressed by this request.
1623
+ */
1624
+ project?: string;
1625
+ }
1626
+
1627
+ export class Resource$Managedzoneoperations {
1628
+ context: APIRequestContext;
1629
+ constructor(context: APIRequestContext) {
1630
+ this.context = context;
1631
+ }
1632
+
1633
+ /**
1634
+ * dns.managedZoneOperations.get
1635
+ * @desc Fetch the representation of an existing Operation.
1636
+ * @example
1637
+ * // Before running the sample:
1638
+ * // - Enable the API at:
1639
+ * // https://console.developers.google.com/apis/api/dns.googleapis.com
1640
+ * // - Login into gcloud by running:
1641
+ * // `$ gcloud auth application-default login`
1642
+ * // - Install the npm module by running:
1643
+ * // `$ npm install googleapis`
1644
+ *
1645
+ * const {google} = require('googleapis');
1646
+ * const dns = google.dns('v2beta1');
1647
+ *
1648
+ * async function main() {
1649
+ * const auth = new google.auth.GoogleAuth({
1650
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1651
+ * scopes: [
1652
+ * 'https://www.googleapis.com/auth/cloud-platform',
1653
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
1654
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readonly',
1655
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
1656
+ * ],
1657
+ * });
1658
+ *
1659
+ * // Acquire an auth client, and bind it to all future calls
1660
+ * const authClient = await auth.getClient();
1661
+ * google.options({auth: authClient});
1662
+ *
1663
+ * // Do the magic
1664
+ * const res = await dns.managedZoneOperations.get({
1665
+ * // For mutating operation requests only. An optional identifier
1666
+ * // specified by the client. Must be unique for operation resources in the
1667
+ * // Operations collection.
1668
+ * clientOperationId: 'placeholder-value',
1669
+ * // Identifies the managed zone addressed by this request.
1670
+ * managedZone: 'placeholder-value',
1671
+ * // Identifies the operation addressed by this request.
1672
+ * operation: 'placeholder-value',
1673
+ * // Identifies the project addressed by this request.
1674
+ * project: 'placeholder-value',
1675
+ * });
1676
+ * console.log(res.data);
1677
+ *
1678
+ * // Example response
1679
+ * // {
1680
+ * // "dnsKeyContext": {},
1681
+ * // "id": "my_id",
1682
+ * // "kind": "my_kind",
1683
+ * // "startTime": "my_startTime",
1684
+ * // "status": "my_status",
1685
+ * // "type": "my_type",
1686
+ * // "user": "my_user",
1687
+ * // "zoneContext": {}
1688
+ * // }
1689
+ * }
1690
+ *
1691
+ * main().catch(e => {
1692
+ * console.error(e);
1693
+ * throw e;
1694
+ * });
1695
+ *
1696
+ * @alias dns.managedZoneOperations.get
1697
+ * @memberOf! ()
1698
+ *
1699
+ * @param {object} params Parameters for request
1700
+ * @param {string=} params.clientOperationId For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
1701
+ * @param {string} params.managedZone Identifies the managed zone addressed by this request.
1702
+ * @param {string} params.operation Identifies the operation addressed by this request.
1703
+ * @param {string} params.project Identifies the project addressed by this request.
1704
+ * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
1705
+ * @param {callback} callback The callback that handles the response.
1706
+ * @return {object} Request object
1707
+ */
1708
+ get(
1709
+ params: Params$Resource$Managedzoneoperations$Get,
1710
+ options: StreamMethodOptions
1711
+ ): GaxiosPromise<Readable>;
1712
+ get(
1713
+ params?: Params$Resource$Managedzoneoperations$Get,
1714
+ options?: MethodOptions
1715
+ ): GaxiosPromise<Schema$Operation>;
1716
+ get(
1717
+ params: Params$Resource$Managedzoneoperations$Get,
1718
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
1719
+ callback: BodyResponseCallback<Readable>
1720
+ ): void;
1721
+ get(
1722
+ params: Params$Resource$Managedzoneoperations$Get,
1723
+ options: MethodOptions | BodyResponseCallback<Schema$Operation>,
1724
+ callback: BodyResponseCallback<Schema$Operation>
1725
+ ): void;
1726
+ get(
1727
+ params: Params$Resource$Managedzoneoperations$Get,
1728
+ callback: BodyResponseCallback<Schema$Operation>
1729
+ ): void;
1730
+ get(callback: BodyResponseCallback<Schema$Operation>): void;
1731
+ get(
1732
+ paramsOrCallback?:
1733
+ | Params$Resource$Managedzoneoperations$Get
1734
+ | BodyResponseCallback<Schema$Operation>
1735
+ | BodyResponseCallback<Readable>,
1736
+ optionsOrCallback?:
1737
+ | MethodOptions
1738
+ | StreamMethodOptions
1739
+ | BodyResponseCallback<Schema$Operation>
1740
+ | BodyResponseCallback<Readable>,
1741
+ callback?:
1742
+ | BodyResponseCallback<Schema$Operation>
1743
+ | BodyResponseCallback<Readable>
1744
+ ): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
1745
+ let params = (paramsOrCallback ||
1746
+ {}) as Params$Resource$Managedzoneoperations$Get;
1747
+ let options = (optionsOrCallback || {}) as MethodOptions;
1748
+
1749
+ if (typeof paramsOrCallback === 'function') {
1750
+ callback = paramsOrCallback;
1751
+ params = {} as Params$Resource$Managedzoneoperations$Get;
1752
+ options = {};
1753
+ }
1754
+
1755
+ if (typeof optionsOrCallback === 'function') {
1756
+ callback = optionsOrCallback;
1757
+ options = {};
1758
+ }
1759
+
1760
+ const rootUrl = options.rootUrl || 'https://dns.googleapis.com/';
1761
+ const parameters = {
1762
+ options: Object.assign(
1763
+ {
1764
+ url: (
1765
+ rootUrl +
1766
+ '/dns/v2beta1/projects/{project}/managedZones/{managedZone}/operations/{operation}'
1767
+ ).replace(/([^:]\/)\/+/g, '$1'),
1768
+ method: 'GET',
1769
+ },
1770
+ options
1771
+ ),
1772
+ params,
1773
+ requiredParams: ['project', 'managedZone', 'operation'],
1774
+ pathParams: ['managedZone', 'operation', 'project'],
1775
+ context: this.context,
1776
+ };
1777
+ if (callback) {
1778
+ createAPIRequest<Schema$Operation>(
1779
+ parameters,
1780
+ callback as BodyResponseCallback<{} | void>
1781
+ );
1782
+ } else {
1783
+ return createAPIRequest<Schema$Operation>(parameters);
1784
+ }
1785
+ }
1786
+
1787
+ /**
1788
+ * dns.managedZoneOperations.list
1789
+ * @desc Enumerate Operations for the given ManagedZone.
1790
+ * @example
1791
+ * // Before running the sample:
1792
+ * // - Enable the API at:
1793
+ * // https://console.developers.google.com/apis/api/dns.googleapis.com
1794
+ * // - Login into gcloud by running:
1795
+ * // `$ gcloud auth application-default login`
1796
+ * // - Install the npm module by running:
1797
+ * // `$ npm install googleapis`
1798
+ *
1799
+ * const {google} = require('googleapis');
1800
+ * const dns = google.dns('v2beta1');
1801
+ *
1802
+ * async function main() {
1803
+ * const auth = new google.auth.GoogleAuth({
1804
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1805
+ * scopes: [
1806
+ * 'https://www.googleapis.com/auth/cloud-platform',
1807
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
1808
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readonly',
1809
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
1810
+ * ],
1811
+ * });
1812
+ *
1813
+ * // Acquire an auth client, and bind it to all future calls
1814
+ * const authClient = await auth.getClient();
1815
+ * google.options({auth: authClient});
1816
+ *
1817
+ * // Do the magic
1818
+ * const res = await dns.managedZoneOperations.list({
1819
+ * // Identifies the managed zone addressed by this request.
1820
+ * managedZone: 'placeholder-value',
1821
+ * // Optional. Maximum number of results to be returned. If unspecified, the
1822
+ * // server will decide how many results to return.
1823
+ * maxResults: 'placeholder-value',
1824
+ * // Optional. A tag returned by a previous list request that was truncated.
1825
+ * // Use this parameter to continue a previous list request.
1826
+ * pageToken: 'placeholder-value',
1827
+ * // Identifies the project addressed by this request.
1828
+ * project: 'placeholder-value',
1829
+ * // Sorting criterion. The only supported values are START_TIME and ID.
1830
+ * sortBy: 'placeholder-value',
1831
+ * });
1832
+ * console.log(res.data);
1833
+ *
1834
+ * // Example response
1835
+ * // {
1836
+ * // "header": {},
1837
+ * // "kind": "my_kind",
1838
+ * // "nextPageToken": "my_nextPageToken",
1839
+ * // "operations": []
1840
+ * // }
1841
+ * }
1842
+ *
1843
+ * main().catch(e => {
1844
+ * console.error(e);
1845
+ * throw e;
1846
+ * });
1847
+ *
1848
+ * @alias dns.managedZoneOperations.list
1849
+ * @memberOf! ()
1850
+ *
1851
+ * @param {object} params Parameters for request
1852
+ * @param {string} params.managedZone Identifies the managed zone addressed by this request.
1853
+ * @param {integer=} params.maxResults Optional. Maximum number of results to be returned. If unspecified, the server will decide how many results to return.
1854
+ * @param {string=} params.pageToken Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.
1855
+ * @param {string} params.project Identifies the project addressed by this request.
1856
+ * @param {string=} params.sortBy Sorting criterion. The only supported values are START_TIME and ID.
1857
+ * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
1858
+ * @param {callback} callback The callback that handles the response.
1859
+ * @return {object} Request object
1860
+ */
1861
+ list(
1862
+ params: Params$Resource$Managedzoneoperations$List,
1863
+ options: StreamMethodOptions
1864
+ ): GaxiosPromise<Readable>;
1865
+ list(
1866
+ params?: Params$Resource$Managedzoneoperations$List,
1867
+ options?: MethodOptions
1868
+ ): GaxiosPromise<Schema$ManagedZoneOperationsListResponse>;
1869
+ list(
1870
+ params: Params$Resource$Managedzoneoperations$List,
1871
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
1872
+ callback: BodyResponseCallback<Readable>
1873
+ ): void;
1874
+ list(
1875
+ params: Params$Resource$Managedzoneoperations$List,
1876
+ options:
1877
+ | MethodOptions
1878
+ | BodyResponseCallback<Schema$ManagedZoneOperationsListResponse>,
1879
+ callback: BodyResponseCallback<Schema$ManagedZoneOperationsListResponse>
1880
+ ): void;
1881
+ list(
1882
+ params: Params$Resource$Managedzoneoperations$List,
1883
+ callback: BodyResponseCallback<Schema$ManagedZoneOperationsListResponse>
1884
+ ): void;
1885
+ list(
1886
+ callback: BodyResponseCallback<Schema$ManagedZoneOperationsListResponse>
1887
+ ): void;
1888
+ list(
1889
+ paramsOrCallback?:
1890
+ | Params$Resource$Managedzoneoperations$List
1891
+ | BodyResponseCallback<Schema$ManagedZoneOperationsListResponse>
1892
+ | BodyResponseCallback<Readable>,
1893
+ optionsOrCallback?:
1894
+ | MethodOptions
1895
+ | StreamMethodOptions
1896
+ | BodyResponseCallback<Schema$ManagedZoneOperationsListResponse>
1897
+ | BodyResponseCallback<Readable>,
1898
+ callback?:
1899
+ | BodyResponseCallback<Schema$ManagedZoneOperationsListResponse>
1900
+ | BodyResponseCallback<Readable>
1901
+ ):
1902
+ | void
1903
+ | GaxiosPromise<Schema$ManagedZoneOperationsListResponse>
1904
+ | GaxiosPromise<Readable> {
1905
+ let params = (paramsOrCallback ||
1906
+ {}) as Params$Resource$Managedzoneoperations$List;
1907
+ let options = (optionsOrCallback || {}) as MethodOptions;
1908
+
1909
+ if (typeof paramsOrCallback === 'function') {
1910
+ callback = paramsOrCallback;
1911
+ params = {} as Params$Resource$Managedzoneoperations$List;
1912
+ options = {};
1913
+ }
1914
+
1915
+ if (typeof optionsOrCallback === 'function') {
1916
+ callback = optionsOrCallback;
1917
+ options = {};
1918
+ }
1919
+
1920
+ const rootUrl = options.rootUrl || 'https://dns.googleapis.com/';
1921
+ const parameters = {
1922
+ options: Object.assign(
1923
+ {
1924
+ url: (
1925
+ rootUrl +
1926
+ '/dns/v2beta1/projects/{project}/managedZones/{managedZone}/operations'
1927
+ ).replace(/([^:]\/)\/+/g, '$1'),
1928
+ method: 'GET',
1929
+ },
1930
+ options
1931
+ ),
1932
+ params,
1933
+ requiredParams: ['project', 'managedZone'],
1934
+ pathParams: ['managedZone', 'project'],
1935
+ context: this.context,
1936
+ };
1937
+ if (callback) {
1938
+ createAPIRequest<Schema$ManagedZoneOperationsListResponse>(
1939
+ parameters,
1940
+ callback as BodyResponseCallback<{} | void>
1941
+ );
1942
+ } else {
1943
+ return createAPIRequest<Schema$ManagedZoneOperationsListResponse>(
1944
+ parameters
1945
+ );
1946
+ }
1947
+ }
1948
+ }
1949
+
1950
+ export interface Params$Resource$Managedzoneoperations$Get
1951
+ extends StandardParameters {
1952
+ /**
1953
+ * For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
1954
+ */
1955
+ clientOperationId?: string;
1956
+ /**
1957
+ * Identifies the managed zone addressed by this request.
1958
+ */
1959
+ managedZone?: string;
1960
+ /**
1961
+ * Identifies the operation addressed by this request.
1962
+ */
1963
+ operation?: string;
1964
+ /**
1965
+ * Identifies the project addressed by this request.
1966
+ */
1967
+ project?: string;
1968
+ }
1969
+ export interface Params$Resource$Managedzoneoperations$List
1970
+ extends StandardParameters {
1971
+ /**
1972
+ * Identifies the managed zone addressed by this request.
1973
+ */
1974
+ managedZone?: string;
1975
+ /**
1976
+ * Optional. Maximum number of results to be returned. If unspecified, the server will decide how many results to return.
1977
+ */
1978
+ maxResults?: number;
1979
+ /**
1980
+ * Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.
1981
+ */
1982
+ pageToken?: string;
1983
+ /**
1984
+ * Identifies the project addressed by this request.
1985
+ */
1986
+ project?: string;
1987
+ /**
1988
+ * Sorting criterion. The only supported values are START_TIME and ID.
1989
+ */
1990
+ sortBy?: string;
1991
+ }
1992
+
1993
+ export class Resource$Managedzones {
1994
+ context: APIRequestContext;
1995
+ constructor(context: APIRequestContext) {
1996
+ this.context = context;
1997
+ }
1998
+
1999
+ /**
2000
+ * dns.managedZones.create
2001
+ * @desc Create a new ManagedZone.
2002
+ * @example
2003
+ * // Before running the sample:
2004
+ * // - Enable the API at:
2005
+ * // https://console.developers.google.com/apis/api/dns.googleapis.com
2006
+ * // - Login into gcloud by running:
2007
+ * // `$ gcloud auth application-default login`
2008
+ * // - Install the npm module by running:
2009
+ * // `$ npm install googleapis`
2010
+ *
2011
+ * const {google} = require('googleapis');
2012
+ * const dns = google.dns('v2beta1');
2013
+ *
2014
+ * async function main() {
2015
+ * const auth = new google.auth.GoogleAuth({
2016
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2017
+ * scopes: [
2018
+ * 'https://www.googleapis.com/auth/cloud-platform',
2019
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
2020
+ * ],
2021
+ * });
2022
+ *
2023
+ * // Acquire an auth client, and bind it to all future calls
2024
+ * const authClient = await auth.getClient();
2025
+ * google.options({auth: authClient});
2026
+ *
2027
+ * // Do the magic
2028
+ * const res = await dns.managedZones.create({
2029
+ * // For mutating operation requests only. An optional identifier
2030
+ * // specified by the client. Must be unique for operation resources in the
2031
+ * // Operations collection.
2032
+ * clientOperationId: 'placeholder-value',
2033
+ * // Identifies the project addressed by this request.
2034
+ * project: 'placeholder-value',
2035
+ *
2036
+ * // Request body metadata
2037
+ * requestBody: {
2038
+ * // request body parameters
2039
+ * // {
2040
+ * // "creationTime": "my_creationTime",
2041
+ * // "description": "my_description",
2042
+ * // "dnsName": "my_dnsName",
2043
+ * // "dnssecConfig": {},
2044
+ * // "forwardingConfig": {},
2045
+ * // "id": "my_id",
2046
+ * // "kind": "my_kind",
2047
+ * // "labels": {},
2048
+ * // "name": "my_name",
2049
+ * // "nameServerSet": "my_nameServerSet",
2050
+ * // "nameServers": [],
2051
+ * // "peeringConfig": {},
2052
+ * // "privateVisibilityConfig": {},
2053
+ * // "reverseLookupConfig": {},
2054
+ * // "visibility": "my_visibility"
2055
+ * // }
2056
+ * },
2057
+ * });
2058
+ * console.log(res.data);
2059
+ *
2060
+ * // Example response
2061
+ * // {
2062
+ * // "creationTime": "my_creationTime",
2063
+ * // "description": "my_description",
2064
+ * // "dnsName": "my_dnsName",
2065
+ * // "dnssecConfig": {},
2066
+ * // "forwardingConfig": {},
2067
+ * // "id": "my_id",
2068
+ * // "kind": "my_kind",
2069
+ * // "labels": {},
2070
+ * // "name": "my_name",
2071
+ * // "nameServerSet": "my_nameServerSet",
2072
+ * // "nameServers": [],
2073
+ * // "peeringConfig": {},
2074
+ * // "privateVisibilityConfig": {},
2075
+ * // "reverseLookupConfig": {},
2076
+ * // "visibility": "my_visibility"
2077
+ * // }
2078
+ * }
2079
+ *
2080
+ * main().catch(e => {
2081
+ * console.error(e);
2082
+ * throw e;
2083
+ * });
2084
+ *
2085
+ * @alias dns.managedZones.create
2086
+ * @memberOf! ()
2087
+ *
2088
+ * @param {object} params Parameters for request
2089
+ * @param {string=} params.clientOperationId For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
2090
+ * @param {string} params.project Identifies the project addressed by this request.
2091
+ * @param {().ManagedZone} params.requestBody Request body data
2092
+ * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
2093
+ * @param {callback} callback The callback that handles the response.
2094
+ * @return {object} Request object
2095
+ */
2096
+ create(
2097
+ params: Params$Resource$Managedzones$Create,
2098
+ options: StreamMethodOptions
2099
+ ): GaxiosPromise<Readable>;
2100
+ create(
2101
+ params?: Params$Resource$Managedzones$Create,
2102
+ options?: MethodOptions
2103
+ ): GaxiosPromise<Schema$ManagedZone>;
2104
+ create(
2105
+ params: Params$Resource$Managedzones$Create,
2106
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
2107
+ callback: BodyResponseCallback<Readable>
2108
+ ): void;
2109
+ create(
2110
+ params: Params$Resource$Managedzones$Create,
2111
+ options: MethodOptions | BodyResponseCallback<Schema$ManagedZone>,
2112
+ callback: BodyResponseCallback<Schema$ManagedZone>
2113
+ ): void;
2114
+ create(
2115
+ params: Params$Resource$Managedzones$Create,
2116
+ callback: BodyResponseCallback<Schema$ManagedZone>
2117
+ ): void;
2118
+ create(callback: BodyResponseCallback<Schema$ManagedZone>): void;
2119
+ create(
2120
+ paramsOrCallback?:
2121
+ | Params$Resource$Managedzones$Create
2122
+ | BodyResponseCallback<Schema$ManagedZone>
2123
+ | BodyResponseCallback<Readable>,
2124
+ optionsOrCallback?:
2125
+ | MethodOptions
2126
+ | StreamMethodOptions
2127
+ | BodyResponseCallback<Schema$ManagedZone>
2128
+ | BodyResponseCallback<Readable>,
2129
+ callback?:
2130
+ | BodyResponseCallback<Schema$ManagedZone>
2131
+ | BodyResponseCallback<Readable>
2132
+ ): void | GaxiosPromise<Schema$ManagedZone> | GaxiosPromise<Readable> {
2133
+ let params = (paramsOrCallback ||
2134
+ {}) as Params$Resource$Managedzones$Create;
2135
+ let options = (optionsOrCallback || {}) as MethodOptions;
2136
+
2137
+ if (typeof paramsOrCallback === 'function') {
2138
+ callback = paramsOrCallback;
2139
+ params = {} as Params$Resource$Managedzones$Create;
2140
+ options = {};
2141
+ }
2142
+
2143
+ if (typeof optionsOrCallback === 'function') {
2144
+ callback = optionsOrCallback;
2145
+ options = {};
2146
+ }
2147
+
2148
+ const rootUrl = options.rootUrl || 'https://dns.googleapis.com/';
2149
+ const parameters = {
2150
+ options: Object.assign(
2151
+ {
2152
+ url: (
2153
+ rootUrl + '/dns/v2beta1/projects/{project}/managedZones'
2154
+ ).replace(/([^:]\/)\/+/g, '$1'),
2155
+ method: 'POST',
2156
+ },
2157
+ options
2158
+ ),
2159
+ params,
2160
+ requiredParams: ['project'],
2161
+ pathParams: ['project'],
2162
+ context: this.context,
2163
+ };
2164
+ if (callback) {
2165
+ createAPIRequest<Schema$ManagedZone>(
2166
+ parameters,
2167
+ callback as BodyResponseCallback<{} | void>
2168
+ );
2169
+ } else {
2170
+ return createAPIRequest<Schema$ManagedZone>(parameters);
2171
+ }
2172
+ }
2173
+
2174
+ /**
2175
+ * dns.managedZones.delete
2176
+ * @desc Delete a previously created ManagedZone.
2177
+ * @example
2178
+ * // Before running the sample:
2179
+ * // - Enable the API at:
2180
+ * // https://console.developers.google.com/apis/api/dns.googleapis.com
2181
+ * // - Login into gcloud by running:
2182
+ * // `$ gcloud auth application-default login`
2183
+ * // - Install the npm module by running:
2184
+ * // `$ npm install googleapis`
2185
+ *
2186
+ * const {google} = require('googleapis');
2187
+ * const dns = google.dns('v2beta1');
2188
+ *
2189
+ * async function main() {
2190
+ * const auth = new google.auth.GoogleAuth({
2191
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2192
+ * scopes: [
2193
+ * 'https://www.googleapis.com/auth/cloud-platform',
2194
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
2195
+ * ],
2196
+ * });
2197
+ *
2198
+ * // Acquire an auth client, and bind it to all future calls
2199
+ * const authClient = await auth.getClient();
2200
+ * google.options({auth: authClient});
2201
+ *
2202
+ * // Do the magic
2203
+ * const res = await dns.managedZones.delete({
2204
+ * // For mutating operation requests only. An optional identifier
2205
+ * // specified by the client. Must be unique for operation resources in the
2206
+ * // Operations collection.
2207
+ * clientOperationId: 'placeholder-value',
2208
+ * // Identifies the managed zone addressed by this request. Can be the managed
2209
+ * // zone name or id.
2210
+ * managedZone: 'placeholder-value',
2211
+ * // Identifies the project addressed by this request.
2212
+ * project: 'placeholder-value',
2213
+ * });
2214
+ * console.log(res.data);
2215
+ * }
2216
+ *
2217
+ * main().catch(e => {
2218
+ * console.error(e);
2219
+ * throw e;
2220
+ * });
2221
+ *
2222
+ * @alias dns.managedZones.delete
2223
+ * @memberOf! ()
2224
+ *
2225
+ * @param {object} params Parameters for request
2226
+ * @param {string=} params.clientOperationId For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
2227
+ * @param {string} params.managedZone Identifies the managed zone addressed by this request. Can be the managed zone name or id.
2228
+ * @param {string} params.project Identifies the project addressed by this request.
2229
+ * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
2230
+ * @param {callback} callback The callback that handles the response.
2231
+ * @return {object} Request object
2232
+ */
2233
+ delete(
2234
+ params: Params$Resource$Managedzones$Delete,
2235
+ options: StreamMethodOptions
2236
+ ): GaxiosPromise<Readable>;
2237
+ delete(
2238
+ params?: Params$Resource$Managedzones$Delete,
2239
+ options?: MethodOptions
2240
+ ): GaxiosPromise<void>;
2241
+ delete(
2242
+ params: Params$Resource$Managedzones$Delete,
2243
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
2244
+ callback: BodyResponseCallback<Readable>
2245
+ ): void;
2246
+ delete(
2247
+ params: Params$Resource$Managedzones$Delete,
2248
+ options: MethodOptions | BodyResponseCallback<void>,
2249
+ callback: BodyResponseCallback<void>
2250
+ ): void;
2251
+ delete(
2252
+ params: Params$Resource$Managedzones$Delete,
2253
+ callback: BodyResponseCallback<void>
2254
+ ): void;
2255
+ delete(callback: BodyResponseCallback<void>): void;
2256
+ delete(
2257
+ paramsOrCallback?:
2258
+ | Params$Resource$Managedzones$Delete
2259
+ | BodyResponseCallback<void>
2260
+ | BodyResponseCallback<Readable>,
2261
+ optionsOrCallback?:
2262
+ | MethodOptions
2263
+ | StreamMethodOptions
2264
+ | BodyResponseCallback<void>
2265
+ | BodyResponseCallback<Readable>,
2266
+ callback?: BodyResponseCallback<void> | BodyResponseCallback<Readable>
2267
+ ): void | GaxiosPromise<void> | GaxiosPromise<Readable> {
2268
+ let params = (paramsOrCallback ||
2269
+ {}) as Params$Resource$Managedzones$Delete;
2270
+ let options = (optionsOrCallback || {}) as MethodOptions;
2271
+
2272
+ if (typeof paramsOrCallback === 'function') {
2273
+ callback = paramsOrCallback;
2274
+ params = {} as Params$Resource$Managedzones$Delete;
2275
+ options = {};
2276
+ }
2277
+
2278
+ if (typeof optionsOrCallback === 'function') {
2279
+ callback = optionsOrCallback;
2280
+ options = {};
2281
+ }
2282
+
2283
+ const rootUrl = options.rootUrl || 'https://dns.googleapis.com/';
2284
+ const parameters = {
2285
+ options: Object.assign(
2286
+ {
2287
+ url: (
2288
+ rootUrl +
2289
+ '/dns/v2beta1/projects/{project}/managedZones/{managedZone}'
2290
+ ).replace(/([^:]\/)\/+/g, '$1'),
2291
+ method: 'DELETE',
2292
+ },
2293
+ options
2294
+ ),
2295
+ params,
2296
+ requiredParams: ['project', 'managedZone'],
2297
+ pathParams: ['managedZone', 'project'],
2298
+ context: this.context,
2299
+ };
2300
+ if (callback) {
2301
+ createAPIRequest<void>(
2302
+ parameters,
2303
+ callback as BodyResponseCallback<{} | void>
2304
+ );
2305
+ } else {
2306
+ return createAPIRequest<void>(parameters);
2307
+ }
2308
+ }
2309
+
2310
+ /**
2311
+ * dns.managedZones.get
2312
+ * @desc Fetch the representation of an existing ManagedZone.
2313
+ * @example
2314
+ * // Before running the sample:
2315
+ * // - Enable the API at:
2316
+ * // https://console.developers.google.com/apis/api/dns.googleapis.com
2317
+ * // - Login into gcloud by running:
2318
+ * // `$ gcloud auth application-default login`
2319
+ * // - Install the npm module by running:
2320
+ * // `$ npm install googleapis`
2321
+ *
2322
+ * const {google} = require('googleapis');
2323
+ * const dns = google.dns('v2beta1');
2324
+ *
2325
+ * async function main() {
2326
+ * const auth = new google.auth.GoogleAuth({
2327
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2328
+ * scopes: [
2329
+ * 'https://www.googleapis.com/auth/cloud-platform',
2330
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
2331
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readonly',
2332
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
2333
+ * ],
2334
+ * });
2335
+ *
2336
+ * // Acquire an auth client, and bind it to all future calls
2337
+ * const authClient = await auth.getClient();
2338
+ * google.options({auth: authClient});
2339
+ *
2340
+ * // Do the magic
2341
+ * const res = await dns.managedZones.get({
2342
+ * // For mutating operation requests only. An optional identifier
2343
+ * // specified by the client. Must be unique for operation resources in the
2344
+ * // Operations collection.
2345
+ * clientOperationId: 'placeholder-value',
2346
+ * // Identifies the managed zone addressed by this request. Can be the managed
2347
+ * // zone name or id.
2348
+ * managedZone: 'placeholder-value',
2349
+ * // Identifies the project addressed by this request.
2350
+ * project: 'placeholder-value',
2351
+ * });
2352
+ * console.log(res.data);
2353
+ *
2354
+ * // Example response
2355
+ * // {
2356
+ * // "creationTime": "my_creationTime",
2357
+ * // "description": "my_description",
2358
+ * // "dnsName": "my_dnsName",
2359
+ * // "dnssecConfig": {},
2360
+ * // "forwardingConfig": {},
2361
+ * // "id": "my_id",
2362
+ * // "kind": "my_kind",
2363
+ * // "labels": {},
2364
+ * // "name": "my_name",
2365
+ * // "nameServerSet": "my_nameServerSet",
2366
+ * // "nameServers": [],
2367
+ * // "peeringConfig": {},
2368
+ * // "privateVisibilityConfig": {},
2369
+ * // "reverseLookupConfig": {},
2370
+ * // "visibility": "my_visibility"
2371
+ * // }
2372
+ * }
2373
+ *
2374
+ * main().catch(e => {
2375
+ * console.error(e);
2376
+ * throw e;
2377
+ * });
2378
+ *
2379
+ * @alias dns.managedZones.get
2380
+ * @memberOf! ()
2381
+ *
2382
+ * @param {object} params Parameters for request
2383
+ * @param {string=} params.clientOperationId For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
2384
+ * @param {string} params.managedZone Identifies the managed zone addressed by this request. Can be the managed zone name or id.
2385
+ * @param {string} params.project Identifies the project addressed by this request.
2386
+ * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
2387
+ * @param {callback} callback The callback that handles the response.
2388
+ * @return {object} Request object
2389
+ */
2390
+ get(
2391
+ params: Params$Resource$Managedzones$Get,
2392
+ options: StreamMethodOptions
2393
+ ): GaxiosPromise<Readable>;
2394
+ get(
2395
+ params?: Params$Resource$Managedzones$Get,
2396
+ options?: MethodOptions
2397
+ ): GaxiosPromise<Schema$ManagedZone>;
2398
+ get(
2399
+ params: Params$Resource$Managedzones$Get,
2400
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
2401
+ callback: BodyResponseCallback<Readable>
2402
+ ): void;
2403
+ get(
2404
+ params: Params$Resource$Managedzones$Get,
2405
+ options: MethodOptions | BodyResponseCallback<Schema$ManagedZone>,
2406
+ callback: BodyResponseCallback<Schema$ManagedZone>
2407
+ ): void;
2408
+ get(
2409
+ params: Params$Resource$Managedzones$Get,
2410
+ callback: BodyResponseCallback<Schema$ManagedZone>
2411
+ ): void;
2412
+ get(callback: BodyResponseCallback<Schema$ManagedZone>): void;
2413
+ get(
2414
+ paramsOrCallback?:
2415
+ | Params$Resource$Managedzones$Get
2416
+ | BodyResponseCallback<Schema$ManagedZone>
2417
+ | BodyResponseCallback<Readable>,
2418
+ optionsOrCallback?:
2419
+ | MethodOptions
2420
+ | StreamMethodOptions
2421
+ | BodyResponseCallback<Schema$ManagedZone>
2422
+ | BodyResponseCallback<Readable>,
2423
+ callback?:
2424
+ | BodyResponseCallback<Schema$ManagedZone>
2425
+ | BodyResponseCallback<Readable>
2426
+ ): void | GaxiosPromise<Schema$ManagedZone> | GaxiosPromise<Readable> {
2427
+ let params = (paramsOrCallback || {}) as Params$Resource$Managedzones$Get;
2428
+ let options = (optionsOrCallback || {}) as MethodOptions;
2429
+
2430
+ if (typeof paramsOrCallback === 'function') {
2431
+ callback = paramsOrCallback;
2432
+ params = {} as Params$Resource$Managedzones$Get;
2433
+ options = {};
2434
+ }
2435
+
2436
+ if (typeof optionsOrCallback === 'function') {
2437
+ callback = optionsOrCallback;
2438
+ options = {};
2439
+ }
2440
+
2441
+ const rootUrl = options.rootUrl || 'https://dns.googleapis.com/';
2442
+ const parameters = {
2443
+ options: Object.assign(
2444
+ {
2445
+ url: (
2446
+ rootUrl +
2447
+ '/dns/v2beta1/projects/{project}/managedZones/{managedZone}'
2448
+ ).replace(/([^:]\/)\/+/g, '$1'),
2449
+ method: 'GET',
2450
+ },
2451
+ options
2452
+ ),
2453
+ params,
2454
+ requiredParams: ['project', 'managedZone'],
2455
+ pathParams: ['managedZone', 'project'],
2456
+ context: this.context,
2457
+ };
2458
+ if (callback) {
2459
+ createAPIRequest<Schema$ManagedZone>(
2460
+ parameters,
2461
+ callback as BodyResponseCallback<{} | void>
2462
+ );
2463
+ } else {
2464
+ return createAPIRequest<Schema$ManagedZone>(parameters);
2465
+ }
2466
+ }
2467
+
2468
+ /**
2469
+ * dns.managedZones.list
2470
+ * @desc Enumerate ManagedZones that have been created but not yet deleted.
2471
+ * @example
2472
+ * // Before running the sample:
2473
+ * // - Enable the API at:
2474
+ * // https://console.developers.google.com/apis/api/dns.googleapis.com
2475
+ * // - Login into gcloud by running:
2476
+ * // `$ gcloud auth application-default login`
2477
+ * // - Install the npm module by running:
2478
+ * // `$ npm install googleapis`
2479
+ *
2480
+ * const {google} = require('googleapis');
2481
+ * const dns = google.dns('v2beta1');
2482
+ *
2483
+ * async function main() {
2484
+ * const auth = new google.auth.GoogleAuth({
2485
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2486
+ * scopes: [
2487
+ * 'https://www.googleapis.com/auth/cloud-platform',
2488
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
2489
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readonly',
2490
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
2491
+ * ],
2492
+ * });
2493
+ *
2494
+ * // Acquire an auth client, and bind it to all future calls
2495
+ * const authClient = await auth.getClient();
2496
+ * google.options({auth: authClient});
2497
+ *
2498
+ * // Do the magic
2499
+ * const res = await dns.managedZones.list({
2500
+ * // Restricts the list to return only zones with this domain name.
2501
+ * dnsName: 'placeholder-value',
2502
+ * // Optional. Maximum number of results to be returned. If unspecified, the
2503
+ * // server will decide how many results to return.
2504
+ * maxResults: 'placeholder-value',
2505
+ * // Optional. A tag returned by a previous list request that was truncated.
2506
+ * // Use this parameter to continue a previous list request.
2507
+ * pageToken: 'placeholder-value',
2508
+ * // Identifies the project addressed by this request.
2509
+ * project: 'placeholder-value',
2510
+ * });
2511
+ * console.log(res.data);
2512
+ *
2513
+ * // Example response
2514
+ * // {
2515
+ * // "header": {},
2516
+ * // "kind": "my_kind",
2517
+ * // "managedZones": [],
2518
+ * // "nextPageToken": "my_nextPageToken"
2519
+ * // }
2520
+ * }
2521
+ *
2522
+ * main().catch(e => {
2523
+ * console.error(e);
2524
+ * throw e;
2525
+ * });
2526
+ *
2527
+ * @alias dns.managedZones.list
2528
+ * @memberOf! ()
2529
+ *
2530
+ * @param {object} params Parameters for request
2531
+ * @param {string=} params.dnsName Restricts the list to return only zones with this domain name.
2532
+ * @param {integer=} params.maxResults Optional. Maximum number of results to be returned. If unspecified, the server will decide how many results to return.
2533
+ * @param {string=} params.pageToken Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.
2534
+ * @param {string} params.project Identifies the project addressed by this request.
2535
+ * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
2536
+ * @param {callback} callback The callback that handles the response.
2537
+ * @return {object} Request object
2538
+ */
2539
+ list(
2540
+ params: Params$Resource$Managedzones$List,
2541
+ options: StreamMethodOptions
2542
+ ): GaxiosPromise<Readable>;
2543
+ list(
2544
+ params?: Params$Resource$Managedzones$List,
2545
+ options?: MethodOptions
2546
+ ): GaxiosPromise<Schema$ManagedZonesListResponse>;
2547
+ list(
2548
+ params: Params$Resource$Managedzones$List,
2549
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
2550
+ callback: BodyResponseCallback<Readable>
2551
+ ): void;
2552
+ list(
2553
+ params: Params$Resource$Managedzones$List,
2554
+ options:
2555
+ | MethodOptions
2556
+ | BodyResponseCallback<Schema$ManagedZonesListResponse>,
2557
+ callback: BodyResponseCallback<Schema$ManagedZonesListResponse>
2558
+ ): void;
2559
+ list(
2560
+ params: Params$Resource$Managedzones$List,
2561
+ callback: BodyResponseCallback<Schema$ManagedZonesListResponse>
2562
+ ): void;
2563
+ list(callback: BodyResponseCallback<Schema$ManagedZonesListResponse>): void;
2564
+ list(
2565
+ paramsOrCallback?:
2566
+ | Params$Resource$Managedzones$List
2567
+ | BodyResponseCallback<Schema$ManagedZonesListResponse>
2568
+ | BodyResponseCallback<Readable>,
2569
+ optionsOrCallback?:
2570
+ | MethodOptions
2571
+ | StreamMethodOptions
2572
+ | BodyResponseCallback<Schema$ManagedZonesListResponse>
2573
+ | BodyResponseCallback<Readable>,
2574
+ callback?:
2575
+ | BodyResponseCallback<Schema$ManagedZonesListResponse>
2576
+ | BodyResponseCallback<Readable>
2577
+ ):
2578
+ | void
2579
+ | GaxiosPromise<Schema$ManagedZonesListResponse>
2580
+ | GaxiosPromise<Readable> {
2581
+ let params = (paramsOrCallback ||
2582
+ {}) as Params$Resource$Managedzones$List;
2583
+ let options = (optionsOrCallback || {}) as MethodOptions;
2584
+
2585
+ if (typeof paramsOrCallback === 'function') {
2586
+ callback = paramsOrCallback;
2587
+ params = {} as Params$Resource$Managedzones$List;
2588
+ options = {};
2589
+ }
2590
+
2591
+ if (typeof optionsOrCallback === 'function') {
2592
+ callback = optionsOrCallback;
2593
+ options = {};
2594
+ }
2595
+
2596
+ const rootUrl = options.rootUrl || 'https://dns.googleapis.com/';
2597
+ const parameters = {
2598
+ options: Object.assign(
2599
+ {
2600
+ url: (
2601
+ rootUrl + '/dns/v2beta1/projects/{project}/managedZones'
2602
+ ).replace(/([^:]\/)\/+/g, '$1'),
2603
+ method: 'GET',
2604
+ },
2605
+ options
2606
+ ),
2607
+ params,
2608
+ requiredParams: ['project'],
2609
+ pathParams: ['project'],
2610
+ context: this.context,
2611
+ };
2612
+ if (callback) {
2613
+ createAPIRequest<Schema$ManagedZonesListResponse>(
2614
+ parameters,
2615
+ callback as BodyResponseCallback<{} | void>
2616
+ );
2617
+ } else {
2618
+ return createAPIRequest<Schema$ManagedZonesListResponse>(parameters);
2619
+ }
2620
+ }
2621
+
2622
+ /**
2623
+ * dns.managedZones.patch
2624
+ * @desc Apply a partial update to an existing ManagedZone.
2625
+ * @example
2626
+ * // Before running the sample:
2627
+ * // - Enable the API at:
2628
+ * // https://console.developers.google.com/apis/api/dns.googleapis.com
2629
+ * // - Login into gcloud by running:
2630
+ * // `$ gcloud auth application-default login`
2631
+ * // - Install the npm module by running:
2632
+ * // `$ npm install googleapis`
2633
+ *
2634
+ * const {google} = require('googleapis');
2635
+ * const dns = google.dns('v2beta1');
2636
+ *
2637
+ * async function main() {
2638
+ * const auth = new google.auth.GoogleAuth({
2639
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2640
+ * scopes: [
2641
+ * 'https://www.googleapis.com/auth/cloud-platform',
2642
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
2643
+ * ],
2644
+ * });
2645
+ *
2646
+ * // Acquire an auth client, and bind it to all future calls
2647
+ * const authClient = await auth.getClient();
2648
+ * google.options({auth: authClient});
2649
+ *
2650
+ * // Do the magic
2651
+ * const res = await dns.managedZones.patch({
2652
+ * // For mutating operation requests only. An optional identifier
2653
+ * // specified by the client. Must be unique for operation resources in the
2654
+ * // Operations collection.
2655
+ * clientOperationId: 'placeholder-value',
2656
+ * // Identifies the managed zone addressed by this request. Can be the managed
2657
+ * // zone name or id.
2658
+ * managedZone: 'placeholder-value',
2659
+ * // Identifies the project addressed by this request.
2660
+ * project: 'placeholder-value',
2661
+ *
2662
+ * // Request body metadata
2663
+ * requestBody: {
2664
+ * // request body parameters
2665
+ * // {
2666
+ * // "creationTime": "my_creationTime",
2667
+ * // "description": "my_description",
2668
+ * // "dnsName": "my_dnsName",
2669
+ * // "dnssecConfig": {},
2670
+ * // "forwardingConfig": {},
2671
+ * // "id": "my_id",
2672
+ * // "kind": "my_kind",
2673
+ * // "labels": {},
2674
+ * // "name": "my_name",
2675
+ * // "nameServerSet": "my_nameServerSet",
2676
+ * // "nameServers": [],
2677
+ * // "peeringConfig": {},
2678
+ * // "privateVisibilityConfig": {},
2679
+ * // "reverseLookupConfig": {},
2680
+ * // "visibility": "my_visibility"
2681
+ * // }
2682
+ * },
2683
+ * });
2684
+ * console.log(res.data);
2685
+ *
2686
+ * // Example response
2687
+ * // {
2688
+ * // "dnsKeyContext": {},
2689
+ * // "id": "my_id",
2690
+ * // "kind": "my_kind",
2691
+ * // "startTime": "my_startTime",
2692
+ * // "status": "my_status",
2693
+ * // "type": "my_type",
2694
+ * // "user": "my_user",
2695
+ * // "zoneContext": {}
2696
+ * // }
2697
+ * }
2698
+ *
2699
+ * main().catch(e => {
2700
+ * console.error(e);
2701
+ * throw e;
2702
+ * });
2703
+ *
2704
+ * @alias dns.managedZones.patch
2705
+ * @memberOf! ()
2706
+ *
2707
+ * @param {object} params Parameters for request
2708
+ * @param {string=} params.clientOperationId For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
2709
+ * @param {string} params.managedZone Identifies the managed zone addressed by this request. Can be the managed zone name or id.
2710
+ * @param {string} params.project Identifies the project addressed by this request.
2711
+ * @param {().ManagedZone} params.requestBody Request body data
2712
+ * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
2713
+ * @param {callback} callback The callback that handles the response.
2714
+ * @return {object} Request object
2715
+ */
2716
+ patch(
2717
+ params: Params$Resource$Managedzones$Patch,
2718
+ options: StreamMethodOptions
2719
+ ): GaxiosPromise<Readable>;
2720
+ patch(
2721
+ params?: Params$Resource$Managedzones$Patch,
2722
+ options?: MethodOptions
2723
+ ): GaxiosPromise<Schema$Operation>;
2724
+ patch(
2725
+ params: Params$Resource$Managedzones$Patch,
2726
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
2727
+ callback: BodyResponseCallback<Readable>
2728
+ ): void;
2729
+ patch(
2730
+ params: Params$Resource$Managedzones$Patch,
2731
+ options: MethodOptions | BodyResponseCallback<Schema$Operation>,
2732
+ callback: BodyResponseCallback<Schema$Operation>
2733
+ ): void;
2734
+ patch(
2735
+ params: Params$Resource$Managedzones$Patch,
2736
+ callback: BodyResponseCallback<Schema$Operation>
2737
+ ): void;
2738
+ patch(callback: BodyResponseCallback<Schema$Operation>): void;
2739
+ patch(
2740
+ paramsOrCallback?:
2741
+ | Params$Resource$Managedzones$Patch
2742
+ | BodyResponseCallback<Schema$Operation>
2743
+ | BodyResponseCallback<Readable>,
2744
+ optionsOrCallback?:
2745
+ | MethodOptions
2746
+ | StreamMethodOptions
2747
+ | BodyResponseCallback<Schema$Operation>
2748
+ | BodyResponseCallback<Readable>,
2749
+ callback?:
2750
+ | BodyResponseCallback<Schema$Operation>
2751
+ | BodyResponseCallback<Readable>
2752
+ ): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
2753
+ let params = (paramsOrCallback ||
2754
+ {}) as Params$Resource$Managedzones$Patch;
2755
+ let options = (optionsOrCallback || {}) as MethodOptions;
2756
+
2757
+ if (typeof paramsOrCallback === 'function') {
2758
+ callback = paramsOrCallback;
2759
+ params = {} as Params$Resource$Managedzones$Patch;
2760
+ options = {};
2761
+ }
2762
+
2763
+ if (typeof optionsOrCallback === 'function') {
2764
+ callback = optionsOrCallback;
2765
+ options = {};
2766
+ }
2767
+
2768
+ const rootUrl = options.rootUrl || 'https://dns.googleapis.com/';
2769
+ const parameters = {
2770
+ options: Object.assign(
2771
+ {
2772
+ url: (
2773
+ rootUrl +
2774
+ '/dns/v2beta1/projects/{project}/managedZones/{managedZone}'
2775
+ ).replace(/([^:]\/)\/+/g, '$1'),
2776
+ method: 'PATCH',
2777
+ },
2778
+ options
2779
+ ),
2780
+ params,
2781
+ requiredParams: ['project', 'managedZone'],
2782
+ pathParams: ['managedZone', 'project'],
2783
+ context: this.context,
2784
+ };
2785
+ if (callback) {
2786
+ createAPIRequest<Schema$Operation>(
2787
+ parameters,
2788
+ callback as BodyResponseCallback<{} | void>
2789
+ );
2790
+ } else {
2791
+ return createAPIRequest<Schema$Operation>(parameters);
2792
+ }
2793
+ }
2794
+
2795
+ /**
2796
+ * dns.managedZones.update
2797
+ * @desc Update an existing ManagedZone.
2798
+ * @example
2799
+ * // Before running the sample:
2800
+ * // - Enable the API at:
2801
+ * // https://console.developers.google.com/apis/api/dns.googleapis.com
2802
+ * // - Login into gcloud by running:
2803
+ * // `$ gcloud auth application-default login`
2804
+ * // - Install the npm module by running:
2805
+ * // `$ npm install googleapis`
2806
+ *
2807
+ * const {google} = require('googleapis');
2808
+ * const dns = google.dns('v2beta1');
2809
+ *
2810
+ * async function main() {
2811
+ * const auth = new google.auth.GoogleAuth({
2812
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2813
+ * scopes: [
2814
+ * 'https://www.googleapis.com/auth/cloud-platform',
2815
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
2816
+ * ],
2817
+ * });
2818
+ *
2819
+ * // Acquire an auth client, and bind it to all future calls
2820
+ * const authClient = await auth.getClient();
2821
+ * google.options({auth: authClient});
2822
+ *
2823
+ * // Do the magic
2824
+ * const res = await dns.managedZones.update({
2825
+ * // For mutating operation requests only. An optional identifier
2826
+ * // specified by the client. Must be unique for operation resources in the
2827
+ * // Operations collection.
2828
+ * clientOperationId: 'placeholder-value',
2829
+ * // Identifies the managed zone addressed by this request. Can be the managed
2830
+ * // zone name or id.
2831
+ * managedZone: 'placeholder-value',
2832
+ * // Identifies the project addressed by this request.
2833
+ * project: 'placeholder-value',
2834
+ *
2835
+ * // Request body metadata
2836
+ * requestBody: {
2837
+ * // request body parameters
2838
+ * // {
2839
+ * // "creationTime": "my_creationTime",
2840
+ * // "description": "my_description",
2841
+ * // "dnsName": "my_dnsName",
2842
+ * // "dnssecConfig": {},
2843
+ * // "forwardingConfig": {},
2844
+ * // "id": "my_id",
2845
+ * // "kind": "my_kind",
2846
+ * // "labels": {},
2847
+ * // "name": "my_name",
2848
+ * // "nameServerSet": "my_nameServerSet",
2849
+ * // "nameServers": [],
2850
+ * // "peeringConfig": {},
2851
+ * // "privateVisibilityConfig": {},
2852
+ * // "reverseLookupConfig": {},
2853
+ * // "visibility": "my_visibility"
2854
+ * // }
2855
+ * },
2856
+ * });
2857
+ * console.log(res.data);
2858
+ *
2859
+ * // Example response
2860
+ * // {
2861
+ * // "dnsKeyContext": {},
2862
+ * // "id": "my_id",
2863
+ * // "kind": "my_kind",
2864
+ * // "startTime": "my_startTime",
2865
+ * // "status": "my_status",
2866
+ * // "type": "my_type",
2867
+ * // "user": "my_user",
2868
+ * // "zoneContext": {}
2869
+ * // }
2870
+ * }
2871
+ *
2872
+ * main().catch(e => {
2873
+ * console.error(e);
2874
+ * throw e;
2875
+ * });
2876
+ *
2877
+ * @alias dns.managedZones.update
2878
+ * @memberOf! ()
2879
+ *
2880
+ * @param {object} params Parameters for request
2881
+ * @param {string=} params.clientOperationId For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
2882
+ * @param {string} params.managedZone Identifies the managed zone addressed by this request. Can be the managed zone name or id.
2883
+ * @param {string} params.project Identifies the project addressed by this request.
2884
+ * @param {().ManagedZone} params.requestBody Request body data
2885
+ * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
2886
+ * @param {callback} callback The callback that handles the response.
2887
+ * @return {object} Request object
2888
+ */
2889
+ update(
2890
+ params: Params$Resource$Managedzones$Update,
2891
+ options: StreamMethodOptions
2892
+ ): GaxiosPromise<Readable>;
2893
+ update(
2894
+ params?: Params$Resource$Managedzones$Update,
2895
+ options?: MethodOptions
2896
+ ): GaxiosPromise<Schema$Operation>;
2897
+ update(
2898
+ params: Params$Resource$Managedzones$Update,
2899
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
2900
+ callback: BodyResponseCallback<Readable>
2901
+ ): void;
2902
+ update(
2903
+ params: Params$Resource$Managedzones$Update,
2904
+ options: MethodOptions | BodyResponseCallback<Schema$Operation>,
2905
+ callback: BodyResponseCallback<Schema$Operation>
2906
+ ): void;
2907
+ update(
2908
+ params: Params$Resource$Managedzones$Update,
2909
+ callback: BodyResponseCallback<Schema$Operation>
2910
+ ): void;
2911
+ update(callback: BodyResponseCallback<Schema$Operation>): void;
2912
+ update(
2913
+ paramsOrCallback?:
2914
+ | Params$Resource$Managedzones$Update
2915
+ | BodyResponseCallback<Schema$Operation>
2916
+ | BodyResponseCallback<Readable>,
2917
+ optionsOrCallback?:
2918
+ | MethodOptions
2919
+ | StreamMethodOptions
2920
+ | BodyResponseCallback<Schema$Operation>
2921
+ | BodyResponseCallback<Readable>,
2922
+ callback?:
2923
+ | BodyResponseCallback<Schema$Operation>
2924
+ | BodyResponseCallback<Readable>
2925
+ ): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
2926
+ let params = (paramsOrCallback ||
2927
+ {}) as Params$Resource$Managedzones$Update;
2928
+ let options = (optionsOrCallback || {}) as MethodOptions;
2929
+
2930
+ if (typeof paramsOrCallback === 'function') {
2931
+ callback = paramsOrCallback;
2932
+ params = {} as Params$Resource$Managedzones$Update;
2933
+ options = {};
2934
+ }
2935
+
2936
+ if (typeof optionsOrCallback === 'function') {
2937
+ callback = optionsOrCallback;
2938
+ options = {};
2939
+ }
2940
+
2941
+ const rootUrl = options.rootUrl || 'https://dns.googleapis.com/';
2942
+ const parameters = {
2943
+ options: Object.assign(
2944
+ {
2945
+ url: (
2946
+ rootUrl +
2947
+ '/dns/v2beta1/projects/{project}/managedZones/{managedZone}'
2948
+ ).replace(/([^:]\/)\/+/g, '$1'),
2949
+ method: 'PUT',
2950
+ },
2951
+ options
2952
+ ),
2953
+ params,
2954
+ requiredParams: ['project', 'managedZone'],
2955
+ pathParams: ['managedZone', 'project'],
2956
+ context: this.context,
2957
+ };
2958
+ if (callback) {
2959
+ createAPIRequest<Schema$Operation>(
2960
+ parameters,
2961
+ callback as BodyResponseCallback<{} | void>
2962
+ );
2963
+ } else {
2964
+ return createAPIRequest<Schema$Operation>(parameters);
2965
+ }
2966
+ }
2967
+ }
2968
+
2969
+ export interface Params$Resource$Managedzones$Create
2970
+ extends StandardParameters {
2971
+ /**
2972
+ * For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
2973
+ */
2974
+ clientOperationId?: string;
2975
+ /**
2976
+ * Identifies the project addressed by this request.
2977
+ */
2978
+ project?: string;
2979
+
2980
+ /**
2981
+ * Request body metadata
2982
+ */
2983
+ requestBody?: Schema$ManagedZone;
2984
+ }
2985
+ export interface Params$Resource$Managedzones$Delete
2986
+ extends StandardParameters {
2987
+ /**
2988
+ * For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
2989
+ */
2990
+ clientOperationId?: string;
2991
+ /**
2992
+ * Identifies the managed zone addressed by this request. Can be the managed zone name or id.
2993
+ */
2994
+ managedZone?: string;
2995
+ /**
2996
+ * Identifies the project addressed by this request.
2997
+ */
2998
+ project?: string;
2999
+ }
3000
+ export interface Params$Resource$Managedzones$Get extends StandardParameters {
3001
+ /**
3002
+ * For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
3003
+ */
3004
+ clientOperationId?: string;
3005
+ /**
3006
+ * Identifies the managed zone addressed by this request. Can be the managed zone name or id.
3007
+ */
3008
+ managedZone?: string;
3009
+ /**
3010
+ * Identifies the project addressed by this request.
3011
+ */
3012
+ project?: string;
3013
+ }
3014
+ export interface Params$Resource$Managedzones$List
3015
+ extends StandardParameters {
3016
+ /**
3017
+ * Restricts the list to return only zones with this domain name.
3018
+ */
3019
+ dnsName?: string;
3020
+ /**
3021
+ * Optional. Maximum number of results to be returned. If unspecified, the server will decide how many results to return.
3022
+ */
3023
+ maxResults?: number;
3024
+ /**
3025
+ * Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.
3026
+ */
3027
+ pageToken?: string;
3028
+ /**
3029
+ * Identifies the project addressed by this request.
3030
+ */
3031
+ project?: string;
3032
+ }
3033
+ export interface Params$Resource$Managedzones$Patch
3034
+ extends StandardParameters {
3035
+ /**
3036
+ * For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
3037
+ */
3038
+ clientOperationId?: string;
3039
+ /**
3040
+ * Identifies the managed zone addressed by this request. Can be the managed zone name or id.
3041
+ */
3042
+ managedZone?: string;
3043
+ /**
3044
+ * Identifies the project addressed by this request.
3045
+ */
3046
+ project?: string;
3047
+
3048
+ /**
3049
+ * Request body metadata
3050
+ */
3051
+ requestBody?: Schema$ManagedZone;
3052
+ }
3053
+ export interface Params$Resource$Managedzones$Update
3054
+ extends StandardParameters {
3055
+ /**
3056
+ * For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
3057
+ */
3058
+ clientOperationId?: string;
3059
+ /**
3060
+ * Identifies the managed zone addressed by this request. Can be the managed zone name or id.
3061
+ */
3062
+ managedZone?: string;
3063
+ /**
3064
+ * Identifies the project addressed by this request.
3065
+ */
3066
+ project?: string;
3067
+
3068
+ /**
3069
+ * Request body metadata
3070
+ */
3071
+ requestBody?: Schema$ManagedZone;
3072
+ }
3073
+
3074
+ export class Resource$Policies {
3075
+ context: APIRequestContext;
3076
+ constructor(context: APIRequestContext) {
3077
+ this.context = context;
3078
+ }
3079
+
3080
+ /**
3081
+ * dns.policies.create
3082
+ * @desc Create a new Policy
3083
+ * @example
3084
+ * // Before running the sample:
3085
+ * // - Enable the API at:
3086
+ * // https://console.developers.google.com/apis/api/dns.googleapis.com
3087
+ * // - Login into gcloud by running:
3088
+ * // `$ gcloud auth application-default login`
3089
+ * // - Install the npm module by running:
3090
+ * // `$ npm install googleapis`
3091
+ *
3092
+ * const {google} = require('googleapis');
3093
+ * const dns = google.dns('v2beta1');
3094
+ *
3095
+ * async function main() {
3096
+ * const auth = new google.auth.GoogleAuth({
3097
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3098
+ * scopes: [],
3099
+ * });
3100
+ *
3101
+ * // Acquire an auth client, and bind it to all future calls
3102
+ * const authClient = await auth.getClient();
3103
+ * google.options({auth: authClient});
3104
+ *
3105
+ * // Do the magic
3106
+ * const res = await dns.policies.create({
3107
+ * // For mutating operation requests only. An optional identifier
3108
+ * // specified by the client. Must be unique for operation resources in the
3109
+ * // Operations collection.
3110
+ * clientOperationId: 'placeholder-value',
3111
+ * // Identifies the project addressed by this request.
3112
+ * project: 'placeholder-value',
3113
+ *
3114
+ * // Request body metadata
3115
+ * requestBody: {
3116
+ * // request body parameters
3117
+ * // {
3118
+ * // "alternativeNameServerConfig": {},
3119
+ * // "description": "my_description",
3120
+ * // "enableInboundForwarding": false,
3121
+ * // "enableLogging": false,
3122
+ * // "id": "my_id",
3123
+ * // "kind": "my_kind",
3124
+ * // "name": "my_name",
3125
+ * // "networks": []
3126
+ * // }
3127
+ * },
3128
+ * });
3129
+ * console.log(res.data);
3130
+ *
3131
+ * // Example response
3132
+ * // {
3133
+ * // "alternativeNameServerConfig": {},
3134
+ * // "description": "my_description",
3135
+ * // "enableInboundForwarding": false,
3136
+ * // "enableLogging": false,
3137
+ * // "id": "my_id",
3138
+ * // "kind": "my_kind",
3139
+ * // "name": "my_name",
3140
+ * // "networks": []
3141
+ * // }
3142
+ * }
3143
+ *
3144
+ * main().catch(e => {
3145
+ * console.error(e);
3146
+ * throw e;
3147
+ * });
3148
+ *
3149
+ * @alias dns.policies.create
3150
+ * @memberOf! ()
3151
+ *
3152
+ * @param {object} params Parameters for request
3153
+ * @param {string=} params.clientOperationId For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
3154
+ * @param {string} params.project Identifies the project addressed by this request.
3155
+ * @param {().Policy} params.requestBody Request body data
3156
+ * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
3157
+ * @param {callback} callback The callback that handles the response.
3158
+ * @return {object} Request object
3159
+ */
3160
+ create(
3161
+ params: Params$Resource$Policies$Create,
3162
+ options: StreamMethodOptions
3163
+ ): GaxiosPromise<Readable>;
3164
+ create(
3165
+ params?: Params$Resource$Policies$Create,
3166
+ options?: MethodOptions
3167
+ ): GaxiosPromise<Schema$Policy>;
3168
+ create(
3169
+ params: Params$Resource$Policies$Create,
3170
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
3171
+ callback: BodyResponseCallback<Readable>
3172
+ ): void;
3173
+ create(
3174
+ params: Params$Resource$Policies$Create,
3175
+ options: MethodOptions | BodyResponseCallback<Schema$Policy>,
3176
+ callback: BodyResponseCallback<Schema$Policy>
3177
+ ): void;
3178
+ create(
3179
+ params: Params$Resource$Policies$Create,
3180
+ callback: BodyResponseCallback<Schema$Policy>
3181
+ ): void;
3182
+ create(callback: BodyResponseCallback<Schema$Policy>): void;
3183
+ create(
3184
+ paramsOrCallback?:
3185
+ | Params$Resource$Policies$Create
3186
+ | BodyResponseCallback<Schema$Policy>
3187
+ | BodyResponseCallback<Readable>,
3188
+ optionsOrCallback?:
3189
+ | MethodOptions
3190
+ | StreamMethodOptions
3191
+ | BodyResponseCallback<Schema$Policy>
3192
+ | BodyResponseCallback<Readable>,
3193
+ callback?:
3194
+ | BodyResponseCallback<Schema$Policy>
3195
+ | BodyResponseCallback<Readable>
3196
+ ): void | GaxiosPromise<Schema$Policy> | GaxiosPromise<Readable> {
3197
+ let params = (paramsOrCallback || {}) as Params$Resource$Policies$Create;
3198
+ let options = (optionsOrCallback || {}) as MethodOptions;
3199
+
3200
+ if (typeof paramsOrCallback === 'function') {
3201
+ callback = paramsOrCallback;
3202
+ params = {} as Params$Resource$Policies$Create;
3203
+ options = {};
3204
+ }
3205
+
3206
+ if (typeof optionsOrCallback === 'function') {
3207
+ callback = optionsOrCallback;
3208
+ options = {};
3209
+ }
3210
+
3211
+ const rootUrl = options.rootUrl || 'https://dns.googleapis.com/';
3212
+ const parameters = {
3213
+ options: Object.assign(
3214
+ {
3215
+ url: (rootUrl + '/dns/v2beta1/projects/{project}/policies').replace(
3216
+ /([^:]\/)\/+/g,
3217
+ '$1'
3218
+ ),
3219
+ method: 'POST',
3220
+ },
3221
+ options
3222
+ ),
3223
+ params,
3224
+ requiredParams: ['project'],
3225
+ pathParams: ['project'],
3226
+ context: this.context,
3227
+ };
3228
+ if (callback) {
3229
+ createAPIRequest<Schema$Policy>(
3230
+ parameters,
3231
+ callback as BodyResponseCallback<{} | void>
3232
+ );
3233
+ } else {
3234
+ return createAPIRequest<Schema$Policy>(parameters);
3235
+ }
3236
+ }
3237
+
3238
+ /**
3239
+ * dns.policies.delete
3240
+ * @desc Delete a previously created Policy. Will fail if the policy is still being referenced by a network.
3241
+ * @example
3242
+ * // Before running the sample:
3243
+ * // - Enable the API at:
3244
+ * // https://console.developers.google.com/apis/api/dns.googleapis.com
3245
+ * // - Login into gcloud by running:
3246
+ * // `$ gcloud auth application-default login`
3247
+ * // - Install the npm module by running:
3248
+ * // `$ npm install googleapis`
3249
+ *
3250
+ * const {google} = require('googleapis');
3251
+ * const dns = google.dns('v2beta1');
3252
+ *
3253
+ * async function main() {
3254
+ * const auth = new google.auth.GoogleAuth({
3255
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3256
+ * scopes: [],
3257
+ * });
3258
+ *
3259
+ * // Acquire an auth client, and bind it to all future calls
3260
+ * const authClient = await auth.getClient();
3261
+ * google.options({auth: authClient});
3262
+ *
3263
+ * // Do the magic
3264
+ * const res = await dns.policies.delete({
3265
+ * // For mutating operation requests only. An optional identifier
3266
+ * // specified by the client. Must be unique for operation resources in the
3267
+ * // Operations collection.
3268
+ * clientOperationId: 'placeholder-value',
3269
+ * // User given friendly name of the policy addressed by this request.
3270
+ * policy: 'placeholder-value',
3271
+ * // Identifies the project addressed by this request.
3272
+ * project: 'placeholder-value',
3273
+ * });
3274
+ * console.log(res.data);
3275
+ * }
3276
+ *
3277
+ * main().catch(e => {
3278
+ * console.error(e);
3279
+ * throw e;
3280
+ * });
3281
+ *
3282
+ * @alias dns.policies.delete
3283
+ * @memberOf! ()
3284
+ *
3285
+ * @param {object} params Parameters for request
3286
+ * @param {string=} params.clientOperationId For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
3287
+ * @param {string} params.policy User given friendly name of the policy addressed by this request.
3288
+ * @param {string} params.project Identifies the project addressed by this request.
3289
+ * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
3290
+ * @param {callback} callback The callback that handles the response.
3291
+ * @return {object} Request object
3292
+ */
3293
+ delete(
3294
+ params: Params$Resource$Policies$Delete,
3295
+ options: StreamMethodOptions
3296
+ ): GaxiosPromise<Readable>;
3297
+ delete(
3298
+ params?: Params$Resource$Policies$Delete,
3299
+ options?: MethodOptions
3300
+ ): GaxiosPromise<void>;
3301
+ delete(
3302
+ params: Params$Resource$Policies$Delete,
3303
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
3304
+ callback: BodyResponseCallback<Readable>
3305
+ ): void;
3306
+ delete(
3307
+ params: Params$Resource$Policies$Delete,
3308
+ options: MethodOptions | BodyResponseCallback<void>,
3309
+ callback: BodyResponseCallback<void>
3310
+ ): void;
3311
+ delete(
3312
+ params: Params$Resource$Policies$Delete,
3313
+ callback: BodyResponseCallback<void>
3314
+ ): void;
3315
+ delete(callback: BodyResponseCallback<void>): void;
3316
+ delete(
3317
+ paramsOrCallback?:
3318
+ | Params$Resource$Policies$Delete
3319
+ | BodyResponseCallback<void>
3320
+ | BodyResponseCallback<Readable>,
3321
+ optionsOrCallback?:
3322
+ | MethodOptions
3323
+ | StreamMethodOptions
3324
+ | BodyResponseCallback<void>
3325
+ | BodyResponseCallback<Readable>,
3326
+ callback?: BodyResponseCallback<void> | BodyResponseCallback<Readable>
3327
+ ): void | GaxiosPromise<void> | GaxiosPromise<Readable> {
3328
+ let params = (paramsOrCallback || {}) as Params$Resource$Policies$Delete;
3329
+ let options = (optionsOrCallback || {}) as MethodOptions;
3330
+
3331
+ if (typeof paramsOrCallback === 'function') {
3332
+ callback = paramsOrCallback;
3333
+ params = {} as Params$Resource$Policies$Delete;
3334
+ options = {};
3335
+ }
3336
+
3337
+ if (typeof optionsOrCallback === 'function') {
3338
+ callback = optionsOrCallback;
3339
+ options = {};
3340
+ }
3341
+
3342
+ const rootUrl = options.rootUrl || 'https://dns.googleapis.com/';
3343
+ const parameters = {
3344
+ options: Object.assign(
3345
+ {
3346
+ url: (
3347
+ rootUrl + '/dns/v2beta1/projects/{project}/policies/{policy}'
3348
+ ).replace(/([^:]\/)\/+/g, '$1'),
3349
+ method: 'DELETE',
3350
+ },
3351
+ options
3352
+ ),
3353
+ params,
3354
+ requiredParams: ['project', 'policy'],
3355
+ pathParams: ['policy', 'project'],
3356
+ context: this.context,
3357
+ };
3358
+ if (callback) {
3359
+ createAPIRequest<void>(
3360
+ parameters,
3361
+ callback as BodyResponseCallback<{} | void>
3362
+ );
3363
+ } else {
3364
+ return createAPIRequest<void>(parameters);
3365
+ }
3366
+ }
3367
+
3368
+ /**
3369
+ * dns.policies.get
3370
+ * @desc Fetch the representation of an existing Policy.
3371
+ * @example
3372
+ * // Before running the sample:
3373
+ * // - Enable the API at:
3374
+ * // https://console.developers.google.com/apis/api/dns.googleapis.com
3375
+ * // - Login into gcloud by running:
3376
+ * // `$ gcloud auth application-default login`
3377
+ * // - Install the npm module by running:
3378
+ * // `$ npm install googleapis`
3379
+ *
3380
+ * const {google} = require('googleapis');
3381
+ * const dns = google.dns('v2beta1');
3382
+ *
3383
+ * async function main() {
3384
+ * const auth = new google.auth.GoogleAuth({
3385
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3386
+ * scopes: [],
3387
+ * });
3388
+ *
3389
+ * // Acquire an auth client, and bind it to all future calls
3390
+ * const authClient = await auth.getClient();
3391
+ * google.options({auth: authClient});
3392
+ *
3393
+ * // Do the magic
3394
+ * const res = await dns.policies.get({
3395
+ * // For mutating operation requests only. An optional identifier
3396
+ * // specified by the client. Must be unique for operation resources in the
3397
+ * // Operations collection.
3398
+ * clientOperationId: 'placeholder-value',
3399
+ * // User given friendly name of the policy addressed by this request.
3400
+ * policy: 'placeholder-value',
3401
+ * // Identifies the project addressed by this request.
3402
+ * project: 'placeholder-value',
3403
+ * });
3404
+ * console.log(res.data);
3405
+ *
3406
+ * // Example response
3407
+ * // {
3408
+ * // "alternativeNameServerConfig": {},
3409
+ * // "description": "my_description",
3410
+ * // "enableInboundForwarding": false,
3411
+ * // "enableLogging": false,
3412
+ * // "id": "my_id",
3413
+ * // "kind": "my_kind",
3414
+ * // "name": "my_name",
3415
+ * // "networks": []
3416
+ * // }
3417
+ * }
3418
+ *
3419
+ * main().catch(e => {
3420
+ * console.error(e);
3421
+ * throw e;
3422
+ * });
3423
+ *
3424
+ * @alias dns.policies.get
3425
+ * @memberOf! ()
3426
+ *
3427
+ * @param {object} params Parameters for request
3428
+ * @param {string=} params.clientOperationId For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
3429
+ * @param {string} params.policy User given friendly name of the policy addressed by this request.
3430
+ * @param {string} params.project Identifies the project addressed by this request.
3431
+ * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
3432
+ * @param {callback} callback The callback that handles the response.
3433
+ * @return {object} Request object
3434
+ */
3435
+ get(
3436
+ params: Params$Resource$Policies$Get,
3437
+ options: StreamMethodOptions
3438
+ ): GaxiosPromise<Readable>;
3439
+ get(
3440
+ params?: Params$Resource$Policies$Get,
3441
+ options?: MethodOptions
3442
+ ): GaxiosPromise<Schema$Policy>;
3443
+ get(
3444
+ params: Params$Resource$Policies$Get,
3445
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
3446
+ callback: BodyResponseCallback<Readable>
3447
+ ): void;
3448
+ get(
3449
+ params: Params$Resource$Policies$Get,
3450
+ options: MethodOptions | BodyResponseCallback<Schema$Policy>,
3451
+ callback: BodyResponseCallback<Schema$Policy>
3452
+ ): void;
3453
+ get(
3454
+ params: Params$Resource$Policies$Get,
3455
+ callback: BodyResponseCallback<Schema$Policy>
3456
+ ): void;
3457
+ get(callback: BodyResponseCallback<Schema$Policy>): void;
3458
+ get(
3459
+ paramsOrCallback?:
3460
+ | Params$Resource$Policies$Get
3461
+ | BodyResponseCallback<Schema$Policy>
3462
+ | BodyResponseCallback<Readable>,
3463
+ optionsOrCallback?:
3464
+ | MethodOptions
3465
+ | StreamMethodOptions
3466
+ | BodyResponseCallback<Schema$Policy>
3467
+ | BodyResponseCallback<Readable>,
3468
+ callback?:
3469
+ | BodyResponseCallback<Schema$Policy>
3470
+ | BodyResponseCallback<Readable>
3471
+ ): void | GaxiosPromise<Schema$Policy> | GaxiosPromise<Readable> {
3472
+ let params = (paramsOrCallback || {}) as Params$Resource$Policies$Get;
3473
+ let options = (optionsOrCallback || {}) as MethodOptions;
3474
+
3475
+ if (typeof paramsOrCallback === 'function') {
3476
+ callback = paramsOrCallback;
3477
+ params = {} as Params$Resource$Policies$Get;
3478
+ options = {};
3479
+ }
3480
+
3481
+ if (typeof optionsOrCallback === 'function') {
3482
+ callback = optionsOrCallback;
3483
+ options = {};
3484
+ }
3485
+
3486
+ const rootUrl = options.rootUrl || 'https://dns.googleapis.com/';
3487
+ const parameters = {
3488
+ options: Object.assign(
3489
+ {
3490
+ url: (
3491
+ rootUrl + '/dns/v2beta1/projects/{project}/policies/{policy}'
3492
+ ).replace(/([^:]\/)\/+/g, '$1'),
3493
+ method: 'GET',
3494
+ },
3495
+ options
3496
+ ),
3497
+ params,
3498
+ requiredParams: ['project', 'policy'],
3499
+ pathParams: ['policy', 'project'],
3500
+ context: this.context,
3501
+ };
3502
+ if (callback) {
3503
+ createAPIRequest<Schema$Policy>(
3504
+ parameters,
3505
+ callback as BodyResponseCallback<{} | void>
3506
+ );
3507
+ } else {
3508
+ return createAPIRequest<Schema$Policy>(parameters);
3509
+ }
3510
+ }
3511
+
3512
+ /**
3513
+ * dns.policies.list
3514
+ * @desc Enumerate all Policies associated with a project.
3515
+ * @example
3516
+ * // Before running the sample:
3517
+ * // - Enable the API at:
3518
+ * // https://console.developers.google.com/apis/api/dns.googleapis.com
3519
+ * // - Login into gcloud by running:
3520
+ * // `$ gcloud auth application-default login`
3521
+ * // - Install the npm module by running:
3522
+ * // `$ npm install googleapis`
3523
+ *
3524
+ * const {google} = require('googleapis');
3525
+ * const dns = google.dns('v2beta1');
3526
+ *
3527
+ * async function main() {
3528
+ * const auth = new google.auth.GoogleAuth({
3529
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3530
+ * scopes: [],
3531
+ * });
3532
+ *
3533
+ * // Acquire an auth client, and bind it to all future calls
3534
+ * const authClient = await auth.getClient();
3535
+ * google.options({auth: authClient});
3536
+ *
3537
+ * // Do the magic
3538
+ * const res = await dns.policies.list({
3539
+ * // Optional. Maximum number of results to be returned. If unspecified, the
3540
+ * // server will decide how many results to return.
3541
+ * maxResults: 'placeholder-value',
3542
+ * // Optional. A tag returned by a previous list request that was truncated.
3543
+ * // Use this parameter to continue a previous list request.
3544
+ * pageToken: 'placeholder-value',
3545
+ * // Identifies the project addressed by this request.
3546
+ * project: 'placeholder-value',
3547
+ * });
3548
+ * console.log(res.data);
3549
+ *
3550
+ * // Example response
3551
+ * // {
3552
+ * // "header": {},
3553
+ * // "kind": "my_kind",
3554
+ * // "nextPageToken": "my_nextPageToken",
3555
+ * // "policies": []
3556
+ * // }
3557
+ * }
3558
+ *
3559
+ * main().catch(e => {
3560
+ * console.error(e);
3561
+ * throw e;
3562
+ * });
3563
+ *
3564
+ * @alias dns.policies.list
3565
+ * @memberOf! ()
3566
+ *
3567
+ * @param {object} params Parameters for request
3568
+ * @param {integer=} params.maxResults Optional. Maximum number of results to be returned. If unspecified, the server will decide how many results to return.
3569
+ * @param {string=} params.pageToken Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.
3570
+ * @param {string} params.project Identifies the project addressed by this request.
3571
+ * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
3572
+ * @param {callback} callback The callback that handles the response.
3573
+ * @return {object} Request object
3574
+ */
3575
+ list(
3576
+ params: Params$Resource$Policies$List,
3577
+ options: StreamMethodOptions
3578
+ ): GaxiosPromise<Readable>;
3579
+ list(
3580
+ params?: Params$Resource$Policies$List,
3581
+ options?: MethodOptions
3582
+ ): GaxiosPromise<Schema$PoliciesListResponse>;
3583
+ list(
3584
+ params: Params$Resource$Policies$List,
3585
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
3586
+ callback: BodyResponseCallback<Readable>
3587
+ ): void;
3588
+ list(
3589
+ params: Params$Resource$Policies$List,
3590
+ options:
3591
+ | MethodOptions
3592
+ | BodyResponseCallback<Schema$PoliciesListResponse>,
3593
+ callback: BodyResponseCallback<Schema$PoliciesListResponse>
3594
+ ): void;
3595
+ list(
3596
+ params: Params$Resource$Policies$List,
3597
+ callback: BodyResponseCallback<Schema$PoliciesListResponse>
3598
+ ): void;
3599
+ list(callback: BodyResponseCallback<Schema$PoliciesListResponse>): void;
3600
+ list(
3601
+ paramsOrCallback?:
3602
+ | Params$Resource$Policies$List
3603
+ | BodyResponseCallback<Schema$PoliciesListResponse>
3604
+ | BodyResponseCallback<Readable>,
3605
+ optionsOrCallback?:
3606
+ | MethodOptions
3607
+ | StreamMethodOptions
3608
+ | BodyResponseCallback<Schema$PoliciesListResponse>
3609
+ | BodyResponseCallback<Readable>,
3610
+ callback?:
3611
+ | BodyResponseCallback<Schema$PoliciesListResponse>
3612
+ | BodyResponseCallback<Readable>
3613
+ ):
3614
+ | void
3615
+ | GaxiosPromise<Schema$PoliciesListResponse>
3616
+ | GaxiosPromise<Readable> {
3617
+ let params = (paramsOrCallback || {}) as Params$Resource$Policies$List;
3618
+ let options = (optionsOrCallback || {}) as MethodOptions;
3619
+
3620
+ if (typeof paramsOrCallback === 'function') {
3621
+ callback = paramsOrCallback;
3622
+ params = {} as Params$Resource$Policies$List;
3623
+ options = {};
3624
+ }
3625
+
3626
+ if (typeof optionsOrCallback === 'function') {
3627
+ callback = optionsOrCallback;
3628
+ options = {};
3629
+ }
3630
+
3631
+ const rootUrl = options.rootUrl || 'https://dns.googleapis.com/';
3632
+ const parameters = {
3633
+ options: Object.assign(
3634
+ {
3635
+ url: (rootUrl + '/dns/v2beta1/projects/{project}/policies').replace(
3636
+ /([^:]\/)\/+/g,
3637
+ '$1'
3638
+ ),
3639
+ method: 'GET',
3640
+ },
3641
+ options
3642
+ ),
3643
+ params,
3644
+ requiredParams: ['project'],
3645
+ pathParams: ['project'],
3646
+ context: this.context,
3647
+ };
3648
+ if (callback) {
3649
+ createAPIRequest<Schema$PoliciesListResponse>(
3650
+ parameters,
3651
+ callback as BodyResponseCallback<{} | void>
3652
+ );
3653
+ } else {
3654
+ return createAPIRequest<Schema$PoliciesListResponse>(parameters);
3655
+ }
3656
+ }
3657
+
3658
+ /**
3659
+ * dns.policies.patch
3660
+ * @desc Apply a partial update to an existing Policy.
3661
+ * @example
3662
+ * // Before running the sample:
3663
+ * // - Enable the API at:
3664
+ * // https://console.developers.google.com/apis/api/dns.googleapis.com
3665
+ * // - Login into gcloud by running:
3666
+ * // `$ gcloud auth application-default login`
3667
+ * // - Install the npm module by running:
3668
+ * // `$ npm install googleapis`
3669
+ *
3670
+ * const {google} = require('googleapis');
3671
+ * const dns = google.dns('v2beta1');
3672
+ *
3673
+ * async function main() {
3674
+ * const auth = new google.auth.GoogleAuth({
3675
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3676
+ * scopes: [],
3677
+ * });
3678
+ *
3679
+ * // Acquire an auth client, and bind it to all future calls
3680
+ * const authClient = await auth.getClient();
3681
+ * google.options({auth: authClient});
3682
+ *
3683
+ * // Do the magic
3684
+ * const res = await dns.policies.patch({
3685
+ * // For mutating operation requests only. An optional identifier
3686
+ * // specified by the client. Must be unique for operation resources in the
3687
+ * // Operations collection.
3688
+ * clientOperationId: 'placeholder-value',
3689
+ * // User given friendly name of the policy addressed by this request.
3690
+ * policy: 'placeholder-value',
3691
+ * // Identifies the project addressed by this request.
3692
+ * project: 'placeholder-value',
3693
+ *
3694
+ * // Request body metadata
3695
+ * requestBody: {
3696
+ * // request body parameters
3697
+ * // {
3698
+ * // "alternativeNameServerConfig": {},
3699
+ * // "description": "my_description",
3700
+ * // "enableInboundForwarding": false,
3701
+ * // "enableLogging": false,
3702
+ * // "id": "my_id",
3703
+ * // "kind": "my_kind",
3704
+ * // "name": "my_name",
3705
+ * // "networks": []
3706
+ * // }
3707
+ * },
3708
+ * });
3709
+ * console.log(res.data);
3710
+ *
3711
+ * // Example response
3712
+ * // {
3713
+ * // "header": {},
3714
+ * // "policy": {}
3715
+ * // }
3716
+ * }
3717
+ *
3718
+ * main().catch(e => {
3719
+ * console.error(e);
3720
+ * throw e;
3721
+ * });
3722
+ *
3723
+ * @alias dns.policies.patch
3724
+ * @memberOf! ()
3725
+ *
3726
+ * @param {object} params Parameters for request
3727
+ * @param {string=} params.clientOperationId For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
3728
+ * @param {string} params.policy User given friendly name of the policy addressed by this request.
3729
+ * @param {string} params.project Identifies the project addressed by this request.
3730
+ * @param {().Policy} params.requestBody Request body data
3731
+ * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
3732
+ * @param {callback} callback The callback that handles the response.
3733
+ * @return {object} Request object
3734
+ */
3735
+ patch(
3736
+ params: Params$Resource$Policies$Patch,
3737
+ options: StreamMethodOptions
3738
+ ): GaxiosPromise<Readable>;
3739
+ patch(
3740
+ params?: Params$Resource$Policies$Patch,
3741
+ options?: MethodOptions
3742
+ ): GaxiosPromise<Schema$PoliciesPatchResponse>;
3743
+ patch(
3744
+ params: Params$Resource$Policies$Patch,
3745
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
3746
+ callback: BodyResponseCallback<Readable>
3747
+ ): void;
3748
+ patch(
3749
+ params: Params$Resource$Policies$Patch,
3750
+ options:
3751
+ | MethodOptions
3752
+ | BodyResponseCallback<Schema$PoliciesPatchResponse>,
3753
+ callback: BodyResponseCallback<Schema$PoliciesPatchResponse>
3754
+ ): void;
3755
+ patch(
3756
+ params: Params$Resource$Policies$Patch,
3757
+ callback: BodyResponseCallback<Schema$PoliciesPatchResponse>
3758
+ ): void;
3759
+ patch(callback: BodyResponseCallback<Schema$PoliciesPatchResponse>): void;
3760
+ patch(
3761
+ paramsOrCallback?:
3762
+ | Params$Resource$Policies$Patch
3763
+ | BodyResponseCallback<Schema$PoliciesPatchResponse>
3764
+ | BodyResponseCallback<Readable>,
3765
+ optionsOrCallback?:
3766
+ | MethodOptions
3767
+ | StreamMethodOptions
3768
+ | BodyResponseCallback<Schema$PoliciesPatchResponse>
3769
+ | BodyResponseCallback<Readable>,
3770
+ callback?:
3771
+ | BodyResponseCallback<Schema$PoliciesPatchResponse>
3772
+ | BodyResponseCallback<Readable>
3773
+ ):
3774
+ | void
3775
+ | GaxiosPromise<Schema$PoliciesPatchResponse>
3776
+ | GaxiosPromise<Readable> {
3777
+ let params = (paramsOrCallback || {}) as Params$Resource$Policies$Patch;
3778
+ let options = (optionsOrCallback || {}) as MethodOptions;
3779
+
3780
+ if (typeof paramsOrCallback === 'function') {
3781
+ callback = paramsOrCallback;
3782
+ params = {} as Params$Resource$Policies$Patch;
3783
+ options = {};
3784
+ }
3785
+
3786
+ if (typeof optionsOrCallback === 'function') {
3787
+ callback = optionsOrCallback;
3788
+ options = {};
3789
+ }
3790
+
3791
+ const rootUrl = options.rootUrl || 'https://dns.googleapis.com/';
3792
+ const parameters = {
3793
+ options: Object.assign(
3794
+ {
3795
+ url: (
3796
+ rootUrl + '/dns/v2beta1/projects/{project}/policies/{policy}'
3797
+ ).replace(/([^:]\/)\/+/g, '$1'),
3798
+ method: 'PATCH',
3799
+ },
3800
+ options
3801
+ ),
3802
+ params,
3803
+ requiredParams: ['project', 'policy'],
3804
+ pathParams: ['policy', 'project'],
3805
+ context: this.context,
3806
+ };
3807
+ if (callback) {
3808
+ createAPIRequest<Schema$PoliciesPatchResponse>(
3809
+ parameters,
3810
+ callback as BodyResponseCallback<{} | void>
3811
+ );
3812
+ } else {
3813
+ return createAPIRequest<Schema$PoliciesPatchResponse>(parameters);
3814
+ }
3815
+ }
3816
+
3817
+ /**
3818
+ * dns.policies.update
3819
+ * @desc Update an existing Policy.
3820
+ * @example
3821
+ * // Before running the sample:
3822
+ * // - Enable the API at:
3823
+ * // https://console.developers.google.com/apis/api/dns.googleapis.com
3824
+ * // - Login into gcloud by running:
3825
+ * // `$ gcloud auth application-default login`
3826
+ * // - Install the npm module by running:
3827
+ * // `$ npm install googleapis`
3828
+ *
3829
+ * const {google} = require('googleapis');
3830
+ * const dns = google.dns('v2beta1');
3831
+ *
3832
+ * async function main() {
3833
+ * const auth = new google.auth.GoogleAuth({
3834
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3835
+ * scopes: [],
3836
+ * });
3837
+ *
3838
+ * // Acquire an auth client, and bind it to all future calls
3839
+ * const authClient = await auth.getClient();
3840
+ * google.options({auth: authClient});
3841
+ *
3842
+ * // Do the magic
3843
+ * const res = await dns.policies.update({
3844
+ * // For mutating operation requests only. An optional identifier
3845
+ * // specified by the client. Must be unique for operation resources in the
3846
+ * // Operations collection.
3847
+ * clientOperationId: 'placeholder-value',
3848
+ * // User given friendly name of the policy addressed by this request.
3849
+ * policy: 'placeholder-value',
3850
+ * // Identifies the project addressed by this request.
3851
+ * project: 'placeholder-value',
3852
+ *
3853
+ * // Request body metadata
3854
+ * requestBody: {
3855
+ * // request body parameters
3856
+ * // {
3857
+ * // "alternativeNameServerConfig": {},
3858
+ * // "description": "my_description",
3859
+ * // "enableInboundForwarding": false,
3860
+ * // "enableLogging": false,
3861
+ * // "id": "my_id",
3862
+ * // "kind": "my_kind",
3863
+ * // "name": "my_name",
3864
+ * // "networks": []
3865
+ * // }
3866
+ * },
3867
+ * });
3868
+ * console.log(res.data);
3869
+ *
3870
+ * // Example response
3871
+ * // {
3872
+ * // "header": {},
3873
+ * // "policy": {}
3874
+ * // }
3875
+ * }
3876
+ *
3877
+ * main().catch(e => {
3878
+ * console.error(e);
3879
+ * throw e;
3880
+ * });
3881
+ *
3882
+ * @alias dns.policies.update
3883
+ * @memberOf! ()
3884
+ *
3885
+ * @param {object} params Parameters for request
3886
+ * @param {string=} params.clientOperationId For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
3887
+ * @param {string} params.policy User given friendly name of the policy addressed by this request.
3888
+ * @param {string} params.project Identifies the project addressed by this request.
3889
+ * @param {().Policy} params.requestBody Request body data
3890
+ * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
3891
+ * @param {callback} callback The callback that handles the response.
3892
+ * @return {object} Request object
3893
+ */
3894
+ update(
3895
+ params: Params$Resource$Policies$Update,
3896
+ options: StreamMethodOptions
3897
+ ): GaxiosPromise<Readable>;
3898
+ update(
3899
+ params?: Params$Resource$Policies$Update,
3900
+ options?: MethodOptions
3901
+ ): GaxiosPromise<Schema$PoliciesUpdateResponse>;
3902
+ update(
3903
+ params: Params$Resource$Policies$Update,
3904
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
3905
+ callback: BodyResponseCallback<Readable>
3906
+ ): void;
3907
+ update(
3908
+ params: Params$Resource$Policies$Update,
3909
+ options:
3910
+ | MethodOptions
3911
+ | BodyResponseCallback<Schema$PoliciesUpdateResponse>,
3912
+ callback: BodyResponseCallback<Schema$PoliciesUpdateResponse>
3913
+ ): void;
3914
+ update(
3915
+ params: Params$Resource$Policies$Update,
3916
+ callback: BodyResponseCallback<Schema$PoliciesUpdateResponse>
3917
+ ): void;
3918
+ update(callback: BodyResponseCallback<Schema$PoliciesUpdateResponse>): void;
3919
+ update(
3920
+ paramsOrCallback?:
3921
+ | Params$Resource$Policies$Update
3922
+ | BodyResponseCallback<Schema$PoliciesUpdateResponse>
3923
+ | BodyResponseCallback<Readable>,
3924
+ optionsOrCallback?:
3925
+ | MethodOptions
3926
+ | StreamMethodOptions
3927
+ | BodyResponseCallback<Schema$PoliciesUpdateResponse>
3928
+ | BodyResponseCallback<Readable>,
3929
+ callback?:
3930
+ | BodyResponseCallback<Schema$PoliciesUpdateResponse>
3931
+ | BodyResponseCallback<Readable>
3932
+ ):
3933
+ | void
3934
+ | GaxiosPromise<Schema$PoliciesUpdateResponse>
3935
+ | GaxiosPromise<Readable> {
3936
+ let params = (paramsOrCallback || {}) as Params$Resource$Policies$Update;
3937
+ let options = (optionsOrCallback || {}) as MethodOptions;
3938
+
3939
+ if (typeof paramsOrCallback === 'function') {
3940
+ callback = paramsOrCallback;
3941
+ params = {} as Params$Resource$Policies$Update;
3942
+ options = {};
3943
+ }
3944
+
3945
+ if (typeof optionsOrCallback === 'function') {
3946
+ callback = optionsOrCallback;
3947
+ options = {};
3948
+ }
3949
+
3950
+ const rootUrl = options.rootUrl || 'https://dns.googleapis.com/';
3951
+ const parameters = {
3952
+ options: Object.assign(
3953
+ {
3954
+ url: (
3955
+ rootUrl + '/dns/v2beta1/projects/{project}/policies/{policy}'
3956
+ ).replace(/([^:]\/)\/+/g, '$1'),
3957
+ method: 'PUT',
3958
+ },
3959
+ options
3960
+ ),
3961
+ params,
3962
+ requiredParams: ['project', 'policy'],
3963
+ pathParams: ['policy', 'project'],
3964
+ context: this.context,
3965
+ };
3966
+ if (callback) {
3967
+ createAPIRequest<Schema$PoliciesUpdateResponse>(
3968
+ parameters,
3969
+ callback as BodyResponseCallback<{} | void>
3970
+ );
3971
+ } else {
3972
+ return createAPIRequest<Schema$PoliciesUpdateResponse>(parameters);
3973
+ }
3974
+ }
3975
+ }
3976
+
3977
+ export interface Params$Resource$Policies$Create extends StandardParameters {
3978
+ /**
3979
+ * For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
3980
+ */
3981
+ clientOperationId?: string;
3982
+ /**
3983
+ * Identifies the project addressed by this request.
3984
+ */
3985
+ project?: string;
3986
+
3987
+ /**
3988
+ * Request body metadata
3989
+ */
3990
+ requestBody?: Schema$Policy;
3991
+ }
3992
+ export interface Params$Resource$Policies$Delete extends StandardParameters {
3993
+ /**
3994
+ * For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
3995
+ */
3996
+ clientOperationId?: string;
3997
+ /**
3998
+ * User given friendly name of the policy addressed by this request.
3999
+ */
4000
+ policy?: string;
4001
+ /**
4002
+ * Identifies the project addressed by this request.
4003
+ */
4004
+ project?: string;
4005
+ }
4006
+ export interface Params$Resource$Policies$Get extends StandardParameters {
4007
+ /**
4008
+ * For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
4009
+ */
4010
+ clientOperationId?: string;
4011
+ /**
4012
+ * User given friendly name of the policy addressed by this request.
4013
+ */
4014
+ policy?: string;
4015
+ /**
4016
+ * Identifies the project addressed by this request.
4017
+ */
4018
+ project?: string;
4019
+ }
4020
+ export interface Params$Resource$Policies$List extends StandardParameters {
4021
+ /**
4022
+ * Optional. Maximum number of results to be returned. If unspecified, the server will decide how many results to return.
4023
+ */
4024
+ maxResults?: number;
4025
+ /**
4026
+ * Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.
4027
+ */
4028
+ pageToken?: string;
4029
+ /**
4030
+ * Identifies the project addressed by this request.
4031
+ */
4032
+ project?: string;
4033
+ }
4034
+ export interface Params$Resource$Policies$Patch extends StandardParameters {
4035
+ /**
4036
+ * For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
4037
+ */
4038
+ clientOperationId?: string;
4039
+ /**
4040
+ * User given friendly name of the policy addressed by this request.
4041
+ */
4042
+ policy?: string;
4043
+ /**
4044
+ * Identifies the project addressed by this request.
4045
+ */
4046
+ project?: string;
4047
+
4048
+ /**
4049
+ * Request body metadata
4050
+ */
4051
+ requestBody?: Schema$Policy;
4052
+ }
4053
+ export interface Params$Resource$Policies$Update extends StandardParameters {
4054
+ /**
4055
+ * For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
4056
+ */
4057
+ clientOperationId?: string;
4058
+ /**
4059
+ * User given friendly name of the policy addressed by this request.
4060
+ */
4061
+ policy?: string;
4062
+ /**
4063
+ * Identifies the project addressed by this request.
4064
+ */
4065
+ project?: string;
4066
+
4067
+ /**
4068
+ * Request body metadata
4069
+ */
4070
+ requestBody?: Schema$Policy;
4071
+ }
4072
+
4073
+ export class Resource$Projects {
4074
+ context: APIRequestContext;
4075
+ constructor(context: APIRequestContext) {
4076
+ this.context = context;
4077
+ }
4078
+
4079
+ /**
4080
+ * dns.projects.get
4081
+ * @desc Fetch the representation of an existing Project.
4082
+ * @example
4083
+ * // Before running the sample:
4084
+ * // - Enable the API at:
4085
+ * // https://console.developers.google.com/apis/api/dns.googleapis.com
4086
+ * // - Login into gcloud by running:
4087
+ * // `$ gcloud auth application-default login`
4088
+ * // - Install the npm module by running:
4089
+ * // `$ npm install googleapis`
4090
+ *
4091
+ * const {google} = require('googleapis');
4092
+ * const dns = google.dns('v2beta1');
4093
+ *
4094
+ * async function main() {
4095
+ * const auth = new google.auth.GoogleAuth({
4096
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
4097
+ * scopes: [
4098
+ * 'https://www.googleapis.com/auth/cloud-platform',
4099
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
4100
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readonly',
4101
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
4102
+ * ],
4103
+ * });
4104
+ *
4105
+ * // Acquire an auth client, and bind it to all future calls
4106
+ * const authClient = await auth.getClient();
4107
+ * google.options({auth: authClient});
4108
+ *
4109
+ * // Do the magic
4110
+ * const res = await dns.projects.get({
4111
+ * // For mutating operation requests only. An optional identifier
4112
+ * // specified by the client. Must be unique for operation resources in the
4113
+ * // Operations collection.
4114
+ * clientOperationId: 'placeholder-value',
4115
+ * // Identifies the project addressed by this request.
4116
+ * project: 'placeholder-value',
4117
+ * });
4118
+ * console.log(res.data);
4119
+ *
4120
+ * // Example response
4121
+ * // {
4122
+ * // "id": "my_id",
4123
+ * // "kind": "my_kind",
4124
+ * // "number": "my_number",
4125
+ * // "quota": {}
4126
+ * // }
4127
+ * }
4128
+ *
4129
+ * main().catch(e => {
4130
+ * console.error(e);
4131
+ * throw e;
4132
+ * });
4133
+ *
4134
+ * @alias dns.projects.get
4135
+ * @memberOf! ()
4136
+ *
4137
+ * @param {object} params Parameters for request
4138
+ * @param {string=} params.clientOperationId For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
4139
+ * @param {string} params.project Identifies the project addressed by this request.
4140
+ * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
4141
+ * @param {callback} callback The callback that handles the response.
4142
+ * @return {object} Request object
4143
+ */
4144
+ get(
4145
+ params: Params$Resource$Projects$Get,
4146
+ options: StreamMethodOptions
4147
+ ): GaxiosPromise<Readable>;
4148
+ get(
4149
+ params?: Params$Resource$Projects$Get,
4150
+ options?: MethodOptions
4151
+ ): GaxiosPromise<Schema$Project>;
4152
+ get(
4153
+ params: Params$Resource$Projects$Get,
4154
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
4155
+ callback: BodyResponseCallback<Readable>
4156
+ ): void;
4157
+ get(
4158
+ params: Params$Resource$Projects$Get,
4159
+ options: MethodOptions | BodyResponseCallback<Schema$Project>,
4160
+ callback: BodyResponseCallback<Schema$Project>
4161
+ ): void;
4162
+ get(
4163
+ params: Params$Resource$Projects$Get,
4164
+ callback: BodyResponseCallback<Schema$Project>
4165
+ ): void;
4166
+ get(callback: BodyResponseCallback<Schema$Project>): void;
4167
+ get(
4168
+ paramsOrCallback?:
4169
+ | Params$Resource$Projects$Get
4170
+ | BodyResponseCallback<Schema$Project>
4171
+ | BodyResponseCallback<Readable>,
4172
+ optionsOrCallback?:
4173
+ | MethodOptions
4174
+ | StreamMethodOptions
4175
+ | BodyResponseCallback<Schema$Project>
4176
+ | BodyResponseCallback<Readable>,
4177
+ callback?:
4178
+ | BodyResponseCallback<Schema$Project>
4179
+ | BodyResponseCallback<Readable>
4180
+ ): void | GaxiosPromise<Schema$Project> | GaxiosPromise<Readable> {
4181
+ let params = (paramsOrCallback || {}) as Params$Resource$Projects$Get;
4182
+ let options = (optionsOrCallback || {}) as MethodOptions;
4183
+
4184
+ if (typeof paramsOrCallback === 'function') {
4185
+ callback = paramsOrCallback;
4186
+ params = {} as Params$Resource$Projects$Get;
4187
+ options = {};
4188
+ }
4189
+
4190
+ if (typeof optionsOrCallback === 'function') {
4191
+ callback = optionsOrCallback;
4192
+ options = {};
4193
+ }
4194
+
4195
+ const rootUrl = options.rootUrl || 'https://dns.googleapis.com/';
4196
+ const parameters = {
4197
+ options: Object.assign(
4198
+ {
4199
+ url: (rootUrl + '/dns/v2beta1/projects/{project}').replace(
4200
+ /([^:]\/)\/+/g,
4201
+ '$1'
4202
+ ),
4203
+ method: 'GET',
4204
+ },
4205
+ options
4206
+ ),
4207
+ params,
4208
+ requiredParams: ['project'],
4209
+ pathParams: ['project'],
4210
+ context: this.context,
4211
+ };
4212
+ if (callback) {
4213
+ createAPIRequest<Schema$Project>(
4214
+ parameters,
4215
+ callback as BodyResponseCallback<{} | void>
4216
+ );
4217
+ } else {
4218
+ return createAPIRequest<Schema$Project>(parameters);
4219
+ }
4220
+ }
4221
+ }
4222
+
4223
+ export interface Params$Resource$Projects$Get extends StandardParameters {
4224
+ /**
4225
+ * For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
4226
+ */
4227
+ clientOperationId?: string;
4228
+ /**
4229
+ * Identifies the project addressed by this request.
4230
+ */
4231
+ project?: string;
4232
+ }
4233
+
4234
+ export class Resource$Resourcerecordsets {
4235
+ context: APIRequestContext;
4236
+ constructor(context: APIRequestContext) {
4237
+ this.context = context;
4238
+ }
4239
+
4240
+ /**
4241
+ * dns.resourceRecordSets.list
4242
+ * @desc Enumerate ResourceRecordSets that have been created but not yet deleted.
4243
+ * @example
4244
+ * // Before running the sample:
4245
+ * // - Enable the API at:
4246
+ * // https://console.developers.google.com/apis/api/dns.googleapis.com
4247
+ * // - Login into gcloud by running:
4248
+ * // `$ gcloud auth application-default login`
4249
+ * // - Install the npm module by running:
4250
+ * // `$ npm install googleapis`
4251
+ *
4252
+ * const {google} = require('googleapis');
4253
+ * const dns = google.dns('v2beta1');
4254
+ *
4255
+ * async function main() {
4256
+ * const auth = new google.auth.GoogleAuth({
4257
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
4258
+ * scopes: [
4259
+ * 'https://www.googleapis.com/auth/cloud-platform',
4260
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
4261
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readonly',
4262
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
4263
+ * ],
4264
+ * });
4265
+ *
4266
+ * // Acquire an auth client, and bind it to all future calls
4267
+ * const authClient = await auth.getClient();
4268
+ * google.options({auth: authClient});
4269
+ *
4270
+ * // Do the magic
4271
+ * const res = await dns.resourceRecordSets.list({
4272
+ * // Identifies the managed zone addressed by this request. Can be the managed
4273
+ * // zone name or id.
4274
+ * managedZone: 'placeholder-value',
4275
+ * // Optional. Maximum number of results to be returned. If unspecified, the
4276
+ * // server will decide how many results to return.
4277
+ * maxResults: 'placeholder-value',
4278
+ * // Restricts the list to return only records with this fully qualified domain
4279
+ * // name.
4280
+ * name: 'placeholder-value',
4281
+ * // Optional. A tag returned by a previous list request that was truncated.
4282
+ * // Use this parameter to continue a previous list request.
4283
+ * pageToken: 'placeholder-value',
4284
+ * // Identifies the project addressed by this request.
4285
+ * project: 'placeholder-value',
4286
+ * // Restricts the list to return only records of this type. If present, the
4287
+ * // "name" parameter must also be present.
4288
+ * type: 'placeholder-value',
4289
+ * });
4290
+ * console.log(res.data);
4291
+ *
4292
+ * // Example response
4293
+ * // {
4294
+ * // "header": {},
4295
+ * // "kind": "my_kind",
4296
+ * // "nextPageToken": "my_nextPageToken",
4297
+ * // "rrsets": []
4298
+ * // }
4299
+ * }
4300
+ *
4301
+ * main().catch(e => {
4302
+ * console.error(e);
4303
+ * throw e;
4304
+ * });
4305
+ *
4306
+ * @alias dns.resourceRecordSets.list
4307
+ * @memberOf! ()
4308
+ *
4309
+ * @param {object} params Parameters for request
4310
+ * @param {string} params.managedZone Identifies the managed zone addressed by this request. Can be the managed zone name or id.
4311
+ * @param {integer=} params.maxResults Optional. Maximum number of results to be returned. If unspecified, the server will decide how many results to return.
4312
+ * @param {string=} params.name Restricts the list to return only records with this fully qualified domain name.
4313
+ * @param {string=} params.pageToken Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.
4314
+ * @param {string} params.project Identifies the project addressed by this request.
4315
+ * @param {string=} params.type Restricts the list to return only records of this type. If present, the "name" parameter must also be present.
4316
+ * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
4317
+ * @param {callback} callback The callback that handles the response.
4318
+ * @return {object} Request object
4319
+ */
4320
+ list(
4321
+ params: Params$Resource$Resourcerecordsets$List,
4322
+ options: StreamMethodOptions
4323
+ ): GaxiosPromise<Readable>;
4324
+ list(
4325
+ params?: Params$Resource$Resourcerecordsets$List,
4326
+ options?: MethodOptions
4327
+ ): GaxiosPromise<Schema$ResourceRecordSetsListResponse>;
4328
+ list(
4329
+ params: Params$Resource$Resourcerecordsets$List,
4330
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
4331
+ callback: BodyResponseCallback<Readable>
4332
+ ): void;
4333
+ list(
4334
+ params: Params$Resource$Resourcerecordsets$List,
4335
+ options:
4336
+ | MethodOptions
4337
+ | BodyResponseCallback<Schema$ResourceRecordSetsListResponse>,
4338
+ callback: BodyResponseCallback<Schema$ResourceRecordSetsListResponse>
4339
+ ): void;
4340
+ list(
4341
+ params: Params$Resource$Resourcerecordsets$List,
4342
+ callback: BodyResponseCallback<Schema$ResourceRecordSetsListResponse>
4343
+ ): void;
4344
+ list(
4345
+ callback: BodyResponseCallback<Schema$ResourceRecordSetsListResponse>
4346
+ ): void;
4347
+ list(
4348
+ paramsOrCallback?:
4349
+ | Params$Resource$Resourcerecordsets$List
4350
+ | BodyResponseCallback<Schema$ResourceRecordSetsListResponse>
4351
+ | BodyResponseCallback<Readable>,
4352
+ optionsOrCallback?:
4353
+ | MethodOptions
4354
+ | StreamMethodOptions
4355
+ | BodyResponseCallback<Schema$ResourceRecordSetsListResponse>
4356
+ | BodyResponseCallback<Readable>,
4357
+ callback?:
4358
+ | BodyResponseCallback<Schema$ResourceRecordSetsListResponse>
4359
+ | BodyResponseCallback<Readable>
4360
+ ):
4361
+ | void
4362
+ | GaxiosPromise<Schema$ResourceRecordSetsListResponse>
4363
+ | GaxiosPromise<Readable> {
4364
+ let params = (paramsOrCallback ||
4365
+ {}) as Params$Resource$Resourcerecordsets$List;
4366
+ let options = (optionsOrCallback || {}) as MethodOptions;
4367
+
4368
+ if (typeof paramsOrCallback === 'function') {
4369
+ callback = paramsOrCallback;
4370
+ params = {} as Params$Resource$Resourcerecordsets$List;
4371
+ options = {};
4372
+ }
4373
+
4374
+ if (typeof optionsOrCallback === 'function') {
4375
+ callback = optionsOrCallback;
4376
+ options = {};
4377
+ }
4378
+
4379
+ const rootUrl = options.rootUrl || 'https://dns.googleapis.com/';
4380
+ const parameters = {
4381
+ options: Object.assign(
4382
+ {
4383
+ url: (
4384
+ rootUrl +
4385
+ '/dns/v2beta1/projects/{project}/managedZones/{managedZone}/rrsets'
4386
+ ).replace(/([^:]\/)\/+/g, '$1'),
4387
+ method: 'GET',
4388
+ },
4389
+ options
4390
+ ),
4391
+ params,
4392
+ requiredParams: ['project', 'managedZone'],
4393
+ pathParams: ['managedZone', 'project'],
4394
+ context: this.context,
4395
+ };
4396
+ if (callback) {
4397
+ createAPIRequest<Schema$ResourceRecordSetsListResponse>(
4398
+ parameters,
4399
+ callback as BodyResponseCallback<{} | void>
4400
+ );
4401
+ } else {
4402
+ return createAPIRequest<Schema$ResourceRecordSetsListResponse>(
4403
+ parameters
4404
+ );
4405
+ }
4406
+ }
4407
+ }
4408
+
4409
+ export interface Params$Resource$Resourcerecordsets$List
4410
+ extends StandardParameters {
4411
+ /**
4412
+ * Identifies the managed zone addressed by this request. Can be the managed zone name or id.
4413
+ */
4414
+ managedZone?: string;
4415
+ /**
4416
+ * Optional. Maximum number of results to be returned. If unspecified, the server will decide how many results to return.
4417
+ */
4418
+ maxResults?: number;
4419
+ /**
4420
+ * Restricts the list to return only records with this fully qualified domain name.
4421
+ */
4422
+ name?: string;
4423
+ /**
4424
+ * Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.
4425
+ */
4426
+ pageToken?: string;
4427
+ /**
4428
+ * Identifies the project addressed by this request.
4429
+ */
4430
+ project?: string;
4431
+ /**
4432
+ * Restricts the list to return only records of this type. If present, the "name" parameter must also be present.
4433
+ */
4434
+ type?: string;
4435
+ }
4436
+ }