@googleapis/dns 6.3.0 → 8.0.1

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/build/v1.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /// <reference types="node" />
2
- import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient, GaxiosPromise, GoogleConfigurable, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext } from 'googleapis-common';
2
+ import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient, GaxiosResponseWithHTTP2, GoogleConfigurable, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext } from 'googleapis-common';
3
3
  import { Readable } from 'stream';
4
4
  export declare namespace dns_v1 {
5
5
  export interface Options extends GlobalOptions {
@@ -1139,42 +1139,241 @@ export declare namespace dns_v1 {
1139
1139
  constructor(context: APIRequestContext);
1140
1140
  /**
1141
1141
  * Atomically updates the ResourceRecordSet collection.
1142
+ * @example
1143
+ * ```js
1144
+ * // Before running the sample:
1145
+ * // - Enable the API at:
1146
+ * // https://console.developers.google.com/apis/api/dns.googleapis.com
1147
+ * // - Login into gcloud by running:
1148
+ * // ```sh
1149
+ * // $ gcloud auth application-default login
1150
+ * // ```
1151
+ * // - Install the npm module by running:
1152
+ * // ```sh
1153
+ * // $ npm install googleapis
1154
+ * // ```
1155
+ *
1156
+ * const {google} = require('googleapis');
1157
+ * const dns = google.dns('v1');
1158
+ *
1159
+ * async function main() {
1160
+ * const auth = new google.auth.GoogleAuth({
1161
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1162
+ * scopes: [
1163
+ * 'https://www.googleapis.com/auth/cloud-platform',
1164
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
1165
+ * ],
1166
+ * });
1167
+ *
1168
+ * // Acquire an auth client, and bind it to all future calls
1169
+ * const authClient = await auth.getClient();
1170
+ * google.options({auth: authClient});
1171
+ *
1172
+ * // Do the magic
1173
+ * const res = await dns.changes.create({
1174
+ * // For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
1175
+ * clientOperationId: 'placeholder-value',
1176
+ * // Identifies the managed zone addressed by this request. Can be the managed zone name or ID.
1177
+ * managedZone: 'placeholder-value',
1178
+ * // Identifies the project addressed by this request.
1179
+ * project: 'placeholder-value',
1180
+ *
1181
+ * // Request body metadata
1182
+ * requestBody: {
1183
+ * // request body parameters
1184
+ * // {
1185
+ * // "additions": [],
1186
+ * // "deletions": [],
1187
+ * // "id": "my_id",
1188
+ * // "isServing": false,
1189
+ * // "kind": "my_kind",
1190
+ * // "startTime": "my_startTime",
1191
+ * // "status": "my_status"
1192
+ * // }
1193
+ * },
1194
+ * });
1195
+ * console.log(res.data);
1196
+ *
1197
+ * // Example response
1198
+ * // {
1199
+ * // "additions": [],
1200
+ * // "deletions": [],
1201
+ * // "id": "my_id",
1202
+ * // "isServing": false,
1203
+ * // "kind": "my_kind",
1204
+ * // "startTime": "my_startTime",
1205
+ * // "status": "my_status"
1206
+ * // }
1207
+ * }
1208
+ *
1209
+ * main().catch(e => {
1210
+ * console.error(e);
1211
+ * throw e;
1212
+ * });
1213
+ *
1214
+ * ```
1142
1215
  *
1143
1216
  * @param params - Parameters for request
1144
1217
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1145
1218
  * @param callback - Optional callback that handles the response.
1146
1219
  * @returns A promise if used with async/await, or void if used with a callback.
1147
1220
  */
1148
- create(params: Params$Resource$Changes$Create, options: StreamMethodOptions): GaxiosPromise<Readable>;
1149
- create(params?: Params$Resource$Changes$Create, options?: MethodOptions): GaxiosPromise<Schema$Change>;
1221
+ create(params: Params$Resource$Changes$Create, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
1222
+ create(params?: Params$Resource$Changes$Create, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Change>>;
1150
1223
  create(params: Params$Resource$Changes$Create, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1151
1224
  create(params: Params$Resource$Changes$Create, options: MethodOptions | BodyResponseCallback<Schema$Change>, callback: BodyResponseCallback<Schema$Change>): void;
1152
1225
  create(params: Params$Resource$Changes$Create, callback: BodyResponseCallback<Schema$Change>): void;
1153
1226
  create(callback: BodyResponseCallback<Schema$Change>): void;
1154
1227
  /**
1155
1228
  * Fetches the representation of an existing Change.
1229
+ * @example
1230
+ * ```js
1231
+ * // Before running the sample:
1232
+ * // - Enable the API at:
1233
+ * // https://console.developers.google.com/apis/api/dns.googleapis.com
1234
+ * // - Login into gcloud by running:
1235
+ * // ```sh
1236
+ * // $ gcloud auth application-default login
1237
+ * // ```
1238
+ * // - Install the npm module by running:
1239
+ * // ```sh
1240
+ * // $ npm install googleapis
1241
+ * // ```
1242
+ *
1243
+ * const {google} = require('googleapis');
1244
+ * const dns = google.dns('v1');
1245
+ *
1246
+ * async function main() {
1247
+ * const auth = new google.auth.GoogleAuth({
1248
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1249
+ * scopes: [
1250
+ * 'https://www.googleapis.com/auth/cloud-platform',
1251
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
1252
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readonly',
1253
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
1254
+ * ],
1255
+ * });
1256
+ *
1257
+ * // Acquire an auth client, and bind it to all future calls
1258
+ * const authClient = await auth.getClient();
1259
+ * google.options({auth: authClient});
1260
+ *
1261
+ * // Do the magic
1262
+ * const res = await dns.changes.get({
1263
+ * // The identifier of the requested change, from a previous ResourceRecordSetsChangeResponse.
1264
+ * changeId: 'placeholder-value',
1265
+ * // For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
1266
+ * clientOperationId: 'placeholder-value',
1267
+ * // Identifies the managed zone addressed by this request. Can be the managed zone name or ID.
1268
+ * managedZone: 'placeholder-value',
1269
+ * // Identifies the project addressed by this request.
1270
+ * project: 'placeholder-value',
1271
+ * });
1272
+ * console.log(res.data);
1273
+ *
1274
+ * // Example response
1275
+ * // {
1276
+ * // "additions": [],
1277
+ * // "deletions": [],
1278
+ * // "id": "my_id",
1279
+ * // "isServing": false,
1280
+ * // "kind": "my_kind",
1281
+ * // "startTime": "my_startTime",
1282
+ * // "status": "my_status"
1283
+ * // }
1284
+ * }
1285
+ *
1286
+ * main().catch(e => {
1287
+ * console.error(e);
1288
+ * throw e;
1289
+ * });
1290
+ *
1291
+ * ```
1156
1292
  *
1157
1293
  * @param params - Parameters for request
1158
1294
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1159
1295
  * @param callback - Optional callback that handles the response.
1160
1296
  * @returns A promise if used with async/await, or void if used with a callback.
1161
1297
  */
1162
- get(params: Params$Resource$Changes$Get, options: StreamMethodOptions): GaxiosPromise<Readable>;
1163
- get(params?: Params$Resource$Changes$Get, options?: MethodOptions): GaxiosPromise<Schema$Change>;
1298
+ get(params: Params$Resource$Changes$Get, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
1299
+ get(params?: Params$Resource$Changes$Get, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Change>>;
1164
1300
  get(params: Params$Resource$Changes$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1165
1301
  get(params: Params$Resource$Changes$Get, options: MethodOptions | BodyResponseCallback<Schema$Change>, callback: BodyResponseCallback<Schema$Change>): void;
1166
1302
  get(params: Params$Resource$Changes$Get, callback: BodyResponseCallback<Schema$Change>): void;
1167
1303
  get(callback: BodyResponseCallback<Schema$Change>): void;
1168
1304
  /**
1169
1305
  * Enumerates Changes to a ResourceRecordSet collection.
1306
+ * @example
1307
+ * ```js
1308
+ * // Before running the sample:
1309
+ * // - Enable the API at:
1310
+ * // https://console.developers.google.com/apis/api/dns.googleapis.com
1311
+ * // - Login into gcloud by running:
1312
+ * // ```sh
1313
+ * // $ gcloud auth application-default login
1314
+ * // ```
1315
+ * // - Install the npm module by running:
1316
+ * // ```sh
1317
+ * // $ npm install googleapis
1318
+ * // ```
1319
+ *
1320
+ * const {google} = require('googleapis');
1321
+ * const dns = google.dns('v1');
1322
+ *
1323
+ * async function main() {
1324
+ * const auth = new google.auth.GoogleAuth({
1325
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1326
+ * scopes: [
1327
+ * 'https://www.googleapis.com/auth/cloud-platform',
1328
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
1329
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readonly',
1330
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
1331
+ * ],
1332
+ * });
1333
+ *
1334
+ * // Acquire an auth client, and bind it to all future calls
1335
+ * const authClient = await auth.getClient();
1336
+ * google.options({auth: authClient});
1337
+ *
1338
+ * // Do the magic
1339
+ * const res = await dns.changes.list({
1340
+ * // Identifies the managed zone addressed by this request. Can be the managed zone name or ID.
1341
+ * managedZone: 'placeholder-value',
1342
+ * // Optional. Maximum number of results to be returned. If unspecified, the server decides how many results to return.
1343
+ * maxResults: 'placeholder-value',
1344
+ * // Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.
1345
+ * pageToken: 'placeholder-value',
1346
+ * // Identifies the project addressed by this request.
1347
+ * project: 'placeholder-value',
1348
+ * // Sorting criterion. The only supported value is change sequence.
1349
+ * sortBy: 'placeholder-value',
1350
+ * // Sorting order direction: 'ascending' or 'descending'.
1351
+ * sortOrder: 'placeholder-value',
1352
+ * });
1353
+ * console.log(res.data);
1354
+ *
1355
+ * // Example response
1356
+ * // {
1357
+ * // "changes": [],
1358
+ * // "kind": "my_kind",
1359
+ * // "nextPageToken": "my_nextPageToken"
1360
+ * // }
1361
+ * }
1362
+ *
1363
+ * main().catch(e => {
1364
+ * console.error(e);
1365
+ * throw e;
1366
+ * });
1367
+ *
1368
+ * ```
1170
1369
  *
1171
1370
  * @param params - Parameters for request
1172
1371
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1173
1372
  * @param callback - Optional callback that handles the response.
1174
1373
  * @returns A promise if used with async/await, or void if used with a callback.
1175
1374
  */
1176
- list(params: Params$Resource$Changes$List, options: StreamMethodOptions): GaxiosPromise<Readable>;
1177
- list(params?: Params$Resource$Changes$List, options?: MethodOptions): GaxiosPromise<Schema$ChangesListResponse>;
1375
+ list(params: Params$Resource$Changes$List, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
1376
+ list(params?: Params$Resource$Changes$List, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ChangesListResponse>>;
1178
1377
  list(params: Params$Resource$Changes$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1179
1378
  list(params: Params$Resource$Changes$List, options: MethodOptions | BodyResponseCallback<Schema$ChangesListResponse>, callback: BodyResponseCallback<Schema$ChangesListResponse>): void;
1180
1379
  list(params: Params$Resource$Changes$List, callback: BodyResponseCallback<Schema$ChangesListResponse>): void;
@@ -1247,28 +1446,158 @@ export declare namespace dns_v1 {
1247
1446
  constructor(context: APIRequestContext);
1248
1447
  /**
1249
1448
  * Fetches the representation of an existing DnsKey.
1449
+ * @example
1450
+ * ```js
1451
+ * // Before running the sample:
1452
+ * // - Enable the API at:
1453
+ * // https://console.developers.google.com/apis/api/dns.googleapis.com
1454
+ * // - Login into gcloud by running:
1455
+ * // ```sh
1456
+ * // $ gcloud auth application-default login
1457
+ * // ```
1458
+ * // - Install the npm module by running:
1459
+ * // ```sh
1460
+ * // $ npm install googleapis
1461
+ * // ```
1462
+ *
1463
+ * const {google} = require('googleapis');
1464
+ * const dns = google.dns('v1');
1465
+ *
1466
+ * async function main() {
1467
+ * const auth = new google.auth.GoogleAuth({
1468
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1469
+ * scopes: [
1470
+ * 'https://www.googleapis.com/auth/cloud-platform',
1471
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
1472
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readonly',
1473
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
1474
+ * ],
1475
+ * });
1476
+ *
1477
+ * // Acquire an auth client, and bind it to all future calls
1478
+ * const authClient = await auth.getClient();
1479
+ * google.options({auth: authClient});
1480
+ *
1481
+ * // Do the magic
1482
+ * const res = await dns.dnsKeys.get({
1483
+ * // For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
1484
+ * clientOperationId: 'placeholder-value',
1485
+ * // An optional comma-separated list of digest types to compute and display for key signing keys. If omitted, the recommended digest type is computed and displayed.
1486
+ * digestType: 'placeholder-value',
1487
+ * // The identifier of the requested DnsKey.
1488
+ * dnsKeyId: 'placeholder-value',
1489
+ * // Identifies the managed zone addressed by this request. Can be the managed zone name or ID.
1490
+ * managedZone: 'placeholder-value',
1491
+ * // Identifies the project addressed by this request.
1492
+ * project: 'placeholder-value',
1493
+ * });
1494
+ * console.log(res.data);
1495
+ *
1496
+ * // Example response
1497
+ * // {
1498
+ * // "algorithm": "my_algorithm",
1499
+ * // "creationTime": "my_creationTime",
1500
+ * // "description": "my_description",
1501
+ * // "digests": [],
1502
+ * // "id": "my_id",
1503
+ * // "isActive": false,
1504
+ * // "keyLength": 0,
1505
+ * // "keyTag": 0,
1506
+ * // "kind": "my_kind",
1507
+ * // "publicKey": "my_publicKey",
1508
+ * // "type": "my_type"
1509
+ * // }
1510
+ * }
1511
+ *
1512
+ * main().catch(e => {
1513
+ * console.error(e);
1514
+ * throw e;
1515
+ * });
1516
+ *
1517
+ * ```
1250
1518
  *
1251
1519
  * @param params - Parameters for request
1252
1520
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1253
1521
  * @param callback - Optional callback that handles the response.
1254
1522
  * @returns A promise if used with async/await, or void if used with a callback.
1255
1523
  */
1256
- get(params: Params$Resource$Dnskeys$Get, options: StreamMethodOptions): GaxiosPromise<Readable>;
1257
- get(params?: Params$Resource$Dnskeys$Get, options?: MethodOptions): GaxiosPromise<Schema$DnsKey>;
1524
+ get(params: Params$Resource$Dnskeys$Get, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
1525
+ get(params?: Params$Resource$Dnskeys$Get, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$DnsKey>>;
1258
1526
  get(params: Params$Resource$Dnskeys$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1259
1527
  get(params: Params$Resource$Dnskeys$Get, options: MethodOptions | BodyResponseCallback<Schema$DnsKey>, callback: BodyResponseCallback<Schema$DnsKey>): void;
1260
1528
  get(params: Params$Resource$Dnskeys$Get, callback: BodyResponseCallback<Schema$DnsKey>): void;
1261
1529
  get(callback: BodyResponseCallback<Schema$DnsKey>): void;
1262
1530
  /**
1263
1531
  * Enumerates DnsKeys to a ResourceRecordSet collection.
1532
+ * @example
1533
+ * ```js
1534
+ * // Before running the sample:
1535
+ * // - Enable the API at:
1536
+ * // https://console.developers.google.com/apis/api/dns.googleapis.com
1537
+ * // - Login into gcloud by running:
1538
+ * // ```sh
1539
+ * // $ gcloud auth application-default login
1540
+ * // ```
1541
+ * // - Install the npm module by running:
1542
+ * // ```sh
1543
+ * // $ npm install googleapis
1544
+ * // ```
1545
+ *
1546
+ * const {google} = require('googleapis');
1547
+ * const dns = google.dns('v1');
1548
+ *
1549
+ * async function main() {
1550
+ * const auth = new google.auth.GoogleAuth({
1551
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1552
+ * scopes: [
1553
+ * 'https://www.googleapis.com/auth/cloud-platform',
1554
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
1555
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readonly',
1556
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
1557
+ * ],
1558
+ * });
1559
+ *
1560
+ * // Acquire an auth client, and bind it to all future calls
1561
+ * const authClient = await auth.getClient();
1562
+ * google.options({auth: authClient});
1563
+ *
1564
+ * // Do the magic
1565
+ * const res = await dns.dnsKeys.list({
1566
+ * // An optional comma-separated list of digest types to compute and display for key signing keys. If omitted, the recommended digest type is computed and displayed.
1567
+ * digestType: 'placeholder-value',
1568
+ * // Identifies the managed zone addressed by this request. Can be the managed zone name or ID.
1569
+ * managedZone: 'placeholder-value',
1570
+ * // Optional. Maximum number of results to be returned. If unspecified, the server decides how many results to return.
1571
+ * maxResults: 'placeholder-value',
1572
+ * // Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.
1573
+ * pageToken: 'placeholder-value',
1574
+ * // Identifies the project addressed by this request.
1575
+ * project: 'placeholder-value',
1576
+ * });
1577
+ * console.log(res.data);
1578
+ *
1579
+ * // Example response
1580
+ * // {
1581
+ * // "dnsKeys": [],
1582
+ * // "kind": "my_kind",
1583
+ * // "nextPageToken": "my_nextPageToken"
1584
+ * // }
1585
+ * }
1586
+ *
1587
+ * main().catch(e => {
1588
+ * console.error(e);
1589
+ * throw e;
1590
+ * });
1591
+ *
1592
+ * ```
1264
1593
  *
1265
1594
  * @param params - Parameters for request
1266
1595
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1267
1596
  * @param callback - Optional callback that handles the response.
1268
1597
  * @returns A promise if used with async/await, or void if used with a callback.
1269
1598
  */
1270
- list(params: Params$Resource$Dnskeys$List, options: StreamMethodOptions): GaxiosPromise<Readable>;
1271
- list(params?: Params$Resource$Dnskeys$List, options?: MethodOptions): GaxiosPromise<Schema$DnsKeysListResponse>;
1599
+ list(params: Params$Resource$Dnskeys$List, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
1600
+ list(params?: Params$Resource$Dnskeys$List, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$DnsKeysListResponse>>;
1272
1601
  list(params: Params$Resource$Dnskeys$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1273
1602
  list(params: Params$Resource$Dnskeys$List, options: MethodOptions | BodyResponseCallback<Schema$DnsKeysListResponse>, callback: BodyResponseCallback<Schema$DnsKeysListResponse>): void;
1274
1603
  list(params: Params$Resource$Dnskeys$List, callback: BodyResponseCallback<Schema$DnsKeysListResponse>): void;
@@ -1323,28 +1652,153 @@ export declare namespace dns_v1 {
1323
1652
  constructor(context: APIRequestContext);
1324
1653
  /**
1325
1654
  * Fetches the representation of an existing Operation.
1655
+ * @example
1656
+ * ```js
1657
+ * // Before running the sample:
1658
+ * // - Enable the API at:
1659
+ * // https://console.developers.google.com/apis/api/dns.googleapis.com
1660
+ * // - Login into gcloud by running:
1661
+ * // ```sh
1662
+ * // $ gcloud auth application-default login
1663
+ * // ```
1664
+ * // - Install the npm module by running:
1665
+ * // ```sh
1666
+ * // $ npm install googleapis
1667
+ * // ```
1668
+ *
1669
+ * const {google} = require('googleapis');
1670
+ * const dns = google.dns('v1');
1671
+ *
1672
+ * async function main() {
1673
+ * const auth = new google.auth.GoogleAuth({
1674
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1675
+ * scopes: [
1676
+ * 'https://www.googleapis.com/auth/cloud-platform',
1677
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
1678
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readonly',
1679
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
1680
+ * ],
1681
+ * });
1682
+ *
1683
+ * // Acquire an auth client, and bind it to all future calls
1684
+ * const authClient = await auth.getClient();
1685
+ * google.options({auth: authClient});
1686
+ *
1687
+ * // Do the magic
1688
+ * const res = await dns.managedZoneOperations.get({
1689
+ * // For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
1690
+ * clientOperationId: 'placeholder-value',
1691
+ * // Identifies the managed zone addressed by this request.
1692
+ * managedZone: 'placeholder-value',
1693
+ * // Identifies the operation addressed by this request (ID of the operation).
1694
+ * operation: 'placeholder-value',
1695
+ * // Identifies the project addressed by this request.
1696
+ * project: 'placeholder-value',
1697
+ * });
1698
+ * console.log(res.data);
1699
+ *
1700
+ * // Example response
1701
+ * // {
1702
+ * // "dnsKeyContext": {},
1703
+ * // "id": "my_id",
1704
+ * // "kind": "my_kind",
1705
+ * // "startTime": "my_startTime",
1706
+ * // "status": "my_status",
1707
+ * // "type": "my_type",
1708
+ * // "user": "my_user",
1709
+ * // "zoneContext": {}
1710
+ * // }
1711
+ * }
1712
+ *
1713
+ * main().catch(e => {
1714
+ * console.error(e);
1715
+ * throw e;
1716
+ * });
1717
+ *
1718
+ * ```
1326
1719
  *
1327
1720
  * @param params - Parameters for request
1328
1721
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1329
1722
  * @param callback - Optional callback that handles the response.
1330
1723
  * @returns A promise if used with async/await, or void if used with a callback.
1331
1724
  */
1332
- get(params: Params$Resource$Managedzoneoperations$Get, options: StreamMethodOptions): GaxiosPromise<Readable>;
1333
- get(params?: Params$Resource$Managedzoneoperations$Get, options?: MethodOptions): GaxiosPromise<Schema$Operation>;
1725
+ get(params: Params$Resource$Managedzoneoperations$Get, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
1726
+ get(params?: Params$Resource$Managedzoneoperations$Get, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
1334
1727
  get(params: Params$Resource$Managedzoneoperations$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1335
1728
  get(params: Params$Resource$Managedzoneoperations$Get, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
1336
1729
  get(params: Params$Resource$Managedzoneoperations$Get, callback: BodyResponseCallback<Schema$Operation>): void;
1337
1730
  get(callback: BodyResponseCallback<Schema$Operation>): void;
1338
1731
  /**
1339
1732
  * Enumerates Operations for the given ManagedZone.
1733
+ * @example
1734
+ * ```js
1735
+ * // Before running the sample:
1736
+ * // - Enable the API at:
1737
+ * // https://console.developers.google.com/apis/api/dns.googleapis.com
1738
+ * // - Login into gcloud by running:
1739
+ * // ```sh
1740
+ * // $ gcloud auth application-default login
1741
+ * // ```
1742
+ * // - Install the npm module by running:
1743
+ * // ```sh
1744
+ * // $ npm install googleapis
1745
+ * // ```
1746
+ *
1747
+ * const {google} = require('googleapis');
1748
+ * const dns = google.dns('v1');
1749
+ *
1750
+ * async function main() {
1751
+ * const auth = new google.auth.GoogleAuth({
1752
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1753
+ * scopes: [
1754
+ * 'https://www.googleapis.com/auth/cloud-platform',
1755
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
1756
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readonly',
1757
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
1758
+ * ],
1759
+ * });
1760
+ *
1761
+ * // Acquire an auth client, and bind it to all future calls
1762
+ * const authClient = await auth.getClient();
1763
+ * google.options({auth: authClient});
1764
+ *
1765
+ * // Do the magic
1766
+ * const res = await dns.managedZoneOperations.list({
1767
+ * // Identifies the managed zone addressed by this request.
1768
+ * managedZone: 'placeholder-value',
1769
+ * // Optional. Maximum number of results to be returned. If unspecified, the server decides how many results to return.
1770
+ * maxResults: 'placeholder-value',
1771
+ * // Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.
1772
+ * pageToken: 'placeholder-value',
1773
+ * // Identifies the project addressed by this request.
1774
+ * project: 'placeholder-value',
1775
+ * // Sorting criterion. The only supported values are START_TIME and ID.
1776
+ * sortBy: 'placeholder-value',
1777
+ * });
1778
+ * console.log(res.data);
1779
+ *
1780
+ * // Example response
1781
+ * // {
1782
+ * // "kind": "my_kind",
1783
+ * // "nextPageToken": "my_nextPageToken",
1784
+ * // "operations": []
1785
+ * // }
1786
+ * }
1787
+ *
1788
+ * main().catch(e => {
1789
+ * console.error(e);
1790
+ * throw e;
1791
+ * });
1792
+ *
1793
+ * ```
1340
1794
  *
1341
1795
  * @param params - Parameters for request
1342
1796
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1343
1797
  * @param callback - Optional callback that handles the response.
1344
1798
  * @returns A promise if used with async/await, or void if used with a callback.
1345
1799
  */
1346
- list(params: Params$Resource$Managedzoneoperations$List, options: StreamMethodOptions): GaxiosPromise<Readable>;
1347
- list(params?: Params$Resource$Managedzoneoperations$List, options?: MethodOptions): GaxiosPromise<Schema$ManagedZoneOperationsListResponse>;
1800
+ list(params: Params$Resource$Managedzoneoperations$List, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
1801
+ list(params?: Params$Resource$Managedzoneoperations$List, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ManagedZoneOperationsListResponse>>;
1348
1802
  list(params: Params$Resource$Managedzoneoperations$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1349
1803
  list(params: Params$Resource$Managedzoneoperations$List, options: MethodOptions | BodyResponseCallback<Schema$ManagedZoneOperationsListResponse>, callback: BodyResponseCallback<Schema$ManagedZoneOperationsListResponse>): void;
1350
1804
  list(params: Params$Resource$Managedzoneoperations$List, callback: BodyResponseCallback<Schema$ManagedZoneOperationsListResponse>): void;
@@ -1395,126 +1849,745 @@ export declare namespace dns_v1 {
1395
1849
  constructor(context: APIRequestContext);
1396
1850
  /**
1397
1851
  * Creates a new ManagedZone.
1852
+ * @example
1853
+ * ```js
1854
+ * // Before running the sample:
1855
+ * // - Enable the API at:
1856
+ * // https://console.developers.google.com/apis/api/dns.googleapis.com
1857
+ * // - Login into gcloud by running:
1858
+ * // ```sh
1859
+ * // $ gcloud auth application-default login
1860
+ * // ```
1861
+ * // - Install the npm module by running:
1862
+ * // ```sh
1863
+ * // $ npm install googleapis
1864
+ * // ```
1865
+ *
1866
+ * const {google} = require('googleapis');
1867
+ * const dns = google.dns('v1');
1868
+ *
1869
+ * async function main() {
1870
+ * const auth = new google.auth.GoogleAuth({
1871
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1872
+ * scopes: [
1873
+ * 'https://www.googleapis.com/auth/cloud-platform',
1874
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
1875
+ * ],
1876
+ * });
1877
+ *
1878
+ * // Acquire an auth client, and bind it to all future calls
1879
+ * const authClient = await auth.getClient();
1880
+ * google.options({auth: authClient});
1881
+ *
1882
+ * // Do the magic
1883
+ * const res = await dns.managedZones.create({
1884
+ * // For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
1885
+ * clientOperationId: 'placeholder-value',
1886
+ * // Identifies the project addressed by this request.
1887
+ * project: 'placeholder-value',
1888
+ *
1889
+ * // Request body metadata
1890
+ * requestBody: {
1891
+ * // request body parameters
1892
+ * // {
1893
+ * // "cloudLoggingConfig": {},
1894
+ * // "creationTime": "my_creationTime",
1895
+ * // "description": "my_description",
1896
+ * // "dnsName": "my_dnsName",
1897
+ * // "dnssecConfig": {},
1898
+ * // "forwardingConfig": {},
1899
+ * // "id": "my_id",
1900
+ * // "kind": "my_kind",
1901
+ * // "labels": {},
1902
+ * // "name": "my_name",
1903
+ * // "nameServerSet": "my_nameServerSet",
1904
+ * // "nameServers": [],
1905
+ * // "peeringConfig": {},
1906
+ * // "privateVisibilityConfig": {},
1907
+ * // "reverseLookupConfig": {},
1908
+ * // "serviceDirectoryConfig": {},
1909
+ * // "visibility": "my_visibility"
1910
+ * // }
1911
+ * },
1912
+ * });
1913
+ * console.log(res.data);
1914
+ *
1915
+ * // Example response
1916
+ * // {
1917
+ * // "cloudLoggingConfig": {},
1918
+ * // "creationTime": "my_creationTime",
1919
+ * // "description": "my_description",
1920
+ * // "dnsName": "my_dnsName",
1921
+ * // "dnssecConfig": {},
1922
+ * // "forwardingConfig": {},
1923
+ * // "id": "my_id",
1924
+ * // "kind": "my_kind",
1925
+ * // "labels": {},
1926
+ * // "name": "my_name",
1927
+ * // "nameServerSet": "my_nameServerSet",
1928
+ * // "nameServers": [],
1929
+ * // "peeringConfig": {},
1930
+ * // "privateVisibilityConfig": {},
1931
+ * // "reverseLookupConfig": {},
1932
+ * // "serviceDirectoryConfig": {},
1933
+ * // "visibility": "my_visibility"
1934
+ * // }
1935
+ * }
1936
+ *
1937
+ * main().catch(e => {
1938
+ * console.error(e);
1939
+ * throw e;
1940
+ * });
1941
+ *
1942
+ * ```
1398
1943
  *
1399
1944
  * @param params - Parameters for request
1400
1945
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1401
1946
  * @param callback - Optional callback that handles the response.
1402
1947
  * @returns A promise if used with async/await, or void if used with a callback.
1403
1948
  */
1404
- create(params: Params$Resource$Managedzones$Create, options: StreamMethodOptions): GaxiosPromise<Readable>;
1405
- create(params?: Params$Resource$Managedzones$Create, options?: MethodOptions): GaxiosPromise<Schema$ManagedZone>;
1949
+ create(params: Params$Resource$Managedzones$Create, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
1950
+ create(params?: Params$Resource$Managedzones$Create, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ManagedZone>>;
1406
1951
  create(params: Params$Resource$Managedzones$Create, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1407
1952
  create(params: Params$Resource$Managedzones$Create, options: MethodOptions | BodyResponseCallback<Schema$ManagedZone>, callback: BodyResponseCallback<Schema$ManagedZone>): void;
1408
1953
  create(params: Params$Resource$Managedzones$Create, callback: BodyResponseCallback<Schema$ManagedZone>): void;
1409
1954
  create(callback: BodyResponseCallback<Schema$ManagedZone>): void;
1410
1955
  /**
1411
1956
  * Deletes a previously created ManagedZone.
1957
+ * @example
1958
+ * ```js
1959
+ * // Before running the sample:
1960
+ * // - Enable the API at:
1961
+ * // https://console.developers.google.com/apis/api/dns.googleapis.com
1962
+ * // - Login into gcloud by running:
1963
+ * // ```sh
1964
+ * // $ gcloud auth application-default login
1965
+ * // ```
1966
+ * // - Install the npm module by running:
1967
+ * // ```sh
1968
+ * // $ npm install googleapis
1969
+ * // ```
1970
+ *
1971
+ * const {google} = require('googleapis');
1972
+ * const dns = google.dns('v1');
1973
+ *
1974
+ * async function main() {
1975
+ * const auth = new google.auth.GoogleAuth({
1976
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1977
+ * scopes: [
1978
+ * 'https://www.googleapis.com/auth/cloud-platform',
1979
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
1980
+ * ],
1981
+ * });
1982
+ *
1983
+ * // Acquire an auth client, and bind it to all future calls
1984
+ * const authClient = await auth.getClient();
1985
+ * google.options({auth: authClient});
1986
+ *
1987
+ * // Do the magic
1988
+ * const res = await dns.managedZones.delete({
1989
+ * // For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
1990
+ * clientOperationId: 'placeholder-value',
1991
+ * // Identifies the managed zone addressed by this request. Can be the managed zone name or ID.
1992
+ * managedZone: 'placeholder-value',
1993
+ * // Identifies the project addressed by this request.
1994
+ * project: 'placeholder-value',
1995
+ * });
1996
+ * console.log(res.data);
1997
+ * }
1998
+ *
1999
+ * main().catch(e => {
2000
+ * console.error(e);
2001
+ * throw e;
2002
+ * });
2003
+ *
2004
+ * ```
1412
2005
  *
1413
2006
  * @param params - Parameters for request
1414
2007
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1415
2008
  * @param callback - Optional callback that handles the response.
1416
2009
  * @returns A promise if used with async/await, or void if used with a callback.
1417
2010
  */
1418
- delete(params: Params$Resource$Managedzones$Delete, options: StreamMethodOptions): GaxiosPromise<Readable>;
1419
- delete(params?: Params$Resource$Managedzones$Delete, options?: MethodOptions): GaxiosPromise<void>;
2011
+ delete(params: Params$Resource$Managedzones$Delete, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
2012
+ delete(params?: Params$Resource$Managedzones$Delete, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<void>>;
1420
2013
  delete(params: Params$Resource$Managedzones$Delete, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1421
2014
  delete(params: Params$Resource$Managedzones$Delete, options: MethodOptions | BodyResponseCallback<void>, callback: BodyResponseCallback<void>): void;
1422
2015
  delete(params: Params$Resource$Managedzones$Delete, callback: BodyResponseCallback<void>): void;
1423
2016
  delete(callback: BodyResponseCallback<void>): void;
1424
2017
  /**
1425
2018
  * Fetches the representation of an existing ManagedZone.
2019
+ * @example
2020
+ * ```js
2021
+ * // Before running the sample:
2022
+ * // - Enable the API at:
2023
+ * // https://console.developers.google.com/apis/api/dns.googleapis.com
2024
+ * // - Login into gcloud by running:
2025
+ * // ```sh
2026
+ * // $ gcloud auth application-default login
2027
+ * // ```
2028
+ * // - Install the npm module by running:
2029
+ * // ```sh
2030
+ * // $ npm install googleapis
2031
+ * // ```
2032
+ *
2033
+ * const {google} = require('googleapis');
2034
+ * const dns = google.dns('v1');
2035
+ *
2036
+ * async function main() {
2037
+ * const auth = new google.auth.GoogleAuth({
2038
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2039
+ * scopes: [
2040
+ * 'https://www.googleapis.com/auth/cloud-platform',
2041
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
2042
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readonly',
2043
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
2044
+ * ],
2045
+ * });
2046
+ *
2047
+ * // Acquire an auth client, and bind it to all future calls
2048
+ * const authClient = await auth.getClient();
2049
+ * google.options({auth: authClient});
2050
+ *
2051
+ * // Do the magic
2052
+ * const res = await dns.managedZones.get({
2053
+ * // For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
2054
+ * clientOperationId: 'placeholder-value',
2055
+ * // Identifies the managed zone addressed by this request. Can be the managed zone name or ID.
2056
+ * managedZone: 'placeholder-value',
2057
+ * // Identifies the project addressed by this request.
2058
+ * project: 'placeholder-value',
2059
+ * });
2060
+ * console.log(res.data);
2061
+ *
2062
+ * // Example response
2063
+ * // {
2064
+ * // "cloudLoggingConfig": {},
2065
+ * // "creationTime": "my_creationTime",
2066
+ * // "description": "my_description",
2067
+ * // "dnsName": "my_dnsName",
2068
+ * // "dnssecConfig": {},
2069
+ * // "forwardingConfig": {},
2070
+ * // "id": "my_id",
2071
+ * // "kind": "my_kind",
2072
+ * // "labels": {},
2073
+ * // "name": "my_name",
2074
+ * // "nameServerSet": "my_nameServerSet",
2075
+ * // "nameServers": [],
2076
+ * // "peeringConfig": {},
2077
+ * // "privateVisibilityConfig": {},
2078
+ * // "reverseLookupConfig": {},
2079
+ * // "serviceDirectoryConfig": {},
2080
+ * // "visibility": "my_visibility"
2081
+ * // }
2082
+ * }
2083
+ *
2084
+ * main().catch(e => {
2085
+ * console.error(e);
2086
+ * throw e;
2087
+ * });
2088
+ *
2089
+ * ```
1426
2090
  *
1427
2091
  * @param params - Parameters for request
1428
2092
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1429
2093
  * @param callback - Optional callback that handles the response.
1430
2094
  * @returns A promise if used with async/await, or void if used with a callback.
1431
2095
  */
1432
- get(params: Params$Resource$Managedzones$Get, options: StreamMethodOptions): GaxiosPromise<Readable>;
1433
- get(params?: Params$Resource$Managedzones$Get, options?: MethodOptions): GaxiosPromise<Schema$ManagedZone>;
2096
+ get(params: Params$Resource$Managedzones$Get, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
2097
+ get(params?: Params$Resource$Managedzones$Get, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ManagedZone>>;
1434
2098
  get(params: Params$Resource$Managedzones$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1435
2099
  get(params: Params$Resource$Managedzones$Get, options: MethodOptions | BodyResponseCallback<Schema$ManagedZone>, callback: BodyResponseCallback<Schema$ManagedZone>): void;
1436
2100
  get(params: Params$Resource$Managedzones$Get, callback: BodyResponseCallback<Schema$ManagedZone>): void;
1437
2101
  get(callback: BodyResponseCallback<Schema$ManagedZone>): void;
1438
2102
  /**
1439
2103
  * Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
2104
+ * @example
2105
+ * ```js
2106
+ * // Before running the sample:
2107
+ * // - Enable the API at:
2108
+ * // https://console.developers.google.com/apis/api/dns.googleapis.com
2109
+ * // - Login into gcloud by running:
2110
+ * // ```sh
2111
+ * // $ gcloud auth application-default login
2112
+ * // ```
2113
+ * // - Install the npm module by running:
2114
+ * // ```sh
2115
+ * // $ npm install googleapis
2116
+ * // ```
2117
+ *
2118
+ * const {google} = require('googleapis');
2119
+ * const dns = google.dns('v1');
2120
+ *
2121
+ * async function main() {
2122
+ * const auth = new google.auth.GoogleAuth({
2123
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2124
+ * scopes: [
2125
+ * 'https://www.googleapis.com/auth/cloud-platform',
2126
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
2127
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readonly',
2128
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
2129
+ * ],
2130
+ * });
2131
+ *
2132
+ * // Acquire an auth client, and bind it to all future calls
2133
+ * const authClient = await auth.getClient();
2134
+ * google.options({auth: authClient});
2135
+ *
2136
+ * // Do the magic
2137
+ * const res = await dns.managedZones.getIamPolicy({
2138
+ * // REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.
2139
+ * resource: 'projects/my-project/managedZones/my-managedZone',
2140
+ *
2141
+ * // Request body metadata
2142
+ * requestBody: {
2143
+ * // request body parameters
2144
+ * // {
2145
+ * // "options": {}
2146
+ * // }
2147
+ * },
2148
+ * });
2149
+ * console.log(res.data);
2150
+ *
2151
+ * // Example response
2152
+ * // {
2153
+ * // "auditConfigs": [],
2154
+ * // "bindings": [],
2155
+ * // "etag": "my_etag",
2156
+ * // "version": 0
2157
+ * // }
2158
+ * }
2159
+ *
2160
+ * main().catch(e => {
2161
+ * console.error(e);
2162
+ * throw e;
2163
+ * });
2164
+ *
2165
+ * ```
1440
2166
  *
1441
2167
  * @param params - Parameters for request
1442
2168
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1443
2169
  * @param callback - Optional callback that handles the response.
1444
2170
  * @returns A promise if used with async/await, or void if used with a callback.
1445
2171
  */
1446
- getIamPolicy(params: Params$Resource$Managedzones$Getiampolicy, options: StreamMethodOptions): GaxiosPromise<Readable>;
1447
- getIamPolicy(params?: Params$Resource$Managedzones$Getiampolicy, options?: MethodOptions): GaxiosPromise<Schema$GoogleIamV1Policy>;
2172
+ getIamPolicy(params: Params$Resource$Managedzones$Getiampolicy, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
2173
+ getIamPolicy(params?: Params$Resource$Managedzones$Getiampolicy, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$GoogleIamV1Policy>>;
1448
2174
  getIamPolicy(params: Params$Resource$Managedzones$Getiampolicy, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1449
2175
  getIamPolicy(params: Params$Resource$Managedzones$Getiampolicy, options: MethodOptions | BodyResponseCallback<Schema$GoogleIamV1Policy>, callback: BodyResponseCallback<Schema$GoogleIamV1Policy>): void;
1450
2176
  getIamPolicy(params: Params$Resource$Managedzones$Getiampolicy, callback: BodyResponseCallback<Schema$GoogleIamV1Policy>): void;
1451
2177
  getIamPolicy(callback: BodyResponseCallback<Schema$GoogleIamV1Policy>): void;
1452
2178
  /**
1453
2179
  * Enumerates ManagedZones that have been created but not yet deleted.
2180
+ * @example
2181
+ * ```js
2182
+ * // Before running the sample:
2183
+ * // - Enable the API at:
2184
+ * // https://console.developers.google.com/apis/api/dns.googleapis.com
2185
+ * // - Login into gcloud by running:
2186
+ * // ```sh
2187
+ * // $ gcloud auth application-default login
2188
+ * // ```
2189
+ * // - Install the npm module by running:
2190
+ * // ```sh
2191
+ * // $ npm install googleapis
2192
+ * // ```
2193
+ *
2194
+ * const {google} = require('googleapis');
2195
+ * const dns = google.dns('v1');
2196
+ *
2197
+ * async function main() {
2198
+ * const auth = new google.auth.GoogleAuth({
2199
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2200
+ * scopes: [
2201
+ * 'https://www.googleapis.com/auth/cloud-platform',
2202
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
2203
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readonly',
2204
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
2205
+ * ],
2206
+ * });
2207
+ *
2208
+ * // Acquire an auth client, and bind it to all future calls
2209
+ * const authClient = await auth.getClient();
2210
+ * google.options({auth: authClient});
2211
+ *
2212
+ * // Do the magic
2213
+ * const res = await dns.managedZones.list({
2214
+ * // Restricts the list to return only zones with this domain name.
2215
+ * dnsName: 'placeholder-value',
2216
+ * // Optional. Maximum number of results to be returned. If unspecified, the server decides how many results to return.
2217
+ * maxResults: 'placeholder-value',
2218
+ * // Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.
2219
+ * pageToken: 'placeholder-value',
2220
+ * // Identifies the project addressed by this request.
2221
+ * project: 'placeholder-value',
2222
+ * });
2223
+ * console.log(res.data);
2224
+ *
2225
+ * // Example response
2226
+ * // {
2227
+ * // "kind": "my_kind",
2228
+ * // "managedZones": [],
2229
+ * // "nextPageToken": "my_nextPageToken"
2230
+ * // }
2231
+ * }
2232
+ *
2233
+ * main().catch(e => {
2234
+ * console.error(e);
2235
+ * throw e;
2236
+ * });
2237
+ *
2238
+ * ```
1454
2239
  *
1455
2240
  * @param params - Parameters for request
1456
2241
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1457
2242
  * @param callback - Optional callback that handles the response.
1458
2243
  * @returns A promise if used with async/await, or void if used with a callback.
1459
2244
  */
1460
- list(params: Params$Resource$Managedzones$List, options: StreamMethodOptions): GaxiosPromise<Readable>;
1461
- list(params?: Params$Resource$Managedzones$List, options?: MethodOptions): GaxiosPromise<Schema$ManagedZonesListResponse>;
2245
+ list(params: Params$Resource$Managedzones$List, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
2246
+ list(params?: Params$Resource$Managedzones$List, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ManagedZonesListResponse>>;
1462
2247
  list(params: Params$Resource$Managedzones$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1463
2248
  list(params: Params$Resource$Managedzones$List, options: MethodOptions | BodyResponseCallback<Schema$ManagedZonesListResponse>, callback: BodyResponseCallback<Schema$ManagedZonesListResponse>): void;
1464
2249
  list(params: Params$Resource$Managedzones$List, callback: BodyResponseCallback<Schema$ManagedZonesListResponse>): void;
1465
2250
  list(callback: BodyResponseCallback<Schema$ManagedZonesListResponse>): void;
1466
2251
  /**
1467
2252
  * Applies a partial update to an existing ManagedZone.
2253
+ * @example
2254
+ * ```js
2255
+ * // Before running the sample:
2256
+ * // - Enable the API at:
2257
+ * // https://console.developers.google.com/apis/api/dns.googleapis.com
2258
+ * // - Login into gcloud by running:
2259
+ * // ```sh
2260
+ * // $ gcloud auth application-default login
2261
+ * // ```
2262
+ * // - Install the npm module by running:
2263
+ * // ```sh
2264
+ * // $ npm install googleapis
2265
+ * // ```
2266
+ *
2267
+ * const {google} = require('googleapis');
2268
+ * const dns = google.dns('v1');
2269
+ *
2270
+ * async function main() {
2271
+ * const auth = new google.auth.GoogleAuth({
2272
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2273
+ * scopes: [
2274
+ * 'https://www.googleapis.com/auth/cloud-platform',
2275
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
2276
+ * ],
2277
+ * });
2278
+ *
2279
+ * // Acquire an auth client, and bind it to all future calls
2280
+ * const authClient = await auth.getClient();
2281
+ * google.options({auth: authClient});
2282
+ *
2283
+ * // Do the magic
2284
+ * const res = await dns.managedZones.patch({
2285
+ * // For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
2286
+ * clientOperationId: 'placeholder-value',
2287
+ * // Identifies the managed zone addressed by this request. Can be the managed zone name or ID.
2288
+ * managedZone: 'placeholder-value',
2289
+ * // Identifies the project addressed by this request.
2290
+ * project: 'placeholder-value',
2291
+ *
2292
+ * // Request body metadata
2293
+ * requestBody: {
2294
+ * // request body parameters
2295
+ * // {
2296
+ * // "cloudLoggingConfig": {},
2297
+ * // "creationTime": "my_creationTime",
2298
+ * // "description": "my_description",
2299
+ * // "dnsName": "my_dnsName",
2300
+ * // "dnssecConfig": {},
2301
+ * // "forwardingConfig": {},
2302
+ * // "id": "my_id",
2303
+ * // "kind": "my_kind",
2304
+ * // "labels": {},
2305
+ * // "name": "my_name",
2306
+ * // "nameServerSet": "my_nameServerSet",
2307
+ * // "nameServers": [],
2308
+ * // "peeringConfig": {},
2309
+ * // "privateVisibilityConfig": {},
2310
+ * // "reverseLookupConfig": {},
2311
+ * // "serviceDirectoryConfig": {},
2312
+ * // "visibility": "my_visibility"
2313
+ * // }
2314
+ * },
2315
+ * });
2316
+ * console.log(res.data);
2317
+ *
2318
+ * // Example response
2319
+ * // {
2320
+ * // "dnsKeyContext": {},
2321
+ * // "id": "my_id",
2322
+ * // "kind": "my_kind",
2323
+ * // "startTime": "my_startTime",
2324
+ * // "status": "my_status",
2325
+ * // "type": "my_type",
2326
+ * // "user": "my_user",
2327
+ * // "zoneContext": {}
2328
+ * // }
2329
+ * }
2330
+ *
2331
+ * main().catch(e => {
2332
+ * console.error(e);
2333
+ * throw e;
2334
+ * });
2335
+ *
2336
+ * ```
1468
2337
  *
1469
2338
  * @param params - Parameters for request
1470
2339
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1471
2340
  * @param callback - Optional callback that handles the response.
1472
2341
  * @returns A promise if used with async/await, or void if used with a callback.
1473
2342
  */
1474
- patch(params: Params$Resource$Managedzones$Patch, options: StreamMethodOptions): GaxiosPromise<Readable>;
1475
- patch(params?: Params$Resource$Managedzones$Patch, options?: MethodOptions): GaxiosPromise<Schema$Operation>;
2343
+ patch(params: Params$Resource$Managedzones$Patch, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
2344
+ patch(params?: Params$Resource$Managedzones$Patch, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
1476
2345
  patch(params: Params$Resource$Managedzones$Patch, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1477
2346
  patch(params: Params$Resource$Managedzones$Patch, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
1478
2347
  patch(params: Params$Resource$Managedzones$Patch, callback: BodyResponseCallback<Schema$Operation>): void;
1479
2348
  patch(callback: BodyResponseCallback<Schema$Operation>): void;
1480
2349
  /**
1481
2350
  * Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
2351
+ * @example
2352
+ * ```js
2353
+ * // Before running the sample:
2354
+ * // - Enable the API at:
2355
+ * // https://console.developers.google.com/apis/api/dns.googleapis.com
2356
+ * // - Login into gcloud by running:
2357
+ * // ```sh
2358
+ * // $ gcloud auth application-default login
2359
+ * // ```
2360
+ * // - Install the npm module by running:
2361
+ * // ```sh
2362
+ * // $ npm install googleapis
2363
+ * // ```
2364
+ *
2365
+ * const {google} = require('googleapis');
2366
+ * const dns = google.dns('v1');
2367
+ *
2368
+ * async function main() {
2369
+ * const auth = new google.auth.GoogleAuth({
2370
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2371
+ * scopes: [
2372
+ * 'https://www.googleapis.com/auth/cloud-platform',
2373
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
2374
+ * ],
2375
+ * });
2376
+ *
2377
+ * // Acquire an auth client, and bind it to all future calls
2378
+ * const authClient = await auth.getClient();
2379
+ * google.options({auth: authClient});
2380
+ *
2381
+ * // Do the magic
2382
+ * const res = await dns.managedZones.setIamPolicy({
2383
+ * // REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.
2384
+ * resource: 'projects/my-project/managedZones/my-managedZone',
2385
+ *
2386
+ * // Request body metadata
2387
+ * requestBody: {
2388
+ * // request body parameters
2389
+ * // {
2390
+ * // "policy": {},
2391
+ * // "updateMask": "my_updateMask"
2392
+ * // }
2393
+ * },
2394
+ * });
2395
+ * console.log(res.data);
2396
+ *
2397
+ * // Example response
2398
+ * // {
2399
+ * // "auditConfigs": [],
2400
+ * // "bindings": [],
2401
+ * // "etag": "my_etag",
2402
+ * // "version": 0
2403
+ * // }
2404
+ * }
2405
+ *
2406
+ * main().catch(e => {
2407
+ * console.error(e);
2408
+ * throw e;
2409
+ * });
2410
+ *
2411
+ * ```
1482
2412
  *
1483
2413
  * @param params - Parameters for request
1484
2414
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1485
2415
  * @param callback - Optional callback that handles the response.
1486
2416
  * @returns A promise if used with async/await, or void if used with a callback.
1487
2417
  */
1488
- setIamPolicy(params: Params$Resource$Managedzones$Setiampolicy, options: StreamMethodOptions): GaxiosPromise<Readable>;
1489
- setIamPolicy(params?: Params$Resource$Managedzones$Setiampolicy, options?: MethodOptions): GaxiosPromise<Schema$GoogleIamV1Policy>;
2418
+ setIamPolicy(params: Params$Resource$Managedzones$Setiampolicy, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
2419
+ setIamPolicy(params?: Params$Resource$Managedzones$Setiampolicy, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$GoogleIamV1Policy>>;
1490
2420
  setIamPolicy(params: Params$Resource$Managedzones$Setiampolicy, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1491
2421
  setIamPolicy(params: Params$Resource$Managedzones$Setiampolicy, options: MethodOptions | BodyResponseCallback<Schema$GoogleIamV1Policy>, callback: BodyResponseCallback<Schema$GoogleIamV1Policy>): void;
1492
2422
  setIamPolicy(params: Params$Resource$Managedzones$Setiampolicy, callback: BodyResponseCallback<Schema$GoogleIamV1Policy>): void;
1493
2423
  setIamPolicy(callback: BodyResponseCallback<Schema$GoogleIamV1Policy>): void;
1494
2424
  /**
1495
2425
  * Returns permissions that a caller has on the specified resource. If the resource does not exist, this returns an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.
2426
+ * @example
2427
+ * ```js
2428
+ * // Before running the sample:
2429
+ * // - Enable the API at:
2430
+ * // https://console.developers.google.com/apis/api/dns.googleapis.com
2431
+ * // - Login into gcloud by running:
2432
+ * // ```sh
2433
+ * // $ gcloud auth application-default login
2434
+ * // ```
2435
+ * // - Install the npm module by running:
2436
+ * // ```sh
2437
+ * // $ npm install googleapis
2438
+ * // ```
2439
+ *
2440
+ * const {google} = require('googleapis');
2441
+ * const dns = google.dns('v1');
2442
+ *
2443
+ * async function main() {
2444
+ * const auth = new google.auth.GoogleAuth({
2445
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2446
+ * scopes: [
2447
+ * 'https://www.googleapis.com/auth/cloud-platform',
2448
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
2449
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readonly',
2450
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
2451
+ * ],
2452
+ * });
2453
+ *
2454
+ * // Acquire an auth client, and bind it to all future calls
2455
+ * const authClient = await auth.getClient();
2456
+ * google.options({auth: authClient});
2457
+ *
2458
+ * // Do the magic
2459
+ * const res = await dns.managedZones.testIamPermissions({
2460
+ * // REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.
2461
+ * resource: 'projects/my-project/managedZones/my-managedZone',
2462
+ *
2463
+ * // Request body metadata
2464
+ * requestBody: {
2465
+ * // request body parameters
2466
+ * // {
2467
+ * // "permissions": []
2468
+ * // }
2469
+ * },
2470
+ * });
2471
+ * console.log(res.data);
2472
+ *
2473
+ * // Example response
2474
+ * // {
2475
+ * // "permissions": []
2476
+ * // }
2477
+ * }
2478
+ *
2479
+ * main().catch(e => {
2480
+ * console.error(e);
2481
+ * throw e;
2482
+ * });
2483
+ *
2484
+ * ```
1496
2485
  *
1497
2486
  * @param params - Parameters for request
1498
2487
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1499
2488
  * @param callback - Optional callback that handles the response.
1500
2489
  * @returns A promise if used with async/await, or void if used with a callback.
1501
2490
  */
1502
- testIamPermissions(params: Params$Resource$Managedzones$Testiampermissions, options: StreamMethodOptions): GaxiosPromise<Readable>;
1503
- testIamPermissions(params?: Params$Resource$Managedzones$Testiampermissions, options?: MethodOptions): GaxiosPromise<Schema$GoogleIamV1TestIamPermissionsResponse>;
2491
+ testIamPermissions(params: Params$Resource$Managedzones$Testiampermissions, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
2492
+ testIamPermissions(params?: Params$Resource$Managedzones$Testiampermissions, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$GoogleIamV1TestIamPermissionsResponse>>;
1504
2493
  testIamPermissions(params: Params$Resource$Managedzones$Testiampermissions, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1505
2494
  testIamPermissions(params: Params$Resource$Managedzones$Testiampermissions, options: MethodOptions | BodyResponseCallback<Schema$GoogleIamV1TestIamPermissionsResponse>, callback: BodyResponseCallback<Schema$GoogleIamV1TestIamPermissionsResponse>): void;
1506
2495
  testIamPermissions(params: Params$Resource$Managedzones$Testiampermissions, callback: BodyResponseCallback<Schema$GoogleIamV1TestIamPermissionsResponse>): void;
1507
2496
  testIamPermissions(callback: BodyResponseCallback<Schema$GoogleIamV1TestIamPermissionsResponse>): void;
1508
2497
  /**
1509
2498
  * Updates an existing ManagedZone.
2499
+ * @example
2500
+ * ```js
2501
+ * // Before running the sample:
2502
+ * // - Enable the API at:
2503
+ * // https://console.developers.google.com/apis/api/dns.googleapis.com
2504
+ * // - Login into gcloud by running:
2505
+ * // ```sh
2506
+ * // $ gcloud auth application-default login
2507
+ * // ```
2508
+ * // - Install the npm module by running:
2509
+ * // ```sh
2510
+ * // $ npm install googleapis
2511
+ * // ```
2512
+ *
2513
+ * const {google} = require('googleapis');
2514
+ * const dns = google.dns('v1');
2515
+ *
2516
+ * async function main() {
2517
+ * const auth = new google.auth.GoogleAuth({
2518
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2519
+ * scopes: [
2520
+ * 'https://www.googleapis.com/auth/cloud-platform',
2521
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
2522
+ * ],
2523
+ * });
2524
+ *
2525
+ * // Acquire an auth client, and bind it to all future calls
2526
+ * const authClient = await auth.getClient();
2527
+ * google.options({auth: authClient});
2528
+ *
2529
+ * // Do the magic
2530
+ * const res = await dns.managedZones.update({
2531
+ * // For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
2532
+ * clientOperationId: 'placeholder-value',
2533
+ * // Identifies the managed zone addressed by this request. Can be the managed zone name or ID.
2534
+ * managedZone: 'placeholder-value',
2535
+ * // Identifies the project addressed by this request.
2536
+ * project: 'placeholder-value',
2537
+ *
2538
+ * // Request body metadata
2539
+ * requestBody: {
2540
+ * // request body parameters
2541
+ * // {
2542
+ * // "cloudLoggingConfig": {},
2543
+ * // "creationTime": "my_creationTime",
2544
+ * // "description": "my_description",
2545
+ * // "dnsName": "my_dnsName",
2546
+ * // "dnssecConfig": {},
2547
+ * // "forwardingConfig": {},
2548
+ * // "id": "my_id",
2549
+ * // "kind": "my_kind",
2550
+ * // "labels": {},
2551
+ * // "name": "my_name",
2552
+ * // "nameServerSet": "my_nameServerSet",
2553
+ * // "nameServers": [],
2554
+ * // "peeringConfig": {},
2555
+ * // "privateVisibilityConfig": {},
2556
+ * // "reverseLookupConfig": {},
2557
+ * // "serviceDirectoryConfig": {},
2558
+ * // "visibility": "my_visibility"
2559
+ * // }
2560
+ * },
2561
+ * });
2562
+ * console.log(res.data);
2563
+ *
2564
+ * // Example response
2565
+ * // {
2566
+ * // "dnsKeyContext": {},
2567
+ * // "id": "my_id",
2568
+ * // "kind": "my_kind",
2569
+ * // "startTime": "my_startTime",
2570
+ * // "status": "my_status",
2571
+ * // "type": "my_type",
2572
+ * // "user": "my_user",
2573
+ * // "zoneContext": {}
2574
+ * // }
2575
+ * }
2576
+ *
2577
+ * main().catch(e => {
2578
+ * console.error(e);
2579
+ * throw e;
2580
+ * });
2581
+ *
2582
+ * ```
1510
2583
  *
1511
2584
  * @param params - Parameters for request
1512
2585
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1513
2586
  * @param callback - Optional callback that handles the response.
1514
2587
  * @returns A promise if used with async/await, or void if used with a callback.
1515
2588
  */
1516
- update(params: Params$Resource$Managedzones$Update, options: StreamMethodOptions): GaxiosPromise<Readable>;
1517
- update(params?: Params$Resource$Managedzones$Update, options?: MethodOptions): GaxiosPromise<Schema$Operation>;
2589
+ update(params: Params$Resource$Managedzones$Update, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
2590
+ update(params?: Params$Resource$Managedzones$Update, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
1518
2591
  update(params: Params$Resource$Managedzones$Update, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1519
2592
  update(params: Params$Resource$Managedzones$Update, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
1520
2593
  update(params: Params$Resource$Managedzones$Update, callback: BodyResponseCallback<Schema$Operation>): void;
@@ -1651,84 +2724,465 @@ export declare namespace dns_v1 {
1651
2724
  constructor(context: APIRequestContext);
1652
2725
  /**
1653
2726
  * Creates a new Policy.
2727
+ * @example
2728
+ * ```js
2729
+ * // Before running the sample:
2730
+ * // - Enable the API at:
2731
+ * // https://console.developers.google.com/apis/api/dns.googleapis.com
2732
+ * // - Login into gcloud by running:
2733
+ * // ```sh
2734
+ * // $ gcloud auth application-default login
2735
+ * // ```
2736
+ * // - Install the npm module by running:
2737
+ * // ```sh
2738
+ * // $ npm install googleapis
2739
+ * // ```
2740
+ *
2741
+ * const {google} = require('googleapis');
2742
+ * const dns = google.dns('v1');
2743
+ *
2744
+ * async function main() {
2745
+ * const auth = new google.auth.GoogleAuth({
2746
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2747
+ * scopes: [
2748
+ * 'https://www.googleapis.com/auth/cloud-platform',
2749
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
2750
+ * ],
2751
+ * });
2752
+ *
2753
+ * // Acquire an auth client, and bind it to all future calls
2754
+ * const authClient = await auth.getClient();
2755
+ * google.options({auth: authClient});
2756
+ *
2757
+ * // Do the magic
2758
+ * const res = await dns.policies.create({
2759
+ * // For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
2760
+ * clientOperationId: 'placeholder-value',
2761
+ * // Identifies the project addressed by this request.
2762
+ * project: 'placeholder-value',
2763
+ *
2764
+ * // Request body metadata
2765
+ * requestBody: {
2766
+ * // request body parameters
2767
+ * // {
2768
+ * // "alternativeNameServerConfig": {},
2769
+ * // "description": "my_description",
2770
+ * // "dns64Config": {},
2771
+ * // "enableInboundForwarding": false,
2772
+ * // "enableLogging": false,
2773
+ * // "id": "my_id",
2774
+ * // "kind": "my_kind",
2775
+ * // "name": "my_name",
2776
+ * // "networks": []
2777
+ * // }
2778
+ * },
2779
+ * });
2780
+ * console.log(res.data);
2781
+ *
2782
+ * // Example response
2783
+ * // {
2784
+ * // "alternativeNameServerConfig": {},
2785
+ * // "description": "my_description",
2786
+ * // "dns64Config": {},
2787
+ * // "enableInboundForwarding": false,
2788
+ * // "enableLogging": false,
2789
+ * // "id": "my_id",
2790
+ * // "kind": "my_kind",
2791
+ * // "name": "my_name",
2792
+ * // "networks": []
2793
+ * // }
2794
+ * }
2795
+ *
2796
+ * main().catch(e => {
2797
+ * console.error(e);
2798
+ * throw e;
2799
+ * });
2800
+ *
2801
+ * ```
1654
2802
  *
1655
2803
  * @param params - Parameters for request
1656
2804
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1657
2805
  * @param callback - Optional callback that handles the response.
1658
2806
  * @returns A promise if used with async/await, or void if used with a callback.
1659
2807
  */
1660
- create(params: Params$Resource$Policies$Create, options: StreamMethodOptions): GaxiosPromise<Readable>;
1661
- create(params?: Params$Resource$Policies$Create, options?: MethodOptions): GaxiosPromise<Schema$Policy>;
2808
+ create(params: Params$Resource$Policies$Create, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
2809
+ create(params?: Params$Resource$Policies$Create, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Policy>>;
1662
2810
  create(params: Params$Resource$Policies$Create, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1663
2811
  create(params: Params$Resource$Policies$Create, options: MethodOptions | BodyResponseCallback<Schema$Policy>, callback: BodyResponseCallback<Schema$Policy>): void;
1664
2812
  create(params: Params$Resource$Policies$Create, callback: BodyResponseCallback<Schema$Policy>): void;
1665
2813
  create(callback: BodyResponseCallback<Schema$Policy>): void;
1666
2814
  /**
1667
2815
  * Deletes a previously created Policy. Fails if the policy is still being referenced by a network.
2816
+ * @example
2817
+ * ```js
2818
+ * // Before running the sample:
2819
+ * // - Enable the API at:
2820
+ * // https://console.developers.google.com/apis/api/dns.googleapis.com
2821
+ * // - Login into gcloud by running:
2822
+ * // ```sh
2823
+ * // $ gcloud auth application-default login
2824
+ * // ```
2825
+ * // - Install the npm module by running:
2826
+ * // ```sh
2827
+ * // $ npm install googleapis
2828
+ * // ```
2829
+ *
2830
+ * const {google} = require('googleapis');
2831
+ * const dns = google.dns('v1');
2832
+ *
2833
+ * async function main() {
2834
+ * const auth = new google.auth.GoogleAuth({
2835
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2836
+ * scopes: [
2837
+ * 'https://www.googleapis.com/auth/cloud-platform',
2838
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
2839
+ * ],
2840
+ * });
2841
+ *
2842
+ * // Acquire an auth client, and bind it to all future calls
2843
+ * const authClient = await auth.getClient();
2844
+ * google.options({auth: authClient});
2845
+ *
2846
+ * // Do the magic
2847
+ * const res = await dns.policies.delete({
2848
+ * // For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
2849
+ * clientOperationId: 'placeholder-value',
2850
+ * // User given friendly name of the policy addressed by this request.
2851
+ * policy: 'placeholder-value',
2852
+ * // Identifies the project addressed by this request.
2853
+ * project: 'placeholder-value',
2854
+ * });
2855
+ * console.log(res.data);
2856
+ * }
2857
+ *
2858
+ * main().catch(e => {
2859
+ * console.error(e);
2860
+ * throw e;
2861
+ * });
2862
+ *
2863
+ * ```
1668
2864
  *
1669
2865
  * @param params - Parameters for request
1670
2866
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1671
2867
  * @param callback - Optional callback that handles the response.
1672
2868
  * @returns A promise if used with async/await, or void if used with a callback.
1673
2869
  */
1674
- delete(params: Params$Resource$Policies$Delete, options: StreamMethodOptions): GaxiosPromise<Readable>;
1675
- delete(params?: Params$Resource$Policies$Delete, options?: MethodOptions): GaxiosPromise<void>;
2870
+ delete(params: Params$Resource$Policies$Delete, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
2871
+ delete(params?: Params$Resource$Policies$Delete, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<void>>;
1676
2872
  delete(params: Params$Resource$Policies$Delete, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1677
2873
  delete(params: Params$Resource$Policies$Delete, options: MethodOptions | BodyResponseCallback<void>, callback: BodyResponseCallback<void>): void;
1678
2874
  delete(params: Params$Resource$Policies$Delete, callback: BodyResponseCallback<void>): void;
1679
2875
  delete(callback: BodyResponseCallback<void>): void;
1680
2876
  /**
1681
2877
  * Fetches the representation of an existing Policy.
2878
+ * @example
2879
+ * ```js
2880
+ * // Before running the sample:
2881
+ * // - Enable the API at:
2882
+ * // https://console.developers.google.com/apis/api/dns.googleapis.com
2883
+ * // - Login into gcloud by running:
2884
+ * // ```sh
2885
+ * // $ gcloud auth application-default login
2886
+ * // ```
2887
+ * // - Install the npm module by running:
2888
+ * // ```sh
2889
+ * // $ npm install googleapis
2890
+ * // ```
2891
+ *
2892
+ * const {google} = require('googleapis');
2893
+ * const dns = google.dns('v1');
2894
+ *
2895
+ * async function main() {
2896
+ * const auth = new google.auth.GoogleAuth({
2897
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2898
+ * scopes: [
2899
+ * 'https://www.googleapis.com/auth/cloud-platform',
2900
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
2901
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readonly',
2902
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
2903
+ * ],
2904
+ * });
2905
+ *
2906
+ * // Acquire an auth client, and bind it to all future calls
2907
+ * const authClient = await auth.getClient();
2908
+ * google.options({auth: authClient});
2909
+ *
2910
+ * // Do the magic
2911
+ * const res = await dns.policies.get({
2912
+ * // For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
2913
+ * clientOperationId: 'placeholder-value',
2914
+ * // User given friendly name of the policy addressed by this request.
2915
+ * policy: 'placeholder-value',
2916
+ * // Identifies the project addressed by this request.
2917
+ * project: 'placeholder-value',
2918
+ * });
2919
+ * console.log(res.data);
2920
+ *
2921
+ * // Example response
2922
+ * // {
2923
+ * // "alternativeNameServerConfig": {},
2924
+ * // "description": "my_description",
2925
+ * // "dns64Config": {},
2926
+ * // "enableInboundForwarding": false,
2927
+ * // "enableLogging": false,
2928
+ * // "id": "my_id",
2929
+ * // "kind": "my_kind",
2930
+ * // "name": "my_name",
2931
+ * // "networks": []
2932
+ * // }
2933
+ * }
2934
+ *
2935
+ * main().catch(e => {
2936
+ * console.error(e);
2937
+ * throw e;
2938
+ * });
2939
+ *
2940
+ * ```
1682
2941
  *
1683
2942
  * @param params - Parameters for request
1684
2943
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1685
2944
  * @param callback - Optional callback that handles the response.
1686
2945
  * @returns A promise if used with async/await, or void if used with a callback.
1687
2946
  */
1688
- get(params: Params$Resource$Policies$Get, options: StreamMethodOptions): GaxiosPromise<Readable>;
1689
- get(params?: Params$Resource$Policies$Get, options?: MethodOptions): GaxiosPromise<Schema$Policy>;
2947
+ get(params: Params$Resource$Policies$Get, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
2948
+ get(params?: Params$Resource$Policies$Get, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Policy>>;
1690
2949
  get(params: Params$Resource$Policies$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1691
2950
  get(params: Params$Resource$Policies$Get, options: MethodOptions | BodyResponseCallback<Schema$Policy>, callback: BodyResponseCallback<Schema$Policy>): void;
1692
2951
  get(params: Params$Resource$Policies$Get, callback: BodyResponseCallback<Schema$Policy>): void;
1693
2952
  get(callback: BodyResponseCallback<Schema$Policy>): void;
1694
2953
  /**
1695
2954
  * Enumerates all Policies associated with a project.
2955
+ * @example
2956
+ * ```js
2957
+ * // Before running the sample:
2958
+ * // - Enable the API at:
2959
+ * // https://console.developers.google.com/apis/api/dns.googleapis.com
2960
+ * // - Login into gcloud by running:
2961
+ * // ```sh
2962
+ * // $ gcloud auth application-default login
2963
+ * // ```
2964
+ * // - Install the npm module by running:
2965
+ * // ```sh
2966
+ * // $ npm install googleapis
2967
+ * // ```
2968
+ *
2969
+ * const {google} = require('googleapis');
2970
+ * const dns = google.dns('v1');
2971
+ *
2972
+ * async function main() {
2973
+ * const auth = new google.auth.GoogleAuth({
2974
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2975
+ * scopes: [
2976
+ * 'https://www.googleapis.com/auth/cloud-platform',
2977
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
2978
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readonly',
2979
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
2980
+ * ],
2981
+ * });
2982
+ *
2983
+ * // Acquire an auth client, and bind it to all future calls
2984
+ * const authClient = await auth.getClient();
2985
+ * google.options({auth: authClient});
2986
+ *
2987
+ * // Do the magic
2988
+ * const res = await dns.policies.list({
2989
+ * // Optional. Maximum number of results to be returned. If unspecified, the server decides how many results to return.
2990
+ * maxResults: 'placeholder-value',
2991
+ * // Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.
2992
+ * pageToken: 'placeholder-value',
2993
+ * // Identifies the project addressed by this request.
2994
+ * project: 'placeholder-value',
2995
+ * });
2996
+ * console.log(res.data);
2997
+ *
2998
+ * // Example response
2999
+ * // {
3000
+ * // "kind": "my_kind",
3001
+ * // "nextPageToken": "my_nextPageToken",
3002
+ * // "policies": []
3003
+ * // }
3004
+ * }
3005
+ *
3006
+ * main().catch(e => {
3007
+ * console.error(e);
3008
+ * throw e;
3009
+ * });
3010
+ *
3011
+ * ```
1696
3012
  *
1697
3013
  * @param params - Parameters for request
1698
3014
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1699
3015
  * @param callback - Optional callback that handles the response.
1700
3016
  * @returns A promise if used with async/await, or void if used with a callback.
1701
3017
  */
1702
- list(params: Params$Resource$Policies$List, options: StreamMethodOptions): GaxiosPromise<Readable>;
1703
- list(params?: Params$Resource$Policies$List, options?: MethodOptions): GaxiosPromise<Schema$PoliciesListResponse>;
3018
+ list(params: Params$Resource$Policies$List, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
3019
+ list(params?: Params$Resource$Policies$List, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$PoliciesListResponse>>;
1704
3020
  list(params: Params$Resource$Policies$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1705
3021
  list(params: Params$Resource$Policies$List, options: MethodOptions | BodyResponseCallback<Schema$PoliciesListResponse>, callback: BodyResponseCallback<Schema$PoliciesListResponse>): void;
1706
3022
  list(params: Params$Resource$Policies$List, callback: BodyResponseCallback<Schema$PoliciesListResponse>): void;
1707
3023
  list(callback: BodyResponseCallback<Schema$PoliciesListResponse>): void;
1708
3024
  /**
1709
3025
  * Applies a partial update to an existing Policy.
3026
+ * @example
3027
+ * ```js
3028
+ * // Before running the sample:
3029
+ * // - Enable the API at:
3030
+ * // https://console.developers.google.com/apis/api/dns.googleapis.com
3031
+ * // - Login into gcloud by running:
3032
+ * // ```sh
3033
+ * // $ gcloud auth application-default login
3034
+ * // ```
3035
+ * // - Install the npm module by running:
3036
+ * // ```sh
3037
+ * // $ npm install googleapis
3038
+ * // ```
3039
+ *
3040
+ * const {google} = require('googleapis');
3041
+ * const dns = google.dns('v1');
3042
+ *
3043
+ * async function main() {
3044
+ * const auth = new google.auth.GoogleAuth({
3045
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3046
+ * scopes: [
3047
+ * 'https://www.googleapis.com/auth/cloud-platform',
3048
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
3049
+ * ],
3050
+ * });
3051
+ *
3052
+ * // Acquire an auth client, and bind it to all future calls
3053
+ * const authClient = await auth.getClient();
3054
+ * google.options({auth: authClient});
3055
+ *
3056
+ * // Do the magic
3057
+ * const res = await dns.policies.patch({
3058
+ * // For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
3059
+ * clientOperationId: 'placeholder-value',
3060
+ * // User given friendly name of the policy addressed by this request.
3061
+ * policy: 'placeholder-value',
3062
+ * // Identifies the project addressed by this request.
3063
+ * project: 'placeholder-value',
3064
+ *
3065
+ * // Request body metadata
3066
+ * requestBody: {
3067
+ * // request body parameters
3068
+ * // {
3069
+ * // "alternativeNameServerConfig": {},
3070
+ * // "description": "my_description",
3071
+ * // "dns64Config": {},
3072
+ * // "enableInboundForwarding": false,
3073
+ * // "enableLogging": false,
3074
+ * // "id": "my_id",
3075
+ * // "kind": "my_kind",
3076
+ * // "name": "my_name",
3077
+ * // "networks": []
3078
+ * // }
3079
+ * },
3080
+ * });
3081
+ * console.log(res.data);
3082
+ *
3083
+ * // Example response
3084
+ * // {
3085
+ * // "policy": {}
3086
+ * // }
3087
+ * }
3088
+ *
3089
+ * main().catch(e => {
3090
+ * console.error(e);
3091
+ * throw e;
3092
+ * });
3093
+ *
3094
+ * ```
1710
3095
  *
1711
3096
  * @param params - Parameters for request
1712
3097
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1713
3098
  * @param callback - Optional callback that handles the response.
1714
3099
  * @returns A promise if used with async/await, or void if used with a callback.
1715
3100
  */
1716
- patch(params: Params$Resource$Policies$Patch, options: StreamMethodOptions): GaxiosPromise<Readable>;
1717
- patch(params?: Params$Resource$Policies$Patch, options?: MethodOptions): GaxiosPromise<Schema$PoliciesPatchResponse>;
3101
+ patch(params: Params$Resource$Policies$Patch, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
3102
+ patch(params?: Params$Resource$Policies$Patch, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$PoliciesPatchResponse>>;
1718
3103
  patch(params: Params$Resource$Policies$Patch, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1719
3104
  patch(params: Params$Resource$Policies$Patch, options: MethodOptions | BodyResponseCallback<Schema$PoliciesPatchResponse>, callback: BodyResponseCallback<Schema$PoliciesPatchResponse>): void;
1720
3105
  patch(params: Params$Resource$Policies$Patch, callback: BodyResponseCallback<Schema$PoliciesPatchResponse>): void;
1721
3106
  patch(callback: BodyResponseCallback<Schema$PoliciesPatchResponse>): void;
1722
3107
  /**
1723
3108
  * Updates an existing Policy.
3109
+ * @example
3110
+ * ```js
3111
+ * // Before running the sample:
3112
+ * // - Enable the API at:
3113
+ * // https://console.developers.google.com/apis/api/dns.googleapis.com
3114
+ * // - Login into gcloud by running:
3115
+ * // ```sh
3116
+ * // $ gcloud auth application-default login
3117
+ * // ```
3118
+ * // - Install the npm module by running:
3119
+ * // ```sh
3120
+ * // $ npm install googleapis
3121
+ * // ```
3122
+ *
3123
+ * const {google} = require('googleapis');
3124
+ * const dns = google.dns('v1');
3125
+ *
3126
+ * async function main() {
3127
+ * const auth = new google.auth.GoogleAuth({
3128
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3129
+ * scopes: [
3130
+ * 'https://www.googleapis.com/auth/cloud-platform',
3131
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
3132
+ * ],
3133
+ * });
3134
+ *
3135
+ * // Acquire an auth client, and bind it to all future calls
3136
+ * const authClient = await auth.getClient();
3137
+ * google.options({auth: authClient});
3138
+ *
3139
+ * // Do the magic
3140
+ * const res = await dns.policies.update({
3141
+ * // For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
3142
+ * clientOperationId: 'placeholder-value',
3143
+ * // User given friendly name of the policy addressed by this request.
3144
+ * policy: 'placeholder-value',
3145
+ * // Identifies the project addressed by this request.
3146
+ * project: 'placeholder-value',
3147
+ *
3148
+ * // Request body metadata
3149
+ * requestBody: {
3150
+ * // request body parameters
3151
+ * // {
3152
+ * // "alternativeNameServerConfig": {},
3153
+ * // "description": "my_description",
3154
+ * // "dns64Config": {},
3155
+ * // "enableInboundForwarding": false,
3156
+ * // "enableLogging": false,
3157
+ * // "id": "my_id",
3158
+ * // "kind": "my_kind",
3159
+ * // "name": "my_name",
3160
+ * // "networks": []
3161
+ * // }
3162
+ * },
3163
+ * });
3164
+ * console.log(res.data);
3165
+ *
3166
+ * // Example response
3167
+ * // {
3168
+ * // "policy": {}
3169
+ * // }
3170
+ * }
3171
+ *
3172
+ * main().catch(e => {
3173
+ * console.error(e);
3174
+ * throw e;
3175
+ * });
3176
+ *
3177
+ * ```
1724
3178
  *
1725
3179
  * @param params - Parameters for request
1726
3180
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1727
3181
  * @param callback - Optional callback that handles the response.
1728
3182
  * @returns A promise if used with async/await, or void if used with a callback.
1729
3183
  */
1730
- update(params: Params$Resource$Policies$Update, options: StreamMethodOptions): GaxiosPromise<Readable>;
1731
- update(params?: Params$Resource$Policies$Update, options?: MethodOptions): GaxiosPromise<Schema$PoliciesUpdateResponse>;
3184
+ update(params: Params$Resource$Policies$Update, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
3185
+ update(params?: Params$Resource$Policies$Update, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$PoliciesUpdateResponse>>;
1732
3186
  update(params: Params$Resource$Policies$Update, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1733
3187
  update(params: Params$Resource$Policies$Update, options: MethodOptions | BodyResponseCallback<Schema$PoliciesUpdateResponse>, callback: BodyResponseCallback<Schema$PoliciesUpdateResponse>): void;
1734
3188
  update(params: Params$Resource$Policies$Update, callback: BodyResponseCallback<Schema$PoliciesUpdateResponse>): void;
@@ -1831,14 +3285,70 @@ export declare namespace dns_v1 {
1831
3285
  constructor(context: APIRequestContext);
1832
3286
  /**
1833
3287
  * Fetches the representation of an existing Project.
3288
+ * @example
3289
+ * ```js
3290
+ * // Before running the sample:
3291
+ * // - Enable the API at:
3292
+ * // https://console.developers.google.com/apis/api/dns.googleapis.com
3293
+ * // - Login into gcloud by running:
3294
+ * // ```sh
3295
+ * // $ gcloud auth application-default login
3296
+ * // ```
3297
+ * // - Install the npm module by running:
3298
+ * // ```sh
3299
+ * // $ npm install googleapis
3300
+ * // ```
3301
+ *
3302
+ * const {google} = require('googleapis');
3303
+ * const dns = google.dns('v1');
3304
+ *
3305
+ * async function main() {
3306
+ * const auth = new google.auth.GoogleAuth({
3307
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3308
+ * scopes: [
3309
+ * 'https://www.googleapis.com/auth/cloud-platform',
3310
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
3311
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readonly',
3312
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
3313
+ * ],
3314
+ * });
3315
+ *
3316
+ * // Acquire an auth client, and bind it to all future calls
3317
+ * const authClient = await auth.getClient();
3318
+ * google.options({auth: authClient});
3319
+ *
3320
+ * // Do the magic
3321
+ * const res = await dns.projects.get({
3322
+ * // For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
3323
+ * clientOperationId: 'placeholder-value',
3324
+ * // Identifies the project addressed by this request.
3325
+ * project: 'placeholder-value',
3326
+ * });
3327
+ * console.log(res.data);
3328
+ *
3329
+ * // Example response
3330
+ * // {
3331
+ * // "id": "my_id",
3332
+ * // "kind": "my_kind",
3333
+ * // "number": "my_number",
3334
+ * // "quota": {}
3335
+ * // }
3336
+ * }
3337
+ *
3338
+ * main().catch(e => {
3339
+ * console.error(e);
3340
+ * throw e;
3341
+ * });
3342
+ *
3343
+ * ```
1834
3344
  *
1835
3345
  * @param params - Parameters for request
1836
3346
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1837
3347
  * @param callback - Optional callback that handles the response.
1838
3348
  * @returns A promise if used with async/await, or void if used with a callback.
1839
3349
  */
1840
- get(params: Params$Resource$Projects$Get, options: StreamMethodOptions): GaxiosPromise<Readable>;
1841
- get(params?: Params$Resource$Projects$Get, options?: MethodOptions): GaxiosPromise<Schema$Project>;
3350
+ get(params: Params$Resource$Projects$Get, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
3351
+ get(params?: Params$Resource$Projects$Get, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Project>>;
1842
3352
  get(params: Params$Resource$Projects$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1843
3353
  get(params: Params$Resource$Projects$Get, options: MethodOptions | BodyResponseCallback<Schema$Project>, callback: BodyResponseCallback<Schema$Project>): void;
1844
3354
  get(params: Params$Resource$Projects$Get, callback: BodyResponseCallback<Schema$Project>): void;
@@ -1859,70 +3369,403 @@ export declare namespace dns_v1 {
1859
3369
  constructor(context: APIRequestContext);
1860
3370
  /**
1861
3371
  * Creates a new ResourceRecordSet.
3372
+ * @example
3373
+ * ```js
3374
+ * // Before running the sample:
3375
+ * // - Enable the API at:
3376
+ * // https://console.developers.google.com/apis/api/dns.googleapis.com
3377
+ * // - Login into gcloud by running:
3378
+ * // ```sh
3379
+ * // $ gcloud auth application-default login
3380
+ * // ```
3381
+ * // - Install the npm module by running:
3382
+ * // ```sh
3383
+ * // $ npm install googleapis
3384
+ * // ```
3385
+ *
3386
+ * const {google} = require('googleapis');
3387
+ * const dns = google.dns('v1');
3388
+ *
3389
+ * async function main() {
3390
+ * const auth = new google.auth.GoogleAuth({
3391
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3392
+ * scopes: [
3393
+ * 'https://www.googleapis.com/auth/cloud-platform',
3394
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
3395
+ * ],
3396
+ * });
3397
+ *
3398
+ * // Acquire an auth client, and bind it to all future calls
3399
+ * const authClient = await auth.getClient();
3400
+ * google.options({auth: authClient});
3401
+ *
3402
+ * // Do the magic
3403
+ * const res = await dns.resourceRecordSets.create({
3404
+ * // For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
3405
+ * clientOperationId: 'placeholder-value',
3406
+ * // Identifies the managed zone addressed by this request. Can be the managed zone name or ID.
3407
+ * managedZone: 'placeholder-value',
3408
+ * // Identifies the project addressed by this request.
3409
+ * project: 'placeholder-value',
3410
+ *
3411
+ * // Request body metadata
3412
+ * requestBody: {
3413
+ * // request body parameters
3414
+ * // {
3415
+ * // "kind": "my_kind",
3416
+ * // "name": "my_name",
3417
+ * // "routingPolicy": {},
3418
+ * // "rrdatas": [],
3419
+ * // "signatureRrdatas": [],
3420
+ * // "ttl": 0,
3421
+ * // "type": "my_type"
3422
+ * // }
3423
+ * },
3424
+ * });
3425
+ * console.log(res.data);
3426
+ *
3427
+ * // Example response
3428
+ * // {
3429
+ * // "kind": "my_kind",
3430
+ * // "name": "my_name",
3431
+ * // "routingPolicy": {},
3432
+ * // "rrdatas": [],
3433
+ * // "signatureRrdatas": [],
3434
+ * // "ttl": 0,
3435
+ * // "type": "my_type"
3436
+ * // }
3437
+ * }
3438
+ *
3439
+ * main().catch(e => {
3440
+ * console.error(e);
3441
+ * throw e;
3442
+ * });
3443
+ *
3444
+ * ```
1862
3445
  *
1863
3446
  * @param params - Parameters for request
1864
3447
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1865
3448
  * @param callback - Optional callback that handles the response.
1866
3449
  * @returns A promise if used with async/await, or void if used with a callback.
1867
3450
  */
1868
- create(params: Params$Resource$Resourcerecordsets$Create, options: StreamMethodOptions): GaxiosPromise<Readable>;
1869
- create(params?: Params$Resource$Resourcerecordsets$Create, options?: MethodOptions): GaxiosPromise<Schema$ResourceRecordSet>;
3451
+ create(params: Params$Resource$Resourcerecordsets$Create, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
3452
+ create(params?: Params$Resource$Resourcerecordsets$Create, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ResourceRecordSet>>;
1870
3453
  create(params: Params$Resource$Resourcerecordsets$Create, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1871
3454
  create(params: Params$Resource$Resourcerecordsets$Create, options: MethodOptions | BodyResponseCallback<Schema$ResourceRecordSet>, callback: BodyResponseCallback<Schema$ResourceRecordSet>): void;
1872
3455
  create(params: Params$Resource$Resourcerecordsets$Create, callback: BodyResponseCallback<Schema$ResourceRecordSet>): void;
1873
3456
  create(callback: BodyResponseCallback<Schema$ResourceRecordSet>): void;
1874
3457
  /**
1875
3458
  * Deletes a previously created ResourceRecordSet.
3459
+ * @example
3460
+ * ```js
3461
+ * // Before running the sample:
3462
+ * // - Enable the API at:
3463
+ * // https://console.developers.google.com/apis/api/dns.googleapis.com
3464
+ * // - Login into gcloud by running:
3465
+ * // ```sh
3466
+ * // $ gcloud auth application-default login
3467
+ * // ```
3468
+ * // - Install the npm module by running:
3469
+ * // ```sh
3470
+ * // $ npm install googleapis
3471
+ * // ```
3472
+ *
3473
+ * const {google} = require('googleapis');
3474
+ * const dns = google.dns('v1');
3475
+ *
3476
+ * async function main() {
3477
+ * const auth = new google.auth.GoogleAuth({
3478
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3479
+ * scopes: [
3480
+ * 'https://www.googleapis.com/auth/cloud-platform',
3481
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
3482
+ * ],
3483
+ * });
3484
+ *
3485
+ * // Acquire an auth client, and bind it to all future calls
3486
+ * const authClient = await auth.getClient();
3487
+ * google.options({auth: authClient});
3488
+ *
3489
+ * // Do the magic
3490
+ * const res = await dns.resourceRecordSets.delete({
3491
+ * // For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
3492
+ * clientOperationId: 'placeholder-value',
3493
+ * // Identifies the managed zone addressed by this request. Can be the managed zone name or ID.
3494
+ * managedZone: 'placeholder-value',
3495
+ * // Fully qualified domain name.
3496
+ * name: 'placeholder-value',
3497
+ * // Identifies the project addressed by this request.
3498
+ * project: 'placeholder-value',
3499
+ * // RRSet type.
3500
+ * type: 'placeholder-value',
3501
+ * });
3502
+ * console.log(res.data);
3503
+ *
3504
+ * // Example response
3505
+ * // {}
3506
+ * }
3507
+ *
3508
+ * main().catch(e => {
3509
+ * console.error(e);
3510
+ * throw e;
3511
+ * });
3512
+ *
3513
+ * ```
1876
3514
  *
1877
3515
  * @param params - Parameters for request
1878
3516
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1879
3517
  * @param callback - Optional callback that handles the response.
1880
3518
  * @returns A promise if used with async/await, or void if used with a callback.
1881
3519
  */
1882
- delete(params: Params$Resource$Resourcerecordsets$Delete, options: StreamMethodOptions): GaxiosPromise<Readable>;
1883
- delete(params?: Params$Resource$Resourcerecordsets$Delete, options?: MethodOptions): GaxiosPromise<Schema$ResourceRecordSetsDeleteResponse>;
3520
+ delete(params: Params$Resource$Resourcerecordsets$Delete, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
3521
+ delete(params?: Params$Resource$Resourcerecordsets$Delete, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ResourceRecordSetsDeleteResponse>>;
1884
3522
  delete(params: Params$Resource$Resourcerecordsets$Delete, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1885
3523
  delete(params: Params$Resource$Resourcerecordsets$Delete, options: MethodOptions | BodyResponseCallback<Schema$ResourceRecordSetsDeleteResponse>, callback: BodyResponseCallback<Schema$ResourceRecordSetsDeleteResponse>): void;
1886
3524
  delete(params: Params$Resource$Resourcerecordsets$Delete, callback: BodyResponseCallback<Schema$ResourceRecordSetsDeleteResponse>): void;
1887
3525
  delete(callback: BodyResponseCallback<Schema$ResourceRecordSetsDeleteResponse>): void;
1888
3526
  /**
1889
3527
  * Fetches the representation of an existing ResourceRecordSet.
3528
+ * @example
3529
+ * ```js
3530
+ * // Before running the sample:
3531
+ * // - Enable the API at:
3532
+ * // https://console.developers.google.com/apis/api/dns.googleapis.com
3533
+ * // - Login into gcloud by running:
3534
+ * // ```sh
3535
+ * // $ gcloud auth application-default login
3536
+ * // ```
3537
+ * // - Install the npm module by running:
3538
+ * // ```sh
3539
+ * // $ npm install googleapis
3540
+ * // ```
3541
+ *
3542
+ * const {google} = require('googleapis');
3543
+ * const dns = google.dns('v1');
3544
+ *
3545
+ * async function main() {
3546
+ * const auth = new google.auth.GoogleAuth({
3547
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3548
+ * scopes: [
3549
+ * 'https://www.googleapis.com/auth/cloud-platform',
3550
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
3551
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readonly',
3552
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
3553
+ * ],
3554
+ * });
3555
+ *
3556
+ * // Acquire an auth client, and bind it to all future calls
3557
+ * const authClient = await auth.getClient();
3558
+ * google.options({auth: authClient});
3559
+ *
3560
+ * // Do the magic
3561
+ * const res = await dns.resourceRecordSets.get({
3562
+ * // For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
3563
+ * clientOperationId: 'placeholder-value',
3564
+ * // Identifies the managed zone addressed by this request. Can be the managed zone name or ID.
3565
+ * managedZone: 'placeholder-value',
3566
+ * // Fully qualified domain name.
3567
+ * name: 'placeholder-value',
3568
+ * // Identifies the project addressed by this request.
3569
+ * project: 'placeholder-value',
3570
+ * // RRSet type.
3571
+ * type: 'placeholder-value',
3572
+ * });
3573
+ * console.log(res.data);
3574
+ *
3575
+ * // Example response
3576
+ * // {
3577
+ * // "kind": "my_kind",
3578
+ * // "name": "my_name",
3579
+ * // "routingPolicy": {},
3580
+ * // "rrdatas": [],
3581
+ * // "signatureRrdatas": [],
3582
+ * // "ttl": 0,
3583
+ * // "type": "my_type"
3584
+ * // }
3585
+ * }
3586
+ *
3587
+ * main().catch(e => {
3588
+ * console.error(e);
3589
+ * throw e;
3590
+ * });
3591
+ *
3592
+ * ```
1890
3593
  *
1891
3594
  * @param params - Parameters for request
1892
3595
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1893
3596
  * @param callback - Optional callback that handles the response.
1894
3597
  * @returns A promise if used with async/await, or void if used with a callback.
1895
3598
  */
1896
- get(params: Params$Resource$Resourcerecordsets$Get, options: StreamMethodOptions): GaxiosPromise<Readable>;
1897
- get(params?: Params$Resource$Resourcerecordsets$Get, options?: MethodOptions): GaxiosPromise<Schema$ResourceRecordSet>;
3599
+ get(params: Params$Resource$Resourcerecordsets$Get, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
3600
+ get(params?: Params$Resource$Resourcerecordsets$Get, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ResourceRecordSet>>;
1898
3601
  get(params: Params$Resource$Resourcerecordsets$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1899
3602
  get(params: Params$Resource$Resourcerecordsets$Get, options: MethodOptions | BodyResponseCallback<Schema$ResourceRecordSet>, callback: BodyResponseCallback<Schema$ResourceRecordSet>): void;
1900
3603
  get(params: Params$Resource$Resourcerecordsets$Get, callback: BodyResponseCallback<Schema$ResourceRecordSet>): void;
1901
3604
  get(callback: BodyResponseCallback<Schema$ResourceRecordSet>): void;
1902
3605
  /**
1903
3606
  * Enumerates ResourceRecordSets that you have created but not yet deleted.
3607
+ * @example
3608
+ * ```js
3609
+ * // Before running the sample:
3610
+ * // - Enable the API at:
3611
+ * // https://console.developers.google.com/apis/api/dns.googleapis.com
3612
+ * // - Login into gcloud by running:
3613
+ * // ```sh
3614
+ * // $ gcloud auth application-default login
3615
+ * // ```
3616
+ * // - Install the npm module by running:
3617
+ * // ```sh
3618
+ * // $ npm install googleapis
3619
+ * // ```
3620
+ *
3621
+ * const {google} = require('googleapis');
3622
+ * const dns = google.dns('v1');
3623
+ *
3624
+ * async function main() {
3625
+ * const auth = new google.auth.GoogleAuth({
3626
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3627
+ * scopes: [
3628
+ * 'https://www.googleapis.com/auth/cloud-platform',
3629
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
3630
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readonly',
3631
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
3632
+ * ],
3633
+ * });
3634
+ *
3635
+ * // Acquire an auth client, and bind it to all future calls
3636
+ * const authClient = await auth.getClient();
3637
+ * google.options({auth: authClient});
3638
+ *
3639
+ * // Do the magic
3640
+ * const res = await dns.resourceRecordSets.list({
3641
+ * // Identifies the managed zone addressed by this request. Can be the managed zone name or ID.
3642
+ * managedZone: 'placeholder-value',
3643
+ * // Optional. Maximum number of results to be returned. If unspecified, the server decides how many results to return.
3644
+ * maxResults: 'placeholder-value',
3645
+ * // Restricts the list to return only records with this fully qualified domain name.
3646
+ * name: 'placeholder-value',
3647
+ * // Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.
3648
+ * pageToken: 'placeholder-value',
3649
+ * // Identifies the project addressed by this request.
3650
+ * project: 'placeholder-value',
3651
+ * // Restricts the list to return only records of this type. If present, the "name" parameter must also be present.
3652
+ * type: 'placeholder-value',
3653
+ * });
3654
+ * console.log(res.data);
3655
+ *
3656
+ * // Example response
3657
+ * // {
3658
+ * // "kind": "my_kind",
3659
+ * // "nextPageToken": "my_nextPageToken",
3660
+ * // "rrsets": []
3661
+ * // }
3662
+ * }
3663
+ *
3664
+ * main().catch(e => {
3665
+ * console.error(e);
3666
+ * throw e;
3667
+ * });
3668
+ *
3669
+ * ```
1904
3670
  *
1905
3671
  * @param params - Parameters for request
1906
3672
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1907
3673
  * @param callback - Optional callback that handles the response.
1908
3674
  * @returns A promise if used with async/await, or void if used with a callback.
1909
3675
  */
1910
- list(params: Params$Resource$Resourcerecordsets$List, options: StreamMethodOptions): GaxiosPromise<Readable>;
1911
- list(params?: Params$Resource$Resourcerecordsets$List, options?: MethodOptions): GaxiosPromise<Schema$ResourceRecordSetsListResponse>;
3676
+ list(params: Params$Resource$Resourcerecordsets$List, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
3677
+ list(params?: Params$Resource$Resourcerecordsets$List, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ResourceRecordSetsListResponse>>;
1912
3678
  list(params: Params$Resource$Resourcerecordsets$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1913
3679
  list(params: Params$Resource$Resourcerecordsets$List, options: MethodOptions | BodyResponseCallback<Schema$ResourceRecordSetsListResponse>, callback: BodyResponseCallback<Schema$ResourceRecordSetsListResponse>): void;
1914
3680
  list(params: Params$Resource$Resourcerecordsets$List, callback: BodyResponseCallback<Schema$ResourceRecordSetsListResponse>): void;
1915
3681
  list(callback: BodyResponseCallback<Schema$ResourceRecordSetsListResponse>): void;
1916
3682
  /**
1917
3683
  * Applies a partial update to an existing ResourceRecordSet.
3684
+ * @example
3685
+ * ```js
3686
+ * // Before running the sample:
3687
+ * // - Enable the API at:
3688
+ * // https://console.developers.google.com/apis/api/dns.googleapis.com
3689
+ * // - Login into gcloud by running:
3690
+ * // ```sh
3691
+ * // $ gcloud auth application-default login
3692
+ * // ```
3693
+ * // - Install the npm module by running:
3694
+ * // ```sh
3695
+ * // $ npm install googleapis
3696
+ * // ```
3697
+ *
3698
+ * const {google} = require('googleapis');
3699
+ * const dns = google.dns('v1');
3700
+ *
3701
+ * async function main() {
3702
+ * const auth = new google.auth.GoogleAuth({
3703
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3704
+ * scopes: [
3705
+ * 'https://www.googleapis.com/auth/cloud-platform',
3706
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
3707
+ * ],
3708
+ * });
3709
+ *
3710
+ * // Acquire an auth client, and bind it to all future calls
3711
+ * const authClient = await auth.getClient();
3712
+ * google.options({auth: authClient});
3713
+ *
3714
+ * // Do the magic
3715
+ * const res = await dns.resourceRecordSets.patch({
3716
+ * // For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
3717
+ * clientOperationId: 'placeholder-value',
3718
+ * // Identifies the managed zone addressed by this request. Can be the managed zone name or ID.
3719
+ * managedZone: 'placeholder-value',
3720
+ * // Fully qualified domain name.
3721
+ * name: 'placeholder-value',
3722
+ * // Identifies the project addressed by this request.
3723
+ * project: 'placeholder-value',
3724
+ * // RRSet type.
3725
+ * type: 'placeholder-value',
3726
+ *
3727
+ * // Request body metadata
3728
+ * requestBody: {
3729
+ * // request body parameters
3730
+ * // {
3731
+ * // "kind": "my_kind",
3732
+ * // "name": "my_name",
3733
+ * // "routingPolicy": {},
3734
+ * // "rrdatas": [],
3735
+ * // "signatureRrdatas": [],
3736
+ * // "ttl": 0,
3737
+ * // "type": "my_type"
3738
+ * // }
3739
+ * },
3740
+ * });
3741
+ * console.log(res.data);
3742
+ *
3743
+ * // Example response
3744
+ * // {
3745
+ * // "kind": "my_kind",
3746
+ * // "name": "my_name",
3747
+ * // "routingPolicy": {},
3748
+ * // "rrdatas": [],
3749
+ * // "signatureRrdatas": [],
3750
+ * // "ttl": 0,
3751
+ * // "type": "my_type"
3752
+ * // }
3753
+ * }
3754
+ *
3755
+ * main().catch(e => {
3756
+ * console.error(e);
3757
+ * throw e;
3758
+ * });
3759
+ *
3760
+ * ```
1918
3761
  *
1919
3762
  * @param params - Parameters for request
1920
3763
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1921
3764
  * @param callback - Optional callback that handles the response.
1922
3765
  * @returns A promise if used with async/await, or void if used with a callback.
1923
3766
  */
1924
- patch(params: Params$Resource$Resourcerecordsets$Patch, options: StreamMethodOptions): GaxiosPromise<Readable>;
1925
- patch(params?: Params$Resource$Resourcerecordsets$Patch, options?: MethodOptions): GaxiosPromise<Schema$ResourceRecordSet>;
3767
+ patch(params: Params$Resource$Resourcerecordsets$Patch, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
3768
+ patch(params?: Params$Resource$Resourcerecordsets$Patch, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ResourceRecordSet>>;
1926
3769
  patch(params: Params$Resource$Resourcerecordsets$Patch, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1927
3770
  patch(params: Params$Resource$Resourcerecordsets$Patch, options: MethodOptions | BodyResponseCallback<Schema$ResourceRecordSet>, callback: BodyResponseCallback<Schema$ResourceRecordSet>): void;
1928
3771
  patch(params: Params$Resource$Resourcerecordsets$Patch, callback: BodyResponseCallback<Schema$ResourceRecordSet>): void;
@@ -2047,84 +3890,454 @@ export declare namespace dns_v1 {
2047
3890
  constructor(context: APIRequestContext);
2048
3891
  /**
2049
3892
  * Creates a new Response Policy
3893
+ * @example
3894
+ * ```js
3895
+ * // Before running the sample:
3896
+ * // - Enable the API at:
3897
+ * // https://console.developers.google.com/apis/api/dns.googleapis.com
3898
+ * // - Login into gcloud by running:
3899
+ * // ```sh
3900
+ * // $ gcloud auth application-default login
3901
+ * // ```
3902
+ * // - Install the npm module by running:
3903
+ * // ```sh
3904
+ * // $ npm install googleapis
3905
+ * // ```
3906
+ *
3907
+ * const {google} = require('googleapis');
3908
+ * const dns = google.dns('v1');
3909
+ *
3910
+ * async function main() {
3911
+ * const auth = new google.auth.GoogleAuth({
3912
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3913
+ * scopes: [
3914
+ * 'https://www.googleapis.com/auth/cloud-platform',
3915
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
3916
+ * ],
3917
+ * });
3918
+ *
3919
+ * // Acquire an auth client, and bind it to all future calls
3920
+ * const authClient = await auth.getClient();
3921
+ * google.options({auth: authClient});
3922
+ *
3923
+ * // Do the magic
3924
+ * const res = await dns.responsePolicies.create({
3925
+ * // For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
3926
+ * clientOperationId: 'placeholder-value',
3927
+ * // Identifies the project addressed by this request.
3928
+ * project: 'placeholder-value',
3929
+ *
3930
+ * // Request body metadata
3931
+ * requestBody: {
3932
+ * // request body parameters
3933
+ * // {
3934
+ * // "description": "my_description",
3935
+ * // "gkeClusters": [],
3936
+ * // "id": "my_id",
3937
+ * // "kind": "my_kind",
3938
+ * // "labels": {},
3939
+ * // "networks": [],
3940
+ * // "responsePolicyName": "my_responsePolicyName"
3941
+ * // }
3942
+ * },
3943
+ * });
3944
+ * console.log(res.data);
3945
+ *
3946
+ * // Example response
3947
+ * // {
3948
+ * // "description": "my_description",
3949
+ * // "gkeClusters": [],
3950
+ * // "id": "my_id",
3951
+ * // "kind": "my_kind",
3952
+ * // "labels": {},
3953
+ * // "networks": [],
3954
+ * // "responsePolicyName": "my_responsePolicyName"
3955
+ * // }
3956
+ * }
3957
+ *
3958
+ * main().catch(e => {
3959
+ * console.error(e);
3960
+ * throw e;
3961
+ * });
3962
+ *
3963
+ * ```
2050
3964
  *
2051
3965
  * @param params - Parameters for request
2052
3966
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2053
3967
  * @param callback - Optional callback that handles the response.
2054
3968
  * @returns A promise if used with async/await, or void if used with a callback.
2055
3969
  */
2056
- create(params: Params$Resource$Responsepolicies$Create, options: StreamMethodOptions): GaxiosPromise<Readable>;
2057
- create(params?: Params$Resource$Responsepolicies$Create, options?: MethodOptions): GaxiosPromise<Schema$ResponsePolicy>;
3970
+ create(params: Params$Resource$Responsepolicies$Create, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
3971
+ create(params?: Params$Resource$Responsepolicies$Create, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ResponsePolicy>>;
2058
3972
  create(params: Params$Resource$Responsepolicies$Create, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
2059
3973
  create(params: Params$Resource$Responsepolicies$Create, options: MethodOptions | BodyResponseCallback<Schema$ResponsePolicy>, callback: BodyResponseCallback<Schema$ResponsePolicy>): void;
2060
3974
  create(params: Params$Resource$Responsepolicies$Create, callback: BodyResponseCallback<Schema$ResponsePolicy>): void;
2061
3975
  create(callback: BodyResponseCallback<Schema$ResponsePolicy>): void;
2062
3976
  /**
2063
3977
  * Deletes a previously created Response Policy. Fails if the response policy is non-empty or still being referenced by a network.
3978
+ * @example
3979
+ * ```js
3980
+ * // Before running the sample:
3981
+ * // - Enable the API at:
3982
+ * // https://console.developers.google.com/apis/api/dns.googleapis.com
3983
+ * // - Login into gcloud by running:
3984
+ * // ```sh
3985
+ * // $ gcloud auth application-default login
3986
+ * // ```
3987
+ * // - Install the npm module by running:
3988
+ * // ```sh
3989
+ * // $ npm install googleapis
3990
+ * // ```
3991
+ *
3992
+ * const {google} = require('googleapis');
3993
+ * const dns = google.dns('v1');
3994
+ *
3995
+ * async function main() {
3996
+ * const auth = new google.auth.GoogleAuth({
3997
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3998
+ * scopes: [
3999
+ * 'https://www.googleapis.com/auth/cloud-platform',
4000
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
4001
+ * ],
4002
+ * });
4003
+ *
4004
+ * // Acquire an auth client, and bind it to all future calls
4005
+ * const authClient = await auth.getClient();
4006
+ * google.options({auth: authClient});
4007
+ *
4008
+ * // Do the magic
4009
+ * const res = await dns.responsePolicies.delete({
4010
+ * // For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
4011
+ * clientOperationId: 'placeholder-value',
4012
+ * // Identifies the project addressed by this request.
4013
+ * project: 'placeholder-value',
4014
+ * // User assigned name of the Response Policy addressed by this request.
4015
+ * responsePolicy: 'placeholder-value',
4016
+ * });
4017
+ * console.log(res.data);
4018
+ * }
4019
+ *
4020
+ * main().catch(e => {
4021
+ * console.error(e);
4022
+ * throw e;
4023
+ * });
4024
+ *
4025
+ * ```
2064
4026
  *
2065
4027
  * @param params - Parameters for request
2066
4028
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2067
4029
  * @param callback - Optional callback that handles the response.
2068
4030
  * @returns A promise if used with async/await, or void if used with a callback.
2069
4031
  */
2070
- delete(params: Params$Resource$Responsepolicies$Delete, options: StreamMethodOptions): GaxiosPromise<Readable>;
2071
- delete(params?: Params$Resource$Responsepolicies$Delete, options?: MethodOptions): GaxiosPromise<void>;
4032
+ delete(params: Params$Resource$Responsepolicies$Delete, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
4033
+ delete(params?: Params$Resource$Responsepolicies$Delete, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<void>>;
2072
4034
  delete(params: Params$Resource$Responsepolicies$Delete, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
2073
4035
  delete(params: Params$Resource$Responsepolicies$Delete, options: MethodOptions | BodyResponseCallback<void>, callback: BodyResponseCallback<void>): void;
2074
4036
  delete(params: Params$Resource$Responsepolicies$Delete, callback: BodyResponseCallback<void>): void;
2075
4037
  delete(callback: BodyResponseCallback<void>): void;
2076
4038
  /**
2077
4039
  * Fetches the representation of an existing Response Policy.
4040
+ * @example
4041
+ * ```js
4042
+ * // Before running the sample:
4043
+ * // - Enable the API at:
4044
+ * // https://console.developers.google.com/apis/api/dns.googleapis.com
4045
+ * // - Login into gcloud by running:
4046
+ * // ```sh
4047
+ * // $ gcloud auth application-default login
4048
+ * // ```
4049
+ * // - Install the npm module by running:
4050
+ * // ```sh
4051
+ * // $ npm install googleapis
4052
+ * // ```
4053
+ *
4054
+ * const {google} = require('googleapis');
4055
+ * const dns = google.dns('v1');
4056
+ *
4057
+ * async function main() {
4058
+ * const auth = new google.auth.GoogleAuth({
4059
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
4060
+ * scopes: [
4061
+ * 'https://www.googleapis.com/auth/cloud-platform',
4062
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
4063
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readonly',
4064
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
4065
+ * ],
4066
+ * });
4067
+ *
4068
+ * // Acquire an auth client, and bind it to all future calls
4069
+ * const authClient = await auth.getClient();
4070
+ * google.options({auth: authClient});
4071
+ *
4072
+ * // Do the magic
4073
+ * const res = await dns.responsePolicies.get({
4074
+ * // For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
4075
+ * clientOperationId: 'placeholder-value',
4076
+ * // Identifies the project addressed by this request.
4077
+ * project: 'placeholder-value',
4078
+ * // User assigned name of the Response Policy addressed by this request.
4079
+ * responsePolicy: 'placeholder-value',
4080
+ * });
4081
+ * console.log(res.data);
4082
+ *
4083
+ * // Example response
4084
+ * // {
4085
+ * // "description": "my_description",
4086
+ * // "gkeClusters": [],
4087
+ * // "id": "my_id",
4088
+ * // "kind": "my_kind",
4089
+ * // "labels": {},
4090
+ * // "networks": [],
4091
+ * // "responsePolicyName": "my_responsePolicyName"
4092
+ * // }
4093
+ * }
4094
+ *
4095
+ * main().catch(e => {
4096
+ * console.error(e);
4097
+ * throw e;
4098
+ * });
4099
+ *
4100
+ * ```
2078
4101
  *
2079
4102
  * @param params - Parameters for request
2080
4103
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2081
4104
  * @param callback - Optional callback that handles the response.
2082
4105
  * @returns A promise if used with async/await, or void if used with a callback.
2083
4106
  */
2084
- get(params: Params$Resource$Responsepolicies$Get, options: StreamMethodOptions): GaxiosPromise<Readable>;
2085
- get(params?: Params$Resource$Responsepolicies$Get, options?: MethodOptions): GaxiosPromise<Schema$ResponsePolicy>;
4107
+ get(params: Params$Resource$Responsepolicies$Get, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
4108
+ get(params?: Params$Resource$Responsepolicies$Get, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ResponsePolicy>>;
2086
4109
  get(params: Params$Resource$Responsepolicies$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
2087
4110
  get(params: Params$Resource$Responsepolicies$Get, options: MethodOptions | BodyResponseCallback<Schema$ResponsePolicy>, callback: BodyResponseCallback<Schema$ResponsePolicy>): void;
2088
4111
  get(params: Params$Resource$Responsepolicies$Get, callback: BodyResponseCallback<Schema$ResponsePolicy>): void;
2089
4112
  get(callback: BodyResponseCallback<Schema$ResponsePolicy>): void;
2090
4113
  /**
2091
4114
  * Enumerates all Response Policies associated with a project.
4115
+ * @example
4116
+ * ```js
4117
+ * // Before running the sample:
4118
+ * // - Enable the API at:
4119
+ * // https://console.developers.google.com/apis/api/dns.googleapis.com
4120
+ * // - Login into gcloud by running:
4121
+ * // ```sh
4122
+ * // $ gcloud auth application-default login
4123
+ * // ```
4124
+ * // - Install the npm module by running:
4125
+ * // ```sh
4126
+ * // $ npm install googleapis
4127
+ * // ```
4128
+ *
4129
+ * const {google} = require('googleapis');
4130
+ * const dns = google.dns('v1');
4131
+ *
4132
+ * async function main() {
4133
+ * const auth = new google.auth.GoogleAuth({
4134
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
4135
+ * scopes: [
4136
+ * 'https://www.googleapis.com/auth/cloud-platform',
4137
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
4138
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readonly',
4139
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
4140
+ * ],
4141
+ * });
4142
+ *
4143
+ * // Acquire an auth client, and bind it to all future calls
4144
+ * const authClient = await auth.getClient();
4145
+ * google.options({auth: authClient});
4146
+ *
4147
+ * // Do the magic
4148
+ * const res = await dns.responsePolicies.list({
4149
+ * // Optional. Maximum number of results to be returned. If unspecified, the server decides how many results to return.
4150
+ * maxResults: 'placeholder-value',
4151
+ * // Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.
4152
+ * pageToken: 'placeholder-value',
4153
+ * // Identifies the project addressed by this request.
4154
+ * project: 'placeholder-value',
4155
+ * });
4156
+ * console.log(res.data);
4157
+ *
4158
+ * // Example response
4159
+ * // {
4160
+ * // "nextPageToken": "my_nextPageToken",
4161
+ * // "responsePolicies": []
4162
+ * // }
4163
+ * }
4164
+ *
4165
+ * main().catch(e => {
4166
+ * console.error(e);
4167
+ * throw e;
4168
+ * });
4169
+ *
4170
+ * ```
2092
4171
  *
2093
4172
  * @param params - Parameters for request
2094
4173
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2095
4174
  * @param callback - Optional callback that handles the response.
2096
4175
  * @returns A promise if used with async/await, or void if used with a callback.
2097
4176
  */
2098
- list(params: Params$Resource$Responsepolicies$List, options: StreamMethodOptions): GaxiosPromise<Readable>;
2099
- list(params?: Params$Resource$Responsepolicies$List, options?: MethodOptions): GaxiosPromise<Schema$ResponsePoliciesListResponse>;
4177
+ list(params: Params$Resource$Responsepolicies$List, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
4178
+ list(params?: Params$Resource$Responsepolicies$List, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ResponsePoliciesListResponse>>;
2100
4179
  list(params: Params$Resource$Responsepolicies$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
2101
4180
  list(params: Params$Resource$Responsepolicies$List, options: MethodOptions | BodyResponseCallback<Schema$ResponsePoliciesListResponse>, callback: BodyResponseCallback<Schema$ResponsePoliciesListResponse>): void;
2102
4181
  list(params: Params$Resource$Responsepolicies$List, callback: BodyResponseCallback<Schema$ResponsePoliciesListResponse>): void;
2103
4182
  list(callback: BodyResponseCallback<Schema$ResponsePoliciesListResponse>): void;
2104
4183
  /**
2105
4184
  * Applies a partial update to an existing Response Policy.
4185
+ * @example
4186
+ * ```js
4187
+ * // Before running the sample:
4188
+ * // - Enable the API at:
4189
+ * // https://console.developers.google.com/apis/api/dns.googleapis.com
4190
+ * // - Login into gcloud by running:
4191
+ * // ```sh
4192
+ * // $ gcloud auth application-default login
4193
+ * // ```
4194
+ * // - Install the npm module by running:
4195
+ * // ```sh
4196
+ * // $ npm install googleapis
4197
+ * // ```
4198
+ *
4199
+ * const {google} = require('googleapis');
4200
+ * const dns = google.dns('v1');
4201
+ *
4202
+ * async function main() {
4203
+ * const auth = new google.auth.GoogleAuth({
4204
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
4205
+ * scopes: [
4206
+ * 'https://www.googleapis.com/auth/cloud-platform',
4207
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
4208
+ * ],
4209
+ * });
4210
+ *
4211
+ * // Acquire an auth client, and bind it to all future calls
4212
+ * const authClient = await auth.getClient();
4213
+ * google.options({auth: authClient});
4214
+ *
4215
+ * // Do the magic
4216
+ * const res = await dns.responsePolicies.patch({
4217
+ * // For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
4218
+ * clientOperationId: 'placeholder-value',
4219
+ * // Identifies the project addressed by this request.
4220
+ * project: 'placeholder-value',
4221
+ * // User assigned name of the response policy addressed by this request.
4222
+ * responsePolicy: 'placeholder-value',
4223
+ *
4224
+ * // Request body metadata
4225
+ * requestBody: {
4226
+ * // request body parameters
4227
+ * // {
4228
+ * // "description": "my_description",
4229
+ * // "gkeClusters": [],
4230
+ * // "id": "my_id",
4231
+ * // "kind": "my_kind",
4232
+ * // "labels": {},
4233
+ * // "networks": [],
4234
+ * // "responsePolicyName": "my_responsePolicyName"
4235
+ * // }
4236
+ * },
4237
+ * });
4238
+ * console.log(res.data);
4239
+ *
4240
+ * // Example response
4241
+ * // {
4242
+ * // "responsePolicy": {}
4243
+ * // }
4244
+ * }
4245
+ *
4246
+ * main().catch(e => {
4247
+ * console.error(e);
4248
+ * throw e;
4249
+ * });
4250
+ *
4251
+ * ```
2106
4252
  *
2107
4253
  * @param params - Parameters for request
2108
4254
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2109
4255
  * @param callback - Optional callback that handles the response.
2110
4256
  * @returns A promise if used with async/await, or void if used with a callback.
2111
4257
  */
2112
- patch(params: Params$Resource$Responsepolicies$Patch, options: StreamMethodOptions): GaxiosPromise<Readable>;
2113
- patch(params?: Params$Resource$Responsepolicies$Patch, options?: MethodOptions): GaxiosPromise<Schema$ResponsePoliciesPatchResponse>;
4258
+ patch(params: Params$Resource$Responsepolicies$Patch, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
4259
+ patch(params?: Params$Resource$Responsepolicies$Patch, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ResponsePoliciesPatchResponse>>;
2114
4260
  patch(params: Params$Resource$Responsepolicies$Patch, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
2115
4261
  patch(params: Params$Resource$Responsepolicies$Patch, options: MethodOptions | BodyResponseCallback<Schema$ResponsePoliciesPatchResponse>, callback: BodyResponseCallback<Schema$ResponsePoliciesPatchResponse>): void;
2116
4262
  patch(params: Params$Resource$Responsepolicies$Patch, callback: BodyResponseCallback<Schema$ResponsePoliciesPatchResponse>): void;
2117
4263
  patch(callback: BodyResponseCallback<Schema$ResponsePoliciesPatchResponse>): void;
2118
4264
  /**
2119
4265
  * Updates an existing Response Policy.
4266
+ * @example
4267
+ * ```js
4268
+ * // Before running the sample:
4269
+ * // - Enable the API at:
4270
+ * // https://console.developers.google.com/apis/api/dns.googleapis.com
4271
+ * // - Login into gcloud by running:
4272
+ * // ```sh
4273
+ * // $ gcloud auth application-default login
4274
+ * // ```
4275
+ * // - Install the npm module by running:
4276
+ * // ```sh
4277
+ * // $ npm install googleapis
4278
+ * // ```
4279
+ *
4280
+ * const {google} = require('googleapis');
4281
+ * const dns = google.dns('v1');
4282
+ *
4283
+ * async function main() {
4284
+ * const auth = new google.auth.GoogleAuth({
4285
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
4286
+ * scopes: [
4287
+ * 'https://www.googleapis.com/auth/cloud-platform',
4288
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
4289
+ * ],
4290
+ * });
4291
+ *
4292
+ * // Acquire an auth client, and bind it to all future calls
4293
+ * const authClient = await auth.getClient();
4294
+ * google.options({auth: authClient});
4295
+ *
4296
+ * // Do the magic
4297
+ * const res = await dns.responsePolicies.update({
4298
+ * // For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
4299
+ * clientOperationId: 'placeholder-value',
4300
+ * // Identifies the project addressed by this request.
4301
+ * project: 'placeholder-value',
4302
+ * // User assigned name of the Response Policy addressed by this request.
4303
+ * responsePolicy: 'placeholder-value',
4304
+ *
4305
+ * // Request body metadata
4306
+ * requestBody: {
4307
+ * // request body parameters
4308
+ * // {
4309
+ * // "description": "my_description",
4310
+ * // "gkeClusters": [],
4311
+ * // "id": "my_id",
4312
+ * // "kind": "my_kind",
4313
+ * // "labels": {},
4314
+ * // "networks": [],
4315
+ * // "responsePolicyName": "my_responsePolicyName"
4316
+ * // }
4317
+ * },
4318
+ * });
4319
+ * console.log(res.data);
4320
+ *
4321
+ * // Example response
4322
+ * // {
4323
+ * // "responsePolicy": {}
4324
+ * // }
4325
+ * }
4326
+ *
4327
+ * main().catch(e => {
4328
+ * console.error(e);
4329
+ * throw e;
4330
+ * });
4331
+ *
4332
+ * ```
2120
4333
  *
2121
4334
  * @param params - Parameters for request
2122
4335
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2123
4336
  * @param callback - Optional callback that handles the response.
2124
4337
  * @returns A promise if used with async/await, or void if used with a callback.
2125
4338
  */
2126
- update(params: Params$Resource$Responsepolicies$Update, options: StreamMethodOptions): GaxiosPromise<Readable>;
2127
- update(params?: Params$Resource$Responsepolicies$Update, options?: MethodOptions): GaxiosPromise<Schema$ResponsePoliciesUpdateResponse>;
4339
+ update(params: Params$Resource$Responsepolicies$Update, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
4340
+ update(params?: Params$Resource$Responsepolicies$Update, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ResponsePoliciesUpdateResponse>>;
2128
4341
  update(params: Params$Resource$Responsepolicies$Update, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
2129
4342
  update(params: Params$Resource$Responsepolicies$Update, options: MethodOptions | BodyResponseCallback<Schema$ResponsePoliciesUpdateResponse>, callback: BodyResponseCallback<Schema$ResponsePoliciesUpdateResponse>): void;
2130
4343
  update(params: Params$Resource$Responsepolicies$Update, callback: BodyResponseCallback<Schema$ResponsePoliciesUpdateResponse>): void;
@@ -2227,84 +4440,456 @@ export declare namespace dns_v1 {
2227
4440
  constructor(context: APIRequestContext);
2228
4441
  /**
2229
4442
  * Creates a new Response Policy Rule.
4443
+ * @example
4444
+ * ```js
4445
+ * // Before running the sample:
4446
+ * // - Enable the API at:
4447
+ * // https://console.developers.google.com/apis/api/dns.googleapis.com
4448
+ * // - Login into gcloud by running:
4449
+ * // ```sh
4450
+ * // $ gcloud auth application-default login
4451
+ * // ```
4452
+ * // - Install the npm module by running:
4453
+ * // ```sh
4454
+ * // $ npm install googleapis
4455
+ * // ```
4456
+ *
4457
+ * const {google} = require('googleapis');
4458
+ * const dns = google.dns('v1');
4459
+ *
4460
+ * async function main() {
4461
+ * const auth = new google.auth.GoogleAuth({
4462
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
4463
+ * scopes: [
4464
+ * 'https://www.googleapis.com/auth/cloud-platform',
4465
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
4466
+ * ],
4467
+ * });
4468
+ *
4469
+ * // Acquire an auth client, and bind it to all future calls
4470
+ * const authClient = await auth.getClient();
4471
+ * google.options({auth: authClient});
4472
+ *
4473
+ * // Do the magic
4474
+ * const res = await dns.responsePolicyRules.create({
4475
+ * // For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
4476
+ * clientOperationId: 'placeholder-value',
4477
+ * // Identifies the project addressed by this request.
4478
+ * project: 'placeholder-value',
4479
+ * // User assigned name of the Response Policy containing the Response Policy Rule.
4480
+ * responsePolicy: 'placeholder-value',
4481
+ *
4482
+ * // Request body metadata
4483
+ * requestBody: {
4484
+ * // request body parameters
4485
+ * // {
4486
+ * // "behavior": "my_behavior",
4487
+ * // "dnsName": "my_dnsName",
4488
+ * // "kind": "my_kind",
4489
+ * // "localData": {},
4490
+ * // "ruleName": "my_ruleName"
4491
+ * // }
4492
+ * },
4493
+ * });
4494
+ * console.log(res.data);
4495
+ *
4496
+ * // Example response
4497
+ * // {
4498
+ * // "behavior": "my_behavior",
4499
+ * // "dnsName": "my_dnsName",
4500
+ * // "kind": "my_kind",
4501
+ * // "localData": {},
4502
+ * // "ruleName": "my_ruleName"
4503
+ * // }
4504
+ * }
4505
+ *
4506
+ * main().catch(e => {
4507
+ * console.error(e);
4508
+ * throw e;
4509
+ * });
4510
+ *
4511
+ * ```
2230
4512
  *
2231
4513
  * @param params - Parameters for request
2232
4514
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2233
4515
  * @param callback - Optional callback that handles the response.
2234
4516
  * @returns A promise if used with async/await, or void if used with a callback.
2235
4517
  */
2236
- create(params: Params$Resource$Responsepolicyrules$Create, options: StreamMethodOptions): GaxiosPromise<Readable>;
2237
- create(params?: Params$Resource$Responsepolicyrules$Create, options?: MethodOptions): GaxiosPromise<Schema$ResponsePolicyRule>;
4518
+ create(params: Params$Resource$Responsepolicyrules$Create, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
4519
+ create(params?: Params$Resource$Responsepolicyrules$Create, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ResponsePolicyRule>>;
2238
4520
  create(params: Params$Resource$Responsepolicyrules$Create, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
2239
4521
  create(params: Params$Resource$Responsepolicyrules$Create, options: MethodOptions | BodyResponseCallback<Schema$ResponsePolicyRule>, callback: BodyResponseCallback<Schema$ResponsePolicyRule>): void;
2240
4522
  create(params: Params$Resource$Responsepolicyrules$Create, callback: BodyResponseCallback<Schema$ResponsePolicyRule>): void;
2241
4523
  create(callback: BodyResponseCallback<Schema$ResponsePolicyRule>): void;
2242
4524
  /**
2243
4525
  * Deletes a previously created Response Policy Rule.
4526
+ * @example
4527
+ * ```js
4528
+ * // Before running the sample:
4529
+ * // - Enable the API at:
4530
+ * // https://console.developers.google.com/apis/api/dns.googleapis.com
4531
+ * // - Login into gcloud by running:
4532
+ * // ```sh
4533
+ * // $ gcloud auth application-default login
4534
+ * // ```
4535
+ * // - Install the npm module by running:
4536
+ * // ```sh
4537
+ * // $ npm install googleapis
4538
+ * // ```
4539
+ *
4540
+ * const {google} = require('googleapis');
4541
+ * const dns = google.dns('v1');
4542
+ *
4543
+ * async function main() {
4544
+ * const auth = new google.auth.GoogleAuth({
4545
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
4546
+ * scopes: [
4547
+ * 'https://www.googleapis.com/auth/cloud-platform',
4548
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
4549
+ * ],
4550
+ * });
4551
+ *
4552
+ * // Acquire an auth client, and bind it to all future calls
4553
+ * const authClient = await auth.getClient();
4554
+ * google.options({auth: authClient});
4555
+ *
4556
+ * // Do the magic
4557
+ * const res = await dns.responsePolicyRules.delete({
4558
+ * // For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
4559
+ * clientOperationId: 'placeholder-value',
4560
+ * // Identifies the project addressed by this request.
4561
+ * project: 'placeholder-value',
4562
+ * // User assigned name of the Response Policy containing the Response Policy Rule.
4563
+ * responsePolicy: 'placeholder-value',
4564
+ * // User assigned name of the Response Policy Rule addressed by this request.
4565
+ * responsePolicyRule: 'placeholder-value',
4566
+ * });
4567
+ * console.log(res.data);
4568
+ * }
4569
+ *
4570
+ * main().catch(e => {
4571
+ * console.error(e);
4572
+ * throw e;
4573
+ * });
4574
+ *
4575
+ * ```
2244
4576
  *
2245
4577
  * @param params - Parameters for request
2246
4578
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2247
4579
  * @param callback - Optional callback that handles the response.
2248
4580
  * @returns A promise if used with async/await, or void if used with a callback.
2249
4581
  */
2250
- delete(params: Params$Resource$Responsepolicyrules$Delete, options: StreamMethodOptions): GaxiosPromise<Readable>;
2251
- delete(params?: Params$Resource$Responsepolicyrules$Delete, options?: MethodOptions): GaxiosPromise<void>;
4582
+ delete(params: Params$Resource$Responsepolicyrules$Delete, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
4583
+ delete(params?: Params$Resource$Responsepolicyrules$Delete, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<void>>;
2252
4584
  delete(params: Params$Resource$Responsepolicyrules$Delete, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
2253
4585
  delete(params: Params$Resource$Responsepolicyrules$Delete, options: MethodOptions | BodyResponseCallback<void>, callback: BodyResponseCallback<void>): void;
2254
4586
  delete(params: Params$Resource$Responsepolicyrules$Delete, callback: BodyResponseCallback<void>): void;
2255
4587
  delete(callback: BodyResponseCallback<void>): void;
2256
4588
  /**
2257
4589
  * Fetches the representation of an existing Response Policy Rule.
4590
+ * @example
4591
+ * ```js
4592
+ * // Before running the sample:
4593
+ * // - Enable the API at:
4594
+ * // https://console.developers.google.com/apis/api/dns.googleapis.com
4595
+ * // - Login into gcloud by running:
4596
+ * // ```sh
4597
+ * // $ gcloud auth application-default login
4598
+ * // ```
4599
+ * // - Install the npm module by running:
4600
+ * // ```sh
4601
+ * // $ npm install googleapis
4602
+ * // ```
4603
+ *
4604
+ * const {google} = require('googleapis');
4605
+ * const dns = google.dns('v1');
4606
+ *
4607
+ * async function main() {
4608
+ * const auth = new google.auth.GoogleAuth({
4609
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
4610
+ * scopes: [
4611
+ * 'https://www.googleapis.com/auth/cloud-platform',
4612
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
4613
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readonly',
4614
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
4615
+ * ],
4616
+ * });
4617
+ *
4618
+ * // Acquire an auth client, and bind it to all future calls
4619
+ * const authClient = await auth.getClient();
4620
+ * google.options({auth: authClient});
4621
+ *
4622
+ * // Do the magic
4623
+ * const res = await dns.responsePolicyRules.get({
4624
+ * // For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
4625
+ * clientOperationId: 'placeholder-value',
4626
+ * // Identifies the project addressed by this request.
4627
+ * project: 'placeholder-value',
4628
+ * // User assigned name of the Response Policy containing the Response Policy Rule.
4629
+ * responsePolicy: 'placeholder-value',
4630
+ * // User assigned name of the Response Policy Rule addressed by this request.
4631
+ * responsePolicyRule: 'placeholder-value',
4632
+ * });
4633
+ * console.log(res.data);
4634
+ *
4635
+ * // Example response
4636
+ * // {
4637
+ * // "behavior": "my_behavior",
4638
+ * // "dnsName": "my_dnsName",
4639
+ * // "kind": "my_kind",
4640
+ * // "localData": {},
4641
+ * // "ruleName": "my_ruleName"
4642
+ * // }
4643
+ * }
4644
+ *
4645
+ * main().catch(e => {
4646
+ * console.error(e);
4647
+ * throw e;
4648
+ * });
4649
+ *
4650
+ * ```
2258
4651
  *
2259
4652
  * @param params - Parameters for request
2260
4653
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2261
4654
  * @param callback - Optional callback that handles the response.
2262
4655
  * @returns A promise if used with async/await, or void if used with a callback.
2263
4656
  */
2264
- get(params: Params$Resource$Responsepolicyrules$Get, options: StreamMethodOptions): GaxiosPromise<Readable>;
2265
- get(params?: Params$Resource$Responsepolicyrules$Get, options?: MethodOptions): GaxiosPromise<Schema$ResponsePolicyRule>;
4657
+ get(params: Params$Resource$Responsepolicyrules$Get, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
4658
+ get(params?: Params$Resource$Responsepolicyrules$Get, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ResponsePolicyRule>>;
2266
4659
  get(params: Params$Resource$Responsepolicyrules$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
2267
4660
  get(params: Params$Resource$Responsepolicyrules$Get, options: MethodOptions | BodyResponseCallback<Schema$ResponsePolicyRule>, callback: BodyResponseCallback<Schema$ResponsePolicyRule>): void;
2268
4661
  get(params: Params$Resource$Responsepolicyrules$Get, callback: BodyResponseCallback<Schema$ResponsePolicyRule>): void;
2269
4662
  get(callback: BodyResponseCallback<Schema$ResponsePolicyRule>): void;
2270
4663
  /**
2271
4664
  * Enumerates all Response Policy Rules associated with a project.
4665
+ * @example
4666
+ * ```js
4667
+ * // Before running the sample:
4668
+ * // - Enable the API at:
4669
+ * // https://console.developers.google.com/apis/api/dns.googleapis.com
4670
+ * // - Login into gcloud by running:
4671
+ * // ```sh
4672
+ * // $ gcloud auth application-default login
4673
+ * // ```
4674
+ * // - Install the npm module by running:
4675
+ * // ```sh
4676
+ * // $ npm install googleapis
4677
+ * // ```
4678
+ *
4679
+ * const {google} = require('googleapis');
4680
+ * const dns = google.dns('v1');
4681
+ *
4682
+ * async function main() {
4683
+ * const auth = new google.auth.GoogleAuth({
4684
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
4685
+ * scopes: [
4686
+ * 'https://www.googleapis.com/auth/cloud-platform',
4687
+ * 'https://www.googleapis.com/auth/cloud-platform.read-only',
4688
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readonly',
4689
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
4690
+ * ],
4691
+ * });
4692
+ *
4693
+ * // Acquire an auth client, and bind it to all future calls
4694
+ * const authClient = await auth.getClient();
4695
+ * google.options({auth: authClient});
4696
+ *
4697
+ * // Do the magic
4698
+ * const res = await dns.responsePolicyRules.list({
4699
+ * // Optional. Maximum number of results to be returned. If unspecified, the server decides how many results to return.
4700
+ * maxResults: 'placeholder-value',
4701
+ * // Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.
4702
+ * pageToken: 'placeholder-value',
4703
+ * // Identifies the project addressed by this request.
4704
+ * project: 'placeholder-value',
4705
+ * // User assigned name of the Response Policy to list.
4706
+ * responsePolicy: 'placeholder-value',
4707
+ * });
4708
+ * console.log(res.data);
4709
+ *
4710
+ * // Example response
4711
+ * // {
4712
+ * // "nextPageToken": "my_nextPageToken",
4713
+ * // "responsePolicyRules": []
4714
+ * // }
4715
+ * }
4716
+ *
4717
+ * main().catch(e => {
4718
+ * console.error(e);
4719
+ * throw e;
4720
+ * });
4721
+ *
4722
+ * ```
2272
4723
  *
2273
4724
  * @param params - Parameters for request
2274
4725
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2275
4726
  * @param callback - Optional callback that handles the response.
2276
4727
  * @returns A promise if used with async/await, or void if used with a callback.
2277
4728
  */
2278
- list(params: Params$Resource$Responsepolicyrules$List, options: StreamMethodOptions): GaxiosPromise<Readable>;
2279
- list(params?: Params$Resource$Responsepolicyrules$List, options?: MethodOptions): GaxiosPromise<Schema$ResponsePolicyRulesListResponse>;
4729
+ list(params: Params$Resource$Responsepolicyrules$List, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
4730
+ list(params?: Params$Resource$Responsepolicyrules$List, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ResponsePolicyRulesListResponse>>;
2280
4731
  list(params: Params$Resource$Responsepolicyrules$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
2281
4732
  list(params: Params$Resource$Responsepolicyrules$List, options: MethodOptions | BodyResponseCallback<Schema$ResponsePolicyRulesListResponse>, callback: BodyResponseCallback<Schema$ResponsePolicyRulesListResponse>): void;
2282
4733
  list(params: Params$Resource$Responsepolicyrules$List, callback: BodyResponseCallback<Schema$ResponsePolicyRulesListResponse>): void;
2283
4734
  list(callback: BodyResponseCallback<Schema$ResponsePolicyRulesListResponse>): void;
2284
4735
  /**
2285
4736
  * Applies a partial update to an existing Response Policy Rule.
4737
+ * @example
4738
+ * ```js
4739
+ * // Before running the sample:
4740
+ * // - Enable the API at:
4741
+ * // https://console.developers.google.com/apis/api/dns.googleapis.com
4742
+ * // - Login into gcloud by running:
4743
+ * // ```sh
4744
+ * // $ gcloud auth application-default login
4745
+ * // ```
4746
+ * // - Install the npm module by running:
4747
+ * // ```sh
4748
+ * // $ npm install googleapis
4749
+ * // ```
4750
+ *
4751
+ * const {google} = require('googleapis');
4752
+ * const dns = google.dns('v1');
4753
+ *
4754
+ * async function main() {
4755
+ * const auth = new google.auth.GoogleAuth({
4756
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
4757
+ * scopes: [
4758
+ * 'https://www.googleapis.com/auth/cloud-platform',
4759
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
4760
+ * ],
4761
+ * });
4762
+ *
4763
+ * // Acquire an auth client, and bind it to all future calls
4764
+ * const authClient = await auth.getClient();
4765
+ * google.options({auth: authClient});
4766
+ *
4767
+ * // Do the magic
4768
+ * const res = await dns.responsePolicyRules.patch({
4769
+ * // For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
4770
+ * clientOperationId: 'placeholder-value',
4771
+ * // Identifies the project addressed by this request.
4772
+ * project: 'placeholder-value',
4773
+ * // User assigned name of the Response Policy containing the Response Policy Rule.
4774
+ * responsePolicy: 'placeholder-value',
4775
+ * // User assigned name of the Response Policy Rule addressed by this request.
4776
+ * responsePolicyRule: 'placeholder-value',
4777
+ *
4778
+ * // Request body metadata
4779
+ * requestBody: {
4780
+ * // request body parameters
4781
+ * // {
4782
+ * // "behavior": "my_behavior",
4783
+ * // "dnsName": "my_dnsName",
4784
+ * // "kind": "my_kind",
4785
+ * // "localData": {},
4786
+ * // "ruleName": "my_ruleName"
4787
+ * // }
4788
+ * },
4789
+ * });
4790
+ * console.log(res.data);
4791
+ *
4792
+ * // Example response
4793
+ * // {
4794
+ * // "responsePolicyRule": {}
4795
+ * // }
4796
+ * }
4797
+ *
4798
+ * main().catch(e => {
4799
+ * console.error(e);
4800
+ * throw e;
4801
+ * });
4802
+ *
4803
+ * ```
2286
4804
  *
2287
4805
  * @param params - Parameters for request
2288
4806
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2289
4807
  * @param callback - Optional callback that handles the response.
2290
4808
  * @returns A promise if used with async/await, or void if used with a callback.
2291
4809
  */
2292
- patch(params: Params$Resource$Responsepolicyrules$Patch, options: StreamMethodOptions): GaxiosPromise<Readable>;
2293
- patch(params?: Params$Resource$Responsepolicyrules$Patch, options?: MethodOptions): GaxiosPromise<Schema$ResponsePolicyRulesPatchResponse>;
4810
+ patch(params: Params$Resource$Responsepolicyrules$Patch, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
4811
+ patch(params?: Params$Resource$Responsepolicyrules$Patch, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ResponsePolicyRulesPatchResponse>>;
2294
4812
  patch(params: Params$Resource$Responsepolicyrules$Patch, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
2295
4813
  patch(params: Params$Resource$Responsepolicyrules$Patch, options: MethodOptions | BodyResponseCallback<Schema$ResponsePolicyRulesPatchResponse>, callback: BodyResponseCallback<Schema$ResponsePolicyRulesPatchResponse>): void;
2296
4814
  patch(params: Params$Resource$Responsepolicyrules$Patch, callback: BodyResponseCallback<Schema$ResponsePolicyRulesPatchResponse>): void;
2297
4815
  patch(callback: BodyResponseCallback<Schema$ResponsePolicyRulesPatchResponse>): void;
2298
4816
  /**
2299
4817
  * Updates an existing Response Policy Rule.
4818
+ * @example
4819
+ * ```js
4820
+ * // Before running the sample:
4821
+ * // - Enable the API at:
4822
+ * // https://console.developers.google.com/apis/api/dns.googleapis.com
4823
+ * // - Login into gcloud by running:
4824
+ * // ```sh
4825
+ * // $ gcloud auth application-default login
4826
+ * // ```
4827
+ * // - Install the npm module by running:
4828
+ * // ```sh
4829
+ * // $ npm install googleapis
4830
+ * // ```
4831
+ *
4832
+ * const {google} = require('googleapis');
4833
+ * const dns = google.dns('v1');
4834
+ *
4835
+ * async function main() {
4836
+ * const auth = new google.auth.GoogleAuth({
4837
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
4838
+ * scopes: [
4839
+ * 'https://www.googleapis.com/auth/cloud-platform',
4840
+ * 'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
4841
+ * ],
4842
+ * });
4843
+ *
4844
+ * // Acquire an auth client, and bind it to all future calls
4845
+ * const authClient = await auth.getClient();
4846
+ * google.options({auth: authClient});
4847
+ *
4848
+ * // Do the magic
4849
+ * const res = await dns.responsePolicyRules.update({
4850
+ * // For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
4851
+ * clientOperationId: 'placeholder-value',
4852
+ * // Identifies the project addressed by this request.
4853
+ * project: 'placeholder-value',
4854
+ * // User assigned name of the Response Policy containing the Response Policy Rule.
4855
+ * responsePolicy: 'placeholder-value',
4856
+ * // User assigned name of the Response Policy Rule addressed by this request.
4857
+ * responsePolicyRule: 'placeholder-value',
4858
+ *
4859
+ * // Request body metadata
4860
+ * requestBody: {
4861
+ * // request body parameters
4862
+ * // {
4863
+ * // "behavior": "my_behavior",
4864
+ * // "dnsName": "my_dnsName",
4865
+ * // "kind": "my_kind",
4866
+ * // "localData": {},
4867
+ * // "ruleName": "my_ruleName"
4868
+ * // }
4869
+ * },
4870
+ * });
4871
+ * console.log(res.data);
4872
+ *
4873
+ * // Example response
4874
+ * // {
4875
+ * // "responsePolicyRule": {}
4876
+ * // }
4877
+ * }
4878
+ *
4879
+ * main().catch(e => {
4880
+ * console.error(e);
4881
+ * throw e;
4882
+ * });
4883
+ *
4884
+ * ```
2300
4885
  *
2301
4886
  * @param params - Parameters for request
2302
4887
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2303
4888
  * @param callback - Optional callback that handles the response.
2304
4889
  * @returns A promise if used with async/await, or void if used with a callback.
2305
4890
  */
2306
- update(params: Params$Resource$Responsepolicyrules$Update, options: StreamMethodOptions): GaxiosPromise<Readable>;
2307
- update(params?: Params$Resource$Responsepolicyrules$Update, options?: MethodOptions): GaxiosPromise<Schema$ResponsePolicyRulesUpdateResponse>;
4891
+ update(params: Params$Resource$Responsepolicyrules$Update, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
4892
+ update(params?: Params$Resource$Responsepolicyrules$Update, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ResponsePolicyRulesUpdateResponse>>;
2308
4893
  update(params: Params$Resource$Responsepolicyrules$Update, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
2309
4894
  update(params: Params$Resource$Responsepolicyrules$Update, options: MethodOptions | BodyResponseCallback<Schema$ResponsePolicyRulesUpdateResponse>, callback: BodyResponseCallback<Schema$ResponsePolicyRulesUpdateResponse>): void;
2310
4895
  update(params: Params$Resource$Responsepolicyrules$Update, callback: BodyResponseCallback<Schema$ResponsePolicyRulesUpdateResponse>): void;