@googleapis/storage 21.1.0 → 21.3.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
@@ -176,6 +176,10 @@ export namespace storage_v1 {
176
176
  * The ID of the resource, including the project number, bucket name and anywhere cache ID.
177
177
  */
178
178
  id?: string | null;
179
+ /**
180
+ * Specifies whether objects are ingested into the cache upon write.
181
+ */
182
+ ingestOnWrite?: boolean | null;
179
183
  /**
180
184
  * The kind of item this is. For Anywhere Cache, this is always storage#anywhereCache.
181
185
  */
@@ -1462,6 +1466,7 @@ export namespace storage_v1 {
1462
1466
  * // "bucket": "my_bucket",
1463
1467
  * // "createTime": "my_createTime",
1464
1468
  * // "id": "my_id",
1469
+ * // "ingestOnWrite": false,
1465
1470
  * // "kind": "my_kind",
1466
1471
  * // "pendingUpdate": false,
1467
1472
  * // "selfLink": "my_selfLink",
@@ -1618,6 +1623,7 @@ export namespace storage_v1 {
1618
1623
  * // "bucket": "my_bucket",
1619
1624
  * // "createTime": "my_createTime",
1620
1625
  * // "id": "my_id",
1626
+ * // "ingestOnWrite": false,
1621
1627
  * // "kind": "my_kind",
1622
1628
  * // "pendingUpdate": false,
1623
1629
  * // "selfLink": "my_selfLink",
@@ -1770,6 +1776,7 @@ export namespace storage_v1 {
1770
1776
  * // "bucket": "my_bucket",
1771
1777
  * // "createTime": "my_createTime",
1772
1778
  * // "id": "my_id",
1779
+ * // "ingestOnWrite": false,
1773
1780
  * // "kind": "my_kind",
1774
1781
  * // "pendingUpdate": false,
1775
1782
  * // "selfLink": "my_selfLink",
@@ -2091,6 +2098,7 @@ export namespace storage_v1 {
2091
2098
  * // "bucket": "my_bucket",
2092
2099
  * // "createTime": "my_createTime",
2093
2100
  * // "id": "my_id",
2101
+ * // "ingestOnWrite": false,
2094
2102
  * // "kind": "my_kind",
2095
2103
  * // "pendingUpdate": false,
2096
2104
  * // "selfLink": "my_selfLink",
@@ -2245,6 +2253,7 @@ export namespace storage_v1 {
2245
2253
  * // "bucket": "my_bucket",
2246
2254
  * // "createTime": "my_createTime",
2247
2255
  * // "id": "my_id",
2256
+ * // "ingestOnWrite": false,
2248
2257
  * // "kind": "my_kind",
2249
2258
  * // "pendingUpdate": false,
2250
2259
  * // "selfLink": "my_selfLink",
@@ -2351,7 +2360,7 @@ export namespace storage_v1 {
2351
2360
  }
2352
2361
 
2353
2362
  /**
2354
- * Updates the config(ttl and admissionPolicy) of an Anywhere Cache instance.
2363
+ * Updates the config of an Anywhere Cache instance.
2355
2364
  * @example
2356
2365
  * ```js
2357
2366
  * // Before running the sample:
@@ -2399,6 +2408,7 @@ export namespace storage_v1 {
2399
2408
  * // "bucket": "my_bucket",
2400
2409
  * // "createTime": "my_createTime",
2401
2410
  * // "id": "my_id",
2411
+ * // "ingestOnWrite": false,
2402
2412
  * // "kind": "my_kind",
2403
2413
  * // "pendingUpdate": false,
2404
2414
  * // "selfLink": "my_selfLink",
@@ -7634,6 +7644,163 @@ export namespace storage_v1 {
7634
7644
  }
7635
7645
  }
7636
7646
 
7647
+ /**
7648
+ * Deletes a folder recursively. Only applicable to buckets with hierarchical namespace enabled.
7649
+ * @example
7650
+ * ```js
7651
+ * // Before running the sample:
7652
+ * // - Enable the API at:
7653
+ * // https://console.developers.google.com/apis/api/storage.googleapis.com
7654
+ * // - Login into gcloud by running:
7655
+ * // ```sh
7656
+ * // $ gcloud auth application-default login
7657
+ * // ```
7658
+ * // - Install the npm module by running:
7659
+ * // ```sh
7660
+ * // $ npm install googleapis
7661
+ * // ```
7662
+ *
7663
+ * const {google} = require('googleapis');
7664
+ * const storage = google.storage('v1');
7665
+ *
7666
+ * async function main() {
7667
+ * const auth = new google.auth.GoogleAuth({
7668
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
7669
+ * scopes: [
7670
+ * 'https://www.googleapis.com/auth/cloud-platform',
7671
+ * 'https://www.googleapis.com/auth/devstorage.full_control',
7672
+ * 'https://www.googleapis.com/auth/devstorage.read_write',
7673
+ * ],
7674
+ * });
7675
+ *
7676
+ * // Acquire an auth client, and bind it to all future calls
7677
+ * const authClient = await auth.getClient();
7678
+ * google.options({auth: authClient});
7679
+ *
7680
+ * // Do the magic
7681
+ * const res = await storage.folders.deleteRecursive({
7682
+ * // Name of the bucket in which the folder resides.
7683
+ * bucket: 'placeholder-value',
7684
+ * // Name of a folder.
7685
+ * folder: 'placeholder-value',
7686
+ * // If set, only deletes the folder if its metageneration matches this value.
7687
+ * ifMetagenerationMatch: 'placeholder-value',
7688
+ * // If set, only deletes the folder if its metageneration does not match this value.
7689
+ * ifMetagenerationNotMatch: 'placeholder-value',
7690
+ * });
7691
+ * console.log(res.data);
7692
+ *
7693
+ * // Example response
7694
+ * // {
7695
+ * // "done": false,
7696
+ * // "error": {},
7697
+ * // "kind": "my_kind",
7698
+ * // "metadata": {},
7699
+ * // "name": "my_name",
7700
+ * // "response": {},
7701
+ * // "selfLink": "my_selfLink"
7702
+ * // }
7703
+ * }
7704
+ *
7705
+ * main().catch(e => {
7706
+ * console.error(e);
7707
+ * throw e;
7708
+ * });
7709
+ *
7710
+ * ```
7711
+ *
7712
+ * @param params - Parameters for request
7713
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
7714
+ * @param callback - Optional callback that handles the response.
7715
+ * @returns A promise if used with async/await, or void if used with a callback.
7716
+ */
7717
+ deleteRecursive(
7718
+ params: Params$Resource$Folders$Deleterecursive,
7719
+ options: StreamMethodOptions
7720
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
7721
+ deleteRecursive(
7722
+ params?: Params$Resource$Folders$Deleterecursive,
7723
+ options?: MethodOptions
7724
+ ): Promise<GaxiosResponseWithHTTP2<Schema$GoogleLongrunningOperation>>;
7725
+ deleteRecursive(
7726
+ params: Params$Resource$Folders$Deleterecursive,
7727
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
7728
+ callback: BodyResponseCallback<Readable>
7729
+ ): void;
7730
+ deleteRecursive(
7731
+ params: Params$Resource$Folders$Deleterecursive,
7732
+ options:
7733
+ | MethodOptions
7734
+ | BodyResponseCallback<Schema$GoogleLongrunningOperation>,
7735
+ callback: BodyResponseCallback<Schema$GoogleLongrunningOperation>
7736
+ ): void;
7737
+ deleteRecursive(
7738
+ params: Params$Resource$Folders$Deleterecursive,
7739
+ callback: BodyResponseCallback<Schema$GoogleLongrunningOperation>
7740
+ ): void;
7741
+ deleteRecursive(
7742
+ callback: BodyResponseCallback<Schema$GoogleLongrunningOperation>
7743
+ ): void;
7744
+ deleteRecursive(
7745
+ paramsOrCallback?:
7746
+ | Params$Resource$Folders$Deleterecursive
7747
+ | BodyResponseCallback<Schema$GoogleLongrunningOperation>
7748
+ | BodyResponseCallback<Readable>,
7749
+ optionsOrCallback?:
7750
+ | MethodOptions
7751
+ | StreamMethodOptions
7752
+ | BodyResponseCallback<Schema$GoogleLongrunningOperation>
7753
+ | BodyResponseCallback<Readable>,
7754
+ callback?:
7755
+ | BodyResponseCallback<Schema$GoogleLongrunningOperation>
7756
+ | BodyResponseCallback<Readable>
7757
+ ):
7758
+ | void
7759
+ | Promise<GaxiosResponseWithHTTP2<Schema$GoogleLongrunningOperation>>
7760
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
7761
+ let params = (paramsOrCallback ||
7762
+ {}) as Params$Resource$Folders$Deleterecursive;
7763
+ let options = (optionsOrCallback || {}) as MethodOptions;
7764
+
7765
+ if (typeof paramsOrCallback === 'function') {
7766
+ callback = paramsOrCallback;
7767
+ params = {} as Params$Resource$Folders$Deleterecursive;
7768
+ options = {};
7769
+ }
7770
+
7771
+ if (typeof optionsOrCallback === 'function') {
7772
+ callback = optionsOrCallback;
7773
+ options = {};
7774
+ }
7775
+
7776
+ const rootUrl = options.rootUrl || 'https://storage.googleapis.com/';
7777
+ const parameters = {
7778
+ options: Object.assign(
7779
+ {
7780
+ url: (
7781
+ rootUrl +
7782
+ '/storage/v1/b/{bucket}/folders/{folder}/deleteRecursive'
7783
+ ).replace(/([^:]\/)\/+/g, '$1'),
7784
+ method: 'POST',
7785
+ apiVersion: '',
7786
+ },
7787
+ options
7788
+ ),
7789
+ params,
7790
+ requiredParams: ['bucket', 'folder'],
7791
+ pathParams: ['bucket', 'folder'],
7792
+ context: this.context,
7793
+ };
7794
+ if (callback) {
7795
+ createAPIRequest<Schema$GoogleLongrunningOperation>(
7796
+ parameters,
7797
+ callback as BodyResponseCallback<unknown>
7798
+ );
7799
+ } else {
7800
+ return createAPIRequest<Schema$GoogleLongrunningOperation>(parameters);
7801
+ }
7802
+ }
7803
+
7637
7804
  /**
7638
7805
  * Returns metadata for the specified folder. Only applicable to buckets with hierarchical namespace enabled.
7639
7806
  * @example
@@ -8289,6 +8456,24 @@ export namespace storage_v1 {
8289
8456
  */
8290
8457
  ifMetagenerationNotMatch?: string;
8291
8458
  }
8459
+ export interface Params$Resource$Folders$Deleterecursive extends StandardParameters {
8460
+ /**
8461
+ * Name of the bucket in which the folder resides.
8462
+ */
8463
+ bucket?: string;
8464
+ /**
8465
+ * Name of a folder.
8466
+ */
8467
+ folder?: string;
8468
+ /**
8469
+ * If set, only deletes the folder if its metageneration matches this value.
8470
+ */
8471
+ ifMetagenerationMatch?: string;
8472
+ /**
8473
+ * If set, only deletes the folder if its metageneration does not match this value.
8474
+ */
8475
+ ifMetagenerationNotMatch?: string;
8476
+ }
8292
8477
  export interface Params$Resource$Folders$Get extends StandardParameters {
8293
8478
  /**
8294
8479
  * Name of the bucket in which the folder resides.
@@ -11592,6 +11777,8 @@ export namespace storage_v1 {
11592
11777
  * destinationObject: 'placeholder-value',
11593
11778
  * // Apply a predefined set of access controls to the destination object.
11594
11779
  * destinationPredefinedAcl: 'placeholder-value',
11780
+ * // Specifies which groups of Object Contexts from the source object(s) should be dropped from the destination object.
11781
+ * dropContextGroups: 'placeholder-value',
11595
11782
  * // Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.
11596
11783
  * ifGenerationMatch: 'placeholder-value',
11597
11784
  * // Makes the operation conditional on whether the object's current metageneration matches the given value.
@@ -13617,6 +13804,8 @@ export namespace storage_v1 {
13617
13804
  * destinationObject: 'placeholder-value',
13618
13805
  * // Apply a predefined set of access controls to the destination object.
13619
13806
  * destinationPredefinedAcl: 'placeholder-value',
13807
+ * // Specifies which groups of Object Contexts from the source object should be dropped from the destination object.
13808
+ * dropContextGroups: 'placeholder-value',
13620
13809
  * // Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.
13621
13810
  * ifGenerationMatch: 'placeholder-value',
13622
13811
  * // Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.
@@ -14582,6 +14771,10 @@ export namespace storage_v1 {
14582
14771
  * Apply a predefined set of access controls to the destination object.
14583
14772
  */
14584
14773
  destinationPredefinedAcl?: string;
14774
+ /**
14775
+ * Specifies which groups of Object Contexts from the source object(s) should be dropped from the destination object.
14776
+ */
14777
+ dropContextGroups?: string[];
14585
14778
  /**
14586
14779
  * Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.
14587
14780
  */
@@ -15073,6 +15266,10 @@ export namespace storage_v1 {
15073
15266
  * Apply a predefined set of access controls to the destination object.
15074
15267
  */
15075
15268
  destinationPredefinedAcl?: string;
15269
+ /**
15270
+ * Specifies which groups of Object Contexts from the source object should be dropped from the destination object.
15271
+ */
15272
+ dropContextGroups?: string[];
15076
15273
  /**
15077
15274
  * Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.
15078
15275
  */