@googleapis/storage 5.1.2 → 6.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/v1.ts CHANGED
@@ -104,9 +104,11 @@ export namespace storage_v1 {
104
104
  buckets: Resource$Buckets;
105
105
  channels: Resource$Channels;
106
106
  defaultObjectAccessControls: Resource$Defaultobjectaccesscontrols;
107
+ managedFolders: Resource$Managedfolders;
107
108
  notifications: Resource$Notifications;
108
109
  objectAccessControls: Resource$Objectaccesscontrols;
109
110
  objects: Resource$Objects;
111
+ operations: Resource$Operations;
110
112
  projects: Resource$Projects;
111
113
 
112
114
  constructor(options: GlobalOptions, google?: GoogleConfigurable) {
@@ -122,11 +124,13 @@ export namespace storage_v1 {
122
124
  this.channels = new Resource$Channels(this.context);
123
125
  this.defaultObjectAccessControls =
124
126
  new Resource$Defaultobjectaccesscontrols(this.context);
127
+ this.managedFolders = new Resource$Managedfolders(this.context);
125
128
  this.notifications = new Resource$Notifications(this.context);
126
129
  this.objectAccessControls = new Resource$Objectaccesscontrols(
127
130
  this.context
128
131
  );
129
132
  this.objects = new Resource$Objects(this.context);
133
+ this.operations = new Resource$Operations(this.context);
130
134
  this.projects = new Resource$Projects(this.context);
131
135
  }
132
136
  }
@@ -142,7 +146,12 @@ export namespace storage_v1 {
142
146
  /**
143
147
  * The bucket's Autoclass configuration.
144
148
  */
145
- autoclass?: {enabled?: boolean; toggleTime?: string} | null;
149
+ autoclass?: {
150
+ enabled?: boolean;
151
+ terminalStorageClass?: string;
152
+ terminalStorageClassUpdateTime?: string;
153
+ toggleTime?: string;
154
+ } | null;
146
155
  /**
147
156
  * The bucket's billing configuration.
148
157
  */
@@ -238,6 +247,10 @@ export namespace storage_v1 {
238
247
  * The name of the bucket.
239
248
  */
240
249
  name?: string | null;
250
+ /**
251
+ * The bucket's object retention config.
252
+ */
253
+ objectRetention?: {mode?: string} | null;
241
254
  /**
242
255
  * The owner of the bucket. This is always the project team's owner group.
243
256
  */
@@ -266,6 +279,13 @@ export namespace storage_v1 {
266
279
  * The URI of this bucket.
267
280
  */
268
281
  selfLink?: string | null;
282
+ /**
283
+ * The bucket's soft delete policy, which defines the period of time that soft-deleted objects will be retained, and cannot be permanently deleted.
284
+ */
285
+ softDeletePolicy?: {
286
+ effectiveTime?: string;
287
+ retentionDurationSeconds?: string;
288
+ } | null;
269
289
  /**
270
290
  * The bucket's default storage class, used whenever no storageClass is specified for a newly-created object. This defines how objects in the bucket are stored and determines the SLA and the cost of storage. Values include MULTI_REGIONAL, REGIONAL, STANDARD, NEARLINE, COLDLINE, ARCHIVE, and DURABLE_REDUCED_AVAILABILITY. If this value is not specified when the bucket is created, it will default to STANDARD. For more information, see storage classes.
271
291
  */
@@ -377,6 +397,31 @@ export namespace storage_v1 {
377
397
  */
378
398
  nextPageToken?: string | null;
379
399
  }
400
+ /**
401
+ * A bulk restore objects request.
402
+ */
403
+ export interface Schema$BulkRestoreObjectsRequest {
404
+ /**
405
+ * If false (default), the restore will not overwrite live objects with the same name at the destination. This means some deleted objects may be skipped. If true, live objects will be overwritten resulting in a noncurrent object (if versioning is enabled). If versioning is not enabled, overwriting the object will result in a soft-deleted object. In either case, if a noncurrent object already exists with the same name, a live version can be written without issue.
406
+ */
407
+ allowOverwrite?: boolean | null;
408
+ /**
409
+ * If true, copies the source object's ACL; otherwise, uses the bucket's default object ACL. The default is false.
410
+ */
411
+ copySourceAcl?: boolean | null;
412
+ /**
413
+ * Restores only the objects matching any of the specified glob(s). If this parameter is not specified, all objects will be restored within the specified time range.
414
+ */
415
+ matchGlobs?: string[] | null;
416
+ /**
417
+ * Restores only the objects that were soft-deleted after this time.
418
+ */
419
+ softDeletedAfterTime?: string | null;
420
+ /**
421
+ * Restores only the objects that were soft-deleted before this time.
422
+ */
423
+ softDeletedBeforeTime?: string | null;
424
+ }
380
425
  /**
381
426
  * An notification channel used to watch for resource changes.
382
427
  */
@@ -464,6 +509,61 @@ export namespace storage_v1 {
464
509
  */
465
510
  title?: string | null;
466
511
  }
512
+ /**
513
+ * The response message for storage.buckets.operations.list.
514
+ */
515
+ export interface Schema$GoogleLongrunningListOperationsResponse {
516
+ /**
517
+ * The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results.
518
+ */
519
+ nextPageToken?: string | null;
520
+ /**
521
+ * A list of operations that matches the specified filter in the request.
522
+ */
523
+ operations?: Schema$GoogleLongrunningOperation[];
524
+ }
525
+ /**
526
+ * This resource represents a long-running operation that is the result of a network API call.
527
+ */
528
+ export interface Schema$GoogleLongrunningOperation {
529
+ /**
530
+ * If the value is "false", it means the operation is still in progress. If "true", the operation is completed, and either "error" or "response" is available.
531
+ */
532
+ done?: boolean | null;
533
+ /**
534
+ * The error result of the operation in case of failure or cancellation.
535
+ */
536
+ error?: Schema$GoogleRpcStatus;
537
+ /**
538
+ * Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
539
+ */
540
+ metadata?: {[key: string]: any} | null;
541
+ /**
542
+ * The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the "name" should be a resource name ending with "operations/{operationId\}".
543
+ */
544
+ name?: string | null;
545
+ /**
546
+ * The normal response of the operation in case of success. If the original method returns no data on success, such as "Delete", the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type "XxxResponse", where "Xxx" is the original method name. For example, if the original method name is "TakeSnapshot()", the inferred response type is "TakeSnapshotResponse".
547
+ */
548
+ response?: {[key: string]: any} | null;
549
+ }
550
+ /**
551
+ * The "Status" type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each "Status" message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).
552
+ */
553
+ export interface Schema$GoogleRpcStatus {
554
+ /**
555
+ * The status code, which should be an enum value of google.rpc.Code.
556
+ */
557
+ code?: number | null;
558
+ /**
559
+ * A list of messages that carry the error details. There is a common set of message types for APIs to use.
560
+ */
561
+ details?: Array<{[key: string]: any}> | null;
562
+ /**
563
+ * A developer-facing error message, which should be in English.
564
+ */
565
+ message?: string | null;
566
+ }
467
567
  /**
468
568
  * JSON template to produce a JSON-style HMAC Key resource for Create responses.
469
569
  */
@@ -543,6 +643,60 @@ export namespace storage_v1 {
543
643
  */
544
644
  nextPageToken?: string | null;
545
645
  }
646
+ /**
647
+ * A managed folder.
648
+ */
649
+ export interface Schema$ManagedFolder {
650
+ /**
651
+ * The name of the bucket containing this managed folder.
652
+ */
653
+ bucket?: string | null;
654
+ /**
655
+ * The creation time of the managed folder in RFC 3339 format.
656
+ */
657
+ createTime?: string | null;
658
+ /**
659
+ * The ID of the managed folder, including the bucket name and managed folder name.
660
+ */
661
+ id?: string | null;
662
+ /**
663
+ * The kind of item this is. For managed folders, this is always storage#managedFolder.
664
+ */
665
+ kind?: string | null;
666
+ /**
667
+ * The version of the metadata for this managed folder. Used for preconditions and for detecting changes in metadata.
668
+ */
669
+ metageneration?: string | null;
670
+ /**
671
+ * The name of the managed folder. Required if not specified by URL parameter.
672
+ */
673
+ name?: string | null;
674
+ /**
675
+ * The link to this managed folder.
676
+ */
677
+ selfLink?: string | null;
678
+ /**
679
+ * The last update time of the managed folder metadata in RFC 3339 format.
680
+ */
681
+ updateTime?: string | null;
682
+ }
683
+ /**
684
+ * A list of managed folders.
685
+ */
686
+ export interface Schema$ManagedFolders {
687
+ /**
688
+ * The list of items.
689
+ */
690
+ items?: Schema$ManagedFolder[];
691
+ /**
692
+ * The kind of item this is. For lists of managed folders, this is always storage#managedFolders.
693
+ */
694
+ kind?: string | null;
695
+ /**
696
+ * The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results.
697
+ */
698
+ nextPageToken?: string | null;
699
+ }
546
700
  /**
547
701
  * A subscription to receive Google PubSub notifications.
548
702
  */
@@ -660,6 +814,10 @@ export namespace storage_v1 {
660
814
  * The content generation of this object. Used for object versioning.
661
815
  */
662
816
  generation?: string | null;
817
+ /**
818
+ * This is the time (in the future) when the soft-deleted object will no longer be restorable. It is equal to the soft delete time plus the current soft delete retention duration of the bucket.
819
+ */
820
+ hardDeleteTime?: string | null;
663
821
  /**
664
822
  * The ID of the object, including the bucket name, object name, and generation number.
665
823
  */
@@ -696,6 +854,10 @@ export namespace storage_v1 {
696
854
  * The owner of the object. This will always be the uploader of the object.
697
855
  */
698
856
  owner?: {entity?: string; entityId?: string} | null;
857
+ /**
858
+ * A collection of object level retention parameters.
859
+ */
860
+ retention?: {mode?: string; retainUntilTime?: string} | null;
699
861
  /**
700
862
  * A server-determined value that specifies the earliest time that the object's retention period expires. This value is in RFC 3339 format. Note 1: This field is not provided for objects with an active event-based hold, since retention expiration is unknown until the hold is removed. Note 2: This value can be provided even when temporary hold is set (so that the user can reason about policy without having to first unset the temporary hold).
701
863
  */
@@ -708,6 +870,10 @@ export namespace storage_v1 {
708
870
  * Content-Length of the data in bytes.
709
871
  */
710
872
  size?: string | null;
873
+ /**
874
+ * The time at which the object became soft-deleted in RFC 3339 format.
875
+ */
876
+ softDeleteTime?: string | null;
711
877
  /**
712
878
  * Storage class of the object.
713
879
  */
@@ -721,7 +887,7 @@ export namespace storage_v1 {
721
887
  */
722
888
  timeCreated?: string | null;
723
889
  /**
724
- * The deletion time of the object in RFC 3339 format. Will be returned if and only if this version of the object has been deleted.
890
+ * The time at which the object became noncurrent in RFC 3339 format. Will be returned if and only if this version of the object has been deleted.
725
891
  */
726
892
  timeDeleted?: string | null;
727
893
  /**
@@ -836,7 +1002,7 @@ export namespace storage_v1 {
836
1002
  prefixes?: string[] | null;
837
1003
  }
838
1004
  /**
839
- * A bucket/object IAM policy.
1005
+ * A bucket/object/managedFolder IAM policy.
840
1006
  */
841
1007
  export interface Schema$Policy {
842
1008
  /**
@@ -856,7 +1022,7 @@ export namespace storage_v1 {
856
1022
  */
857
1023
  kind?: string | null;
858
1024
  /**
859
- * The ID of the resource to which this policy belongs. Will be of the form projects/_/buckets/bucket for buckets, and projects/_/buckets/bucket/objects/object for objects. A specific generation may be specified by appending #generationNumber to the end of the object name, e.g. projects/_/buckets/my-bucket/objects/data.txt#17. The current generation can be denoted with #0. This field is ignored on input.
1025
+ * The ID of the resource to which this policy belongs. Will be of the form projects/_/buckets/bucket for buckets, projects/_/buckets/bucket/objects/object for objects, and projects/_/buckets/bucket/managedFolders/managedFolder. A specific generation may be specified by appending #generationNumber to the end of the object name, e.g. projects/_/buckets/my-bucket/objects/data.txt#17. The current generation can be denoted with #0. This field is ignored on input.
860
1026
  */
861
1027
  resourceId?: string | null;
862
1028
  /**
@@ -907,7 +1073,7 @@ export namespace storage_v1 {
907
1073
  kind?: string | null;
908
1074
  }
909
1075
  /**
910
- * A storage.(buckets|objects).testIamPermissions response.
1076
+ * A storage.(buckets|objects|managedFolders).testIamPermissions response.
911
1077
  */
912
1078
  export interface Schema$TestIamPermissionsResponse {
913
1079
  /**
@@ -915,7 +1081,7 @@ export namespace storage_v1 {
915
1081
  */
916
1082
  kind?: string | null;
917
1083
  /**
918
- * The permissions held by the caller. Permissions are always of the format storage.resource.capability, where resource is one of buckets or objects. The supported permissions are as follows:
1084
+ * The permissions held by the caller. Permissions are always of the format storage.resource.capability, where resource is one of buckets, objects, or managedFolders. The supported permissions are as follows:
919
1085
  * - storage.buckets.delete — Delete bucket.
920
1086
  * - storage.buckets.get — Read bucket metadata.
921
1087
  * - storage.buckets.getIamPolicy — Read bucket IAM policy.
@@ -930,6 +1096,12 @@ export namespace storage_v1 {
930
1096
  * - storage.objects.list — List objects.
931
1097
  * - storage.objects.setIamPolicy — Update object IAM policy.
932
1098
  * - storage.objects.update — Update object metadata.
1099
+ * - storage.managedFolders.delete — Delete managed folder.
1100
+ * - storage.managedFolders.get — Read managed folder metadata.
1101
+ * - storage.managedFolders.getIamPolicy — Read managed folder IAM policy.
1102
+ * - storage.managedFolders.create — Create managed folder.
1103
+ * - storage.managedFolders.list — List managed folders.
1104
+ * - storage.managedFolders.setIamPolicy — Update managed folder IAM policy.
933
1105
  */
934
1106
  permissions?: string[] | null;
935
1107
  }
@@ -2500,6 +2672,10 @@ export namespace storage_v1 {
2500
2672
  userProject?: string;
2501
2673
  }
2502
2674
  export interface Params$Resource$Buckets$Insert extends StandardParameters {
2675
+ /**
2676
+ * When set to true, object retention is enabled for this bucket.
2677
+ */
2678
+ enableObjectRetention?: boolean;
2503
2679
  /**
2504
2680
  * Apply a predefined set of access controls to this bucket.
2505
2681
  */
@@ -3413,14 +3589,14 @@ export namespace storage_v1 {
3413
3589
  requestBody?: Schema$ObjectAccessControl;
3414
3590
  }
3415
3591
 
3416
- export class Resource$Notifications {
3592
+ export class Resource$Managedfolders {
3417
3593
  context: APIRequestContext;
3418
3594
  constructor(context: APIRequestContext) {
3419
3595
  this.context = context;
3420
3596
  }
3421
3597
 
3422
3598
  /**
3423
- * Permanently deletes a notification subscription.
3599
+ * Permanently deletes a managed folder.
3424
3600
  *
3425
3601
  * @param params - Parameters for request
3426
3602
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -3428,31 +3604,31 @@ export namespace storage_v1 {
3428
3604
  * @returns A promise if used with async/await, or void if used with a callback.
3429
3605
  */
3430
3606
  delete(
3431
- params: Params$Resource$Notifications$Delete,
3607
+ params: Params$Resource$Managedfolders$Delete,
3432
3608
  options: StreamMethodOptions
3433
3609
  ): GaxiosPromise<Readable>;
3434
3610
  delete(
3435
- params?: Params$Resource$Notifications$Delete,
3611
+ params?: Params$Resource$Managedfolders$Delete,
3436
3612
  options?: MethodOptions
3437
3613
  ): GaxiosPromise<void>;
3438
3614
  delete(
3439
- params: Params$Resource$Notifications$Delete,
3615
+ params: Params$Resource$Managedfolders$Delete,
3440
3616
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
3441
3617
  callback: BodyResponseCallback<Readable>
3442
3618
  ): void;
3443
3619
  delete(
3444
- params: Params$Resource$Notifications$Delete,
3620
+ params: Params$Resource$Managedfolders$Delete,
3445
3621
  options: MethodOptions | BodyResponseCallback<void>,
3446
3622
  callback: BodyResponseCallback<void>
3447
3623
  ): void;
3448
3624
  delete(
3449
- params: Params$Resource$Notifications$Delete,
3625
+ params: Params$Resource$Managedfolders$Delete,
3450
3626
  callback: BodyResponseCallback<void>
3451
3627
  ): void;
3452
3628
  delete(callback: BodyResponseCallback<void>): void;
3453
3629
  delete(
3454
3630
  paramsOrCallback?:
3455
- | Params$Resource$Notifications$Delete
3631
+ | Params$Resource$Managedfolders$Delete
3456
3632
  | BodyResponseCallback<void>
3457
3633
  | BodyResponseCallback<Readable>,
3458
3634
  optionsOrCallback?:
@@ -3463,12 +3639,12 @@ export namespace storage_v1 {
3463
3639
  callback?: BodyResponseCallback<void> | BodyResponseCallback<Readable>
3464
3640
  ): void | GaxiosPromise<void> | GaxiosPromise<Readable> {
3465
3641
  let params = (paramsOrCallback ||
3466
- {}) as Params$Resource$Notifications$Delete;
3642
+ {}) as Params$Resource$Managedfolders$Delete;
3467
3643
  let options = (optionsOrCallback || {}) as MethodOptions;
3468
3644
 
3469
3645
  if (typeof paramsOrCallback === 'function') {
3470
3646
  callback = paramsOrCallback;
3471
- params = {} as Params$Resource$Notifications$Delete;
3647
+ params = {} as Params$Resource$Managedfolders$Delete;
3472
3648
  options = {};
3473
3649
  }
3474
3650
 
@@ -3482,16 +3658,15 @@ export namespace storage_v1 {
3482
3658
  options: Object.assign(
3483
3659
  {
3484
3660
  url: (
3485
- rootUrl +
3486
- '/storage/v1/b/{bucket}/notificationConfigs/{notification}'
3661
+ rootUrl + '/storage/v1/b/{bucket}/managedFolders/{managedFolder}'
3487
3662
  ).replace(/([^:]\/)\/+/g, '$1'),
3488
3663
  method: 'DELETE',
3489
3664
  },
3490
3665
  options
3491
3666
  ),
3492
3667
  params,
3493
- requiredParams: ['bucket', 'notification'],
3494
- pathParams: ['bucket', 'notification'],
3668
+ requiredParams: ['bucket', 'managedFolder'],
3669
+ pathParams: ['bucket', 'managedFolder'],
3495
3670
  context: this.context,
3496
3671
  };
3497
3672
  if (callback) {
@@ -3505,7 +3680,7 @@ export namespace storage_v1 {
3505
3680
  }
3506
3681
 
3507
3682
  /**
3508
- * View a notification configuration.
3683
+ * Returns metadata of the specified managed folder.
3509
3684
  *
3510
3685
  * @param params - Parameters for request
3511
3686
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -3513,49 +3688,49 @@ export namespace storage_v1 {
3513
3688
  * @returns A promise if used with async/await, or void if used with a callback.
3514
3689
  */
3515
3690
  get(
3516
- params: Params$Resource$Notifications$Get,
3691
+ params: Params$Resource$Managedfolders$Get,
3517
3692
  options: StreamMethodOptions
3518
3693
  ): GaxiosPromise<Readable>;
3519
3694
  get(
3520
- params?: Params$Resource$Notifications$Get,
3695
+ params?: Params$Resource$Managedfolders$Get,
3521
3696
  options?: MethodOptions
3522
- ): GaxiosPromise<Schema$Notification>;
3697
+ ): GaxiosPromise<Schema$ManagedFolder>;
3523
3698
  get(
3524
- params: Params$Resource$Notifications$Get,
3699
+ params: Params$Resource$Managedfolders$Get,
3525
3700
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
3526
3701
  callback: BodyResponseCallback<Readable>
3527
3702
  ): void;
3528
3703
  get(
3529
- params: Params$Resource$Notifications$Get,
3530
- options: MethodOptions | BodyResponseCallback<Schema$Notification>,
3531
- callback: BodyResponseCallback<Schema$Notification>
3704
+ params: Params$Resource$Managedfolders$Get,
3705
+ options: MethodOptions | BodyResponseCallback<Schema$ManagedFolder>,
3706
+ callback: BodyResponseCallback<Schema$ManagedFolder>
3532
3707
  ): void;
3533
3708
  get(
3534
- params: Params$Resource$Notifications$Get,
3535
- callback: BodyResponseCallback<Schema$Notification>
3709
+ params: Params$Resource$Managedfolders$Get,
3710
+ callback: BodyResponseCallback<Schema$ManagedFolder>
3536
3711
  ): void;
3537
- get(callback: BodyResponseCallback<Schema$Notification>): void;
3712
+ get(callback: BodyResponseCallback<Schema$ManagedFolder>): void;
3538
3713
  get(
3539
3714
  paramsOrCallback?:
3540
- | Params$Resource$Notifications$Get
3541
- | BodyResponseCallback<Schema$Notification>
3715
+ | Params$Resource$Managedfolders$Get
3716
+ | BodyResponseCallback<Schema$ManagedFolder>
3542
3717
  | BodyResponseCallback<Readable>,
3543
3718
  optionsOrCallback?:
3544
3719
  | MethodOptions
3545
3720
  | StreamMethodOptions
3546
- | BodyResponseCallback<Schema$Notification>
3721
+ | BodyResponseCallback<Schema$ManagedFolder>
3547
3722
  | BodyResponseCallback<Readable>,
3548
3723
  callback?:
3549
- | BodyResponseCallback<Schema$Notification>
3724
+ | BodyResponseCallback<Schema$ManagedFolder>
3550
3725
  | BodyResponseCallback<Readable>
3551
- ): void | GaxiosPromise<Schema$Notification> | GaxiosPromise<Readable> {
3726
+ ): void | GaxiosPromise<Schema$ManagedFolder> | GaxiosPromise<Readable> {
3552
3727
  let params = (paramsOrCallback ||
3553
- {}) as Params$Resource$Notifications$Get;
3728
+ {}) as Params$Resource$Managedfolders$Get;
3554
3729
  let options = (optionsOrCallback || {}) as MethodOptions;
3555
3730
 
3556
3731
  if (typeof paramsOrCallback === 'function') {
3557
3732
  callback = paramsOrCallback;
3558
- params = {} as Params$Resource$Notifications$Get;
3733
+ params = {} as Params$Resource$Managedfolders$Get;
3559
3734
  options = {};
3560
3735
  }
3561
3736
 
@@ -3569,80 +3744,79 @@ export namespace storage_v1 {
3569
3744
  options: Object.assign(
3570
3745
  {
3571
3746
  url: (
3572
- rootUrl +
3573
- '/storage/v1/b/{bucket}/notificationConfigs/{notification}'
3747
+ rootUrl + '/storage/v1/b/{bucket}/managedFolders/{managedFolder}'
3574
3748
  ).replace(/([^:]\/)\/+/g, '$1'),
3575
3749
  method: 'GET',
3576
3750
  },
3577
3751
  options
3578
3752
  ),
3579
3753
  params,
3580
- requiredParams: ['bucket', 'notification'],
3581
- pathParams: ['bucket', 'notification'],
3754
+ requiredParams: ['bucket', 'managedFolder'],
3755
+ pathParams: ['bucket', 'managedFolder'],
3582
3756
  context: this.context,
3583
3757
  };
3584
3758
  if (callback) {
3585
- createAPIRequest<Schema$Notification>(
3759
+ createAPIRequest<Schema$ManagedFolder>(
3586
3760
  parameters,
3587
3761
  callback as BodyResponseCallback<unknown>
3588
3762
  );
3589
3763
  } else {
3590
- return createAPIRequest<Schema$Notification>(parameters);
3764
+ return createAPIRequest<Schema$ManagedFolder>(parameters);
3591
3765
  }
3592
3766
  }
3593
3767
 
3594
3768
  /**
3595
- * Creates a notification subscription for a given bucket.
3769
+ * Returns an IAM policy for the specified managed folder.
3596
3770
  *
3597
3771
  * @param params - Parameters for request
3598
3772
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
3599
3773
  * @param callback - Optional callback that handles the response.
3600
3774
  * @returns A promise if used with async/await, or void if used with a callback.
3601
3775
  */
3602
- insert(
3603
- params: Params$Resource$Notifications$Insert,
3776
+ getIamPolicy(
3777
+ params: Params$Resource$Managedfolders$Getiampolicy,
3604
3778
  options: StreamMethodOptions
3605
3779
  ): GaxiosPromise<Readable>;
3606
- insert(
3607
- params?: Params$Resource$Notifications$Insert,
3780
+ getIamPolicy(
3781
+ params?: Params$Resource$Managedfolders$Getiampolicy,
3608
3782
  options?: MethodOptions
3609
- ): GaxiosPromise<Schema$Notification>;
3610
- insert(
3611
- params: Params$Resource$Notifications$Insert,
3783
+ ): GaxiosPromise<Schema$Policy>;
3784
+ getIamPolicy(
3785
+ params: Params$Resource$Managedfolders$Getiampolicy,
3612
3786
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
3613
3787
  callback: BodyResponseCallback<Readable>
3614
3788
  ): void;
3615
- insert(
3616
- params: Params$Resource$Notifications$Insert,
3617
- options: MethodOptions | BodyResponseCallback<Schema$Notification>,
3618
- callback: BodyResponseCallback<Schema$Notification>
3789
+ getIamPolicy(
3790
+ params: Params$Resource$Managedfolders$Getiampolicy,
3791
+ options: MethodOptions | BodyResponseCallback<Schema$Policy>,
3792
+ callback: BodyResponseCallback<Schema$Policy>
3619
3793
  ): void;
3620
- insert(
3621
- params: Params$Resource$Notifications$Insert,
3622
- callback: BodyResponseCallback<Schema$Notification>
3794
+ getIamPolicy(
3795
+ params: Params$Resource$Managedfolders$Getiampolicy,
3796
+ callback: BodyResponseCallback<Schema$Policy>
3623
3797
  ): void;
3624
- insert(callback: BodyResponseCallback<Schema$Notification>): void;
3625
- insert(
3798
+ getIamPolicy(callback: BodyResponseCallback<Schema$Policy>): void;
3799
+ getIamPolicy(
3626
3800
  paramsOrCallback?:
3627
- | Params$Resource$Notifications$Insert
3628
- | BodyResponseCallback<Schema$Notification>
3801
+ | Params$Resource$Managedfolders$Getiampolicy
3802
+ | BodyResponseCallback<Schema$Policy>
3629
3803
  | BodyResponseCallback<Readable>,
3630
3804
  optionsOrCallback?:
3631
3805
  | MethodOptions
3632
3806
  | StreamMethodOptions
3633
- | BodyResponseCallback<Schema$Notification>
3807
+ | BodyResponseCallback<Schema$Policy>
3634
3808
  | BodyResponseCallback<Readable>,
3635
3809
  callback?:
3636
- | BodyResponseCallback<Schema$Notification>
3810
+ | BodyResponseCallback<Schema$Policy>
3637
3811
  | BodyResponseCallback<Readable>
3638
- ): void | GaxiosPromise<Schema$Notification> | GaxiosPromise<Readable> {
3812
+ ): void | GaxiosPromise<Schema$Policy> | GaxiosPromise<Readable> {
3639
3813
  let params = (paramsOrCallback ||
3640
- {}) as Params$Resource$Notifications$Insert;
3814
+ {}) as Params$Resource$Managedfolders$Getiampolicy;
3641
3815
  let options = (optionsOrCallback || {}) as MethodOptions;
3642
3816
 
3643
3817
  if (typeof paramsOrCallback === 'function') {
3644
3818
  callback = paramsOrCallback;
3645
- params = {} as Params$Resource$Notifications$Insert;
3819
+ params = {} as Params$Resource$Managedfolders$Getiampolicy;
3646
3820
  options = {};
3647
3821
  }
3648
3822
 
@@ -3656,79 +3830,80 @@ export namespace storage_v1 {
3656
3830
  options: Object.assign(
3657
3831
  {
3658
3832
  url: (
3659
- rootUrl + '/storage/v1/b/{bucket}/notificationConfigs'
3833
+ rootUrl +
3834
+ '/storage/v1/b/{bucket}/managedFolders/{managedFolder}/iam'
3660
3835
  ).replace(/([^:]\/)\/+/g, '$1'),
3661
- method: 'POST',
3836
+ method: 'GET',
3662
3837
  },
3663
3838
  options
3664
3839
  ),
3665
3840
  params,
3666
- requiredParams: ['bucket'],
3667
- pathParams: ['bucket'],
3841
+ requiredParams: ['bucket', 'managedFolder'],
3842
+ pathParams: ['bucket', 'managedFolder'],
3668
3843
  context: this.context,
3669
3844
  };
3670
3845
  if (callback) {
3671
- createAPIRequest<Schema$Notification>(
3846
+ createAPIRequest<Schema$Policy>(
3672
3847
  parameters,
3673
3848
  callback as BodyResponseCallback<unknown>
3674
3849
  );
3675
3850
  } else {
3676
- return createAPIRequest<Schema$Notification>(parameters);
3851
+ return createAPIRequest<Schema$Policy>(parameters);
3677
3852
  }
3678
3853
  }
3679
3854
 
3680
3855
  /**
3681
- * Retrieves a list of notification subscriptions for a given bucket.
3856
+ * Creates a new managed folder.
3682
3857
  *
3683
3858
  * @param params - Parameters for request
3684
3859
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
3685
3860
  * @param callback - Optional callback that handles the response.
3686
3861
  * @returns A promise if used with async/await, or void if used with a callback.
3687
3862
  */
3688
- list(
3689
- params: Params$Resource$Notifications$List,
3863
+ insert(
3864
+ params: Params$Resource$Managedfolders$Insert,
3690
3865
  options: StreamMethodOptions
3691
3866
  ): GaxiosPromise<Readable>;
3692
- list(
3693
- params?: Params$Resource$Notifications$List,
3867
+ insert(
3868
+ params?: Params$Resource$Managedfolders$Insert,
3694
3869
  options?: MethodOptions
3695
- ): GaxiosPromise<Schema$Notifications>;
3696
- list(
3697
- params: Params$Resource$Notifications$List,
3870
+ ): GaxiosPromise<Schema$ManagedFolder>;
3871
+ insert(
3872
+ params: Params$Resource$Managedfolders$Insert,
3698
3873
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
3699
3874
  callback: BodyResponseCallback<Readable>
3700
3875
  ): void;
3701
- list(
3702
- params: Params$Resource$Notifications$List,
3703
- options: MethodOptions | BodyResponseCallback<Schema$Notifications>,
3704
- callback: BodyResponseCallback<Schema$Notifications>
3876
+ insert(
3877
+ params: Params$Resource$Managedfolders$Insert,
3878
+ options: MethodOptions | BodyResponseCallback<Schema$ManagedFolder>,
3879
+ callback: BodyResponseCallback<Schema$ManagedFolder>
3705
3880
  ): void;
3706
- list(
3707
- params: Params$Resource$Notifications$List,
3708
- callback: BodyResponseCallback<Schema$Notifications>
3881
+ insert(
3882
+ params: Params$Resource$Managedfolders$Insert,
3883
+ callback: BodyResponseCallback<Schema$ManagedFolder>
3709
3884
  ): void;
3710
- list(callback: BodyResponseCallback<Schema$Notifications>): void;
3711
- list(
3885
+ insert(callback: BodyResponseCallback<Schema$ManagedFolder>): void;
3886
+ insert(
3712
3887
  paramsOrCallback?:
3713
- | Params$Resource$Notifications$List
3714
- | BodyResponseCallback<Schema$Notifications>
3888
+ | Params$Resource$Managedfolders$Insert
3889
+ | BodyResponseCallback<Schema$ManagedFolder>
3715
3890
  | BodyResponseCallback<Readable>,
3716
3891
  optionsOrCallback?:
3717
3892
  | MethodOptions
3718
3893
  | StreamMethodOptions
3719
- | BodyResponseCallback<Schema$Notifications>
3894
+ | BodyResponseCallback<Schema$ManagedFolder>
3720
3895
  | BodyResponseCallback<Readable>,
3721
3896
  callback?:
3722
- | BodyResponseCallback<Schema$Notifications>
3897
+ | BodyResponseCallback<Schema$ManagedFolder>
3723
3898
  | BodyResponseCallback<Readable>
3724
- ): void | GaxiosPromise<Schema$Notifications> | GaxiosPromise<Readable> {
3899
+ ): void | GaxiosPromise<Schema$ManagedFolder> | GaxiosPromise<Readable> {
3725
3900
  let params = (paramsOrCallback ||
3726
- {}) as Params$Resource$Notifications$List;
3901
+ {}) as Params$Resource$Managedfolders$Insert;
3727
3902
  let options = (optionsOrCallback || {}) as MethodOptions;
3728
3903
 
3729
3904
  if (typeof paramsOrCallback === 'function') {
3730
3905
  callback = paramsOrCallback;
3731
- params = {} as Params$Resource$Notifications$List;
3906
+ params = {} as Params$Resource$Managedfolders$Insert;
3732
3907
  options = {};
3733
3908
  }
3734
3909
 
@@ -3741,10 +3916,11 @@ export namespace storage_v1 {
3741
3916
  const parameters = {
3742
3917
  options: Object.assign(
3743
3918
  {
3744
- url: (
3745
- rootUrl + '/storage/v1/b/{bucket}/notificationConfigs'
3746
- ).replace(/([^:]\/)\/+/g, '$1'),
3747
- method: 'GET',
3919
+ url: (rootUrl + '/storage/v1/b/{bucket}/managedFolders').replace(
3920
+ /([^:]\/)\/+/g,
3921
+ '$1'
3922
+ ),
3923
+ method: 'POST',
3748
3924
  },
3749
3925
  options
3750
3926
  ),
@@ -3754,42 +3930,789 @@ export namespace storage_v1 {
3754
3930
  context: this.context,
3755
3931
  };
3756
3932
  if (callback) {
3757
- createAPIRequest<Schema$Notifications>(
3933
+ createAPIRequest<Schema$ManagedFolder>(
3758
3934
  parameters,
3759
3935
  callback as BodyResponseCallback<unknown>
3760
3936
  );
3761
3937
  } else {
3762
- return createAPIRequest<Schema$Notifications>(parameters);
3938
+ return createAPIRequest<Schema$ManagedFolder>(parameters);
3763
3939
  }
3764
3940
  }
3765
- }
3766
3941
 
3767
- export interface Params$Resource$Notifications$Delete
3768
- extends StandardParameters {
3769
- /**
3770
- * The parent bucket of the notification.
3771
- */
3772
- bucket?: string;
3773
- /**
3774
- * ID of the notification to delete.
3775
- */
3776
- notification?: string;
3777
- /**
3778
- * The project to be billed for this request. Required for Requester Pays buckets.
3779
- */
3780
- userProject?: string;
3781
- }
3782
- export interface Params$Resource$Notifications$Get
3783
- extends StandardParameters {
3784
- /**
3785
- * The parent bucket of the notification.
3786
- */
3787
- bucket?: string;
3788
3942
  /**
3789
- * Notification ID
3943
+ * Lists managed folders in the given bucket.
3944
+ *
3945
+ * @param params - Parameters for request
3946
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
3947
+ * @param callback - Optional callback that handles the response.
3948
+ * @returns A promise if used with async/await, or void if used with a callback.
3790
3949
  */
3791
- notification?: string;
3792
- /**
3950
+ list(
3951
+ params: Params$Resource$Managedfolders$List,
3952
+ options: StreamMethodOptions
3953
+ ): GaxiosPromise<Readable>;
3954
+ list(
3955
+ params?: Params$Resource$Managedfolders$List,
3956
+ options?: MethodOptions
3957
+ ): GaxiosPromise<Schema$ManagedFolders>;
3958
+ list(
3959
+ params: Params$Resource$Managedfolders$List,
3960
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
3961
+ callback: BodyResponseCallback<Readable>
3962
+ ): void;
3963
+ list(
3964
+ params: Params$Resource$Managedfolders$List,
3965
+ options: MethodOptions | BodyResponseCallback<Schema$ManagedFolders>,
3966
+ callback: BodyResponseCallback<Schema$ManagedFolders>
3967
+ ): void;
3968
+ list(
3969
+ params: Params$Resource$Managedfolders$List,
3970
+ callback: BodyResponseCallback<Schema$ManagedFolders>
3971
+ ): void;
3972
+ list(callback: BodyResponseCallback<Schema$ManagedFolders>): void;
3973
+ list(
3974
+ paramsOrCallback?:
3975
+ | Params$Resource$Managedfolders$List
3976
+ | BodyResponseCallback<Schema$ManagedFolders>
3977
+ | BodyResponseCallback<Readable>,
3978
+ optionsOrCallback?:
3979
+ | MethodOptions
3980
+ | StreamMethodOptions
3981
+ | BodyResponseCallback<Schema$ManagedFolders>
3982
+ | BodyResponseCallback<Readable>,
3983
+ callback?:
3984
+ | BodyResponseCallback<Schema$ManagedFolders>
3985
+ | BodyResponseCallback<Readable>
3986
+ ): void | GaxiosPromise<Schema$ManagedFolders> | GaxiosPromise<Readable> {
3987
+ let params = (paramsOrCallback ||
3988
+ {}) as Params$Resource$Managedfolders$List;
3989
+ let options = (optionsOrCallback || {}) as MethodOptions;
3990
+
3991
+ if (typeof paramsOrCallback === 'function') {
3992
+ callback = paramsOrCallback;
3993
+ params = {} as Params$Resource$Managedfolders$List;
3994
+ options = {};
3995
+ }
3996
+
3997
+ if (typeof optionsOrCallback === 'function') {
3998
+ callback = optionsOrCallback;
3999
+ options = {};
4000
+ }
4001
+
4002
+ const rootUrl = options.rootUrl || 'https://storage.googleapis.com/';
4003
+ const parameters = {
4004
+ options: Object.assign(
4005
+ {
4006
+ url: (rootUrl + '/storage/v1/b/{bucket}/managedFolders').replace(
4007
+ /([^:]\/)\/+/g,
4008
+ '$1'
4009
+ ),
4010
+ method: 'GET',
4011
+ },
4012
+ options
4013
+ ),
4014
+ params,
4015
+ requiredParams: ['bucket'],
4016
+ pathParams: ['bucket'],
4017
+ context: this.context,
4018
+ };
4019
+ if (callback) {
4020
+ createAPIRequest<Schema$ManagedFolders>(
4021
+ parameters,
4022
+ callback as BodyResponseCallback<unknown>
4023
+ );
4024
+ } else {
4025
+ return createAPIRequest<Schema$ManagedFolders>(parameters);
4026
+ }
4027
+ }
4028
+
4029
+ /**
4030
+ * Updates an IAM policy for the specified managed folder.
4031
+ *
4032
+ * @param params - Parameters for request
4033
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
4034
+ * @param callback - Optional callback that handles the response.
4035
+ * @returns A promise if used with async/await, or void if used with a callback.
4036
+ */
4037
+ setIamPolicy(
4038
+ params: Params$Resource$Managedfolders$Setiampolicy,
4039
+ options: StreamMethodOptions
4040
+ ): GaxiosPromise<Readable>;
4041
+ setIamPolicy(
4042
+ params?: Params$Resource$Managedfolders$Setiampolicy,
4043
+ options?: MethodOptions
4044
+ ): GaxiosPromise<Schema$Policy>;
4045
+ setIamPolicy(
4046
+ params: Params$Resource$Managedfolders$Setiampolicy,
4047
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
4048
+ callback: BodyResponseCallback<Readable>
4049
+ ): void;
4050
+ setIamPolicy(
4051
+ params: Params$Resource$Managedfolders$Setiampolicy,
4052
+ options: MethodOptions | BodyResponseCallback<Schema$Policy>,
4053
+ callback: BodyResponseCallback<Schema$Policy>
4054
+ ): void;
4055
+ setIamPolicy(
4056
+ params: Params$Resource$Managedfolders$Setiampolicy,
4057
+ callback: BodyResponseCallback<Schema$Policy>
4058
+ ): void;
4059
+ setIamPolicy(callback: BodyResponseCallback<Schema$Policy>): void;
4060
+ setIamPolicy(
4061
+ paramsOrCallback?:
4062
+ | Params$Resource$Managedfolders$Setiampolicy
4063
+ | BodyResponseCallback<Schema$Policy>
4064
+ | BodyResponseCallback<Readable>,
4065
+ optionsOrCallback?:
4066
+ | MethodOptions
4067
+ | StreamMethodOptions
4068
+ | BodyResponseCallback<Schema$Policy>
4069
+ | BodyResponseCallback<Readable>,
4070
+ callback?:
4071
+ | BodyResponseCallback<Schema$Policy>
4072
+ | BodyResponseCallback<Readable>
4073
+ ): void | GaxiosPromise<Schema$Policy> | GaxiosPromise<Readable> {
4074
+ let params = (paramsOrCallback ||
4075
+ {}) as Params$Resource$Managedfolders$Setiampolicy;
4076
+ let options = (optionsOrCallback || {}) as MethodOptions;
4077
+
4078
+ if (typeof paramsOrCallback === 'function') {
4079
+ callback = paramsOrCallback;
4080
+ params = {} as Params$Resource$Managedfolders$Setiampolicy;
4081
+ options = {};
4082
+ }
4083
+
4084
+ if (typeof optionsOrCallback === 'function') {
4085
+ callback = optionsOrCallback;
4086
+ options = {};
4087
+ }
4088
+
4089
+ const rootUrl = options.rootUrl || 'https://storage.googleapis.com/';
4090
+ const parameters = {
4091
+ options: Object.assign(
4092
+ {
4093
+ url: (
4094
+ rootUrl +
4095
+ '/storage/v1/b/{bucket}/managedFolders/{managedFolder}/iam'
4096
+ ).replace(/([^:]\/)\/+/g, '$1'),
4097
+ method: 'PUT',
4098
+ },
4099
+ options
4100
+ ),
4101
+ params,
4102
+ requiredParams: ['bucket', 'managedFolder'],
4103
+ pathParams: ['bucket', 'managedFolder'],
4104
+ context: this.context,
4105
+ };
4106
+ if (callback) {
4107
+ createAPIRequest<Schema$Policy>(
4108
+ parameters,
4109
+ callback as BodyResponseCallback<unknown>
4110
+ );
4111
+ } else {
4112
+ return createAPIRequest<Schema$Policy>(parameters);
4113
+ }
4114
+ }
4115
+
4116
+ /**
4117
+ * Tests a set of permissions on the given managed folder to see which, if any, are held by the caller.
4118
+ *
4119
+ * @param params - Parameters for request
4120
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
4121
+ * @param callback - Optional callback that handles the response.
4122
+ * @returns A promise if used with async/await, or void if used with a callback.
4123
+ */
4124
+ testIamPermissions(
4125
+ params: Params$Resource$Managedfolders$Testiampermissions,
4126
+ options: StreamMethodOptions
4127
+ ): GaxiosPromise<Readable>;
4128
+ testIamPermissions(
4129
+ params?: Params$Resource$Managedfolders$Testiampermissions,
4130
+ options?: MethodOptions
4131
+ ): GaxiosPromise<Schema$TestIamPermissionsResponse>;
4132
+ testIamPermissions(
4133
+ params: Params$Resource$Managedfolders$Testiampermissions,
4134
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
4135
+ callback: BodyResponseCallback<Readable>
4136
+ ): void;
4137
+ testIamPermissions(
4138
+ params: Params$Resource$Managedfolders$Testiampermissions,
4139
+ options:
4140
+ | MethodOptions
4141
+ | BodyResponseCallback<Schema$TestIamPermissionsResponse>,
4142
+ callback: BodyResponseCallback<Schema$TestIamPermissionsResponse>
4143
+ ): void;
4144
+ testIamPermissions(
4145
+ params: Params$Resource$Managedfolders$Testiampermissions,
4146
+ callback: BodyResponseCallback<Schema$TestIamPermissionsResponse>
4147
+ ): void;
4148
+ testIamPermissions(
4149
+ callback: BodyResponseCallback<Schema$TestIamPermissionsResponse>
4150
+ ): void;
4151
+ testIamPermissions(
4152
+ paramsOrCallback?:
4153
+ | Params$Resource$Managedfolders$Testiampermissions
4154
+ | BodyResponseCallback<Schema$TestIamPermissionsResponse>
4155
+ | BodyResponseCallback<Readable>,
4156
+ optionsOrCallback?:
4157
+ | MethodOptions
4158
+ | StreamMethodOptions
4159
+ | BodyResponseCallback<Schema$TestIamPermissionsResponse>
4160
+ | BodyResponseCallback<Readable>,
4161
+ callback?:
4162
+ | BodyResponseCallback<Schema$TestIamPermissionsResponse>
4163
+ | BodyResponseCallback<Readable>
4164
+ ):
4165
+ | void
4166
+ | GaxiosPromise<Schema$TestIamPermissionsResponse>
4167
+ | GaxiosPromise<Readable> {
4168
+ let params = (paramsOrCallback ||
4169
+ {}) as Params$Resource$Managedfolders$Testiampermissions;
4170
+ let options = (optionsOrCallback || {}) as MethodOptions;
4171
+
4172
+ if (typeof paramsOrCallback === 'function') {
4173
+ callback = paramsOrCallback;
4174
+ params = {} as Params$Resource$Managedfolders$Testiampermissions;
4175
+ options = {};
4176
+ }
4177
+
4178
+ if (typeof optionsOrCallback === 'function') {
4179
+ callback = optionsOrCallback;
4180
+ options = {};
4181
+ }
4182
+
4183
+ const rootUrl = options.rootUrl || 'https://storage.googleapis.com/';
4184
+ const parameters = {
4185
+ options: Object.assign(
4186
+ {
4187
+ url: (
4188
+ rootUrl +
4189
+ '/storage/v1/b/{bucket}/managedFolders/{managedFolder}/iam/testPermissions'
4190
+ ).replace(/([^:]\/)\/+/g, '$1'),
4191
+ method: 'GET',
4192
+ },
4193
+ options
4194
+ ),
4195
+ params,
4196
+ requiredParams: ['bucket', 'managedFolder', 'permissions'],
4197
+ pathParams: ['bucket', 'managedFolder'],
4198
+ context: this.context,
4199
+ };
4200
+ if (callback) {
4201
+ createAPIRequest<Schema$TestIamPermissionsResponse>(
4202
+ parameters,
4203
+ callback as BodyResponseCallback<unknown>
4204
+ );
4205
+ } else {
4206
+ return createAPIRequest<Schema$TestIamPermissionsResponse>(parameters);
4207
+ }
4208
+ }
4209
+ }
4210
+
4211
+ export interface Params$Resource$Managedfolders$Delete
4212
+ extends StandardParameters {
4213
+ /**
4214
+ * Name of the bucket containing the managed folder.
4215
+ */
4216
+ bucket?: string;
4217
+ /**
4218
+ * If set, only deletes the managed folder if its metageneration matches this value.
4219
+ */
4220
+ ifMetagenerationMatch?: string;
4221
+ /**
4222
+ * If set, only deletes the managed folder if its metageneration does not match this value.
4223
+ */
4224
+ ifMetagenerationNotMatch?: string;
4225
+ /**
4226
+ * The managed folder name/path.
4227
+ */
4228
+ managedFolder?: string;
4229
+ }
4230
+ export interface Params$Resource$Managedfolders$Get
4231
+ extends StandardParameters {
4232
+ /**
4233
+ * Name of the bucket containing the managed folder.
4234
+ */
4235
+ bucket?: string;
4236
+ /**
4237
+ * Makes the return of the managed folder metadata conditional on whether the managed folder's current metageneration matches the given value.
4238
+ */
4239
+ ifMetagenerationMatch?: string;
4240
+ /**
4241
+ * Makes the return of the managed folder metadata conditional on whether the managed folder's current metageneration does not match the given value.
4242
+ */
4243
+ ifMetagenerationNotMatch?: string;
4244
+ /**
4245
+ * The managed folder name/path.
4246
+ */
4247
+ managedFolder?: string;
4248
+ }
4249
+ export interface Params$Resource$Managedfolders$Getiampolicy
4250
+ extends StandardParameters {
4251
+ /**
4252
+ * Name of the bucket containing the managed folder.
4253
+ */
4254
+ bucket?: string;
4255
+ /**
4256
+ * The managed folder name/path.
4257
+ */
4258
+ managedFolder?: string;
4259
+ /**
4260
+ * The IAM policy format version to be returned. If the optionsRequestedPolicyVersion is for an older version that doesn't support part of the requested IAM policy, the request fails.
4261
+ */
4262
+ optionsRequestedPolicyVersion?: number;
4263
+ /**
4264
+ * The project to be billed for this request. Required for Requester Pays buckets.
4265
+ */
4266
+ userProject?: string;
4267
+ }
4268
+ export interface Params$Resource$Managedfolders$Insert
4269
+ extends StandardParameters {
4270
+ /**
4271
+ * Name of the bucket containing the managed folder.
4272
+ */
4273
+ bucket?: string;
4274
+
4275
+ /**
4276
+ * Request body metadata
4277
+ */
4278
+ requestBody?: Schema$ManagedFolder;
4279
+ }
4280
+ export interface Params$Resource$Managedfolders$List
4281
+ extends StandardParameters {
4282
+ /**
4283
+ * Name of the bucket containing the managed folder.
4284
+ */
4285
+ bucket?: string;
4286
+ /**
4287
+ * Maximum number of items return in a single page of responses.
4288
+ */
4289
+ pageSize?: number;
4290
+ /**
4291
+ * A previously-returned page token representing part of the larger set of results to view.
4292
+ */
4293
+ pageToken?: string;
4294
+ /**
4295
+ * The managed folder name/path prefix to filter the output list of results.
4296
+ */
4297
+ prefix?: string;
4298
+ }
4299
+ export interface Params$Resource$Managedfolders$Setiampolicy
4300
+ extends StandardParameters {
4301
+ /**
4302
+ * Name of the bucket containing the managed folder.
4303
+ */
4304
+ bucket?: string;
4305
+ /**
4306
+ * The managed folder name/path.
4307
+ */
4308
+ managedFolder?: string;
4309
+ /**
4310
+ * The project to be billed for this request. Required for Requester Pays buckets.
4311
+ */
4312
+ userProject?: string;
4313
+
4314
+ /**
4315
+ * Request body metadata
4316
+ */
4317
+ requestBody?: Schema$Policy;
4318
+ }
4319
+ export interface Params$Resource$Managedfolders$Testiampermissions
4320
+ extends StandardParameters {
4321
+ /**
4322
+ * Name of the bucket containing the managed folder.
4323
+ */
4324
+ bucket?: string;
4325
+ /**
4326
+ * The managed folder name/path.
4327
+ */
4328
+ managedFolder?: string;
4329
+ /**
4330
+ * Permissions to test.
4331
+ */
4332
+ permissions?: string[];
4333
+ /**
4334
+ * The project to be billed for this request. Required for Requester Pays buckets.
4335
+ */
4336
+ userProject?: string;
4337
+ }
4338
+
4339
+ export class Resource$Notifications {
4340
+ context: APIRequestContext;
4341
+ constructor(context: APIRequestContext) {
4342
+ this.context = context;
4343
+ }
4344
+
4345
+ /**
4346
+ * Permanently deletes a notification subscription.
4347
+ *
4348
+ * @param params - Parameters for request
4349
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
4350
+ * @param callback - Optional callback that handles the response.
4351
+ * @returns A promise if used with async/await, or void if used with a callback.
4352
+ */
4353
+ delete(
4354
+ params: Params$Resource$Notifications$Delete,
4355
+ options: StreamMethodOptions
4356
+ ): GaxiosPromise<Readable>;
4357
+ delete(
4358
+ params?: Params$Resource$Notifications$Delete,
4359
+ options?: MethodOptions
4360
+ ): GaxiosPromise<void>;
4361
+ delete(
4362
+ params: Params$Resource$Notifications$Delete,
4363
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
4364
+ callback: BodyResponseCallback<Readable>
4365
+ ): void;
4366
+ delete(
4367
+ params: Params$Resource$Notifications$Delete,
4368
+ options: MethodOptions | BodyResponseCallback<void>,
4369
+ callback: BodyResponseCallback<void>
4370
+ ): void;
4371
+ delete(
4372
+ params: Params$Resource$Notifications$Delete,
4373
+ callback: BodyResponseCallback<void>
4374
+ ): void;
4375
+ delete(callback: BodyResponseCallback<void>): void;
4376
+ delete(
4377
+ paramsOrCallback?:
4378
+ | Params$Resource$Notifications$Delete
4379
+ | BodyResponseCallback<void>
4380
+ | BodyResponseCallback<Readable>,
4381
+ optionsOrCallback?:
4382
+ | MethodOptions
4383
+ | StreamMethodOptions
4384
+ | BodyResponseCallback<void>
4385
+ | BodyResponseCallback<Readable>,
4386
+ callback?: BodyResponseCallback<void> | BodyResponseCallback<Readable>
4387
+ ): void | GaxiosPromise<void> | GaxiosPromise<Readable> {
4388
+ let params = (paramsOrCallback ||
4389
+ {}) as Params$Resource$Notifications$Delete;
4390
+ let options = (optionsOrCallback || {}) as MethodOptions;
4391
+
4392
+ if (typeof paramsOrCallback === 'function') {
4393
+ callback = paramsOrCallback;
4394
+ params = {} as Params$Resource$Notifications$Delete;
4395
+ options = {};
4396
+ }
4397
+
4398
+ if (typeof optionsOrCallback === 'function') {
4399
+ callback = optionsOrCallback;
4400
+ options = {};
4401
+ }
4402
+
4403
+ const rootUrl = options.rootUrl || 'https://storage.googleapis.com/';
4404
+ const parameters = {
4405
+ options: Object.assign(
4406
+ {
4407
+ url: (
4408
+ rootUrl +
4409
+ '/storage/v1/b/{bucket}/notificationConfigs/{notification}'
4410
+ ).replace(/([^:]\/)\/+/g, '$1'),
4411
+ method: 'DELETE',
4412
+ },
4413
+ options
4414
+ ),
4415
+ params,
4416
+ requiredParams: ['bucket', 'notification'],
4417
+ pathParams: ['bucket', 'notification'],
4418
+ context: this.context,
4419
+ };
4420
+ if (callback) {
4421
+ createAPIRequest<void>(
4422
+ parameters,
4423
+ callback as BodyResponseCallback<unknown>
4424
+ );
4425
+ } else {
4426
+ return createAPIRequest<void>(parameters);
4427
+ }
4428
+ }
4429
+
4430
+ /**
4431
+ * View a notification configuration.
4432
+ *
4433
+ * @param params - Parameters for request
4434
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
4435
+ * @param callback - Optional callback that handles the response.
4436
+ * @returns A promise if used with async/await, or void if used with a callback.
4437
+ */
4438
+ get(
4439
+ params: Params$Resource$Notifications$Get,
4440
+ options: StreamMethodOptions
4441
+ ): GaxiosPromise<Readable>;
4442
+ get(
4443
+ params?: Params$Resource$Notifications$Get,
4444
+ options?: MethodOptions
4445
+ ): GaxiosPromise<Schema$Notification>;
4446
+ get(
4447
+ params: Params$Resource$Notifications$Get,
4448
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
4449
+ callback: BodyResponseCallback<Readable>
4450
+ ): void;
4451
+ get(
4452
+ params: Params$Resource$Notifications$Get,
4453
+ options: MethodOptions | BodyResponseCallback<Schema$Notification>,
4454
+ callback: BodyResponseCallback<Schema$Notification>
4455
+ ): void;
4456
+ get(
4457
+ params: Params$Resource$Notifications$Get,
4458
+ callback: BodyResponseCallback<Schema$Notification>
4459
+ ): void;
4460
+ get(callback: BodyResponseCallback<Schema$Notification>): void;
4461
+ get(
4462
+ paramsOrCallback?:
4463
+ | Params$Resource$Notifications$Get
4464
+ | BodyResponseCallback<Schema$Notification>
4465
+ | BodyResponseCallback<Readable>,
4466
+ optionsOrCallback?:
4467
+ | MethodOptions
4468
+ | StreamMethodOptions
4469
+ | BodyResponseCallback<Schema$Notification>
4470
+ | BodyResponseCallback<Readable>,
4471
+ callback?:
4472
+ | BodyResponseCallback<Schema$Notification>
4473
+ | BodyResponseCallback<Readable>
4474
+ ): void | GaxiosPromise<Schema$Notification> | GaxiosPromise<Readable> {
4475
+ let params = (paramsOrCallback ||
4476
+ {}) as Params$Resource$Notifications$Get;
4477
+ let options = (optionsOrCallback || {}) as MethodOptions;
4478
+
4479
+ if (typeof paramsOrCallback === 'function') {
4480
+ callback = paramsOrCallback;
4481
+ params = {} as Params$Resource$Notifications$Get;
4482
+ options = {};
4483
+ }
4484
+
4485
+ if (typeof optionsOrCallback === 'function') {
4486
+ callback = optionsOrCallback;
4487
+ options = {};
4488
+ }
4489
+
4490
+ const rootUrl = options.rootUrl || 'https://storage.googleapis.com/';
4491
+ const parameters = {
4492
+ options: Object.assign(
4493
+ {
4494
+ url: (
4495
+ rootUrl +
4496
+ '/storage/v1/b/{bucket}/notificationConfigs/{notification}'
4497
+ ).replace(/([^:]\/)\/+/g, '$1'),
4498
+ method: 'GET',
4499
+ },
4500
+ options
4501
+ ),
4502
+ params,
4503
+ requiredParams: ['bucket', 'notification'],
4504
+ pathParams: ['bucket', 'notification'],
4505
+ context: this.context,
4506
+ };
4507
+ if (callback) {
4508
+ createAPIRequest<Schema$Notification>(
4509
+ parameters,
4510
+ callback as BodyResponseCallback<unknown>
4511
+ );
4512
+ } else {
4513
+ return createAPIRequest<Schema$Notification>(parameters);
4514
+ }
4515
+ }
4516
+
4517
+ /**
4518
+ * Creates a notification subscription for a given bucket.
4519
+ *
4520
+ * @param params - Parameters for request
4521
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
4522
+ * @param callback - Optional callback that handles the response.
4523
+ * @returns A promise if used with async/await, or void if used with a callback.
4524
+ */
4525
+ insert(
4526
+ params: Params$Resource$Notifications$Insert,
4527
+ options: StreamMethodOptions
4528
+ ): GaxiosPromise<Readable>;
4529
+ insert(
4530
+ params?: Params$Resource$Notifications$Insert,
4531
+ options?: MethodOptions
4532
+ ): GaxiosPromise<Schema$Notification>;
4533
+ insert(
4534
+ params: Params$Resource$Notifications$Insert,
4535
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
4536
+ callback: BodyResponseCallback<Readable>
4537
+ ): void;
4538
+ insert(
4539
+ params: Params$Resource$Notifications$Insert,
4540
+ options: MethodOptions | BodyResponseCallback<Schema$Notification>,
4541
+ callback: BodyResponseCallback<Schema$Notification>
4542
+ ): void;
4543
+ insert(
4544
+ params: Params$Resource$Notifications$Insert,
4545
+ callback: BodyResponseCallback<Schema$Notification>
4546
+ ): void;
4547
+ insert(callback: BodyResponseCallback<Schema$Notification>): void;
4548
+ insert(
4549
+ paramsOrCallback?:
4550
+ | Params$Resource$Notifications$Insert
4551
+ | BodyResponseCallback<Schema$Notification>
4552
+ | BodyResponseCallback<Readable>,
4553
+ optionsOrCallback?:
4554
+ | MethodOptions
4555
+ | StreamMethodOptions
4556
+ | BodyResponseCallback<Schema$Notification>
4557
+ | BodyResponseCallback<Readable>,
4558
+ callback?:
4559
+ | BodyResponseCallback<Schema$Notification>
4560
+ | BodyResponseCallback<Readable>
4561
+ ): void | GaxiosPromise<Schema$Notification> | GaxiosPromise<Readable> {
4562
+ let params = (paramsOrCallback ||
4563
+ {}) as Params$Resource$Notifications$Insert;
4564
+ let options = (optionsOrCallback || {}) as MethodOptions;
4565
+
4566
+ if (typeof paramsOrCallback === 'function') {
4567
+ callback = paramsOrCallback;
4568
+ params = {} as Params$Resource$Notifications$Insert;
4569
+ options = {};
4570
+ }
4571
+
4572
+ if (typeof optionsOrCallback === 'function') {
4573
+ callback = optionsOrCallback;
4574
+ options = {};
4575
+ }
4576
+
4577
+ const rootUrl = options.rootUrl || 'https://storage.googleapis.com/';
4578
+ const parameters = {
4579
+ options: Object.assign(
4580
+ {
4581
+ url: (
4582
+ rootUrl + '/storage/v1/b/{bucket}/notificationConfigs'
4583
+ ).replace(/([^:]\/)\/+/g, '$1'),
4584
+ method: 'POST',
4585
+ },
4586
+ options
4587
+ ),
4588
+ params,
4589
+ requiredParams: ['bucket'],
4590
+ pathParams: ['bucket'],
4591
+ context: this.context,
4592
+ };
4593
+ if (callback) {
4594
+ createAPIRequest<Schema$Notification>(
4595
+ parameters,
4596
+ callback as BodyResponseCallback<unknown>
4597
+ );
4598
+ } else {
4599
+ return createAPIRequest<Schema$Notification>(parameters);
4600
+ }
4601
+ }
4602
+
4603
+ /**
4604
+ * Retrieves a list of notification subscriptions for a given bucket.
4605
+ *
4606
+ * @param params - Parameters for request
4607
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
4608
+ * @param callback - Optional callback that handles the response.
4609
+ * @returns A promise if used with async/await, or void if used with a callback.
4610
+ */
4611
+ list(
4612
+ params: Params$Resource$Notifications$List,
4613
+ options: StreamMethodOptions
4614
+ ): GaxiosPromise<Readable>;
4615
+ list(
4616
+ params?: Params$Resource$Notifications$List,
4617
+ options?: MethodOptions
4618
+ ): GaxiosPromise<Schema$Notifications>;
4619
+ list(
4620
+ params: Params$Resource$Notifications$List,
4621
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
4622
+ callback: BodyResponseCallback<Readable>
4623
+ ): void;
4624
+ list(
4625
+ params: Params$Resource$Notifications$List,
4626
+ options: MethodOptions | BodyResponseCallback<Schema$Notifications>,
4627
+ callback: BodyResponseCallback<Schema$Notifications>
4628
+ ): void;
4629
+ list(
4630
+ params: Params$Resource$Notifications$List,
4631
+ callback: BodyResponseCallback<Schema$Notifications>
4632
+ ): void;
4633
+ list(callback: BodyResponseCallback<Schema$Notifications>): void;
4634
+ list(
4635
+ paramsOrCallback?:
4636
+ | Params$Resource$Notifications$List
4637
+ | BodyResponseCallback<Schema$Notifications>
4638
+ | BodyResponseCallback<Readable>,
4639
+ optionsOrCallback?:
4640
+ | MethodOptions
4641
+ | StreamMethodOptions
4642
+ | BodyResponseCallback<Schema$Notifications>
4643
+ | BodyResponseCallback<Readable>,
4644
+ callback?:
4645
+ | BodyResponseCallback<Schema$Notifications>
4646
+ | BodyResponseCallback<Readable>
4647
+ ): void | GaxiosPromise<Schema$Notifications> | GaxiosPromise<Readable> {
4648
+ let params = (paramsOrCallback ||
4649
+ {}) as Params$Resource$Notifications$List;
4650
+ let options = (optionsOrCallback || {}) as MethodOptions;
4651
+
4652
+ if (typeof paramsOrCallback === 'function') {
4653
+ callback = paramsOrCallback;
4654
+ params = {} as Params$Resource$Notifications$List;
4655
+ options = {};
4656
+ }
4657
+
4658
+ if (typeof optionsOrCallback === 'function') {
4659
+ callback = optionsOrCallback;
4660
+ options = {};
4661
+ }
4662
+
4663
+ const rootUrl = options.rootUrl || 'https://storage.googleapis.com/';
4664
+ const parameters = {
4665
+ options: Object.assign(
4666
+ {
4667
+ url: (
4668
+ rootUrl + '/storage/v1/b/{bucket}/notificationConfigs'
4669
+ ).replace(/([^:]\/)\/+/g, '$1'),
4670
+ method: 'GET',
4671
+ },
4672
+ options
4673
+ ),
4674
+ params,
4675
+ requiredParams: ['bucket'],
4676
+ pathParams: ['bucket'],
4677
+ context: this.context,
4678
+ };
4679
+ if (callback) {
4680
+ createAPIRequest<Schema$Notifications>(
4681
+ parameters,
4682
+ callback as BodyResponseCallback<unknown>
4683
+ );
4684
+ } else {
4685
+ return createAPIRequest<Schema$Notifications>(parameters);
4686
+ }
4687
+ }
4688
+ }
4689
+
4690
+ export interface Params$Resource$Notifications$Delete
4691
+ extends StandardParameters {
4692
+ /**
4693
+ * The parent bucket of the notification.
4694
+ */
4695
+ bucket?: string;
4696
+ /**
4697
+ * ID of the notification to delete.
4698
+ */
4699
+ notification?: string;
4700
+ /**
4701
+ * The project to be billed for this request. Required for Requester Pays buckets.
4702
+ */
4703
+ userProject?: string;
4704
+ }
4705
+ export interface Params$Resource$Notifications$Get
4706
+ extends StandardParameters {
4707
+ /**
4708
+ * The parent bucket of the notification.
4709
+ */
4710
+ bucket?: string;
4711
+ /**
4712
+ * Notification ID
4713
+ */
4714
+ notification?: string;
4715
+ /**
3793
4716
  * The project to be billed for this request. Required for Requester Pays buckets.
3794
4717
  */
3795
4718
  userProject?: string;
@@ -4514,6 +5437,100 @@ export namespace storage_v1 {
4514
5437
  this.context = context;
4515
5438
  }
4516
5439
 
5440
+ /**
5441
+ * Initiates a long-running bulk restore operation on the specified bucket.
5442
+ *
5443
+ * @param params - Parameters for request
5444
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
5445
+ * @param callback - Optional callback that handles the response.
5446
+ * @returns A promise if used with async/await, or void if used with a callback.
5447
+ */
5448
+ bulkRestore(
5449
+ params: Params$Resource$Objects$Bulkrestore,
5450
+ options: StreamMethodOptions
5451
+ ): GaxiosPromise<Readable>;
5452
+ bulkRestore(
5453
+ params?: Params$Resource$Objects$Bulkrestore,
5454
+ options?: MethodOptions
5455
+ ): GaxiosPromise<Schema$GoogleLongrunningOperation>;
5456
+ bulkRestore(
5457
+ params: Params$Resource$Objects$Bulkrestore,
5458
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
5459
+ callback: BodyResponseCallback<Readable>
5460
+ ): void;
5461
+ bulkRestore(
5462
+ params: Params$Resource$Objects$Bulkrestore,
5463
+ options:
5464
+ | MethodOptions
5465
+ | BodyResponseCallback<Schema$GoogleLongrunningOperation>,
5466
+ callback: BodyResponseCallback<Schema$GoogleLongrunningOperation>
5467
+ ): void;
5468
+ bulkRestore(
5469
+ params: Params$Resource$Objects$Bulkrestore,
5470
+ callback: BodyResponseCallback<Schema$GoogleLongrunningOperation>
5471
+ ): void;
5472
+ bulkRestore(
5473
+ callback: BodyResponseCallback<Schema$GoogleLongrunningOperation>
5474
+ ): void;
5475
+ bulkRestore(
5476
+ paramsOrCallback?:
5477
+ | Params$Resource$Objects$Bulkrestore
5478
+ | BodyResponseCallback<Schema$GoogleLongrunningOperation>
5479
+ | BodyResponseCallback<Readable>,
5480
+ optionsOrCallback?:
5481
+ | MethodOptions
5482
+ | StreamMethodOptions
5483
+ | BodyResponseCallback<Schema$GoogleLongrunningOperation>
5484
+ | BodyResponseCallback<Readable>,
5485
+ callback?:
5486
+ | BodyResponseCallback<Schema$GoogleLongrunningOperation>
5487
+ | BodyResponseCallback<Readable>
5488
+ ):
5489
+ | void
5490
+ | GaxiosPromise<Schema$GoogleLongrunningOperation>
5491
+ | GaxiosPromise<Readable> {
5492
+ let params = (paramsOrCallback ||
5493
+ {}) as Params$Resource$Objects$Bulkrestore;
5494
+ let options = (optionsOrCallback || {}) as MethodOptions;
5495
+
5496
+ if (typeof paramsOrCallback === 'function') {
5497
+ callback = paramsOrCallback;
5498
+ params = {} as Params$Resource$Objects$Bulkrestore;
5499
+ options = {};
5500
+ }
5501
+
5502
+ if (typeof optionsOrCallback === 'function') {
5503
+ callback = optionsOrCallback;
5504
+ options = {};
5505
+ }
5506
+
5507
+ const rootUrl = options.rootUrl || 'https://storage.googleapis.com/';
5508
+ const parameters = {
5509
+ options: Object.assign(
5510
+ {
5511
+ url: (rootUrl + '/storage/v1/b/{bucket}/o/bulkRestore').replace(
5512
+ /([^:]\/)\/+/g,
5513
+ '$1'
5514
+ ),
5515
+ method: 'POST',
5516
+ },
5517
+ options
5518
+ ),
5519
+ params,
5520
+ requiredParams: ['bucket'],
5521
+ pathParams: ['bucket'],
5522
+ context: this.context,
5523
+ };
5524
+ if (callback) {
5525
+ createAPIRequest<Schema$GoogleLongrunningOperation>(
5526
+ parameters,
5527
+ callback as BodyResponseCallback<unknown>
5528
+ );
5529
+ } else {
5530
+ return createAPIRequest<Schema$GoogleLongrunningOperation>(parameters);
5531
+ }
5532
+ }
5533
+
4517
5534
  /**
4518
5535
  * Concatenates a list of existing objects into a new object in the same bucket.
4519
5536
  *
@@ -5215,6 +6232,91 @@ export namespace storage_v1 {
5215
6232
  }
5216
6233
  }
5217
6234
 
6235
+ /**
6236
+ * Restores a soft-deleted object.
6237
+ *
6238
+ * @param params - Parameters for request
6239
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
6240
+ * @param callback - Optional callback that handles the response.
6241
+ * @returns A promise if used with async/await, or void if used with a callback.
6242
+ */
6243
+ restore(
6244
+ params: Params$Resource$Objects$Restore,
6245
+ options: StreamMethodOptions
6246
+ ): GaxiosPromise<Readable>;
6247
+ restore(
6248
+ params?: Params$Resource$Objects$Restore,
6249
+ options?: MethodOptions
6250
+ ): GaxiosPromise<Schema$Object>;
6251
+ restore(
6252
+ params: Params$Resource$Objects$Restore,
6253
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
6254
+ callback: BodyResponseCallback<Readable>
6255
+ ): void;
6256
+ restore(
6257
+ params: Params$Resource$Objects$Restore,
6258
+ options: MethodOptions | BodyResponseCallback<Schema$Object>,
6259
+ callback: BodyResponseCallback<Schema$Object>
6260
+ ): void;
6261
+ restore(
6262
+ params: Params$Resource$Objects$Restore,
6263
+ callback: BodyResponseCallback<Schema$Object>
6264
+ ): void;
6265
+ restore(callback: BodyResponseCallback<Schema$Object>): void;
6266
+ restore(
6267
+ paramsOrCallback?:
6268
+ | Params$Resource$Objects$Restore
6269
+ | BodyResponseCallback<Schema$Object>
6270
+ | BodyResponseCallback<Readable>,
6271
+ optionsOrCallback?:
6272
+ | MethodOptions
6273
+ | StreamMethodOptions
6274
+ | BodyResponseCallback<Schema$Object>
6275
+ | BodyResponseCallback<Readable>,
6276
+ callback?:
6277
+ | BodyResponseCallback<Schema$Object>
6278
+ | BodyResponseCallback<Readable>
6279
+ ): void | GaxiosPromise<Schema$Object> | GaxiosPromise<Readable> {
6280
+ let params = (paramsOrCallback || {}) as Params$Resource$Objects$Restore;
6281
+ let options = (optionsOrCallback || {}) as MethodOptions;
6282
+
6283
+ if (typeof paramsOrCallback === 'function') {
6284
+ callback = paramsOrCallback;
6285
+ params = {} as Params$Resource$Objects$Restore;
6286
+ options = {};
6287
+ }
6288
+
6289
+ if (typeof optionsOrCallback === 'function') {
6290
+ callback = optionsOrCallback;
6291
+ options = {};
6292
+ }
6293
+
6294
+ const rootUrl = options.rootUrl || 'https://storage.googleapis.com/';
6295
+ const parameters = {
6296
+ options: Object.assign(
6297
+ {
6298
+ url: (
6299
+ rootUrl + '/storage/v1/b/{bucket}/o/{object}/restore'
6300
+ ).replace(/([^:]\/)\/+/g, '$1'),
6301
+ method: 'POST',
6302
+ },
6303
+ options
6304
+ ),
6305
+ params,
6306
+ requiredParams: ['bucket', 'object'],
6307
+ pathParams: ['bucket', 'object'],
6308
+ context: this.context,
6309
+ };
6310
+ if (callback) {
6311
+ createAPIRequest<Schema$Object>(
6312
+ parameters,
6313
+ callback as BodyResponseCallback<unknown>
6314
+ );
6315
+ } else {
6316
+ return createAPIRequest<Schema$Object>(parameters);
6317
+ }
6318
+ }
6319
+
5218
6320
  /**
5219
6321
  * Rewrites a source object to a destination object. Optionally overrides metadata.
5220
6322
  *
@@ -5664,6 +6766,18 @@ export namespace storage_v1 {
5664
6766
  }
5665
6767
  }
5666
6768
 
6769
+ export interface Params$Resource$Objects$Bulkrestore
6770
+ extends StandardParameters {
6771
+ /**
6772
+ * Name of the bucket in which the object resides.
6773
+ */
6774
+ bucket?: string;
6775
+
6776
+ /**
6777
+ * Request body metadata
6778
+ */
6779
+ requestBody?: Schema$BulkRestoreObjectsRequest;
6780
+ }
5667
6781
  export interface Params$Resource$Objects$Compose extends StandardParameters {
5668
6782
  /**
5669
6783
  * Name of the bucket containing the source objects. The destination object is stored in this bucket.
@@ -5841,6 +6955,10 @@ export namespace storage_v1 {
5841
6955
  * Set of properties to return. Defaults to noAcl.
5842
6956
  */
5843
6957
  projection?: string;
6958
+ /**
6959
+ * If true, only soft-deleted object versions will be listed. The default is false. For more information, see Soft Delete.
6960
+ */
6961
+ softDeleted?: boolean;
5844
6962
  /**
5845
6963
  * The project to be billed for this request. Required for Requester Pays buckets.
5846
6964
  */
@@ -5944,6 +7062,10 @@ export namespace storage_v1 {
5944
7062
  * Filter results to objects whose names are lexicographically before endOffset. If startOffset is also set, the objects listed will have names between startOffset (inclusive) and endOffset (exclusive).
5945
7063
  */
5946
7064
  endOffset?: string;
7065
+ /**
7066
+ * Only applicable if delimiter is set to '/'. If true, will also include folders and managed folders (besides objects) in the returned prefixes.
7067
+ */
7068
+ includeFoldersAsPrefixes?: boolean;
5947
7069
  /**
5948
7070
  * If true, objects that end in exactly one instance of delimiter will have their metadata included in items in addition to prefixes.
5949
7071
  */
@@ -5968,6 +7090,10 @@ export namespace storage_v1 {
5968
7090
  * Set of properties to return. Defaults to noAcl.
5969
7091
  */
5970
7092
  projection?: string;
7093
+ /**
7094
+ * If true, only soft-deleted object versions will be listed. The default is false. For more information, see Soft Delete.
7095
+ */
7096
+ softDeleted?: boolean;
5971
7097
  /**
5972
7098
  * Filter results to objects whose names are lexicographically equal to or after startOffset. If endOffset is also set, the objects listed will have names between startOffset (inclusive) and endOffset (exclusive).
5973
7099
  */
@@ -5981,45 +7107,96 @@ export namespace storage_v1 {
5981
7107
  */
5982
7108
  versions?: boolean;
5983
7109
  }
5984
- export interface Params$Resource$Objects$Patch extends StandardParameters {
7110
+ export interface Params$Resource$Objects$Patch extends StandardParameters {
7111
+ /**
7112
+ * Name of the bucket in which the object resides.
7113
+ */
7114
+ bucket?: string;
7115
+ /**
7116
+ * If present, selects a specific revision of this object (as opposed to the latest version, the default).
7117
+ */
7118
+ generation?: string;
7119
+ /**
7120
+ * 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.
7121
+ */
7122
+ ifGenerationMatch?: string;
7123
+ /**
7124
+ * 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.
7125
+ */
7126
+ ifGenerationNotMatch?: string;
7127
+ /**
7128
+ * Makes the operation conditional on whether the object's current metageneration matches the given value.
7129
+ */
7130
+ ifMetagenerationMatch?: string;
7131
+ /**
7132
+ * Makes the operation conditional on whether the object's current metageneration does not match the given value.
7133
+ */
7134
+ ifMetagenerationNotMatch?: string;
7135
+ /**
7136
+ * Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).
7137
+ */
7138
+ object?: string;
7139
+ /**
7140
+ * Must be true to remove the retention configuration, reduce its unlocked retention period, or change its mode from unlocked to locked.
7141
+ */
7142
+ overrideUnlockedRetention?: boolean;
7143
+ /**
7144
+ * Apply a predefined set of access controls to this object.
7145
+ */
7146
+ predefinedAcl?: string;
7147
+ /**
7148
+ * Set of properties to return. Defaults to full.
7149
+ */
7150
+ projection?: string;
7151
+ /**
7152
+ * The project to be billed for this request, for Requester Pays buckets.
7153
+ */
7154
+ userProject?: string;
7155
+
7156
+ /**
7157
+ * Request body metadata
7158
+ */
7159
+ requestBody?: Schema$Object;
7160
+ }
7161
+ export interface Params$Resource$Objects$Restore extends StandardParameters {
5985
7162
  /**
5986
7163
  * Name of the bucket in which the object resides.
5987
7164
  */
5988
7165
  bucket?: string;
5989
7166
  /**
5990
- * If present, selects a specific revision of this object (as opposed to the latest version, the default).
7167
+ * If true, copies the source object's ACL; otherwise, uses the bucket's default object ACL. The default is false.
7168
+ */
7169
+ copySourceAcl?: boolean;
7170
+ /**
7171
+ * Selects a specific revision of this object.
5991
7172
  */
5992
7173
  generation?: string;
5993
7174
  /**
5994
- * 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.
7175
+ * Makes the operation conditional on whether the object's one live generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.
5995
7176
  */
5996
7177
  ifGenerationMatch?: string;
5997
7178
  /**
5998
- * 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.
7179
+ * Makes the operation conditional on whether none of the object's live generations 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.
5999
7180
  */
6000
7181
  ifGenerationNotMatch?: string;
6001
7182
  /**
6002
- * Makes the operation conditional on whether the object's current metageneration matches the given value.
7183
+ * Makes the operation conditional on whether the object's one live metageneration matches the given value.
6003
7184
  */
6004
7185
  ifMetagenerationMatch?: string;
6005
7186
  /**
6006
- * Makes the operation conditional on whether the object's current metageneration does not match the given value.
7187
+ * Makes the operation conditional on whether none of the object's live metagenerations match the given value.
6007
7188
  */
6008
7189
  ifMetagenerationNotMatch?: string;
6009
7190
  /**
6010
- * Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).
7191
+ * Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.
6011
7192
  */
6012
7193
  object?: string;
6013
- /**
6014
- * Apply a predefined set of access controls to this object.
6015
- */
6016
- predefinedAcl?: string;
6017
7194
  /**
6018
7195
  * Set of properties to return. Defaults to full.
6019
7196
  */
6020
7197
  projection?: string;
6021
7198
  /**
6022
- * The project to be billed for this request, for Requester Pays buckets.
7199
+ * The project to be billed for this request. Required for Requester Pays buckets.
6023
7200
  */
6024
7201
  userProject?: string;
6025
7202
 
@@ -6187,6 +7364,10 @@ export namespace storage_v1 {
6187
7364
  * Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).
6188
7365
  */
6189
7366
  object?: string;
7367
+ /**
7368
+ * Must be true to remove the retention configuration, reduce its unlocked retention period, or change its mode from unlocked to locked.
7369
+ */
7370
+ overrideUnlockedRetention?: boolean;
6190
7371
  /**
6191
7372
  * Apply a predefined set of access controls to this object.
6192
7373
  */
@@ -6257,6 +7438,324 @@ export namespace storage_v1 {
6257
7438
  requestBody?: Schema$Channel;
6258
7439
  }
6259
7440
 
7441
+ export class Resource$Operations {
7442
+ context: APIRequestContext;
7443
+ constructor(context: APIRequestContext) {
7444
+ this.context = context;
7445
+ }
7446
+
7447
+ /**
7448
+ * Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed.
7449
+ *
7450
+ * @param params - Parameters for request
7451
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
7452
+ * @param callback - Optional callback that handles the response.
7453
+ * @returns A promise if used with async/await, or void if used with a callback.
7454
+ */
7455
+ cancel(
7456
+ params: Params$Resource$Operations$Cancel,
7457
+ options: StreamMethodOptions
7458
+ ): GaxiosPromise<Readable>;
7459
+ cancel(
7460
+ params?: Params$Resource$Operations$Cancel,
7461
+ options?: MethodOptions
7462
+ ): GaxiosPromise<void>;
7463
+ cancel(
7464
+ params: Params$Resource$Operations$Cancel,
7465
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
7466
+ callback: BodyResponseCallback<Readable>
7467
+ ): void;
7468
+ cancel(
7469
+ params: Params$Resource$Operations$Cancel,
7470
+ options: MethodOptions | BodyResponseCallback<void>,
7471
+ callback: BodyResponseCallback<void>
7472
+ ): void;
7473
+ cancel(
7474
+ params: Params$Resource$Operations$Cancel,
7475
+ callback: BodyResponseCallback<void>
7476
+ ): void;
7477
+ cancel(callback: BodyResponseCallback<void>): void;
7478
+ cancel(
7479
+ paramsOrCallback?:
7480
+ | Params$Resource$Operations$Cancel
7481
+ | BodyResponseCallback<void>
7482
+ | BodyResponseCallback<Readable>,
7483
+ optionsOrCallback?:
7484
+ | MethodOptions
7485
+ | StreamMethodOptions
7486
+ | BodyResponseCallback<void>
7487
+ | BodyResponseCallback<Readable>,
7488
+ callback?: BodyResponseCallback<void> | BodyResponseCallback<Readable>
7489
+ ): void | GaxiosPromise<void> | GaxiosPromise<Readable> {
7490
+ let params = (paramsOrCallback ||
7491
+ {}) as Params$Resource$Operations$Cancel;
7492
+ let options = (optionsOrCallback || {}) as MethodOptions;
7493
+
7494
+ if (typeof paramsOrCallback === 'function') {
7495
+ callback = paramsOrCallback;
7496
+ params = {} as Params$Resource$Operations$Cancel;
7497
+ options = {};
7498
+ }
7499
+
7500
+ if (typeof optionsOrCallback === 'function') {
7501
+ callback = optionsOrCallback;
7502
+ options = {};
7503
+ }
7504
+
7505
+ const rootUrl = options.rootUrl || 'https://storage.googleapis.com/';
7506
+ const parameters = {
7507
+ options: Object.assign(
7508
+ {
7509
+ url: (
7510
+ rootUrl + '/storage/v1/b/{bucket}/operations/{operationId}/cancel'
7511
+ ).replace(/([^:]\/)\/+/g, '$1'),
7512
+ method: 'POST',
7513
+ },
7514
+ options
7515
+ ),
7516
+ params,
7517
+ requiredParams: ['bucket', 'operationId'],
7518
+ pathParams: ['bucket', 'operationId'],
7519
+ context: this.context,
7520
+ };
7521
+ if (callback) {
7522
+ createAPIRequest<void>(
7523
+ parameters,
7524
+ callback as BodyResponseCallback<unknown>
7525
+ );
7526
+ } else {
7527
+ return createAPIRequest<void>(parameters);
7528
+ }
7529
+ }
7530
+
7531
+ /**
7532
+ * Gets the latest state of a long-running operation.
7533
+ *
7534
+ * @param params - Parameters for request
7535
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
7536
+ * @param callback - Optional callback that handles the response.
7537
+ * @returns A promise if used with async/await, or void if used with a callback.
7538
+ */
7539
+ get(
7540
+ params: Params$Resource$Operations$Get,
7541
+ options: StreamMethodOptions
7542
+ ): GaxiosPromise<Readable>;
7543
+ get(
7544
+ params?: Params$Resource$Operations$Get,
7545
+ options?: MethodOptions
7546
+ ): GaxiosPromise<Schema$GoogleLongrunningOperation>;
7547
+ get(
7548
+ params: Params$Resource$Operations$Get,
7549
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
7550
+ callback: BodyResponseCallback<Readable>
7551
+ ): void;
7552
+ get(
7553
+ params: Params$Resource$Operations$Get,
7554
+ options:
7555
+ | MethodOptions
7556
+ | BodyResponseCallback<Schema$GoogleLongrunningOperation>,
7557
+ callback: BodyResponseCallback<Schema$GoogleLongrunningOperation>
7558
+ ): void;
7559
+ get(
7560
+ params: Params$Resource$Operations$Get,
7561
+ callback: BodyResponseCallback<Schema$GoogleLongrunningOperation>
7562
+ ): void;
7563
+ get(
7564
+ callback: BodyResponseCallback<Schema$GoogleLongrunningOperation>
7565
+ ): void;
7566
+ get(
7567
+ paramsOrCallback?:
7568
+ | Params$Resource$Operations$Get
7569
+ | BodyResponseCallback<Schema$GoogleLongrunningOperation>
7570
+ | BodyResponseCallback<Readable>,
7571
+ optionsOrCallback?:
7572
+ | MethodOptions
7573
+ | StreamMethodOptions
7574
+ | BodyResponseCallback<Schema$GoogleLongrunningOperation>
7575
+ | BodyResponseCallback<Readable>,
7576
+ callback?:
7577
+ | BodyResponseCallback<Schema$GoogleLongrunningOperation>
7578
+ | BodyResponseCallback<Readable>
7579
+ ):
7580
+ | void
7581
+ | GaxiosPromise<Schema$GoogleLongrunningOperation>
7582
+ | GaxiosPromise<Readable> {
7583
+ let params = (paramsOrCallback || {}) as Params$Resource$Operations$Get;
7584
+ let options = (optionsOrCallback || {}) as MethodOptions;
7585
+
7586
+ if (typeof paramsOrCallback === 'function') {
7587
+ callback = paramsOrCallback;
7588
+ params = {} as Params$Resource$Operations$Get;
7589
+ options = {};
7590
+ }
7591
+
7592
+ if (typeof optionsOrCallback === 'function') {
7593
+ callback = optionsOrCallback;
7594
+ options = {};
7595
+ }
7596
+
7597
+ const rootUrl = options.rootUrl || 'https://storage.googleapis.com/';
7598
+ const parameters = {
7599
+ options: Object.assign(
7600
+ {
7601
+ url: (
7602
+ rootUrl + '/storage/v1/b/{bucket}/operations/{operationId}'
7603
+ ).replace(/([^:]\/)\/+/g, '$1'),
7604
+ method: 'GET',
7605
+ },
7606
+ options
7607
+ ),
7608
+ params,
7609
+ requiredParams: ['bucket', 'operationId'],
7610
+ pathParams: ['bucket', 'operationId'],
7611
+ context: this.context,
7612
+ };
7613
+ if (callback) {
7614
+ createAPIRequest<Schema$GoogleLongrunningOperation>(
7615
+ parameters,
7616
+ callback as BodyResponseCallback<unknown>
7617
+ );
7618
+ } else {
7619
+ return createAPIRequest<Schema$GoogleLongrunningOperation>(parameters);
7620
+ }
7621
+ }
7622
+
7623
+ /**
7624
+ * Lists operations that match the specified filter in the request.
7625
+ *
7626
+ * @param params - Parameters for request
7627
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
7628
+ * @param callback - Optional callback that handles the response.
7629
+ * @returns A promise if used with async/await, or void if used with a callback.
7630
+ */
7631
+ list(
7632
+ params: Params$Resource$Operations$List,
7633
+ options: StreamMethodOptions
7634
+ ): GaxiosPromise<Readable>;
7635
+ list(
7636
+ params?: Params$Resource$Operations$List,
7637
+ options?: MethodOptions
7638
+ ): GaxiosPromise<Schema$GoogleLongrunningListOperationsResponse>;
7639
+ list(
7640
+ params: Params$Resource$Operations$List,
7641
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
7642
+ callback: BodyResponseCallback<Readable>
7643
+ ): void;
7644
+ list(
7645
+ params: Params$Resource$Operations$List,
7646
+ options:
7647
+ | MethodOptions
7648
+ | BodyResponseCallback<Schema$GoogleLongrunningListOperationsResponse>,
7649
+ callback: BodyResponseCallback<Schema$GoogleLongrunningListOperationsResponse>
7650
+ ): void;
7651
+ list(
7652
+ params: Params$Resource$Operations$List,
7653
+ callback: BodyResponseCallback<Schema$GoogleLongrunningListOperationsResponse>
7654
+ ): void;
7655
+ list(
7656
+ callback: BodyResponseCallback<Schema$GoogleLongrunningListOperationsResponse>
7657
+ ): void;
7658
+ list(
7659
+ paramsOrCallback?:
7660
+ | Params$Resource$Operations$List
7661
+ | BodyResponseCallback<Schema$GoogleLongrunningListOperationsResponse>
7662
+ | BodyResponseCallback<Readable>,
7663
+ optionsOrCallback?:
7664
+ | MethodOptions
7665
+ | StreamMethodOptions
7666
+ | BodyResponseCallback<Schema$GoogleLongrunningListOperationsResponse>
7667
+ | BodyResponseCallback<Readable>,
7668
+ callback?:
7669
+ | BodyResponseCallback<Schema$GoogleLongrunningListOperationsResponse>
7670
+ | BodyResponseCallback<Readable>
7671
+ ):
7672
+ | void
7673
+ | GaxiosPromise<Schema$GoogleLongrunningListOperationsResponse>
7674
+ | GaxiosPromise<Readable> {
7675
+ let params = (paramsOrCallback || {}) as Params$Resource$Operations$List;
7676
+ let options = (optionsOrCallback || {}) as MethodOptions;
7677
+
7678
+ if (typeof paramsOrCallback === 'function') {
7679
+ callback = paramsOrCallback;
7680
+ params = {} as Params$Resource$Operations$List;
7681
+ options = {};
7682
+ }
7683
+
7684
+ if (typeof optionsOrCallback === 'function') {
7685
+ callback = optionsOrCallback;
7686
+ options = {};
7687
+ }
7688
+
7689
+ const rootUrl = options.rootUrl || 'https://storage.googleapis.com/';
7690
+ const parameters = {
7691
+ options: Object.assign(
7692
+ {
7693
+ url: (rootUrl + '/storage/v1/b/{bucket}/operations').replace(
7694
+ /([^:]\/)\/+/g,
7695
+ '$1'
7696
+ ),
7697
+ method: 'GET',
7698
+ },
7699
+ options
7700
+ ),
7701
+ params,
7702
+ requiredParams: ['bucket'],
7703
+ pathParams: ['bucket'],
7704
+ context: this.context,
7705
+ };
7706
+ if (callback) {
7707
+ createAPIRequest<Schema$GoogleLongrunningListOperationsResponse>(
7708
+ parameters,
7709
+ callback as BodyResponseCallback<unknown>
7710
+ );
7711
+ } else {
7712
+ return createAPIRequest<Schema$GoogleLongrunningListOperationsResponse>(
7713
+ parameters
7714
+ );
7715
+ }
7716
+ }
7717
+ }
7718
+
7719
+ export interface Params$Resource$Operations$Cancel
7720
+ extends StandardParameters {
7721
+ /**
7722
+ * The parent bucket of the operation resource.
7723
+ */
7724
+ bucket?: string;
7725
+ /**
7726
+ * The ID of the operation resource.
7727
+ */
7728
+ operationId?: string;
7729
+ }
7730
+ export interface Params$Resource$Operations$Get extends StandardParameters {
7731
+ /**
7732
+ * The parent bucket of the operation resource.
7733
+ */
7734
+ bucket?: string;
7735
+ /**
7736
+ * The ID of the operation resource.
7737
+ */
7738
+ operationId?: string;
7739
+ }
7740
+ export interface Params$Resource$Operations$List extends StandardParameters {
7741
+ /**
7742
+ * Name of the bucket in which to look for operations.
7743
+ */
7744
+ bucket?: string;
7745
+ /**
7746
+ * A filter to narrow down results to a preferred subset. The filtering language is documented in more detail in [AIP-160](https://google.aip.dev/160).
7747
+ */
7748
+ filter?: string;
7749
+ /**
7750
+ * Maximum number of items to return in a single page of responses. Fewer total results may be returned than requested. The service uses this parameter or 100 items, whichever is smaller.
7751
+ */
7752
+ pageSize?: number;
7753
+ /**
7754
+ * A previously-returned page token representing part of the larger set of results to view.
7755
+ */
7756
+ pageToken?: string;
7757
+ }
7758
+
6260
7759
  export class Resource$Projects {
6261
7760
  context: APIRequestContext;
6262
7761
  hmacKeys: Resource$Projects$Hmackeys;