@googleapis/storage 6.1.0 → 6.2.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/v1.ts CHANGED
@@ -100,6 +100,7 @@ export namespace storage_v1 {
100
100
  */
101
101
  export class Storage {
102
102
  context: APIRequestContext;
103
+ anywhereCache: Resource$Anywherecache;
103
104
  bucketAccessControls: Resource$Bucketaccesscontrols;
104
105
  buckets: Resource$Buckets;
105
106
  channels: Resource$Channels;
@@ -117,6 +118,7 @@ export namespace storage_v1 {
117
118
  google,
118
119
  };
119
120
 
121
+ this.anywhereCache = new Resource$Anywherecache(this.context);
120
122
  this.bucketAccessControls = new Resource$Bucketaccesscontrols(
121
123
  this.context
122
124
  );
@@ -135,6 +137,72 @@ export namespace storage_v1 {
135
137
  }
136
138
  }
137
139
 
140
+ /**
141
+ * An Anywhere Cache instance.
142
+ */
143
+ export interface Schema$AnywhereCache {
144
+ /**
145
+ * The cache-level entry admission policy.
146
+ */
147
+ admissionPolicy?: string | null;
148
+ /**
149
+ * The ID of the Anywhere cache instance.
150
+ */
151
+ anywhereCacheId?: string | null;
152
+ /**
153
+ * The name of the bucket containing this cache instance.
154
+ */
155
+ bucket?: string | null;
156
+ /**
157
+ * The creation time of the cache instance in RFC 3339 format.
158
+ */
159
+ createTime?: string | null;
160
+ /**
161
+ * The ID of the resource, including the project number, bucket name and anywhere cache ID.
162
+ */
163
+ id?: string | null;
164
+ /**
165
+ * The kind of item this is. For Anywhere Cache, this is always storage#anywhereCache.
166
+ */
167
+ kind?: string | null;
168
+ /**
169
+ * True if the cache instance has an active Update long-running operation.
170
+ */
171
+ pendingUpdate?: boolean | null;
172
+ /**
173
+ * The link to this cache instance.
174
+ */
175
+ selfLink?: string | null;
176
+ /**
177
+ * The current state of the cache instance.
178
+ */
179
+ state?: string | null;
180
+ /**
181
+ * The TTL of all cache entries in whole seconds. e.g., "7200s".
182
+ */
183
+ ttl?: string | null;
184
+ /**
185
+ * The modification time of the cache instance metadata in RFC 3339 format.
186
+ */
187
+ updateTime?: string | null;
188
+ }
189
+ /**
190
+ * A list of Anywhere Caches.
191
+ */
192
+ export interface Schema$AnywhereCaches {
193
+ /**
194
+ * The list of items.
195
+ */
196
+ items?: Schema$AnywhereCache[];
197
+ /**
198
+ * The kind of item this is. For lists of Anywhere Caches, this is always storage#anywhereCaches.
199
+ */
200
+ kind?: string | null;
201
+ /**
202
+ * The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results.
203
+ */
204
+ nextPageToken?: string | null;
205
+ }
138
206
  /**
139
207
  * A bucket.
140
208
  */
@@ -1106,6 +1174,724 @@ export namespace storage_v1 {
1106
1174
  permissions?: string[] | null;
1107
1175
  }
1108
1176
 
1177
+ export class Resource$Anywherecache {
1178
+ context: APIRequestContext;
1179
+ constructor(context: APIRequestContext) {
1180
+ this.context = context;
1181
+ }
1182
+
1183
+ /**
1184
+ * Disables an Anywhere Cache instance.
1185
+ *
1186
+ * @param params - Parameters for request
1187
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1188
+ * @param callback - Optional callback that handles the response.
1189
+ * @returns A promise if used with async/await, or void if used with a callback.
1190
+ */
1191
+ disable(
1192
+ params: Params$Resource$Anywherecache$Disable,
1193
+ options: StreamMethodOptions
1194
+ ): GaxiosPromise<Readable>;
1195
+ disable(
1196
+ params?: Params$Resource$Anywherecache$Disable,
1197
+ options?: MethodOptions
1198
+ ): GaxiosPromise<Schema$AnywhereCache>;
1199
+ disable(
1200
+ params: Params$Resource$Anywherecache$Disable,
1201
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
1202
+ callback: BodyResponseCallback<Readable>
1203
+ ): void;
1204
+ disable(
1205
+ params: Params$Resource$Anywherecache$Disable,
1206
+ options: MethodOptions | BodyResponseCallback<Schema$AnywhereCache>,
1207
+ callback: BodyResponseCallback<Schema$AnywhereCache>
1208
+ ): void;
1209
+ disable(
1210
+ params: Params$Resource$Anywherecache$Disable,
1211
+ callback: BodyResponseCallback<Schema$AnywhereCache>
1212
+ ): void;
1213
+ disable(callback: BodyResponseCallback<Schema$AnywhereCache>): void;
1214
+ disable(
1215
+ paramsOrCallback?:
1216
+ | Params$Resource$Anywherecache$Disable
1217
+ | BodyResponseCallback<Schema$AnywhereCache>
1218
+ | BodyResponseCallback<Readable>,
1219
+ optionsOrCallback?:
1220
+ | MethodOptions
1221
+ | StreamMethodOptions
1222
+ | BodyResponseCallback<Schema$AnywhereCache>
1223
+ | BodyResponseCallback<Readable>,
1224
+ callback?:
1225
+ | BodyResponseCallback<Schema$AnywhereCache>
1226
+ | BodyResponseCallback<Readable>
1227
+ ): void | GaxiosPromise<Schema$AnywhereCache> | GaxiosPromise<Readable> {
1228
+ let params = (paramsOrCallback ||
1229
+ {}) as Params$Resource$Anywherecache$Disable;
1230
+ let options = (optionsOrCallback || {}) as MethodOptions;
1231
+
1232
+ if (typeof paramsOrCallback === 'function') {
1233
+ callback = paramsOrCallback;
1234
+ params = {} as Params$Resource$Anywherecache$Disable;
1235
+ options = {};
1236
+ }
1237
+
1238
+ if (typeof optionsOrCallback === 'function') {
1239
+ callback = optionsOrCallback;
1240
+ options = {};
1241
+ }
1242
+
1243
+ const rootUrl = options.rootUrl || 'https://storage.googleapis.com/';
1244
+ const parameters = {
1245
+ options: Object.assign(
1246
+ {
1247
+ url: (
1248
+ rootUrl +
1249
+ '/storage/v1/b/{bucket}/anywhereCaches/{anywhereCacheId}/disable'
1250
+ ).replace(/([^:]\/)\/+/g, '$1'),
1251
+ method: 'POST',
1252
+ },
1253
+ options
1254
+ ),
1255
+ params,
1256
+ requiredParams: ['bucket', 'anywhereCacheId'],
1257
+ pathParams: ['anywhereCacheId', 'bucket'],
1258
+ context: this.context,
1259
+ };
1260
+ if (callback) {
1261
+ createAPIRequest<Schema$AnywhereCache>(
1262
+ parameters,
1263
+ callback as BodyResponseCallback<unknown>
1264
+ );
1265
+ } else {
1266
+ return createAPIRequest<Schema$AnywhereCache>(parameters);
1267
+ }
1268
+ }
1269
+
1270
+ /**
1271
+ * Returns the metadata of an Anywhere Cache instance.
1272
+ *
1273
+ * @param params - Parameters for request
1274
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1275
+ * @param callback - Optional callback that handles the response.
1276
+ * @returns A promise if used with async/await, or void if used with a callback.
1277
+ */
1278
+ get(
1279
+ params: Params$Resource$Anywherecache$Get,
1280
+ options: StreamMethodOptions
1281
+ ): GaxiosPromise<Readable>;
1282
+ get(
1283
+ params?: Params$Resource$Anywherecache$Get,
1284
+ options?: MethodOptions
1285
+ ): GaxiosPromise<Schema$AnywhereCache>;
1286
+ get(
1287
+ params: Params$Resource$Anywherecache$Get,
1288
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
1289
+ callback: BodyResponseCallback<Readable>
1290
+ ): void;
1291
+ get(
1292
+ params: Params$Resource$Anywherecache$Get,
1293
+ options: MethodOptions | BodyResponseCallback<Schema$AnywhereCache>,
1294
+ callback: BodyResponseCallback<Schema$AnywhereCache>
1295
+ ): void;
1296
+ get(
1297
+ params: Params$Resource$Anywherecache$Get,
1298
+ callback: BodyResponseCallback<Schema$AnywhereCache>
1299
+ ): void;
1300
+ get(callback: BodyResponseCallback<Schema$AnywhereCache>): void;
1301
+ get(
1302
+ paramsOrCallback?:
1303
+ | Params$Resource$Anywherecache$Get
1304
+ | BodyResponseCallback<Schema$AnywhereCache>
1305
+ | BodyResponseCallback<Readable>,
1306
+ optionsOrCallback?:
1307
+ | MethodOptions
1308
+ | StreamMethodOptions
1309
+ | BodyResponseCallback<Schema$AnywhereCache>
1310
+ | BodyResponseCallback<Readable>,
1311
+ callback?:
1312
+ | BodyResponseCallback<Schema$AnywhereCache>
1313
+ | BodyResponseCallback<Readable>
1314
+ ): void | GaxiosPromise<Schema$AnywhereCache> | GaxiosPromise<Readable> {
1315
+ let params = (paramsOrCallback ||
1316
+ {}) as Params$Resource$Anywherecache$Get;
1317
+ let options = (optionsOrCallback || {}) as MethodOptions;
1318
+
1319
+ if (typeof paramsOrCallback === 'function') {
1320
+ callback = paramsOrCallback;
1321
+ params = {} as Params$Resource$Anywherecache$Get;
1322
+ options = {};
1323
+ }
1324
+
1325
+ if (typeof optionsOrCallback === 'function') {
1326
+ callback = optionsOrCallback;
1327
+ options = {};
1328
+ }
1329
+
1330
+ const rootUrl = options.rootUrl || 'https://storage.googleapis.com/';
1331
+ const parameters = {
1332
+ options: Object.assign(
1333
+ {
1334
+ url: (
1335
+ rootUrl +
1336
+ '/storage/v1/b/{bucket}/anywhereCaches/{anywhereCacheId}'
1337
+ ).replace(/([^:]\/)\/+/g, '$1'),
1338
+ method: 'GET',
1339
+ },
1340
+ options
1341
+ ),
1342
+ params,
1343
+ requiredParams: ['bucket', 'anywhereCacheId'],
1344
+ pathParams: ['anywhereCacheId', 'bucket'],
1345
+ context: this.context,
1346
+ };
1347
+ if (callback) {
1348
+ createAPIRequest<Schema$AnywhereCache>(
1349
+ parameters,
1350
+ callback as BodyResponseCallback<unknown>
1351
+ );
1352
+ } else {
1353
+ return createAPIRequest<Schema$AnywhereCache>(parameters);
1354
+ }
1355
+ }
1356
+
1357
+ /**
1358
+ * Creates an Anywhere Cache instance.
1359
+ *
1360
+ * @param params - Parameters for request
1361
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1362
+ * @param callback - Optional callback that handles the response.
1363
+ * @returns A promise if used with async/await, or void if used with a callback.
1364
+ */
1365
+ insert(
1366
+ params: Params$Resource$Anywherecache$Insert,
1367
+ options: StreamMethodOptions
1368
+ ): GaxiosPromise<Readable>;
1369
+ insert(
1370
+ params?: Params$Resource$Anywherecache$Insert,
1371
+ options?: MethodOptions
1372
+ ): GaxiosPromise<Schema$GoogleLongrunningOperation>;
1373
+ insert(
1374
+ params: Params$Resource$Anywherecache$Insert,
1375
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
1376
+ callback: BodyResponseCallback<Readable>
1377
+ ): void;
1378
+ insert(
1379
+ params: Params$Resource$Anywherecache$Insert,
1380
+ options:
1381
+ | MethodOptions
1382
+ | BodyResponseCallback<Schema$GoogleLongrunningOperation>,
1383
+ callback: BodyResponseCallback<Schema$GoogleLongrunningOperation>
1384
+ ): void;
1385
+ insert(
1386
+ params: Params$Resource$Anywherecache$Insert,
1387
+ callback: BodyResponseCallback<Schema$GoogleLongrunningOperation>
1388
+ ): void;
1389
+ insert(
1390
+ callback: BodyResponseCallback<Schema$GoogleLongrunningOperation>
1391
+ ): void;
1392
+ insert(
1393
+ paramsOrCallback?:
1394
+ | Params$Resource$Anywherecache$Insert
1395
+ | BodyResponseCallback<Schema$GoogleLongrunningOperation>
1396
+ | BodyResponseCallback<Readable>,
1397
+ optionsOrCallback?:
1398
+ | MethodOptions
1399
+ | StreamMethodOptions
1400
+ | BodyResponseCallback<Schema$GoogleLongrunningOperation>
1401
+ | BodyResponseCallback<Readable>,
1402
+ callback?:
1403
+ | BodyResponseCallback<Schema$GoogleLongrunningOperation>
1404
+ | BodyResponseCallback<Readable>
1405
+ ):
1406
+ | void
1407
+ | GaxiosPromise<Schema$GoogleLongrunningOperation>
1408
+ | GaxiosPromise<Readable> {
1409
+ let params = (paramsOrCallback ||
1410
+ {}) as Params$Resource$Anywherecache$Insert;
1411
+ let options = (optionsOrCallback || {}) as MethodOptions;
1412
+
1413
+ if (typeof paramsOrCallback === 'function') {
1414
+ callback = paramsOrCallback;
1415
+ params = {} as Params$Resource$Anywherecache$Insert;
1416
+ options = {};
1417
+ }
1418
+
1419
+ if (typeof optionsOrCallback === 'function') {
1420
+ callback = optionsOrCallback;
1421
+ options = {};
1422
+ }
1423
+
1424
+ const rootUrl = options.rootUrl || 'https://storage.googleapis.com/';
1425
+ const parameters = {
1426
+ options: Object.assign(
1427
+ {
1428
+ url: (rootUrl + '/storage/v1/b/{bucket}/anywhereCaches').replace(
1429
+ /([^:]\/)\/+/g,
1430
+ '$1'
1431
+ ),
1432
+ method: 'POST',
1433
+ },
1434
+ options
1435
+ ),
1436
+ params,
1437
+ requiredParams: ['bucket'],
1438
+ pathParams: ['bucket'],
1439
+ context: this.context,
1440
+ };
1441
+ if (callback) {
1442
+ createAPIRequest<Schema$GoogleLongrunningOperation>(
1443
+ parameters,
1444
+ callback as BodyResponseCallback<unknown>
1445
+ );
1446
+ } else {
1447
+ return createAPIRequest<Schema$GoogleLongrunningOperation>(parameters);
1448
+ }
1449
+ }
1450
+
1451
+ /**
1452
+ * Returns a list of Anywhere Cache instances of the bucket matching the criteria.
1453
+ *
1454
+ * @param params - Parameters for request
1455
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1456
+ * @param callback - Optional callback that handles the response.
1457
+ * @returns A promise if used with async/await, or void if used with a callback.
1458
+ */
1459
+ list(
1460
+ params: Params$Resource$Anywherecache$List,
1461
+ options: StreamMethodOptions
1462
+ ): GaxiosPromise<Readable>;
1463
+ list(
1464
+ params?: Params$Resource$Anywherecache$List,
1465
+ options?: MethodOptions
1466
+ ): GaxiosPromise<Schema$AnywhereCaches>;
1467
+ list(
1468
+ params: Params$Resource$Anywherecache$List,
1469
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
1470
+ callback: BodyResponseCallback<Readable>
1471
+ ): void;
1472
+ list(
1473
+ params: Params$Resource$Anywherecache$List,
1474
+ options: MethodOptions | BodyResponseCallback<Schema$AnywhereCaches>,
1475
+ callback: BodyResponseCallback<Schema$AnywhereCaches>
1476
+ ): void;
1477
+ list(
1478
+ params: Params$Resource$Anywherecache$List,
1479
+ callback: BodyResponseCallback<Schema$AnywhereCaches>
1480
+ ): void;
1481
+ list(callback: BodyResponseCallback<Schema$AnywhereCaches>): void;
1482
+ list(
1483
+ paramsOrCallback?:
1484
+ | Params$Resource$Anywherecache$List
1485
+ | BodyResponseCallback<Schema$AnywhereCaches>
1486
+ | BodyResponseCallback<Readable>,
1487
+ optionsOrCallback?:
1488
+ | MethodOptions
1489
+ | StreamMethodOptions
1490
+ | BodyResponseCallback<Schema$AnywhereCaches>
1491
+ | BodyResponseCallback<Readable>,
1492
+ callback?:
1493
+ | BodyResponseCallback<Schema$AnywhereCaches>
1494
+ | BodyResponseCallback<Readable>
1495
+ ): void | GaxiosPromise<Schema$AnywhereCaches> | GaxiosPromise<Readable> {
1496
+ let params = (paramsOrCallback ||
1497
+ {}) as Params$Resource$Anywherecache$List;
1498
+ let options = (optionsOrCallback || {}) as MethodOptions;
1499
+
1500
+ if (typeof paramsOrCallback === 'function') {
1501
+ callback = paramsOrCallback;
1502
+ params = {} as Params$Resource$Anywherecache$List;
1503
+ options = {};
1504
+ }
1505
+
1506
+ if (typeof optionsOrCallback === 'function') {
1507
+ callback = optionsOrCallback;
1508
+ options = {};
1509
+ }
1510
+
1511
+ const rootUrl = options.rootUrl || 'https://storage.googleapis.com/';
1512
+ const parameters = {
1513
+ options: Object.assign(
1514
+ {
1515
+ url: (rootUrl + '/storage/v1/b/{bucket}/anywhereCache').replace(
1516
+ /([^:]\/)\/+/g,
1517
+ '$1'
1518
+ ),
1519
+ method: 'GET',
1520
+ },
1521
+ options
1522
+ ),
1523
+ params,
1524
+ requiredParams: ['bucket'],
1525
+ pathParams: ['bucket'],
1526
+ context: this.context,
1527
+ };
1528
+ if (callback) {
1529
+ createAPIRequest<Schema$AnywhereCaches>(
1530
+ parameters,
1531
+ callback as BodyResponseCallback<unknown>
1532
+ );
1533
+ } else {
1534
+ return createAPIRequest<Schema$AnywhereCaches>(parameters);
1535
+ }
1536
+ }
1537
+
1538
+ /**
1539
+ * Pauses an Anywhere Cache instance.
1540
+ *
1541
+ * @param params - Parameters for request
1542
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1543
+ * @param callback - Optional callback that handles the response.
1544
+ * @returns A promise if used with async/await, or void if used with a callback.
1545
+ */
1546
+ pause(
1547
+ params: Params$Resource$Anywherecache$Pause,
1548
+ options: StreamMethodOptions
1549
+ ): GaxiosPromise<Readable>;
1550
+ pause(
1551
+ params?: Params$Resource$Anywherecache$Pause,
1552
+ options?: MethodOptions
1553
+ ): GaxiosPromise<Schema$AnywhereCache>;
1554
+ pause(
1555
+ params: Params$Resource$Anywherecache$Pause,
1556
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
1557
+ callback: BodyResponseCallback<Readable>
1558
+ ): void;
1559
+ pause(
1560
+ params: Params$Resource$Anywherecache$Pause,
1561
+ options: MethodOptions | BodyResponseCallback<Schema$AnywhereCache>,
1562
+ callback: BodyResponseCallback<Schema$AnywhereCache>
1563
+ ): void;
1564
+ pause(
1565
+ params: Params$Resource$Anywherecache$Pause,
1566
+ callback: BodyResponseCallback<Schema$AnywhereCache>
1567
+ ): void;
1568
+ pause(callback: BodyResponseCallback<Schema$AnywhereCache>): void;
1569
+ pause(
1570
+ paramsOrCallback?:
1571
+ | Params$Resource$Anywherecache$Pause
1572
+ | BodyResponseCallback<Schema$AnywhereCache>
1573
+ | BodyResponseCallback<Readable>,
1574
+ optionsOrCallback?:
1575
+ | MethodOptions
1576
+ | StreamMethodOptions
1577
+ | BodyResponseCallback<Schema$AnywhereCache>
1578
+ | BodyResponseCallback<Readable>,
1579
+ callback?:
1580
+ | BodyResponseCallback<Schema$AnywhereCache>
1581
+ | BodyResponseCallback<Readable>
1582
+ ): void | GaxiosPromise<Schema$AnywhereCache> | GaxiosPromise<Readable> {
1583
+ let params = (paramsOrCallback ||
1584
+ {}) as Params$Resource$Anywherecache$Pause;
1585
+ let options = (optionsOrCallback || {}) as MethodOptions;
1586
+
1587
+ if (typeof paramsOrCallback === 'function') {
1588
+ callback = paramsOrCallback;
1589
+ params = {} as Params$Resource$Anywherecache$Pause;
1590
+ options = {};
1591
+ }
1592
+
1593
+ if (typeof optionsOrCallback === 'function') {
1594
+ callback = optionsOrCallback;
1595
+ options = {};
1596
+ }
1597
+
1598
+ const rootUrl = options.rootUrl || 'https://storage.googleapis.com/';
1599
+ const parameters = {
1600
+ options: Object.assign(
1601
+ {
1602
+ url: (
1603
+ rootUrl +
1604
+ '/storage/v1/b/{bucket}/anywhereCaches/{anywhereCacheId}/pause'
1605
+ ).replace(/([^:]\/)\/+/g, '$1'),
1606
+ method: 'POST',
1607
+ },
1608
+ options
1609
+ ),
1610
+ params,
1611
+ requiredParams: ['bucket', 'anywhereCacheId'],
1612
+ pathParams: ['anywhereCacheId', 'bucket'],
1613
+ context: this.context,
1614
+ };
1615
+ if (callback) {
1616
+ createAPIRequest<Schema$AnywhereCache>(
1617
+ parameters,
1618
+ callback as BodyResponseCallback<unknown>
1619
+ );
1620
+ } else {
1621
+ return createAPIRequest<Schema$AnywhereCache>(parameters);
1622
+ }
1623
+ }
1624
+
1625
+ /**
1626
+ * Resumes a paused or disabled Anywhere Cache instance.
1627
+ *
1628
+ * @param params - Parameters for request
1629
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1630
+ * @param callback - Optional callback that handles the response.
1631
+ * @returns A promise if used with async/await, or void if used with a callback.
1632
+ */
1633
+ resume(
1634
+ params: Params$Resource$Anywherecache$Resume,
1635
+ options: StreamMethodOptions
1636
+ ): GaxiosPromise<Readable>;
1637
+ resume(
1638
+ params?: Params$Resource$Anywherecache$Resume,
1639
+ options?: MethodOptions
1640
+ ): GaxiosPromise<Schema$AnywhereCache>;
1641
+ resume(
1642
+ params: Params$Resource$Anywherecache$Resume,
1643
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
1644
+ callback: BodyResponseCallback<Readable>
1645
+ ): void;
1646
+ resume(
1647
+ params: Params$Resource$Anywherecache$Resume,
1648
+ options: MethodOptions | BodyResponseCallback<Schema$AnywhereCache>,
1649
+ callback: BodyResponseCallback<Schema$AnywhereCache>
1650
+ ): void;
1651
+ resume(
1652
+ params: Params$Resource$Anywherecache$Resume,
1653
+ callback: BodyResponseCallback<Schema$AnywhereCache>
1654
+ ): void;
1655
+ resume(callback: BodyResponseCallback<Schema$AnywhereCache>): void;
1656
+ resume(
1657
+ paramsOrCallback?:
1658
+ | Params$Resource$Anywherecache$Resume
1659
+ | BodyResponseCallback<Schema$AnywhereCache>
1660
+ | BodyResponseCallback<Readable>,
1661
+ optionsOrCallback?:
1662
+ | MethodOptions
1663
+ | StreamMethodOptions
1664
+ | BodyResponseCallback<Schema$AnywhereCache>
1665
+ | BodyResponseCallback<Readable>,
1666
+ callback?:
1667
+ | BodyResponseCallback<Schema$AnywhereCache>
1668
+ | BodyResponseCallback<Readable>
1669
+ ): void | GaxiosPromise<Schema$AnywhereCache> | GaxiosPromise<Readable> {
1670
+ let params = (paramsOrCallback ||
1671
+ {}) as Params$Resource$Anywherecache$Resume;
1672
+ let options = (optionsOrCallback || {}) as MethodOptions;
1673
+
1674
+ if (typeof paramsOrCallback === 'function') {
1675
+ callback = paramsOrCallback;
1676
+ params = {} as Params$Resource$Anywherecache$Resume;
1677
+ options = {};
1678
+ }
1679
+
1680
+ if (typeof optionsOrCallback === 'function') {
1681
+ callback = optionsOrCallback;
1682
+ options = {};
1683
+ }
1684
+
1685
+ const rootUrl = options.rootUrl || 'https://storage.googleapis.com/';
1686
+ const parameters = {
1687
+ options: Object.assign(
1688
+ {
1689
+ url: (
1690
+ rootUrl +
1691
+ '/storage/v1/b/{bucket}/anywhereCaches/{anywhereCacheId}/resume'
1692
+ ).replace(/([^:]\/)\/+/g, '$1'),
1693
+ method: 'POST',
1694
+ },
1695
+ options
1696
+ ),
1697
+ params,
1698
+ requiredParams: ['bucket', 'anywhereCacheId'],
1699
+ pathParams: ['anywhereCacheId', 'bucket'],
1700
+ context: this.context,
1701
+ };
1702
+ if (callback) {
1703
+ createAPIRequest<Schema$AnywhereCache>(
1704
+ parameters,
1705
+ callback as BodyResponseCallback<unknown>
1706
+ );
1707
+ } else {
1708
+ return createAPIRequest<Schema$AnywhereCache>(parameters);
1709
+ }
1710
+ }
1711
+
1712
+ /**
1713
+ * Updates the config(ttl and admissionPolicy) of an Anywhere Cache instance.
1714
+ *
1715
+ * @param params - Parameters for request
1716
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1717
+ * @param callback - Optional callback that handles the response.
1718
+ * @returns A promise if used with async/await, or void if used with a callback.
1719
+ */
1720
+ update(
1721
+ params: Params$Resource$Anywherecache$Update,
1722
+ options: StreamMethodOptions
1723
+ ): GaxiosPromise<Readable>;
1724
+ update(
1725
+ params?: Params$Resource$Anywherecache$Update,
1726
+ options?: MethodOptions
1727
+ ): GaxiosPromise<Schema$GoogleLongrunningOperation>;
1728
+ update(
1729
+ params: Params$Resource$Anywherecache$Update,
1730
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
1731
+ callback: BodyResponseCallback<Readable>
1732
+ ): void;
1733
+ update(
1734
+ params: Params$Resource$Anywherecache$Update,
1735
+ options:
1736
+ | MethodOptions
1737
+ | BodyResponseCallback<Schema$GoogleLongrunningOperation>,
1738
+ callback: BodyResponseCallback<Schema$GoogleLongrunningOperation>
1739
+ ): void;
1740
+ update(
1741
+ params: Params$Resource$Anywherecache$Update,
1742
+ callback: BodyResponseCallback<Schema$GoogleLongrunningOperation>
1743
+ ): void;
1744
+ update(
1745
+ callback: BodyResponseCallback<Schema$GoogleLongrunningOperation>
1746
+ ): void;
1747
+ update(
1748
+ paramsOrCallback?:
1749
+ | Params$Resource$Anywherecache$Update
1750
+ | BodyResponseCallback<Schema$GoogleLongrunningOperation>
1751
+ | BodyResponseCallback<Readable>,
1752
+ optionsOrCallback?:
1753
+ | MethodOptions
1754
+ | StreamMethodOptions
1755
+ | BodyResponseCallback<Schema$GoogleLongrunningOperation>
1756
+ | BodyResponseCallback<Readable>,
1757
+ callback?:
1758
+ | BodyResponseCallback<Schema$GoogleLongrunningOperation>
1759
+ | BodyResponseCallback<Readable>
1760
+ ):
1761
+ | void
1762
+ | GaxiosPromise<Schema$GoogleLongrunningOperation>
1763
+ | GaxiosPromise<Readable> {
1764
+ let params = (paramsOrCallback ||
1765
+ {}) as Params$Resource$Anywherecache$Update;
1766
+ let options = (optionsOrCallback || {}) as MethodOptions;
1767
+
1768
+ if (typeof paramsOrCallback === 'function') {
1769
+ callback = paramsOrCallback;
1770
+ params = {} as Params$Resource$Anywherecache$Update;
1771
+ options = {};
1772
+ }
1773
+
1774
+ if (typeof optionsOrCallback === 'function') {
1775
+ callback = optionsOrCallback;
1776
+ options = {};
1777
+ }
1778
+
1779
+ const rootUrl = options.rootUrl || 'https://storage.googleapis.com/';
1780
+ const parameters = {
1781
+ options: Object.assign(
1782
+ {
1783
+ url: (
1784
+ rootUrl +
1785
+ '/storage/v1/b/{bucket}/anywhereCaches/{anywhereCacheId}'
1786
+ ).replace(/([^:]\/)\/+/g, '$1'),
1787
+ method: 'PATCH',
1788
+ },
1789
+ options
1790
+ ),
1791
+ params,
1792
+ requiredParams: ['bucket', 'anywhereCacheId'],
1793
+ pathParams: ['anywhereCacheId', 'bucket'],
1794
+ context: this.context,
1795
+ };
1796
+ if (callback) {
1797
+ createAPIRequest<Schema$GoogleLongrunningOperation>(
1798
+ parameters,
1799
+ callback as BodyResponseCallback<unknown>
1800
+ );
1801
+ } else {
1802
+ return createAPIRequest<Schema$GoogleLongrunningOperation>(parameters);
1803
+ }
1804
+ }
1805
+ }
1806
+
1807
+ export interface Params$Resource$Anywherecache$Disable
1808
+ extends StandardParameters {
1809
+ /**
1810
+ * The ID of requested Anywhere Cache instance.
1811
+ */
1812
+ anywhereCacheId?: string;
1813
+ /**
1814
+ * Name of the partent bucket
1815
+ */
1816
+ bucket?: string;
1817
+ }
1818
+ export interface Params$Resource$Anywherecache$Get
1819
+ extends StandardParameters {
1820
+ /**
1821
+ * The ID of requested Anywhere Cache instance.
1822
+ */
1823
+ anywhereCacheId?: string;
1824
+ /**
1825
+ * Name of the partent bucket
1826
+ */
1827
+ bucket?: string;
1828
+ }
1829
+ export interface Params$Resource$Anywherecache$Insert
1830
+ extends StandardParameters {
1831
+ /**
1832
+ * Name of the partent bucket
1833
+ */
1834
+ bucket?: string;
1835
+
1836
+ /**
1837
+ * Request body metadata
1838
+ */
1839
+ requestBody?: Schema$AnywhereCache;
1840
+ }
1841
+ export interface Params$Resource$Anywherecache$List
1842
+ extends StandardParameters {
1843
+ /**
1844
+ * Name of the partent bucket
1845
+ */
1846
+ bucket?: string;
1847
+ /**
1848
+ * Maximum number of items return in a single page of responses. Maximum 1000.
1849
+ */
1850
+ pageSize?: number;
1851
+ /**
1852
+ * A previously-returned page token representing part of the larger set of results to view.
1853
+ */
1854
+ pageToken?: string;
1855
+ }
1856
+ export interface Params$Resource$Anywherecache$Pause
1857
+ extends StandardParameters {
1858
+ /**
1859
+ * The ID of requested Anywhere Cache instance.
1860
+ */
1861
+ anywhereCacheId?: string;
1862
+ /**
1863
+ * Name of the partent bucket
1864
+ */
1865
+ bucket?: string;
1866
+ }
1867
+ export interface Params$Resource$Anywherecache$Resume
1868
+ extends StandardParameters {
1869
+ /**
1870
+ * The ID of requested Anywhere Cache instance.
1871
+ */
1872
+ anywhereCacheId?: string;
1873
+ /**
1874
+ * Name of the partent bucket
1875
+ */
1876
+ bucket?: string;
1877
+ }
1878
+ export interface Params$Resource$Anywherecache$Update
1879
+ extends StandardParameters {
1880
+ /**
1881
+ * The ID of requested Anywhere Cache instance.
1882
+ */
1883
+ anywhereCacheId?: string;
1884
+ /**
1885
+ * Name of the partent bucket
1886
+ */
1887
+ bucket?: string;
1888
+
1889
+ /**
1890
+ * Request body metadata
1891
+ */
1892
+ requestBody?: Schema$AnywhereCache;
1893
+ }
1894
+
1109
1895
  export class Resource$Bucketaccesscontrols {
1110
1896
  context: APIRequestContext;
1111
1897
  constructor(context: APIRequestContext) {