@googleapis/tpu 5.5.0 → 7.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/v2alpha1.ts CHANGED
@@ -23,7 +23,7 @@ import {
23
23
  Compute,
24
24
  UserRefreshClient,
25
25
  BaseExternalAccountClient,
26
- GaxiosPromise,
26
+ GaxiosResponseWithHTTP2,
27
27
  GoogleConfigurable,
28
28
  createAPIRequest,
29
29
  MethodOptions,
@@ -933,6 +933,10 @@ export namespace tpu_v2alpha1 {
933
933
  * Optional. Defines the provisioning model for the node.
934
934
  */
935
935
  provisioningModel?: string | null;
936
+ /**
937
+ * Optional. Name of the reservation in which the node should be provisioned.
938
+ */
939
+ reservationName?: string | null;
936
940
  /**
937
941
  * Whether the node is created under a reservation.
938
942
  */
@@ -1156,6 +1160,58 @@ export namespace tpu_v2alpha1 {
1156
1160
 
1157
1161
  /**
1158
1162
  * Generates the Cloud TPU service identity for the project.
1163
+ * @example
1164
+ * ```js
1165
+ * // Before running the sample:
1166
+ * // - Enable the API at:
1167
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1168
+ * // - Login into gcloud by running:
1169
+ * // ```sh
1170
+ * // $ gcloud auth application-default login
1171
+ * // ```
1172
+ * // - Install the npm module by running:
1173
+ * // ```sh
1174
+ * // $ npm install googleapis
1175
+ * // ```
1176
+ *
1177
+ * const {google} = require('googleapis');
1178
+ * const tpu = google.tpu('v2alpha1');
1179
+ *
1180
+ * async function main() {
1181
+ * const auth = new google.auth.GoogleAuth({
1182
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1183
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1184
+ * });
1185
+ *
1186
+ * // Acquire an auth client, and bind it to all future calls
1187
+ * const authClient = await auth.getClient();
1188
+ * google.options({auth: authClient});
1189
+ *
1190
+ * // Do the magic
1191
+ * const res = await tpu.projects.locations.generateServiceIdentity({
1192
+ * // Required. The parent resource name.
1193
+ * parent: 'projects/my-project/locations/my-location',
1194
+ *
1195
+ * // Request body metadata
1196
+ * requestBody: {
1197
+ * // request body parameters
1198
+ * // {}
1199
+ * },
1200
+ * });
1201
+ * console.log(res.data);
1202
+ *
1203
+ * // Example response
1204
+ * // {
1205
+ * // "identity": {}
1206
+ * // }
1207
+ * }
1208
+ *
1209
+ * main().catch(e => {
1210
+ * console.error(e);
1211
+ * throw e;
1212
+ * });
1213
+ *
1214
+ * ```
1159
1215
  *
1160
1216
  * @param params - Parameters for request
1161
1217
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1165,11 +1221,11 @@ export namespace tpu_v2alpha1 {
1165
1221
  generateServiceIdentity(
1166
1222
  params: Params$Resource$Projects$Locations$Generateserviceidentity,
1167
1223
  options: StreamMethodOptions
1168
- ): GaxiosPromise<Readable>;
1224
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
1169
1225
  generateServiceIdentity(
1170
1226
  params?: Params$Resource$Projects$Locations$Generateserviceidentity,
1171
1227
  options?: MethodOptions
1172
- ): GaxiosPromise<Schema$GenerateServiceIdentityResponse>;
1228
+ ): Promise<GaxiosResponseWithHTTP2<Schema$GenerateServiceIdentityResponse>>;
1173
1229
  generateServiceIdentity(
1174
1230
  params: Params$Resource$Projects$Locations$Generateserviceidentity,
1175
1231
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -1204,8 +1260,8 @@ export namespace tpu_v2alpha1 {
1204
1260
  | BodyResponseCallback<Readable>
1205
1261
  ):
1206
1262
  | void
1207
- | GaxiosPromise<Schema$GenerateServiceIdentityResponse>
1208
- | GaxiosPromise<Readable> {
1263
+ | Promise<GaxiosResponseWithHTTP2<Schema$GenerateServiceIdentityResponse>>
1264
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
1209
1265
  let params = (paramsOrCallback ||
1210
1266
  {}) as Params$Resource$Projects$Locations$Generateserviceidentity;
1211
1267
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -1253,6 +1309,56 @@ export namespace tpu_v2alpha1 {
1253
1309
 
1254
1310
  /**
1255
1311
  * Gets information about a location.
1312
+ * @example
1313
+ * ```js
1314
+ * // Before running the sample:
1315
+ * // - Enable the API at:
1316
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1317
+ * // - Login into gcloud by running:
1318
+ * // ```sh
1319
+ * // $ gcloud auth application-default login
1320
+ * // ```
1321
+ * // - Install the npm module by running:
1322
+ * // ```sh
1323
+ * // $ npm install googleapis
1324
+ * // ```
1325
+ *
1326
+ * const {google} = require('googleapis');
1327
+ * const tpu = google.tpu('v2alpha1');
1328
+ *
1329
+ * async function main() {
1330
+ * const auth = new google.auth.GoogleAuth({
1331
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1332
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1333
+ * });
1334
+ *
1335
+ * // Acquire an auth client, and bind it to all future calls
1336
+ * const authClient = await auth.getClient();
1337
+ * google.options({auth: authClient});
1338
+ *
1339
+ * // Do the magic
1340
+ * const res = await tpu.projects.locations.get({
1341
+ * // Resource name for the location.
1342
+ * name: 'projects/my-project/locations/my-location',
1343
+ * });
1344
+ * console.log(res.data);
1345
+ *
1346
+ * // Example response
1347
+ * // {
1348
+ * // "displayName": "my_displayName",
1349
+ * // "labels": {},
1350
+ * // "locationId": "my_locationId",
1351
+ * // "metadata": {},
1352
+ * // "name": "my_name"
1353
+ * // }
1354
+ * }
1355
+ *
1356
+ * main().catch(e => {
1357
+ * console.error(e);
1358
+ * throw e;
1359
+ * });
1360
+ *
1361
+ * ```
1256
1362
  *
1257
1363
  * @param params - Parameters for request
1258
1364
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1262,11 +1368,11 @@ export namespace tpu_v2alpha1 {
1262
1368
  get(
1263
1369
  params: Params$Resource$Projects$Locations$Get,
1264
1370
  options: StreamMethodOptions
1265
- ): GaxiosPromise<Readable>;
1371
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
1266
1372
  get(
1267
1373
  params?: Params$Resource$Projects$Locations$Get,
1268
1374
  options?: MethodOptions
1269
- ): GaxiosPromise<Schema$Location>;
1375
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Location>>;
1270
1376
  get(
1271
1377
  params: Params$Resource$Projects$Locations$Get,
1272
1378
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -1295,7 +1401,10 @@ export namespace tpu_v2alpha1 {
1295
1401
  callback?:
1296
1402
  | BodyResponseCallback<Schema$Location>
1297
1403
  | BodyResponseCallback<Readable>
1298
- ): void | GaxiosPromise<Schema$Location> | GaxiosPromise<Readable> {
1404
+ ):
1405
+ | void
1406
+ | Promise<GaxiosResponseWithHTTP2<Schema$Location>>
1407
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
1299
1408
  let params = (paramsOrCallback ||
1300
1409
  {}) as Params$Resource$Projects$Locations$Get;
1301
1410
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -1338,6 +1447,61 @@ export namespace tpu_v2alpha1 {
1338
1447
 
1339
1448
  /**
1340
1449
  * Lists information about the supported locations for this service.
1450
+ * @example
1451
+ * ```js
1452
+ * // Before running the sample:
1453
+ * // - Enable the API at:
1454
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1455
+ * // - Login into gcloud by running:
1456
+ * // ```sh
1457
+ * // $ gcloud auth application-default login
1458
+ * // ```
1459
+ * // - Install the npm module by running:
1460
+ * // ```sh
1461
+ * // $ npm install googleapis
1462
+ * // ```
1463
+ *
1464
+ * const {google} = require('googleapis');
1465
+ * const tpu = google.tpu('v2alpha1');
1466
+ *
1467
+ * async function main() {
1468
+ * const auth = new google.auth.GoogleAuth({
1469
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1470
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1471
+ * });
1472
+ *
1473
+ * // Acquire an auth client, and bind it to all future calls
1474
+ * const authClient = await auth.getClient();
1475
+ * google.options({auth: authClient});
1476
+ *
1477
+ * // Do the magic
1478
+ * const res = await tpu.projects.locations.list({
1479
+ * // Optional. A list of extra location types that should be used as conditions for controlling the visibility of the locations.
1480
+ * extraLocationTypes: 'placeholder-value',
1481
+ * // A filter to narrow down results to a preferred subset. The filtering language accepts strings like `"displayName=tokyo"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).
1482
+ * filter: 'placeholder-value',
1483
+ * // The resource that owns the locations collection, if applicable.
1484
+ * name: 'projects/my-project',
1485
+ * // The maximum number of results to return. If not set, the service selects a default.
1486
+ * pageSize: 'placeholder-value',
1487
+ * // A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.
1488
+ * pageToken: 'placeholder-value',
1489
+ * });
1490
+ * console.log(res.data);
1491
+ *
1492
+ * // Example response
1493
+ * // {
1494
+ * // "locations": [],
1495
+ * // "nextPageToken": "my_nextPageToken"
1496
+ * // }
1497
+ * }
1498
+ *
1499
+ * main().catch(e => {
1500
+ * console.error(e);
1501
+ * throw e;
1502
+ * });
1503
+ *
1504
+ * ```
1341
1505
  *
1342
1506
  * @param params - Parameters for request
1343
1507
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1347,11 +1511,11 @@ export namespace tpu_v2alpha1 {
1347
1511
  list(
1348
1512
  params: Params$Resource$Projects$Locations$List,
1349
1513
  options: StreamMethodOptions
1350
- ): GaxiosPromise<Readable>;
1514
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
1351
1515
  list(
1352
1516
  params?: Params$Resource$Projects$Locations$List,
1353
1517
  options?: MethodOptions
1354
- ): GaxiosPromise<Schema$ListLocationsResponse>;
1518
+ ): Promise<GaxiosResponseWithHTTP2<Schema$ListLocationsResponse>>;
1355
1519
  list(
1356
1520
  params: Params$Resource$Projects$Locations$List,
1357
1521
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -1384,8 +1548,8 @@ export namespace tpu_v2alpha1 {
1384
1548
  | BodyResponseCallback<Readable>
1385
1549
  ):
1386
1550
  | void
1387
- | GaxiosPromise<Schema$ListLocationsResponse>
1388
- | GaxiosPromise<Readable> {
1551
+ | Promise<GaxiosResponseWithHTTP2<Schema$ListLocationsResponse>>
1552
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
1389
1553
  let params = (paramsOrCallback ||
1390
1554
  {}) as Params$Resource$Projects$Locations$List;
1391
1555
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -1481,6 +1645,54 @@ export namespace tpu_v2alpha1 {
1481
1645
 
1482
1646
  /**
1483
1647
  * Gets AcceleratorType.
1648
+ * @example
1649
+ * ```js
1650
+ * // Before running the sample:
1651
+ * // - Enable the API at:
1652
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1653
+ * // - Login into gcloud by running:
1654
+ * // ```sh
1655
+ * // $ gcloud auth application-default login
1656
+ * // ```
1657
+ * // - Install the npm module by running:
1658
+ * // ```sh
1659
+ * // $ npm install googleapis
1660
+ * // ```
1661
+ *
1662
+ * const {google} = require('googleapis');
1663
+ * const tpu = google.tpu('v2alpha1');
1664
+ *
1665
+ * async function main() {
1666
+ * const auth = new google.auth.GoogleAuth({
1667
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1668
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1669
+ * });
1670
+ *
1671
+ * // Acquire an auth client, and bind it to all future calls
1672
+ * const authClient = await auth.getClient();
1673
+ * google.options({auth: authClient});
1674
+ *
1675
+ * // Do the magic
1676
+ * const res = await tpu.projects.locations.acceleratorTypes.get({
1677
+ * // Required. The resource name.
1678
+ * name: 'projects/my-project/locations/my-location/acceleratorTypes/my-acceleratorType',
1679
+ * });
1680
+ * console.log(res.data);
1681
+ *
1682
+ * // Example response
1683
+ * // {
1684
+ * // "acceleratorConfigs": [],
1685
+ * // "name": "my_name",
1686
+ * // "type": "my_type"
1687
+ * // }
1688
+ * }
1689
+ *
1690
+ * main().catch(e => {
1691
+ * console.error(e);
1692
+ * throw e;
1693
+ * });
1694
+ *
1695
+ * ```
1484
1696
  *
1485
1697
  * @param params - Parameters for request
1486
1698
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1490,11 +1702,11 @@ export namespace tpu_v2alpha1 {
1490
1702
  get(
1491
1703
  params: Params$Resource$Projects$Locations$Acceleratortypes$Get,
1492
1704
  options: StreamMethodOptions
1493
- ): GaxiosPromise<Readable>;
1705
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
1494
1706
  get(
1495
1707
  params?: Params$Resource$Projects$Locations$Acceleratortypes$Get,
1496
1708
  options?: MethodOptions
1497
- ): GaxiosPromise<Schema$AcceleratorType>;
1709
+ ): Promise<GaxiosResponseWithHTTP2<Schema$AcceleratorType>>;
1498
1710
  get(
1499
1711
  params: Params$Resource$Projects$Locations$Acceleratortypes$Get,
1500
1712
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -1523,7 +1735,10 @@ export namespace tpu_v2alpha1 {
1523
1735
  callback?:
1524
1736
  | BodyResponseCallback<Schema$AcceleratorType>
1525
1737
  | BodyResponseCallback<Readable>
1526
- ): void | GaxiosPromise<Schema$AcceleratorType> | GaxiosPromise<Readable> {
1738
+ ):
1739
+ | void
1740
+ | Promise<GaxiosResponseWithHTTP2<Schema$AcceleratorType>>
1741
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
1527
1742
  let params = (paramsOrCallback ||
1528
1743
  {}) as Params$Resource$Projects$Locations$Acceleratortypes$Get;
1529
1744
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -1566,6 +1781,62 @@ export namespace tpu_v2alpha1 {
1566
1781
 
1567
1782
  /**
1568
1783
  * Lists accelerator types supported by this API.
1784
+ * @example
1785
+ * ```js
1786
+ * // Before running the sample:
1787
+ * // - Enable the API at:
1788
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1789
+ * // - Login into gcloud by running:
1790
+ * // ```sh
1791
+ * // $ gcloud auth application-default login
1792
+ * // ```
1793
+ * // - Install the npm module by running:
1794
+ * // ```sh
1795
+ * // $ npm install googleapis
1796
+ * // ```
1797
+ *
1798
+ * const {google} = require('googleapis');
1799
+ * const tpu = google.tpu('v2alpha1');
1800
+ *
1801
+ * async function main() {
1802
+ * const auth = new google.auth.GoogleAuth({
1803
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1804
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1805
+ * });
1806
+ *
1807
+ * // Acquire an auth client, and bind it to all future calls
1808
+ * const authClient = await auth.getClient();
1809
+ * google.options({auth: authClient});
1810
+ *
1811
+ * // Do the magic
1812
+ * const res = await tpu.projects.locations.acceleratorTypes.list({
1813
+ * // List filter.
1814
+ * filter: 'placeholder-value',
1815
+ * // Sort results.
1816
+ * orderBy: 'placeholder-value',
1817
+ * // The maximum number of items to return.
1818
+ * pageSize: 'placeholder-value',
1819
+ * // The next_page_token value returned from a previous List request, if any.
1820
+ * pageToken: 'placeholder-value',
1821
+ * // Required. The parent resource name.
1822
+ * parent: 'projects/my-project/locations/my-location',
1823
+ * });
1824
+ * console.log(res.data);
1825
+ *
1826
+ * // Example response
1827
+ * // {
1828
+ * // "acceleratorTypes": [],
1829
+ * // "nextPageToken": "my_nextPageToken",
1830
+ * // "unreachable": []
1831
+ * // }
1832
+ * }
1833
+ *
1834
+ * main().catch(e => {
1835
+ * console.error(e);
1836
+ * throw e;
1837
+ * });
1838
+ *
1839
+ * ```
1569
1840
  *
1570
1841
  * @param params - Parameters for request
1571
1842
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1575,11 +1846,11 @@ export namespace tpu_v2alpha1 {
1575
1846
  list(
1576
1847
  params: Params$Resource$Projects$Locations$Acceleratortypes$List,
1577
1848
  options: StreamMethodOptions
1578
- ): GaxiosPromise<Readable>;
1849
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
1579
1850
  list(
1580
1851
  params?: Params$Resource$Projects$Locations$Acceleratortypes$List,
1581
1852
  options?: MethodOptions
1582
- ): GaxiosPromise<Schema$ListAcceleratorTypesResponse>;
1853
+ ): Promise<GaxiosResponseWithHTTP2<Schema$ListAcceleratorTypesResponse>>;
1583
1854
  list(
1584
1855
  params: Params$Resource$Projects$Locations$Acceleratortypes$List,
1585
1856
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -1614,8 +1885,8 @@ export namespace tpu_v2alpha1 {
1614
1885
  | BodyResponseCallback<Readable>
1615
1886
  ):
1616
1887
  | void
1617
- | GaxiosPromise<Schema$ListAcceleratorTypesResponse>
1618
- | GaxiosPromise<Readable> {
1888
+ | Promise<GaxiosResponseWithHTTP2<Schema$ListAcceleratorTypesResponse>>
1889
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
1619
1890
  let params = (paramsOrCallback ||
1620
1891
  {}) as Params$Resource$Projects$Locations$Acceleratortypes$List;
1621
1892
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -1701,6 +1972,95 @@ export namespace tpu_v2alpha1 {
1701
1972
 
1702
1973
  /**
1703
1974
  * Creates a node.
1975
+ * @example
1976
+ * ```js
1977
+ * // Before running the sample:
1978
+ * // - Enable the API at:
1979
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1980
+ * // - Login into gcloud by running:
1981
+ * // ```sh
1982
+ * // $ gcloud auth application-default login
1983
+ * // ```
1984
+ * // - Install the npm module by running:
1985
+ * // ```sh
1986
+ * // $ npm install googleapis
1987
+ * // ```
1988
+ *
1989
+ * const {google} = require('googleapis');
1990
+ * const tpu = google.tpu('v2alpha1');
1991
+ *
1992
+ * async function main() {
1993
+ * const auth = new google.auth.GoogleAuth({
1994
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1995
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1996
+ * });
1997
+ *
1998
+ * // Acquire an auth client, and bind it to all future calls
1999
+ * const authClient = await auth.getClient();
2000
+ * google.options({auth: authClient});
2001
+ *
2002
+ * // Do the magic
2003
+ * const res = await tpu.projects.locations.nodes.create({
2004
+ * // The unqualified resource name.
2005
+ * nodeId: 'placeholder-value',
2006
+ * // Required. The parent resource name.
2007
+ * parent: 'projects/my-project/locations/my-location',
2008
+ * // Idempotent request UUID.
2009
+ * requestId: 'placeholder-value',
2010
+ *
2011
+ * // Request body metadata
2012
+ * requestBody: {
2013
+ * // request body parameters
2014
+ * // {
2015
+ * // "acceleratorConfig": {},
2016
+ * // "acceleratorType": "my_acceleratorType",
2017
+ * // "apiVersion": "my_apiVersion",
2018
+ * // "autocheckpointEnabled": false,
2019
+ * // "bootDiskConfig": {},
2020
+ * // "cidrBlock": "my_cidrBlock",
2021
+ * // "createTime": "my_createTime",
2022
+ * // "dataDisks": [],
2023
+ * // "description": "my_description",
2024
+ * // "health": "my_health",
2025
+ * // "healthDescription": "my_healthDescription",
2026
+ * // "id": "my_id",
2027
+ * // "labels": {},
2028
+ * // "metadata": {},
2029
+ * // "multisliceNode": false,
2030
+ * // "name": "my_name",
2031
+ * // "networkConfig": {},
2032
+ * // "networkConfigs": [],
2033
+ * // "networkEndpoints": [],
2034
+ * // "queuedResource": "my_queuedResource",
2035
+ * // "runtimeVersion": "my_runtimeVersion",
2036
+ * // "schedulingConfig": {},
2037
+ * // "serviceAccount": {},
2038
+ * // "shieldedInstanceConfig": {},
2039
+ * // "state": "my_state",
2040
+ * // "symptoms": [],
2041
+ * // "tags": [],
2042
+ * // "upcomingMaintenance": {}
2043
+ * // }
2044
+ * },
2045
+ * });
2046
+ * console.log(res.data);
2047
+ *
2048
+ * // Example response
2049
+ * // {
2050
+ * // "done": false,
2051
+ * // "error": {},
2052
+ * // "metadata": {},
2053
+ * // "name": "my_name",
2054
+ * // "response": {}
2055
+ * // }
2056
+ * }
2057
+ *
2058
+ * main().catch(e => {
2059
+ * console.error(e);
2060
+ * throw e;
2061
+ * });
2062
+ *
2063
+ * ```
1704
2064
  *
1705
2065
  * @param params - Parameters for request
1706
2066
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1710,11 +2070,11 @@ export namespace tpu_v2alpha1 {
1710
2070
  create(
1711
2071
  params: Params$Resource$Projects$Locations$Nodes$Create,
1712
2072
  options: StreamMethodOptions
1713
- ): GaxiosPromise<Readable>;
2073
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
1714
2074
  create(
1715
2075
  params?: Params$Resource$Projects$Locations$Nodes$Create,
1716
2076
  options?: MethodOptions
1717
- ): GaxiosPromise<Schema$Operation>;
2077
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
1718
2078
  create(
1719
2079
  params: Params$Resource$Projects$Locations$Nodes$Create,
1720
2080
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -1743,7 +2103,10 @@ export namespace tpu_v2alpha1 {
1743
2103
  callback?:
1744
2104
  | BodyResponseCallback<Schema$Operation>
1745
2105
  | BodyResponseCallback<Readable>
1746
- ): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
2106
+ ):
2107
+ | void
2108
+ | Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
2109
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
1747
2110
  let params = (paramsOrCallback ||
1748
2111
  {}) as Params$Resource$Projects$Locations$Nodes$Create;
1749
2112
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -1789,6 +2152,58 @@ export namespace tpu_v2alpha1 {
1789
2152
 
1790
2153
  /**
1791
2154
  * Deletes a node.
2155
+ * @example
2156
+ * ```js
2157
+ * // Before running the sample:
2158
+ * // - Enable the API at:
2159
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
2160
+ * // - Login into gcloud by running:
2161
+ * // ```sh
2162
+ * // $ gcloud auth application-default login
2163
+ * // ```
2164
+ * // - Install the npm module by running:
2165
+ * // ```sh
2166
+ * // $ npm install googleapis
2167
+ * // ```
2168
+ *
2169
+ * const {google} = require('googleapis');
2170
+ * const tpu = google.tpu('v2alpha1');
2171
+ *
2172
+ * async function main() {
2173
+ * const auth = new google.auth.GoogleAuth({
2174
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2175
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
2176
+ * });
2177
+ *
2178
+ * // Acquire an auth client, and bind it to all future calls
2179
+ * const authClient = await auth.getClient();
2180
+ * google.options({auth: authClient});
2181
+ *
2182
+ * // Do the magic
2183
+ * const res = await tpu.projects.locations.nodes.delete({
2184
+ * // Required. The resource name.
2185
+ * name: 'projects/my-project/locations/my-location/nodes/my-node',
2186
+ * // Idempotent request UUID.
2187
+ * requestId: 'placeholder-value',
2188
+ * });
2189
+ * console.log(res.data);
2190
+ *
2191
+ * // Example response
2192
+ * // {
2193
+ * // "done": false,
2194
+ * // "error": {},
2195
+ * // "metadata": {},
2196
+ * // "name": "my_name",
2197
+ * // "response": {}
2198
+ * // }
2199
+ * }
2200
+ *
2201
+ * main().catch(e => {
2202
+ * console.error(e);
2203
+ * throw e;
2204
+ * });
2205
+ *
2206
+ * ```
1792
2207
  *
1793
2208
  * @param params - Parameters for request
1794
2209
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1798,11 +2213,11 @@ export namespace tpu_v2alpha1 {
1798
2213
  delete(
1799
2214
  params: Params$Resource$Projects$Locations$Nodes$Delete,
1800
2215
  options: StreamMethodOptions
1801
- ): GaxiosPromise<Readable>;
2216
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
1802
2217
  delete(
1803
2218
  params?: Params$Resource$Projects$Locations$Nodes$Delete,
1804
2219
  options?: MethodOptions
1805
- ): GaxiosPromise<Schema$Operation>;
2220
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
1806
2221
  delete(
1807
2222
  params: Params$Resource$Projects$Locations$Nodes$Delete,
1808
2223
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -1831,7 +2246,10 @@ export namespace tpu_v2alpha1 {
1831
2246
  callback?:
1832
2247
  | BodyResponseCallback<Schema$Operation>
1833
2248
  | BodyResponseCallback<Readable>
1834
- ): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
2249
+ ):
2250
+ | void
2251
+ | Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
2252
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
1835
2253
  let params = (paramsOrCallback ||
1836
2254
  {}) as Params$Resource$Projects$Locations$Nodes$Delete;
1837
2255
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -1874,6 +2292,79 @@ export namespace tpu_v2alpha1 {
1874
2292
 
1875
2293
  /**
1876
2294
  * Gets the details of a node.
2295
+ * @example
2296
+ * ```js
2297
+ * // Before running the sample:
2298
+ * // - Enable the API at:
2299
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
2300
+ * // - Login into gcloud by running:
2301
+ * // ```sh
2302
+ * // $ gcloud auth application-default login
2303
+ * // ```
2304
+ * // - Install the npm module by running:
2305
+ * // ```sh
2306
+ * // $ npm install googleapis
2307
+ * // ```
2308
+ *
2309
+ * const {google} = require('googleapis');
2310
+ * const tpu = google.tpu('v2alpha1');
2311
+ *
2312
+ * async function main() {
2313
+ * const auth = new google.auth.GoogleAuth({
2314
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2315
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
2316
+ * });
2317
+ *
2318
+ * // Acquire an auth client, and bind it to all future calls
2319
+ * const authClient = await auth.getClient();
2320
+ * google.options({auth: authClient});
2321
+ *
2322
+ * // Do the magic
2323
+ * const res = await tpu.projects.locations.nodes.get({
2324
+ * // Required. The resource name.
2325
+ * name: 'projects/my-project/locations/my-location/nodes/my-node',
2326
+ * });
2327
+ * console.log(res.data);
2328
+ *
2329
+ * // Example response
2330
+ * // {
2331
+ * // "acceleratorConfig": {},
2332
+ * // "acceleratorType": "my_acceleratorType",
2333
+ * // "apiVersion": "my_apiVersion",
2334
+ * // "autocheckpointEnabled": false,
2335
+ * // "bootDiskConfig": {},
2336
+ * // "cidrBlock": "my_cidrBlock",
2337
+ * // "createTime": "my_createTime",
2338
+ * // "dataDisks": [],
2339
+ * // "description": "my_description",
2340
+ * // "health": "my_health",
2341
+ * // "healthDescription": "my_healthDescription",
2342
+ * // "id": "my_id",
2343
+ * // "labels": {},
2344
+ * // "metadata": {},
2345
+ * // "multisliceNode": false,
2346
+ * // "name": "my_name",
2347
+ * // "networkConfig": {},
2348
+ * // "networkConfigs": [],
2349
+ * // "networkEndpoints": [],
2350
+ * // "queuedResource": "my_queuedResource",
2351
+ * // "runtimeVersion": "my_runtimeVersion",
2352
+ * // "schedulingConfig": {},
2353
+ * // "serviceAccount": {},
2354
+ * // "shieldedInstanceConfig": {},
2355
+ * // "state": "my_state",
2356
+ * // "symptoms": [],
2357
+ * // "tags": [],
2358
+ * // "upcomingMaintenance": {}
2359
+ * // }
2360
+ * }
2361
+ *
2362
+ * main().catch(e => {
2363
+ * console.error(e);
2364
+ * throw e;
2365
+ * });
2366
+ *
2367
+ * ```
1877
2368
  *
1878
2369
  * @param params - Parameters for request
1879
2370
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1883,11 +2374,11 @@ export namespace tpu_v2alpha1 {
1883
2374
  get(
1884
2375
  params: Params$Resource$Projects$Locations$Nodes$Get,
1885
2376
  options: StreamMethodOptions
1886
- ): GaxiosPromise<Readable>;
2377
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
1887
2378
  get(
1888
2379
  params?: Params$Resource$Projects$Locations$Nodes$Get,
1889
2380
  options?: MethodOptions
1890
- ): GaxiosPromise<Schema$Node>;
2381
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Node>>;
1891
2382
  get(
1892
2383
  params: Params$Resource$Projects$Locations$Nodes$Get,
1893
2384
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -1916,7 +2407,10 @@ export namespace tpu_v2alpha1 {
1916
2407
  callback?:
1917
2408
  | BodyResponseCallback<Schema$Node>
1918
2409
  | BodyResponseCallback<Readable>
1919
- ): void | GaxiosPromise<Schema$Node> | GaxiosPromise<Readable> {
2410
+ ):
2411
+ | void
2412
+ | Promise<GaxiosResponseWithHTTP2<Schema$Node>>
2413
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
1920
2414
  let params = (paramsOrCallback ||
1921
2415
  {}) as Params$Resource$Projects$Locations$Nodes$Get;
1922
2416
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -1959,6 +2453,61 @@ export namespace tpu_v2alpha1 {
1959
2453
 
1960
2454
  /**
1961
2455
  * Retrieves the guest attributes for the node.
2456
+ * @example
2457
+ * ```js
2458
+ * // Before running the sample:
2459
+ * // - Enable the API at:
2460
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
2461
+ * // - Login into gcloud by running:
2462
+ * // ```sh
2463
+ * // $ gcloud auth application-default login
2464
+ * // ```
2465
+ * // - Install the npm module by running:
2466
+ * // ```sh
2467
+ * // $ npm install googleapis
2468
+ * // ```
2469
+ *
2470
+ * const {google} = require('googleapis');
2471
+ * const tpu = google.tpu('v2alpha1');
2472
+ *
2473
+ * async function main() {
2474
+ * const auth = new google.auth.GoogleAuth({
2475
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2476
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
2477
+ * });
2478
+ *
2479
+ * // Acquire an auth client, and bind it to all future calls
2480
+ * const authClient = await auth.getClient();
2481
+ * google.options({auth: authClient});
2482
+ *
2483
+ * // Do the magic
2484
+ * const res = await tpu.projects.locations.nodes.getGuestAttributes({
2485
+ * // Required. The resource name.
2486
+ * name: 'projects/my-project/locations/my-location/nodes/my-node',
2487
+ *
2488
+ * // Request body metadata
2489
+ * requestBody: {
2490
+ * // request body parameters
2491
+ * // {
2492
+ * // "queryPath": "my_queryPath",
2493
+ * // "workerIds": []
2494
+ * // }
2495
+ * },
2496
+ * });
2497
+ * console.log(res.data);
2498
+ *
2499
+ * // Example response
2500
+ * // {
2501
+ * // "guestAttributes": []
2502
+ * // }
2503
+ * }
2504
+ *
2505
+ * main().catch(e => {
2506
+ * console.error(e);
2507
+ * throw e;
2508
+ * });
2509
+ *
2510
+ * ```
1962
2511
  *
1963
2512
  * @param params - Parameters for request
1964
2513
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1968,11 +2517,11 @@ export namespace tpu_v2alpha1 {
1968
2517
  getGuestAttributes(
1969
2518
  params: Params$Resource$Projects$Locations$Nodes$Getguestattributes,
1970
2519
  options: StreamMethodOptions
1971
- ): GaxiosPromise<Readable>;
2520
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
1972
2521
  getGuestAttributes(
1973
2522
  params?: Params$Resource$Projects$Locations$Nodes$Getguestattributes,
1974
2523
  options?: MethodOptions
1975
- ): GaxiosPromise<Schema$GetGuestAttributesResponse>;
2524
+ ): Promise<GaxiosResponseWithHTTP2<Schema$GetGuestAttributesResponse>>;
1976
2525
  getGuestAttributes(
1977
2526
  params: Params$Resource$Projects$Locations$Nodes$Getguestattributes,
1978
2527
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -2007,8 +2556,8 @@ export namespace tpu_v2alpha1 {
2007
2556
  | BodyResponseCallback<Readable>
2008
2557
  ):
2009
2558
  | void
2010
- | GaxiosPromise<Schema$GetGuestAttributesResponse>
2011
- | GaxiosPromise<Readable> {
2559
+ | Promise<GaxiosResponseWithHTTP2<Schema$GetGuestAttributesResponse>>
2560
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
2012
2561
  let params = (paramsOrCallback ||
2013
2562
  {}) as Params$Resource$Projects$Locations$Nodes$Getguestattributes;
2014
2563
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -2055,6 +2604,58 @@ export namespace tpu_v2alpha1 {
2055
2604
 
2056
2605
  /**
2057
2606
  * Lists nodes.
2607
+ * @example
2608
+ * ```js
2609
+ * // Before running the sample:
2610
+ * // - Enable the API at:
2611
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
2612
+ * // - Login into gcloud by running:
2613
+ * // ```sh
2614
+ * // $ gcloud auth application-default login
2615
+ * // ```
2616
+ * // - Install the npm module by running:
2617
+ * // ```sh
2618
+ * // $ npm install googleapis
2619
+ * // ```
2620
+ *
2621
+ * const {google} = require('googleapis');
2622
+ * const tpu = google.tpu('v2alpha1');
2623
+ *
2624
+ * async function main() {
2625
+ * const auth = new google.auth.GoogleAuth({
2626
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2627
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
2628
+ * });
2629
+ *
2630
+ * // Acquire an auth client, and bind it to all future calls
2631
+ * const authClient = await auth.getClient();
2632
+ * google.options({auth: authClient});
2633
+ *
2634
+ * // Do the magic
2635
+ * const res = await tpu.projects.locations.nodes.list({
2636
+ * // The maximum number of items to return.
2637
+ * pageSize: 'placeholder-value',
2638
+ * // The next_page_token value returned from a previous List request, if any.
2639
+ * pageToken: 'placeholder-value',
2640
+ * // Required. The parent resource name.
2641
+ * parent: 'projects/my-project/locations/my-location',
2642
+ * });
2643
+ * console.log(res.data);
2644
+ *
2645
+ * // Example response
2646
+ * // {
2647
+ * // "nextPageToken": "my_nextPageToken",
2648
+ * // "nodes": [],
2649
+ * // "unreachable": []
2650
+ * // }
2651
+ * }
2652
+ *
2653
+ * main().catch(e => {
2654
+ * console.error(e);
2655
+ * throw e;
2656
+ * });
2657
+ *
2658
+ * ```
2058
2659
  *
2059
2660
  * @param params - Parameters for request
2060
2661
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2064,11 +2665,11 @@ export namespace tpu_v2alpha1 {
2064
2665
  list(
2065
2666
  params: Params$Resource$Projects$Locations$Nodes$List,
2066
2667
  options: StreamMethodOptions
2067
- ): GaxiosPromise<Readable>;
2668
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
2068
2669
  list(
2069
2670
  params?: Params$Resource$Projects$Locations$Nodes$List,
2070
2671
  options?: MethodOptions
2071
- ): GaxiosPromise<Schema$ListNodesResponse>;
2672
+ ): Promise<GaxiosResponseWithHTTP2<Schema$ListNodesResponse>>;
2072
2673
  list(
2073
2674
  params: Params$Resource$Projects$Locations$Nodes$List,
2074
2675
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -2099,8 +2700,8 @@ export namespace tpu_v2alpha1 {
2099
2700
  | BodyResponseCallback<Readable>
2100
2701
  ):
2101
2702
  | void
2102
- | GaxiosPromise<Schema$ListNodesResponse>
2103
- | GaxiosPromise<Readable> {
2703
+ | Promise<GaxiosResponseWithHTTP2<Schema$ListNodesResponse>>
2704
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
2104
2705
  let params = (paramsOrCallback ||
2105
2706
  {}) as Params$Resource$Projects$Locations$Nodes$List;
2106
2707
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -2146,6 +2747,93 @@ export namespace tpu_v2alpha1 {
2146
2747
 
2147
2748
  /**
2148
2749
  * Updates the configurations of a node.
2750
+ * @example
2751
+ * ```js
2752
+ * // Before running the sample:
2753
+ * // - Enable the API at:
2754
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
2755
+ * // - Login into gcloud by running:
2756
+ * // ```sh
2757
+ * // $ gcloud auth application-default login
2758
+ * // ```
2759
+ * // - Install the npm module by running:
2760
+ * // ```sh
2761
+ * // $ npm install googleapis
2762
+ * // ```
2763
+ *
2764
+ * const {google} = require('googleapis');
2765
+ * const tpu = google.tpu('v2alpha1');
2766
+ *
2767
+ * async function main() {
2768
+ * const auth = new google.auth.GoogleAuth({
2769
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2770
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
2771
+ * });
2772
+ *
2773
+ * // Acquire an auth client, and bind it to all future calls
2774
+ * const authClient = await auth.getClient();
2775
+ * google.options({auth: authClient});
2776
+ *
2777
+ * // Do the magic
2778
+ * const res = await tpu.projects.locations.nodes.patch({
2779
+ * // Output only. Immutable. The name of the TPU.
2780
+ * name: 'projects/my-project/locations/my-location/nodes/my-node',
2781
+ * // Required. Mask of fields from Node to update. Supported fields: [description, tags, labels, metadata, network_config.enable_external_ips].
2782
+ * updateMask: 'placeholder-value',
2783
+ *
2784
+ * // Request body metadata
2785
+ * requestBody: {
2786
+ * // request body parameters
2787
+ * // {
2788
+ * // "acceleratorConfig": {},
2789
+ * // "acceleratorType": "my_acceleratorType",
2790
+ * // "apiVersion": "my_apiVersion",
2791
+ * // "autocheckpointEnabled": false,
2792
+ * // "bootDiskConfig": {},
2793
+ * // "cidrBlock": "my_cidrBlock",
2794
+ * // "createTime": "my_createTime",
2795
+ * // "dataDisks": [],
2796
+ * // "description": "my_description",
2797
+ * // "health": "my_health",
2798
+ * // "healthDescription": "my_healthDescription",
2799
+ * // "id": "my_id",
2800
+ * // "labels": {},
2801
+ * // "metadata": {},
2802
+ * // "multisliceNode": false,
2803
+ * // "name": "my_name",
2804
+ * // "networkConfig": {},
2805
+ * // "networkConfigs": [],
2806
+ * // "networkEndpoints": [],
2807
+ * // "queuedResource": "my_queuedResource",
2808
+ * // "runtimeVersion": "my_runtimeVersion",
2809
+ * // "schedulingConfig": {},
2810
+ * // "serviceAccount": {},
2811
+ * // "shieldedInstanceConfig": {},
2812
+ * // "state": "my_state",
2813
+ * // "symptoms": [],
2814
+ * // "tags": [],
2815
+ * // "upcomingMaintenance": {}
2816
+ * // }
2817
+ * },
2818
+ * });
2819
+ * console.log(res.data);
2820
+ *
2821
+ * // Example response
2822
+ * // {
2823
+ * // "done": false,
2824
+ * // "error": {},
2825
+ * // "metadata": {},
2826
+ * // "name": "my_name",
2827
+ * // "response": {}
2828
+ * // }
2829
+ * }
2830
+ *
2831
+ * main().catch(e => {
2832
+ * console.error(e);
2833
+ * throw e;
2834
+ * });
2835
+ *
2836
+ * ```
2149
2837
  *
2150
2838
  * @param params - Parameters for request
2151
2839
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2155,11 +2843,11 @@ export namespace tpu_v2alpha1 {
2155
2843
  patch(
2156
2844
  params: Params$Resource$Projects$Locations$Nodes$Patch,
2157
2845
  options: StreamMethodOptions
2158
- ): GaxiosPromise<Readable>;
2846
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
2159
2847
  patch(
2160
2848
  params?: Params$Resource$Projects$Locations$Nodes$Patch,
2161
2849
  options?: MethodOptions
2162
- ): GaxiosPromise<Schema$Operation>;
2850
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
2163
2851
  patch(
2164
2852
  params: Params$Resource$Projects$Locations$Nodes$Patch,
2165
2853
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -2188,7 +2876,10 @@ export namespace tpu_v2alpha1 {
2188
2876
  callback?:
2189
2877
  | BodyResponseCallback<Schema$Operation>
2190
2878
  | BodyResponseCallback<Readable>
2191
- ): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
2879
+ ):
2880
+ | void
2881
+ | Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
2882
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
2192
2883
  let params = (paramsOrCallback ||
2193
2884
  {}) as Params$Resource$Projects$Locations$Nodes$Patch;
2194
2885
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -2231,6 +2922,62 @@ export namespace tpu_v2alpha1 {
2231
2922
 
2232
2923
  /**
2233
2924
  * Perform manual maintenance on a node.
2925
+ * @example
2926
+ * ```js
2927
+ * // Before running the sample:
2928
+ * // - Enable the API at:
2929
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
2930
+ * // - Login into gcloud by running:
2931
+ * // ```sh
2932
+ * // $ gcloud auth application-default login
2933
+ * // ```
2934
+ * // - Install the npm module by running:
2935
+ * // ```sh
2936
+ * // $ npm install googleapis
2937
+ * // ```
2938
+ *
2939
+ * const {google} = require('googleapis');
2940
+ * const tpu = google.tpu('v2alpha1');
2941
+ *
2942
+ * async function main() {
2943
+ * const auth = new google.auth.GoogleAuth({
2944
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2945
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
2946
+ * });
2947
+ *
2948
+ * // Acquire an auth client, and bind it to all future calls
2949
+ * const authClient = await auth.getClient();
2950
+ * google.options({auth: authClient});
2951
+ *
2952
+ * // Do the magic
2953
+ * const res = await tpu.projects.locations.nodes.performMaintenance({
2954
+ * // Required. The resource name.
2955
+ * name: 'projects/my-project/locations/my-location/nodes/my-node',
2956
+ *
2957
+ * // Request body metadata
2958
+ * requestBody: {
2959
+ * // request body parameters
2960
+ * // {}
2961
+ * },
2962
+ * });
2963
+ * console.log(res.data);
2964
+ *
2965
+ * // Example response
2966
+ * // {
2967
+ * // "done": false,
2968
+ * // "error": {},
2969
+ * // "metadata": {},
2970
+ * // "name": "my_name",
2971
+ * // "response": {}
2972
+ * // }
2973
+ * }
2974
+ *
2975
+ * main().catch(e => {
2976
+ * console.error(e);
2977
+ * throw e;
2978
+ * });
2979
+ *
2980
+ * ```
2234
2981
  *
2235
2982
  * @param params - Parameters for request
2236
2983
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2240,11 +2987,11 @@ export namespace tpu_v2alpha1 {
2240
2987
  performMaintenance(
2241
2988
  params: Params$Resource$Projects$Locations$Nodes$Performmaintenance,
2242
2989
  options: StreamMethodOptions
2243
- ): GaxiosPromise<Readable>;
2990
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
2244
2991
  performMaintenance(
2245
2992
  params?: Params$Resource$Projects$Locations$Nodes$Performmaintenance,
2246
2993
  options?: MethodOptions
2247
- ): GaxiosPromise<Schema$Operation>;
2994
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
2248
2995
  performMaintenance(
2249
2996
  params: Params$Resource$Projects$Locations$Nodes$Performmaintenance,
2250
2997
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -2273,7 +3020,10 @@ export namespace tpu_v2alpha1 {
2273
3020
  callback?:
2274
3021
  | BodyResponseCallback<Schema$Operation>
2275
3022
  | BodyResponseCallback<Readable>
2276
- ): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
3023
+ ):
3024
+ | void
3025
+ | Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
3026
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
2277
3027
  let params = (paramsOrCallback ||
2278
3028
  {}) as Params$Resource$Projects$Locations$Nodes$Performmaintenance;
2279
3029
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -2320,6 +3070,64 @@ export namespace tpu_v2alpha1 {
2320
3070
 
2321
3071
  /**
2322
3072
  * Simulates a maintenance event.
3073
+ * @example
3074
+ * ```js
3075
+ * // Before running the sample:
3076
+ * // - Enable the API at:
3077
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
3078
+ * // - Login into gcloud by running:
3079
+ * // ```sh
3080
+ * // $ gcloud auth application-default login
3081
+ * // ```
3082
+ * // - Install the npm module by running:
3083
+ * // ```sh
3084
+ * // $ npm install googleapis
3085
+ * // ```
3086
+ *
3087
+ * const {google} = require('googleapis');
3088
+ * const tpu = google.tpu('v2alpha1');
3089
+ *
3090
+ * async function main() {
3091
+ * const auth = new google.auth.GoogleAuth({
3092
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3093
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
3094
+ * });
3095
+ *
3096
+ * // Acquire an auth client, and bind it to all future calls
3097
+ * const authClient = await auth.getClient();
3098
+ * google.options({auth: authClient});
3099
+ *
3100
+ * // Do the magic
3101
+ * const res = await tpu.projects.locations.nodes.simulateMaintenanceEvent({
3102
+ * // Required. The resource name.
3103
+ * name: 'projects/my-project/locations/my-location/nodes/my-node',
3104
+ *
3105
+ * // Request body metadata
3106
+ * requestBody: {
3107
+ * // request body parameters
3108
+ * // {
3109
+ * // "workerIds": []
3110
+ * // }
3111
+ * },
3112
+ * });
3113
+ * console.log(res.data);
3114
+ *
3115
+ * // Example response
3116
+ * // {
3117
+ * // "done": false,
3118
+ * // "error": {},
3119
+ * // "metadata": {},
3120
+ * // "name": "my_name",
3121
+ * // "response": {}
3122
+ * // }
3123
+ * }
3124
+ *
3125
+ * main().catch(e => {
3126
+ * console.error(e);
3127
+ * throw e;
3128
+ * });
3129
+ *
3130
+ * ```
2323
3131
  *
2324
3132
  * @param params - Parameters for request
2325
3133
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2329,11 +3137,11 @@ export namespace tpu_v2alpha1 {
2329
3137
  simulateMaintenanceEvent(
2330
3138
  params: Params$Resource$Projects$Locations$Nodes$Simulatemaintenanceevent,
2331
3139
  options: StreamMethodOptions
2332
- ): GaxiosPromise<Readable>;
3140
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
2333
3141
  simulateMaintenanceEvent(
2334
3142
  params?: Params$Resource$Projects$Locations$Nodes$Simulatemaintenanceevent,
2335
3143
  options?: MethodOptions
2336
- ): GaxiosPromise<Schema$Operation>;
3144
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
2337
3145
  simulateMaintenanceEvent(
2338
3146
  params: Params$Resource$Projects$Locations$Nodes$Simulatemaintenanceevent,
2339
3147
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -2364,7 +3172,10 @@ export namespace tpu_v2alpha1 {
2364
3172
  callback?:
2365
3173
  | BodyResponseCallback<Schema$Operation>
2366
3174
  | BodyResponseCallback<Readable>
2367
- ): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
3175
+ ):
3176
+ | void
3177
+ | Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
3178
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
2368
3179
  let params = (paramsOrCallback ||
2369
3180
  {}) as Params$Resource$Projects$Locations$Nodes$Simulatemaintenanceevent;
2370
3181
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -2410,6 +3221,62 @@ export namespace tpu_v2alpha1 {
2410
3221
 
2411
3222
  /**
2412
3223
  * Starts a node.
3224
+ * @example
3225
+ * ```js
3226
+ * // Before running the sample:
3227
+ * // - Enable the API at:
3228
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
3229
+ * // - Login into gcloud by running:
3230
+ * // ```sh
3231
+ * // $ gcloud auth application-default login
3232
+ * // ```
3233
+ * // - Install the npm module by running:
3234
+ * // ```sh
3235
+ * // $ npm install googleapis
3236
+ * // ```
3237
+ *
3238
+ * const {google} = require('googleapis');
3239
+ * const tpu = google.tpu('v2alpha1');
3240
+ *
3241
+ * async function main() {
3242
+ * const auth = new google.auth.GoogleAuth({
3243
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3244
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
3245
+ * });
3246
+ *
3247
+ * // Acquire an auth client, and bind it to all future calls
3248
+ * const authClient = await auth.getClient();
3249
+ * google.options({auth: authClient});
3250
+ *
3251
+ * // Do the magic
3252
+ * const res = await tpu.projects.locations.nodes.start({
3253
+ * // Required. The resource name.
3254
+ * name: 'projects/my-project/locations/my-location/nodes/my-node',
3255
+ *
3256
+ * // Request body metadata
3257
+ * requestBody: {
3258
+ * // request body parameters
3259
+ * // {}
3260
+ * },
3261
+ * });
3262
+ * console.log(res.data);
3263
+ *
3264
+ * // Example response
3265
+ * // {
3266
+ * // "done": false,
3267
+ * // "error": {},
3268
+ * // "metadata": {},
3269
+ * // "name": "my_name",
3270
+ * // "response": {}
3271
+ * // }
3272
+ * }
3273
+ *
3274
+ * main().catch(e => {
3275
+ * console.error(e);
3276
+ * throw e;
3277
+ * });
3278
+ *
3279
+ * ```
2413
3280
  *
2414
3281
  * @param params - Parameters for request
2415
3282
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2419,11 +3286,11 @@ export namespace tpu_v2alpha1 {
2419
3286
  start(
2420
3287
  params: Params$Resource$Projects$Locations$Nodes$Start,
2421
3288
  options: StreamMethodOptions
2422
- ): GaxiosPromise<Readable>;
3289
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
2423
3290
  start(
2424
3291
  params?: Params$Resource$Projects$Locations$Nodes$Start,
2425
3292
  options?: MethodOptions
2426
- ): GaxiosPromise<Schema$Operation>;
3293
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
2427
3294
  start(
2428
3295
  params: Params$Resource$Projects$Locations$Nodes$Start,
2429
3296
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -2452,7 +3319,10 @@ export namespace tpu_v2alpha1 {
2452
3319
  callback?:
2453
3320
  | BodyResponseCallback<Schema$Operation>
2454
3321
  | BodyResponseCallback<Readable>
2455
- ): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
3322
+ ):
3323
+ | void
3324
+ | Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
3325
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
2456
3326
  let params = (paramsOrCallback ||
2457
3327
  {}) as Params$Resource$Projects$Locations$Nodes$Start;
2458
3328
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -2498,6 +3368,62 @@ export namespace tpu_v2alpha1 {
2498
3368
 
2499
3369
  /**
2500
3370
  * Stops a node. This operation is only available with single TPU nodes.
3371
+ * @example
3372
+ * ```js
3373
+ * // Before running the sample:
3374
+ * // - Enable the API at:
3375
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
3376
+ * // - Login into gcloud by running:
3377
+ * // ```sh
3378
+ * // $ gcloud auth application-default login
3379
+ * // ```
3380
+ * // - Install the npm module by running:
3381
+ * // ```sh
3382
+ * // $ npm install googleapis
3383
+ * // ```
3384
+ *
3385
+ * const {google} = require('googleapis');
3386
+ * const tpu = google.tpu('v2alpha1');
3387
+ *
3388
+ * async function main() {
3389
+ * const auth = new google.auth.GoogleAuth({
3390
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3391
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
3392
+ * });
3393
+ *
3394
+ * // Acquire an auth client, and bind it to all future calls
3395
+ * const authClient = await auth.getClient();
3396
+ * google.options({auth: authClient});
3397
+ *
3398
+ * // Do the magic
3399
+ * const res = await tpu.projects.locations.nodes.stop({
3400
+ * // Required. The resource name.
3401
+ * name: 'projects/my-project/locations/my-location/nodes/my-node',
3402
+ *
3403
+ * // Request body metadata
3404
+ * requestBody: {
3405
+ * // request body parameters
3406
+ * // {}
3407
+ * },
3408
+ * });
3409
+ * console.log(res.data);
3410
+ *
3411
+ * // Example response
3412
+ * // {
3413
+ * // "done": false,
3414
+ * // "error": {},
3415
+ * // "metadata": {},
3416
+ * // "name": "my_name",
3417
+ * // "response": {}
3418
+ * // }
3419
+ * }
3420
+ *
3421
+ * main().catch(e => {
3422
+ * console.error(e);
3423
+ * throw e;
3424
+ * });
3425
+ *
3426
+ * ```
2501
3427
  *
2502
3428
  * @param params - Parameters for request
2503
3429
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2507,11 +3433,11 @@ export namespace tpu_v2alpha1 {
2507
3433
  stop(
2508
3434
  params: Params$Resource$Projects$Locations$Nodes$Stop,
2509
3435
  options: StreamMethodOptions
2510
- ): GaxiosPromise<Readable>;
3436
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
2511
3437
  stop(
2512
3438
  params?: Params$Resource$Projects$Locations$Nodes$Stop,
2513
3439
  options?: MethodOptions
2514
- ): GaxiosPromise<Schema$Operation>;
3440
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
2515
3441
  stop(
2516
3442
  params: Params$Resource$Projects$Locations$Nodes$Stop,
2517
3443
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -2540,7 +3466,10 @@ export namespace tpu_v2alpha1 {
2540
3466
  callback?:
2541
3467
  | BodyResponseCallback<Schema$Operation>
2542
3468
  | BodyResponseCallback<Readable>
2543
- ): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
3469
+ ):
3470
+ | void
3471
+ | Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
3472
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
2544
3473
  let params = (paramsOrCallback ||
2545
3474
  {}) as Params$Resource$Projects$Locations$Nodes$Stop;
2546
3475
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -2723,6 +3652,50 @@ export namespace tpu_v2alpha1 {
2723
3652
 
2724
3653
  /**
2725
3654
  * Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.
3655
+ * @example
3656
+ * ```js
3657
+ * // Before running the sample:
3658
+ * // - Enable the API at:
3659
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
3660
+ * // - Login into gcloud by running:
3661
+ * // ```sh
3662
+ * // $ gcloud auth application-default login
3663
+ * // ```
3664
+ * // - Install the npm module by running:
3665
+ * // ```sh
3666
+ * // $ npm install googleapis
3667
+ * // ```
3668
+ *
3669
+ * const {google} = require('googleapis');
3670
+ * const tpu = google.tpu('v2alpha1');
3671
+ *
3672
+ * async function main() {
3673
+ * const auth = new google.auth.GoogleAuth({
3674
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3675
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
3676
+ * });
3677
+ *
3678
+ * // Acquire an auth client, and bind it to all future calls
3679
+ * const authClient = await auth.getClient();
3680
+ * google.options({auth: authClient});
3681
+ *
3682
+ * // Do the magic
3683
+ * const res = await tpu.projects.locations.operations.cancel({
3684
+ * // The name of the operation resource to be cancelled.
3685
+ * name: 'projects/my-project/locations/my-location/operations/my-operation',
3686
+ * });
3687
+ * console.log(res.data);
3688
+ *
3689
+ * // Example response
3690
+ * // {}
3691
+ * }
3692
+ *
3693
+ * main().catch(e => {
3694
+ * console.error(e);
3695
+ * throw e;
3696
+ * });
3697
+ *
3698
+ * ```
2726
3699
  *
2727
3700
  * @param params - Parameters for request
2728
3701
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2732,11 +3705,11 @@ export namespace tpu_v2alpha1 {
2732
3705
  cancel(
2733
3706
  params: Params$Resource$Projects$Locations$Operations$Cancel,
2734
3707
  options: StreamMethodOptions
2735
- ): GaxiosPromise<Readable>;
3708
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
2736
3709
  cancel(
2737
3710
  params?: Params$Resource$Projects$Locations$Operations$Cancel,
2738
3711
  options?: MethodOptions
2739
- ): GaxiosPromise<Schema$Empty>;
3712
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Empty>>;
2740
3713
  cancel(
2741
3714
  params: Params$Resource$Projects$Locations$Operations$Cancel,
2742
3715
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -2765,7 +3738,10 @@ export namespace tpu_v2alpha1 {
2765
3738
  callback?:
2766
3739
  | BodyResponseCallback<Schema$Empty>
2767
3740
  | BodyResponseCallback<Readable>
2768
- ): void | GaxiosPromise<Schema$Empty> | GaxiosPromise<Readable> {
3741
+ ):
3742
+ | void
3743
+ | Promise<GaxiosResponseWithHTTP2<Schema$Empty>>
3744
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
2769
3745
  let params = (paramsOrCallback ||
2770
3746
  {}) as Params$Resource$Projects$Locations$Operations$Cancel;
2771
3747
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -2811,6 +3787,50 @@ export namespace tpu_v2alpha1 {
2811
3787
 
2812
3788
  /**
2813
3789
  * Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
3790
+ * @example
3791
+ * ```js
3792
+ * // Before running the sample:
3793
+ * // - Enable the API at:
3794
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
3795
+ * // - Login into gcloud by running:
3796
+ * // ```sh
3797
+ * // $ gcloud auth application-default login
3798
+ * // ```
3799
+ * // - Install the npm module by running:
3800
+ * // ```sh
3801
+ * // $ npm install googleapis
3802
+ * // ```
3803
+ *
3804
+ * const {google} = require('googleapis');
3805
+ * const tpu = google.tpu('v2alpha1');
3806
+ *
3807
+ * async function main() {
3808
+ * const auth = new google.auth.GoogleAuth({
3809
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3810
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
3811
+ * });
3812
+ *
3813
+ * // Acquire an auth client, and bind it to all future calls
3814
+ * const authClient = await auth.getClient();
3815
+ * google.options({auth: authClient});
3816
+ *
3817
+ * // Do the magic
3818
+ * const res = await tpu.projects.locations.operations.delete({
3819
+ * // The name of the operation resource to be deleted.
3820
+ * name: 'projects/my-project/locations/my-location/operations/my-operation',
3821
+ * });
3822
+ * console.log(res.data);
3823
+ *
3824
+ * // Example response
3825
+ * // {}
3826
+ * }
3827
+ *
3828
+ * main().catch(e => {
3829
+ * console.error(e);
3830
+ * throw e;
3831
+ * });
3832
+ *
3833
+ * ```
2814
3834
  *
2815
3835
  * @param params - Parameters for request
2816
3836
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2820,11 +3840,11 @@ export namespace tpu_v2alpha1 {
2820
3840
  delete(
2821
3841
  params: Params$Resource$Projects$Locations$Operations$Delete,
2822
3842
  options: StreamMethodOptions
2823
- ): GaxiosPromise<Readable>;
3843
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
2824
3844
  delete(
2825
3845
  params?: Params$Resource$Projects$Locations$Operations$Delete,
2826
3846
  options?: MethodOptions
2827
- ): GaxiosPromise<Schema$Empty>;
3847
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Empty>>;
2828
3848
  delete(
2829
3849
  params: Params$Resource$Projects$Locations$Operations$Delete,
2830
3850
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -2853,7 +3873,10 @@ export namespace tpu_v2alpha1 {
2853
3873
  callback?:
2854
3874
  | BodyResponseCallback<Schema$Empty>
2855
3875
  | BodyResponseCallback<Readable>
2856
- ): void | GaxiosPromise<Schema$Empty> | GaxiosPromise<Readable> {
3876
+ ):
3877
+ | void
3878
+ | Promise<GaxiosResponseWithHTTP2<Schema$Empty>>
3879
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
2857
3880
  let params = (paramsOrCallback ||
2858
3881
  {}) as Params$Resource$Projects$Locations$Operations$Delete;
2859
3882
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -2896,6 +3919,56 @@ export namespace tpu_v2alpha1 {
2896
3919
 
2897
3920
  /**
2898
3921
  * Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
3922
+ * @example
3923
+ * ```js
3924
+ * // Before running the sample:
3925
+ * // - Enable the API at:
3926
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
3927
+ * // - Login into gcloud by running:
3928
+ * // ```sh
3929
+ * // $ gcloud auth application-default login
3930
+ * // ```
3931
+ * // - Install the npm module by running:
3932
+ * // ```sh
3933
+ * // $ npm install googleapis
3934
+ * // ```
3935
+ *
3936
+ * const {google} = require('googleapis');
3937
+ * const tpu = google.tpu('v2alpha1');
3938
+ *
3939
+ * async function main() {
3940
+ * const auth = new google.auth.GoogleAuth({
3941
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3942
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
3943
+ * });
3944
+ *
3945
+ * // Acquire an auth client, and bind it to all future calls
3946
+ * const authClient = await auth.getClient();
3947
+ * google.options({auth: authClient});
3948
+ *
3949
+ * // Do the magic
3950
+ * const res = await tpu.projects.locations.operations.get({
3951
+ * // The name of the operation resource.
3952
+ * name: 'projects/my-project/locations/my-location/operations/my-operation',
3953
+ * });
3954
+ * console.log(res.data);
3955
+ *
3956
+ * // Example response
3957
+ * // {
3958
+ * // "done": false,
3959
+ * // "error": {},
3960
+ * // "metadata": {},
3961
+ * // "name": "my_name",
3962
+ * // "response": {}
3963
+ * // }
3964
+ * }
3965
+ *
3966
+ * main().catch(e => {
3967
+ * console.error(e);
3968
+ * throw e;
3969
+ * });
3970
+ *
3971
+ * ```
2899
3972
  *
2900
3973
  * @param params - Parameters for request
2901
3974
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2905,11 +3978,11 @@ export namespace tpu_v2alpha1 {
2905
3978
  get(
2906
3979
  params: Params$Resource$Projects$Locations$Operations$Get,
2907
3980
  options: StreamMethodOptions
2908
- ): GaxiosPromise<Readable>;
3981
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
2909
3982
  get(
2910
3983
  params?: Params$Resource$Projects$Locations$Operations$Get,
2911
3984
  options?: MethodOptions
2912
- ): GaxiosPromise<Schema$Operation>;
3985
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
2913
3986
  get(
2914
3987
  params: Params$Resource$Projects$Locations$Operations$Get,
2915
3988
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -2938,7 +4011,10 @@ export namespace tpu_v2alpha1 {
2938
4011
  callback?:
2939
4012
  | BodyResponseCallback<Schema$Operation>
2940
4013
  | BodyResponseCallback<Readable>
2941
- ): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
4014
+ ):
4015
+ | void
4016
+ | Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
4017
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
2942
4018
  let params = (paramsOrCallback ||
2943
4019
  {}) as Params$Resource$Projects$Locations$Operations$Get;
2944
4020
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -2981,6 +4057,59 @@ export namespace tpu_v2alpha1 {
2981
4057
 
2982
4058
  /**
2983
4059
  * Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
4060
+ * @example
4061
+ * ```js
4062
+ * // Before running the sample:
4063
+ * // - Enable the API at:
4064
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
4065
+ * // - Login into gcloud by running:
4066
+ * // ```sh
4067
+ * // $ gcloud auth application-default login
4068
+ * // ```
4069
+ * // - Install the npm module by running:
4070
+ * // ```sh
4071
+ * // $ npm install googleapis
4072
+ * // ```
4073
+ *
4074
+ * const {google} = require('googleapis');
4075
+ * const tpu = google.tpu('v2alpha1');
4076
+ *
4077
+ * async function main() {
4078
+ * const auth = new google.auth.GoogleAuth({
4079
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
4080
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
4081
+ * });
4082
+ *
4083
+ * // Acquire an auth client, and bind it to all future calls
4084
+ * const authClient = await auth.getClient();
4085
+ * google.options({auth: authClient});
4086
+ *
4087
+ * // Do the magic
4088
+ * const res = await tpu.projects.locations.operations.list({
4089
+ * // The standard list filter.
4090
+ * filter: 'placeholder-value',
4091
+ * // The name of the operation's parent resource.
4092
+ * name: 'projects/my-project/locations/my-location',
4093
+ * // The standard list page size.
4094
+ * pageSize: 'placeholder-value',
4095
+ * // The standard list page token.
4096
+ * pageToken: 'placeholder-value',
4097
+ * });
4098
+ * console.log(res.data);
4099
+ *
4100
+ * // Example response
4101
+ * // {
4102
+ * // "nextPageToken": "my_nextPageToken",
4103
+ * // "operations": []
4104
+ * // }
4105
+ * }
4106
+ *
4107
+ * main().catch(e => {
4108
+ * console.error(e);
4109
+ * throw e;
4110
+ * });
4111
+ *
4112
+ * ```
2984
4113
  *
2985
4114
  * @param params - Parameters for request
2986
4115
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2990,11 +4119,11 @@ export namespace tpu_v2alpha1 {
2990
4119
  list(
2991
4120
  params: Params$Resource$Projects$Locations$Operations$List,
2992
4121
  options: StreamMethodOptions
2993
- ): GaxiosPromise<Readable>;
4122
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
2994
4123
  list(
2995
4124
  params?: Params$Resource$Projects$Locations$Operations$List,
2996
4125
  options?: MethodOptions
2997
- ): GaxiosPromise<Schema$ListOperationsResponse>;
4126
+ ): Promise<GaxiosResponseWithHTTP2<Schema$ListOperationsResponse>>;
2998
4127
  list(
2999
4128
  params: Params$Resource$Projects$Locations$Operations$List,
3000
4129
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -3027,8 +4156,8 @@ export namespace tpu_v2alpha1 {
3027
4156
  | BodyResponseCallback<Readable>
3028
4157
  ):
3029
4158
  | void
3030
- | GaxiosPromise<Schema$ListOperationsResponse>
3031
- | GaxiosPromise<Readable> {
4159
+ | Promise<GaxiosResponseWithHTTP2<Schema$ListOperationsResponse>>
4160
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
3032
4161
  let params = (paramsOrCallback ||
3033
4162
  {}) as Params$Resource$Projects$Locations$Operations$List;
3034
4163
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -3122,6 +4251,78 @@ export namespace tpu_v2alpha1 {
3122
4251
 
3123
4252
  /**
3124
4253
  * Creates a QueuedResource TPU instance.
4254
+ * @example
4255
+ * ```js
4256
+ * // Before running the sample:
4257
+ * // - Enable the API at:
4258
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
4259
+ * // - Login into gcloud by running:
4260
+ * // ```sh
4261
+ * // $ gcloud auth application-default login
4262
+ * // ```
4263
+ * // - Install the npm module by running:
4264
+ * // ```sh
4265
+ * // $ npm install googleapis
4266
+ * // ```
4267
+ *
4268
+ * const {google} = require('googleapis');
4269
+ * const tpu = google.tpu('v2alpha1');
4270
+ *
4271
+ * async function main() {
4272
+ * const auth = new google.auth.GoogleAuth({
4273
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
4274
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
4275
+ * });
4276
+ *
4277
+ * // Acquire an auth client, and bind it to all future calls
4278
+ * const authClient = await auth.getClient();
4279
+ * google.options({auth: authClient});
4280
+ *
4281
+ * // Do the magic
4282
+ * const res = await tpu.projects.locations.queuedResources.create({
4283
+ * // Required. The parent resource name.
4284
+ * parent: 'projects/my-project/locations/my-location',
4285
+ * // The unqualified resource name. Should follow the `^[A-Za-z0-9_.~+%-]+$` regex format.
4286
+ * queuedResourceId: 'placeholder-value',
4287
+ * // Idempotent request UUID.
4288
+ * requestId: 'placeholder-value',
4289
+ *
4290
+ * // Request body metadata
4291
+ * requestBody: {
4292
+ * // request body parameters
4293
+ * // {
4294
+ * // "bestEffort": {},
4295
+ * // "createTime": "my_createTime",
4296
+ * // "guaranteed": {},
4297
+ * // "name": "my_name",
4298
+ * // "provisioningModel": "my_provisioningModel",
4299
+ * // "queueingPolicy": {},
4300
+ * // "reservationName": "my_reservationName",
4301
+ * // "runDuration": {},
4302
+ * // "spot": {},
4303
+ * // "state": {},
4304
+ * // "tpu": {}
4305
+ * // }
4306
+ * },
4307
+ * });
4308
+ * console.log(res.data);
4309
+ *
4310
+ * // Example response
4311
+ * // {
4312
+ * // "done": false,
4313
+ * // "error": {},
4314
+ * // "metadata": {},
4315
+ * // "name": "my_name",
4316
+ * // "response": {}
4317
+ * // }
4318
+ * }
4319
+ *
4320
+ * main().catch(e => {
4321
+ * console.error(e);
4322
+ * throw e;
4323
+ * });
4324
+ *
4325
+ * ```
3125
4326
  *
3126
4327
  * @param params - Parameters for request
3127
4328
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -3131,11 +4332,11 @@ export namespace tpu_v2alpha1 {
3131
4332
  create(
3132
4333
  params: Params$Resource$Projects$Locations$Queuedresources$Create,
3133
4334
  options: StreamMethodOptions
3134
- ): GaxiosPromise<Readable>;
4335
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
3135
4336
  create(
3136
4337
  params?: Params$Resource$Projects$Locations$Queuedresources$Create,
3137
4338
  options?: MethodOptions
3138
- ): GaxiosPromise<Schema$Operation>;
4339
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
3139
4340
  create(
3140
4341
  params: Params$Resource$Projects$Locations$Queuedresources$Create,
3141
4342
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -3164,7 +4365,10 @@ export namespace tpu_v2alpha1 {
3164
4365
  callback?:
3165
4366
  | BodyResponseCallback<Schema$Operation>
3166
4367
  | BodyResponseCallback<Readable>
3167
- ): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
4368
+ ):
4369
+ | void
4370
+ | Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
4371
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
3168
4372
  let params = (paramsOrCallback ||
3169
4373
  {}) as Params$Resource$Projects$Locations$Queuedresources$Create;
3170
4374
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -3211,6 +4415,60 @@ export namespace tpu_v2alpha1 {
3211
4415
 
3212
4416
  /**
3213
4417
  * Deletes a QueuedResource TPU instance.
4418
+ * @example
4419
+ * ```js
4420
+ * // Before running the sample:
4421
+ * // - Enable the API at:
4422
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
4423
+ * // - Login into gcloud by running:
4424
+ * // ```sh
4425
+ * // $ gcloud auth application-default login
4426
+ * // ```
4427
+ * // - Install the npm module by running:
4428
+ * // ```sh
4429
+ * // $ npm install googleapis
4430
+ * // ```
4431
+ *
4432
+ * const {google} = require('googleapis');
4433
+ * const tpu = google.tpu('v2alpha1');
4434
+ *
4435
+ * async function main() {
4436
+ * const auth = new google.auth.GoogleAuth({
4437
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
4438
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
4439
+ * });
4440
+ *
4441
+ * // Acquire an auth client, and bind it to all future calls
4442
+ * const authClient = await auth.getClient();
4443
+ * google.options({auth: authClient});
4444
+ *
4445
+ * // Do the magic
4446
+ * const res = await tpu.projects.locations.queuedResources.delete({
4447
+ * // If set to true, all running nodes belonging to this queued resource will be deleted first and then the queued resource will be deleted. Otherwise (i.e. force=false), the queued resource will only be deleted if its nodes have already been deleted or the queued resource is in the ACCEPTED, FAILED, or SUSPENDED state.
4448
+ * force: 'placeholder-value',
4449
+ * // Required. The resource name.
4450
+ * name: 'projects/my-project/locations/my-location/queuedResources/my-queuedResource',
4451
+ * // Idempotent request UUID.
4452
+ * requestId: 'placeholder-value',
4453
+ * });
4454
+ * console.log(res.data);
4455
+ *
4456
+ * // Example response
4457
+ * // {
4458
+ * // "done": false,
4459
+ * // "error": {},
4460
+ * // "metadata": {},
4461
+ * // "name": "my_name",
4462
+ * // "response": {}
4463
+ * // }
4464
+ * }
4465
+ *
4466
+ * main().catch(e => {
4467
+ * console.error(e);
4468
+ * throw e;
4469
+ * });
4470
+ *
4471
+ * ```
3214
4472
  *
3215
4473
  * @param params - Parameters for request
3216
4474
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -3220,11 +4478,11 @@ export namespace tpu_v2alpha1 {
3220
4478
  delete(
3221
4479
  params: Params$Resource$Projects$Locations$Queuedresources$Delete,
3222
4480
  options: StreamMethodOptions
3223
- ): GaxiosPromise<Readable>;
4481
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
3224
4482
  delete(
3225
4483
  params?: Params$Resource$Projects$Locations$Queuedresources$Delete,
3226
4484
  options?: MethodOptions
3227
- ): GaxiosPromise<Schema$Operation>;
4485
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
3228
4486
  delete(
3229
4487
  params: Params$Resource$Projects$Locations$Queuedresources$Delete,
3230
4488
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -3253,7 +4511,10 @@ export namespace tpu_v2alpha1 {
3253
4511
  callback?:
3254
4512
  | BodyResponseCallback<Schema$Operation>
3255
4513
  | BodyResponseCallback<Readable>
3256
- ): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
4514
+ ):
4515
+ | void
4516
+ | Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
4517
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
3257
4518
  let params = (paramsOrCallback ||
3258
4519
  {}) as Params$Resource$Projects$Locations$Queuedresources$Delete;
3259
4520
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -3297,6 +4558,62 @@ export namespace tpu_v2alpha1 {
3297
4558
 
3298
4559
  /**
3299
4560
  * Gets details of a queued resource.
4561
+ * @example
4562
+ * ```js
4563
+ * // Before running the sample:
4564
+ * // - Enable the API at:
4565
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
4566
+ * // - Login into gcloud by running:
4567
+ * // ```sh
4568
+ * // $ gcloud auth application-default login
4569
+ * // ```
4570
+ * // - Install the npm module by running:
4571
+ * // ```sh
4572
+ * // $ npm install googleapis
4573
+ * // ```
4574
+ *
4575
+ * const {google} = require('googleapis');
4576
+ * const tpu = google.tpu('v2alpha1');
4577
+ *
4578
+ * async function main() {
4579
+ * const auth = new google.auth.GoogleAuth({
4580
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
4581
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
4582
+ * });
4583
+ *
4584
+ * // Acquire an auth client, and bind it to all future calls
4585
+ * const authClient = await auth.getClient();
4586
+ * google.options({auth: authClient});
4587
+ *
4588
+ * // Do the magic
4589
+ * const res = await tpu.projects.locations.queuedResources.get({
4590
+ * // Required. The resource name.
4591
+ * name: 'projects/my-project/locations/my-location/queuedResources/my-queuedResource',
4592
+ * });
4593
+ * console.log(res.data);
4594
+ *
4595
+ * // Example response
4596
+ * // {
4597
+ * // "bestEffort": {},
4598
+ * // "createTime": "my_createTime",
4599
+ * // "guaranteed": {},
4600
+ * // "name": "my_name",
4601
+ * // "provisioningModel": "my_provisioningModel",
4602
+ * // "queueingPolicy": {},
4603
+ * // "reservationName": "my_reservationName",
4604
+ * // "runDuration": {},
4605
+ * // "spot": {},
4606
+ * // "state": {},
4607
+ * // "tpu": {}
4608
+ * // }
4609
+ * }
4610
+ *
4611
+ * main().catch(e => {
4612
+ * console.error(e);
4613
+ * throw e;
4614
+ * });
4615
+ *
4616
+ * ```
3300
4617
  *
3301
4618
  * @param params - Parameters for request
3302
4619
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -3306,11 +4623,11 @@ export namespace tpu_v2alpha1 {
3306
4623
  get(
3307
4624
  params: Params$Resource$Projects$Locations$Queuedresources$Get,
3308
4625
  options: StreamMethodOptions
3309
- ): GaxiosPromise<Readable>;
4626
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
3310
4627
  get(
3311
4628
  params?: Params$Resource$Projects$Locations$Queuedresources$Get,
3312
4629
  options?: MethodOptions
3313
- ): GaxiosPromise<Schema$QueuedResource>;
4630
+ ): Promise<GaxiosResponseWithHTTP2<Schema$QueuedResource>>;
3314
4631
  get(
3315
4632
  params: Params$Resource$Projects$Locations$Queuedresources$Get,
3316
4633
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -3339,7 +4656,10 @@ export namespace tpu_v2alpha1 {
3339
4656
  callback?:
3340
4657
  | BodyResponseCallback<Schema$QueuedResource>
3341
4658
  | BodyResponseCallback<Readable>
3342
- ): void | GaxiosPromise<Schema$QueuedResource> | GaxiosPromise<Readable> {
4659
+ ):
4660
+ | void
4661
+ | Promise<GaxiosResponseWithHTTP2<Schema$QueuedResource>>
4662
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
3343
4663
  let params = (paramsOrCallback ||
3344
4664
  {}) as Params$Resource$Projects$Locations$Queuedresources$Get;
3345
4665
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -3382,6 +4702,58 @@ export namespace tpu_v2alpha1 {
3382
4702
 
3383
4703
  /**
3384
4704
  * Lists queued resources.
4705
+ * @example
4706
+ * ```js
4707
+ * // Before running the sample:
4708
+ * // - Enable the API at:
4709
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
4710
+ * // - Login into gcloud by running:
4711
+ * // ```sh
4712
+ * // $ gcloud auth application-default login
4713
+ * // ```
4714
+ * // - Install the npm module by running:
4715
+ * // ```sh
4716
+ * // $ npm install googleapis
4717
+ * // ```
4718
+ *
4719
+ * const {google} = require('googleapis');
4720
+ * const tpu = google.tpu('v2alpha1');
4721
+ *
4722
+ * async function main() {
4723
+ * const auth = new google.auth.GoogleAuth({
4724
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
4725
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
4726
+ * });
4727
+ *
4728
+ * // Acquire an auth client, and bind it to all future calls
4729
+ * const authClient = await auth.getClient();
4730
+ * google.options({auth: authClient});
4731
+ *
4732
+ * // Do the magic
4733
+ * const res = await tpu.projects.locations.queuedResources.list({
4734
+ * // The maximum number of items to return.
4735
+ * pageSize: 'placeholder-value',
4736
+ * // The next_page_token value returned from a previous List request, if any.
4737
+ * pageToken: 'placeholder-value',
4738
+ * // Required. The parent resource name.
4739
+ * parent: 'projects/my-project/locations/my-location',
4740
+ * });
4741
+ * console.log(res.data);
4742
+ *
4743
+ * // Example response
4744
+ * // {
4745
+ * // "nextPageToken": "my_nextPageToken",
4746
+ * // "queuedResources": [],
4747
+ * // "unreachable": []
4748
+ * // }
4749
+ * }
4750
+ *
4751
+ * main().catch(e => {
4752
+ * console.error(e);
4753
+ * throw e;
4754
+ * });
4755
+ *
4756
+ * ```
3385
4757
  *
3386
4758
  * @param params - Parameters for request
3387
4759
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -3391,11 +4763,11 @@ export namespace tpu_v2alpha1 {
3391
4763
  list(
3392
4764
  params: Params$Resource$Projects$Locations$Queuedresources$List,
3393
4765
  options: StreamMethodOptions
3394
- ): GaxiosPromise<Readable>;
4766
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
3395
4767
  list(
3396
4768
  params?: Params$Resource$Projects$Locations$Queuedresources$List,
3397
4769
  options?: MethodOptions
3398
- ): GaxiosPromise<Schema$ListQueuedResourcesResponse>;
4770
+ ): Promise<GaxiosResponseWithHTTP2<Schema$ListQueuedResourcesResponse>>;
3399
4771
  list(
3400
4772
  params: Params$Resource$Projects$Locations$Queuedresources$List,
3401
4773
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -3430,8 +4802,8 @@ export namespace tpu_v2alpha1 {
3430
4802
  | BodyResponseCallback<Readable>
3431
4803
  ):
3432
4804
  | void
3433
- | GaxiosPromise<Schema$ListQueuedResourcesResponse>
3434
- | GaxiosPromise<Readable> {
4805
+ | Promise<GaxiosResponseWithHTTP2<Schema$ListQueuedResourcesResponse>>
4806
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
3435
4807
  let params = (paramsOrCallback ||
3436
4808
  {}) as Params$Resource$Projects$Locations$Queuedresources$List;
3437
4809
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -3477,6 +4849,67 @@ export namespace tpu_v2alpha1 {
3477
4849
 
3478
4850
  /**
3479
4851
  * Perform manual maintenance on specific nodes of a QueuedResource.
4852
+ * @example
4853
+ * ```js
4854
+ * // Before running the sample:
4855
+ * // - Enable the API at:
4856
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
4857
+ * // - Login into gcloud by running:
4858
+ * // ```sh
4859
+ * // $ gcloud auth application-default login
4860
+ * // ```
4861
+ * // - Install the npm module by running:
4862
+ * // ```sh
4863
+ * // $ npm install googleapis
4864
+ * // ```
4865
+ *
4866
+ * const {google} = require('googleapis');
4867
+ * const tpu = google.tpu('v2alpha1');
4868
+ *
4869
+ * async function main() {
4870
+ * const auth = new google.auth.GoogleAuth({
4871
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
4872
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
4873
+ * });
4874
+ *
4875
+ * // Acquire an auth client, and bind it to all future calls
4876
+ * const authClient = await auth.getClient();
4877
+ * google.options({auth: authClient});
4878
+ *
4879
+ * // Do the magic
4880
+ * const res =
4881
+ * await tpu.projects.locations.queuedResources.performMaintenanceQueuedResource(
4882
+ * {
4883
+ * // Required. The name of the QueuedResource which holds the nodes to perform maintenance on.
4884
+ * name: 'projects/my-project/locations/my-location/queuedResources/my-queuedResource',
4885
+ *
4886
+ * // Request body metadata
4887
+ * requestBody: {
4888
+ * // request body parameters
4889
+ * // {
4890
+ * // "nodeNames": []
4891
+ * // }
4892
+ * },
4893
+ * },
4894
+ * );
4895
+ * console.log(res.data);
4896
+ *
4897
+ * // Example response
4898
+ * // {
4899
+ * // "done": false,
4900
+ * // "error": {},
4901
+ * // "metadata": {},
4902
+ * // "name": "my_name",
4903
+ * // "response": {}
4904
+ * // }
4905
+ * }
4906
+ *
4907
+ * main().catch(e => {
4908
+ * console.error(e);
4909
+ * throw e;
4910
+ * });
4911
+ *
4912
+ * ```
3480
4913
  *
3481
4914
  * @param params - Parameters for request
3482
4915
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -3486,11 +4919,11 @@ export namespace tpu_v2alpha1 {
3486
4919
  performMaintenanceQueuedResource(
3487
4920
  params: Params$Resource$Projects$Locations$Queuedresources$Performmaintenancequeuedresource,
3488
4921
  options: StreamMethodOptions
3489
- ): GaxiosPromise<Readable>;
4922
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
3490
4923
  performMaintenanceQueuedResource(
3491
4924
  params?: Params$Resource$Projects$Locations$Queuedresources$Performmaintenancequeuedresource,
3492
4925
  options?: MethodOptions
3493
- ): GaxiosPromise<Schema$Operation>;
4926
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
3494
4927
  performMaintenanceQueuedResource(
3495
4928
  params: Params$Resource$Projects$Locations$Queuedresources$Performmaintenancequeuedresource,
3496
4929
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -3521,7 +4954,10 @@ export namespace tpu_v2alpha1 {
3521
4954
  callback?:
3522
4955
  | BodyResponseCallback<Schema$Operation>
3523
4956
  | BodyResponseCallback<Readable>
3524
- ): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
4957
+ ):
4958
+ | void
4959
+ | Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
4960
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
3525
4961
  let params = (paramsOrCallback ||
3526
4962
  {}) as Params$Resource$Projects$Locations$Queuedresources$Performmaintenancequeuedresource;
3527
4963
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -3567,6 +5003,62 @@ export namespace tpu_v2alpha1 {
3567
5003
 
3568
5004
  /**
3569
5005
  * Resets a QueuedResource TPU instance
5006
+ * @example
5007
+ * ```js
5008
+ * // Before running the sample:
5009
+ * // - Enable the API at:
5010
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
5011
+ * // - Login into gcloud by running:
5012
+ * // ```sh
5013
+ * // $ gcloud auth application-default login
5014
+ * // ```
5015
+ * // - Install the npm module by running:
5016
+ * // ```sh
5017
+ * // $ npm install googleapis
5018
+ * // ```
5019
+ *
5020
+ * const {google} = require('googleapis');
5021
+ * const tpu = google.tpu('v2alpha1');
5022
+ *
5023
+ * async function main() {
5024
+ * const auth = new google.auth.GoogleAuth({
5025
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
5026
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
5027
+ * });
5028
+ *
5029
+ * // Acquire an auth client, and bind it to all future calls
5030
+ * const authClient = await auth.getClient();
5031
+ * google.options({auth: authClient});
5032
+ *
5033
+ * // Do the magic
5034
+ * const res = await tpu.projects.locations.queuedResources.reset({
5035
+ * // Required. The name of the queued resource.
5036
+ * name: 'projects/my-project/locations/my-location/queuedResources/my-queuedResource',
5037
+ *
5038
+ * // Request body metadata
5039
+ * requestBody: {
5040
+ * // request body parameters
5041
+ * // {}
5042
+ * },
5043
+ * });
5044
+ * console.log(res.data);
5045
+ *
5046
+ * // Example response
5047
+ * // {
5048
+ * // "done": false,
5049
+ * // "error": {},
5050
+ * // "metadata": {},
5051
+ * // "name": "my_name",
5052
+ * // "response": {}
5053
+ * // }
5054
+ * }
5055
+ *
5056
+ * main().catch(e => {
5057
+ * console.error(e);
5058
+ * throw e;
5059
+ * });
5060
+ *
5061
+ * ```
3570
5062
  *
3571
5063
  * @param params - Parameters for request
3572
5064
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -3576,11 +5068,11 @@ export namespace tpu_v2alpha1 {
3576
5068
  reset(
3577
5069
  params: Params$Resource$Projects$Locations$Queuedresources$Reset,
3578
5070
  options: StreamMethodOptions
3579
- ): GaxiosPromise<Readable>;
5071
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
3580
5072
  reset(
3581
5073
  params?: Params$Resource$Projects$Locations$Queuedresources$Reset,
3582
5074
  options?: MethodOptions
3583
- ): GaxiosPromise<Schema$Operation>;
5075
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
3584
5076
  reset(
3585
5077
  params: Params$Resource$Projects$Locations$Queuedresources$Reset,
3586
5078
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -3609,7 +5101,10 @@ export namespace tpu_v2alpha1 {
3609
5101
  callback?:
3610
5102
  | BodyResponseCallback<Schema$Operation>
3611
5103
  | BodyResponseCallback<Readable>
3612
- ): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
5104
+ ):
5105
+ | void
5106
+ | Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
5107
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
3613
5108
  let params = (paramsOrCallback ||
3614
5109
  {}) as Params$Resource$Projects$Locations$Queuedresources$Reset;
3615
5110
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -3744,6 +5239,57 @@ export namespace tpu_v2alpha1 {
3744
5239
 
3745
5240
  /**
3746
5241
  * Retrieves the reservations for the given project in the given location.
5242
+ * @example
5243
+ * ```js
5244
+ * // Before running the sample:
5245
+ * // - Enable the API at:
5246
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
5247
+ * // - Login into gcloud by running:
5248
+ * // ```sh
5249
+ * // $ gcloud auth application-default login
5250
+ * // ```
5251
+ * // - Install the npm module by running:
5252
+ * // ```sh
5253
+ * // $ npm install googleapis
5254
+ * // ```
5255
+ *
5256
+ * const {google} = require('googleapis');
5257
+ * const tpu = google.tpu('v2alpha1');
5258
+ *
5259
+ * async function main() {
5260
+ * const auth = new google.auth.GoogleAuth({
5261
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
5262
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
5263
+ * });
5264
+ *
5265
+ * // Acquire an auth client, and bind it to all future calls
5266
+ * const authClient = await auth.getClient();
5267
+ * google.options({auth: authClient});
5268
+ *
5269
+ * // Do the magic
5270
+ * const res = await tpu.projects.locations.reservations.list({
5271
+ * // The maximum number of items to return. Defaults to 0 if not specified, which means no limit.
5272
+ * pageSize: 'placeholder-value',
5273
+ * // The next_page_token value returned from a previous List request, if any.
5274
+ * pageToken: 'placeholder-value',
5275
+ * // Required. The parent for reservations.
5276
+ * parent: 'projects/my-project/locations/my-location',
5277
+ * });
5278
+ * console.log(res.data);
5279
+ *
5280
+ * // Example response
5281
+ * // {
5282
+ * // "nextPageToken": "my_nextPageToken",
5283
+ * // "reservations": []
5284
+ * // }
5285
+ * }
5286
+ *
5287
+ * main().catch(e => {
5288
+ * console.error(e);
5289
+ * throw e;
5290
+ * });
5291
+ *
5292
+ * ```
3747
5293
  *
3748
5294
  * @param params - Parameters for request
3749
5295
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -3753,11 +5299,11 @@ export namespace tpu_v2alpha1 {
3753
5299
  list(
3754
5300
  params: Params$Resource$Projects$Locations$Reservations$List,
3755
5301
  options: StreamMethodOptions
3756
- ): GaxiosPromise<Readable>;
5302
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
3757
5303
  list(
3758
5304
  params?: Params$Resource$Projects$Locations$Reservations$List,
3759
5305
  options?: MethodOptions
3760
- ): GaxiosPromise<Schema$ListReservationsResponse>;
5306
+ ): Promise<GaxiosResponseWithHTTP2<Schema$ListReservationsResponse>>;
3761
5307
  list(
3762
5308
  params: Params$Resource$Projects$Locations$Reservations$List,
3763
5309
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -3790,8 +5336,8 @@ export namespace tpu_v2alpha1 {
3790
5336
  | BodyResponseCallback<Readable>
3791
5337
  ):
3792
5338
  | void
3793
- | GaxiosPromise<Schema$ListReservationsResponse>
3794
- | GaxiosPromise<Readable> {
5339
+ | Promise<GaxiosResponseWithHTTP2<Schema$ListReservationsResponse>>
5340
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
3795
5341
  let params = (paramsOrCallback ||
3796
5342
  {}) as Params$Resource$Projects$Locations$Reservations$List;
3797
5343
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -3860,6 +5406,53 @@ export namespace tpu_v2alpha1 {
3860
5406
 
3861
5407
  /**
3862
5408
  * Gets a runtime version.
5409
+ * @example
5410
+ * ```js
5411
+ * // Before running the sample:
5412
+ * // - Enable the API at:
5413
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
5414
+ * // - Login into gcloud by running:
5415
+ * // ```sh
5416
+ * // $ gcloud auth application-default login
5417
+ * // ```
5418
+ * // - Install the npm module by running:
5419
+ * // ```sh
5420
+ * // $ npm install googleapis
5421
+ * // ```
5422
+ *
5423
+ * const {google} = require('googleapis');
5424
+ * const tpu = google.tpu('v2alpha1');
5425
+ *
5426
+ * async function main() {
5427
+ * const auth = new google.auth.GoogleAuth({
5428
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
5429
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
5430
+ * });
5431
+ *
5432
+ * // Acquire an auth client, and bind it to all future calls
5433
+ * const authClient = await auth.getClient();
5434
+ * google.options({auth: authClient});
5435
+ *
5436
+ * // Do the magic
5437
+ * const res = await tpu.projects.locations.runtimeVersions.get({
5438
+ * // Required. The resource name.
5439
+ * name: 'projects/my-project/locations/my-location/runtimeVersions/my-runtimeVersion',
5440
+ * });
5441
+ * console.log(res.data);
5442
+ *
5443
+ * // Example response
5444
+ * // {
5445
+ * // "name": "my_name",
5446
+ * // "version": "my_version"
5447
+ * // }
5448
+ * }
5449
+ *
5450
+ * main().catch(e => {
5451
+ * console.error(e);
5452
+ * throw e;
5453
+ * });
5454
+ *
5455
+ * ```
3863
5456
  *
3864
5457
  * @param params - Parameters for request
3865
5458
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -3869,11 +5462,11 @@ export namespace tpu_v2alpha1 {
3869
5462
  get(
3870
5463
  params: Params$Resource$Projects$Locations$Runtimeversions$Get,
3871
5464
  options: StreamMethodOptions
3872
- ): GaxiosPromise<Readable>;
5465
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
3873
5466
  get(
3874
5467
  params?: Params$Resource$Projects$Locations$Runtimeversions$Get,
3875
5468
  options?: MethodOptions
3876
- ): GaxiosPromise<Schema$RuntimeVersion>;
5469
+ ): Promise<GaxiosResponseWithHTTP2<Schema$RuntimeVersion>>;
3877
5470
  get(
3878
5471
  params: Params$Resource$Projects$Locations$Runtimeversions$Get,
3879
5472
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -3902,7 +5495,10 @@ export namespace tpu_v2alpha1 {
3902
5495
  callback?:
3903
5496
  | BodyResponseCallback<Schema$RuntimeVersion>
3904
5497
  | BodyResponseCallback<Readable>
3905
- ): void | GaxiosPromise<Schema$RuntimeVersion> | GaxiosPromise<Readable> {
5498
+ ):
5499
+ | void
5500
+ | Promise<GaxiosResponseWithHTTP2<Schema$RuntimeVersion>>
5501
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
3906
5502
  let params = (paramsOrCallback ||
3907
5503
  {}) as Params$Resource$Projects$Locations$Runtimeversions$Get;
3908
5504
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -3945,6 +5541,62 @@ export namespace tpu_v2alpha1 {
3945
5541
 
3946
5542
  /**
3947
5543
  * Lists runtime versions supported by this API.
5544
+ * @example
5545
+ * ```js
5546
+ * // Before running the sample:
5547
+ * // - Enable the API at:
5548
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
5549
+ * // - Login into gcloud by running:
5550
+ * // ```sh
5551
+ * // $ gcloud auth application-default login
5552
+ * // ```
5553
+ * // - Install the npm module by running:
5554
+ * // ```sh
5555
+ * // $ npm install googleapis
5556
+ * // ```
5557
+ *
5558
+ * const {google} = require('googleapis');
5559
+ * const tpu = google.tpu('v2alpha1');
5560
+ *
5561
+ * async function main() {
5562
+ * const auth = new google.auth.GoogleAuth({
5563
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
5564
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
5565
+ * });
5566
+ *
5567
+ * // Acquire an auth client, and bind it to all future calls
5568
+ * const authClient = await auth.getClient();
5569
+ * google.options({auth: authClient});
5570
+ *
5571
+ * // Do the magic
5572
+ * const res = await tpu.projects.locations.runtimeVersions.list({
5573
+ * // List filter.
5574
+ * filter: 'placeholder-value',
5575
+ * // Sort results.
5576
+ * orderBy: 'placeholder-value',
5577
+ * // The maximum number of items to return.
5578
+ * pageSize: 'placeholder-value',
5579
+ * // The next_page_token value returned from a previous List request, if any.
5580
+ * pageToken: 'placeholder-value',
5581
+ * // Required. The parent resource name.
5582
+ * parent: 'projects/my-project/locations/my-location',
5583
+ * });
5584
+ * console.log(res.data);
5585
+ *
5586
+ * // Example response
5587
+ * // {
5588
+ * // "nextPageToken": "my_nextPageToken",
5589
+ * // "runtimeVersions": [],
5590
+ * // "unreachable": []
5591
+ * // }
5592
+ * }
5593
+ *
5594
+ * main().catch(e => {
5595
+ * console.error(e);
5596
+ * throw e;
5597
+ * });
5598
+ *
5599
+ * ```
3948
5600
  *
3949
5601
  * @param params - Parameters for request
3950
5602
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -3954,11 +5606,11 @@ export namespace tpu_v2alpha1 {
3954
5606
  list(
3955
5607
  params: Params$Resource$Projects$Locations$Runtimeversions$List,
3956
5608
  options: StreamMethodOptions
3957
- ): GaxiosPromise<Readable>;
5609
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
3958
5610
  list(
3959
5611
  params?: Params$Resource$Projects$Locations$Runtimeversions$List,
3960
5612
  options?: MethodOptions
3961
- ): GaxiosPromise<Schema$ListRuntimeVersionsResponse>;
5613
+ ): Promise<GaxiosResponseWithHTTP2<Schema$ListRuntimeVersionsResponse>>;
3962
5614
  list(
3963
5615
  params: Params$Resource$Projects$Locations$Runtimeversions$List,
3964
5616
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -3993,8 +5645,8 @@ export namespace tpu_v2alpha1 {
3993
5645
  | BodyResponseCallback<Readable>
3994
5646
  ):
3995
5647
  | void
3996
- | GaxiosPromise<Schema$ListRuntimeVersionsResponse>
3997
- | GaxiosPromise<Readable> {
5648
+ | Promise<GaxiosResponseWithHTTP2<Schema$ListRuntimeVersionsResponse>>
5649
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
3998
5650
  let params = (paramsOrCallback ||
3999
5651
  {}) as Params$Resource$Projects$Locations$Runtimeversions$List;
4000
5652
  let options = (optionsOrCallback || {}) as MethodOptions;