@googleapis/storage 5.1.1 → 6.0.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/CHANGELOG.md +25 -0
- package/build/v1.d.ts +306 -1
- package/build/v1.js +159 -0
- package/build/v1.js.map +1 -1
- package/package.json +3 -3
- package/v1.ts +688 -2
package/v1.ts
CHANGED
|
@@ -107,6 +107,7 @@ export namespace storage_v1 {
|
|
|
107
107
|
notifications: Resource$Notifications;
|
|
108
108
|
objectAccessControls: Resource$Objectaccesscontrols;
|
|
109
109
|
objects: Resource$Objects;
|
|
110
|
+
operations: Resource$Operations;
|
|
110
111
|
projects: Resource$Projects;
|
|
111
112
|
|
|
112
113
|
constructor(options: GlobalOptions, google?: GoogleConfigurable) {
|
|
@@ -127,6 +128,7 @@ export namespace storage_v1 {
|
|
|
127
128
|
this.context
|
|
128
129
|
);
|
|
129
130
|
this.objects = new Resource$Objects(this.context);
|
|
131
|
+
this.operations = new Resource$Operations(this.context);
|
|
130
132
|
this.projects = new Resource$Projects(this.context);
|
|
131
133
|
}
|
|
132
134
|
}
|
|
@@ -142,7 +144,12 @@ export namespace storage_v1 {
|
|
|
142
144
|
/**
|
|
143
145
|
* The bucket's Autoclass configuration.
|
|
144
146
|
*/
|
|
145
|
-
autoclass?: {
|
|
147
|
+
autoclass?: {
|
|
148
|
+
enabled?: boolean;
|
|
149
|
+
terminalStorageClass?: string;
|
|
150
|
+
terminalStorageClassUpdateTime?: string;
|
|
151
|
+
toggleTime?: string;
|
|
152
|
+
} | null;
|
|
146
153
|
/**
|
|
147
154
|
* The bucket's billing configuration.
|
|
148
155
|
*/
|
|
@@ -238,6 +245,10 @@ export namespace storage_v1 {
|
|
|
238
245
|
* The name of the bucket.
|
|
239
246
|
*/
|
|
240
247
|
name?: string | null;
|
|
248
|
+
/**
|
|
249
|
+
* The bucket's object retention config.
|
|
250
|
+
*/
|
|
251
|
+
objectRetention?: {mode?: string} | null;
|
|
241
252
|
/**
|
|
242
253
|
* The owner of the bucket. This is always the project team's owner group.
|
|
243
254
|
*/
|
|
@@ -266,6 +277,13 @@ export namespace storage_v1 {
|
|
|
266
277
|
* The URI of this bucket.
|
|
267
278
|
*/
|
|
268
279
|
selfLink?: string | null;
|
|
280
|
+
/**
|
|
281
|
+
* The bucket's soft delete policy, which defines the period of time that soft-deleted objects will be retained, and cannot be permanently deleted.
|
|
282
|
+
*/
|
|
283
|
+
softDeletePolicy?: {
|
|
284
|
+
effectiveTime?: string;
|
|
285
|
+
retentionDurationSeconds?: string;
|
|
286
|
+
} | null;
|
|
269
287
|
/**
|
|
270
288
|
* 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
289
|
*/
|
|
@@ -377,6 +395,31 @@ export namespace storage_v1 {
|
|
|
377
395
|
*/
|
|
378
396
|
nextPageToken?: string | null;
|
|
379
397
|
}
|
|
398
|
+
/**
|
|
399
|
+
* A bulk restore objects request.
|
|
400
|
+
*/
|
|
401
|
+
export interface Schema$BulkRestoreObjectsRequest {
|
|
402
|
+
/**
|
|
403
|
+
* 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.
|
|
404
|
+
*/
|
|
405
|
+
allowOverwrite?: boolean | null;
|
|
406
|
+
/**
|
|
407
|
+
* If true, copies the source object's ACL; otherwise, uses the bucket's default object ACL. The default is false.
|
|
408
|
+
*/
|
|
409
|
+
copySourceAcl?: boolean | null;
|
|
410
|
+
/**
|
|
411
|
+
* 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.
|
|
412
|
+
*/
|
|
413
|
+
matchGlobs?: string[] | null;
|
|
414
|
+
/**
|
|
415
|
+
* Restores only the objects that were soft-deleted after this time.
|
|
416
|
+
*/
|
|
417
|
+
softDeletedAfterTime?: string | null;
|
|
418
|
+
/**
|
|
419
|
+
* Restores only the objects that were soft-deleted before this time.
|
|
420
|
+
*/
|
|
421
|
+
softDeletedBeforeTime?: string | null;
|
|
422
|
+
}
|
|
380
423
|
/**
|
|
381
424
|
* An notification channel used to watch for resource changes.
|
|
382
425
|
*/
|
|
@@ -464,6 +507,61 @@ export namespace storage_v1 {
|
|
|
464
507
|
*/
|
|
465
508
|
title?: string | null;
|
|
466
509
|
}
|
|
510
|
+
/**
|
|
511
|
+
* The response message for storage.buckets.operations.list.
|
|
512
|
+
*/
|
|
513
|
+
export interface Schema$GoogleLongrunningListOperationsResponse {
|
|
514
|
+
/**
|
|
515
|
+
* The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results.
|
|
516
|
+
*/
|
|
517
|
+
nextPageToken?: string | null;
|
|
518
|
+
/**
|
|
519
|
+
* A list of operations that matches the specified filter in the request.
|
|
520
|
+
*/
|
|
521
|
+
operations?: Schema$GoogleLongrunningOperation[];
|
|
522
|
+
}
|
|
523
|
+
/**
|
|
524
|
+
* This resource represents a long-running operation that is the result of a network API call.
|
|
525
|
+
*/
|
|
526
|
+
export interface Schema$GoogleLongrunningOperation {
|
|
527
|
+
/**
|
|
528
|
+
* 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.
|
|
529
|
+
*/
|
|
530
|
+
done?: boolean | null;
|
|
531
|
+
/**
|
|
532
|
+
* The error result of the operation in case of failure or cancellation.
|
|
533
|
+
*/
|
|
534
|
+
error?: Schema$GoogleRpcStatus;
|
|
535
|
+
/**
|
|
536
|
+
* 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.
|
|
537
|
+
*/
|
|
538
|
+
metadata?: {[key: string]: any} | null;
|
|
539
|
+
/**
|
|
540
|
+
* 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\}".
|
|
541
|
+
*/
|
|
542
|
+
name?: string | null;
|
|
543
|
+
/**
|
|
544
|
+
* 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".
|
|
545
|
+
*/
|
|
546
|
+
response?: {[key: string]: any} | null;
|
|
547
|
+
}
|
|
548
|
+
/**
|
|
549
|
+
* 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).
|
|
550
|
+
*/
|
|
551
|
+
export interface Schema$GoogleRpcStatus {
|
|
552
|
+
/**
|
|
553
|
+
* The status code, which should be an enum value of google.rpc.Code.
|
|
554
|
+
*/
|
|
555
|
+
code?: number | null;
|
|
556
|
+
/**
|
|
557
|
+
* A list of messages that carry the error details. There is a common set of message types for APIs to use.
|
|
558
|
+
*/
|
|
559
|
+
details?: Array<{[key: string]: any}> | null;
|
|
560
|
+
/**
|
|
561
|
+
* A developer-facing error message, which should be in English.
|
|
562
|
+
*/
|
|
563
|
+
message?: string | null;
|
|
564
|
+
}
|
|
467
565
|
/**
|
|
468
566
|
* JSON template to produce a JSON-style HMAC Key resource for Create responses.
|
|
469
567
|
*/
|
|
@@ -660,6 +758,10 @@ export namespace storage_v1 {
|
|
|
660
758
|
* The content generation of this object. Used for object versioning.
|
|
661
759
|
*/
|
|
662
760
|
generation?: string | null;
|
|
761
|
+
/**
|
|
762
|
+
* 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.
|
|
763
|
+
*/
|
|
764
|
+
hardDeleteTime?: string | null;
|
|
663
765
|
/**
|
|
664
766
|
* The ID of the object, including the bucket name, object name, and generation number.
|
|
665
767
|
*/
|
|
@@ -696,6 +798,10 @@ export namespace storage_v1 {
|
|
|
696
798
|
* The owner of the object. This will always be the uploader of the object.
|
|
697
799
|
*/
|
|
698
800
|
owner?: {entity?: string; entityId?: string} | null;
|
|
801
|
+
/**
|
|
802
|
+
* A collection of object level retention parameters.
|
|
803
|
+
*/
|
|
804
|
+
retention?: {mode?: string; retainUntilTime?: string} | null;
|
|
699
805
|
/**
|
|
700
806
|
* 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
807
|
*/
|
|
@@ -708,6 +814,10 @@ export namespace storage_v1 {
|
|
|
708
814
|
* Content-Length of the data in bytes.
|
|
709
815
|
*/
|
|
710
816
|
size?: string | null;
|
|
817
|
+
/**
|
|
818
|
+
* The time at which the object became soft-deleted in RFC 3339 format.
|
|
819
|
+
*/
|
|
820
|
+
softDeleteTime?: string | null;
|
|
711
821
|
/**
|
|
712
822
|
* Storage class of the object.
|
|
713
823
|
*/
|
|
@@ -721,7 +831,7 @@ export namespace storage_v1 {
|
|
|
721
831
|
*/
|
|
722
832
|
timeCreated?: string | null;
|
|
723
833
|
/**
|
|
724
|
-
* The
|
|
834
|
+
* 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
835
|
*/
|
|
726
836
|
timeDeleted?: string | null;
|
|
727
837
|
/**
|
|
@@ -2500,6 +2610,10 @@ export namespace storage_v1 {
|
|
|
2500
2610
|
userProject?: string;
|
|
2501
2611
|
}
|
|
2502
2612
|
export interface Params$Resource$Buckets$Insert extends StandardParameters {
|
|
2613
|
+
/**
|
|
2614
|
+
* When set to true, object retention is enabled for this bucket.
|
|
2615
|
+
*/
|
|
2616
|
+
enableObjectRetention?: boolean;
|
|
2503
2617
|
/**
|
|
2504
2618
|
* Apply a predefined set of access controls to this bucket.
|
|
2505
2619
|
*/
|
|
@@ -4514,6 +4628,100 @@ export namespace storage_v1 {
|
|
|
4514
4628
|
this.context = context;
|
|
4515
4629
|
}
|
|
4516
4630
|
|
|
4631
|
+
/**
|
|
4632
|
+
* Initiates a long-running bulk restore operation on the specified bucket.
|
|
4633
|
+
*
|
|
4634
|
+
* @param params - Parameters for request
|
|
4635
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
4636
|
+
* @param callback - Optional callback that handles the response.
|
|
4637
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
4638
|
+
*/
|
|
4639
|
+
bulkRestore(
|
|
4640
|
+
params: Params$Resource$Objects$Bulkrestore,
|
|
4641
|
+
options: StreamMethodOptions
|
|
4642
|
+
): GaxiosPromise<Readable>;
|
|
4643
|
+
bulkRestore(
|
|
4644
|
+
params?: Params$Resource$Objects$Bulkrestore,
|
|
4645
|
+
options?: MethodOptions
|
|
4646
|
+
): GaxiosPromise<Schema$GoogleLongrunningOperation>;
|
|
4647
|
+
bulkRestore(
|
|
4648
|
+
params: Params$Resource$Objects$Bulkrestore,
|
|
4649
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
4650
|
+
callback: BodyResponseCallback<Readable>
|
|
4651
|
+
): void;
|
|
4652
|
+
bulkRestore(
|
|
4653
|
+
params: Params$Resource$Objects$Bulkrestore,
|
|
4654
|
+
options:
|
|
4655
|
+
| MethodOptions
|
|
4656
|
+
| BodyResponseCallback<Schema$GoogleLongrunningOperation>,
|
|
4657
|
+
callback: BodyResponseCallback<Schema$GoogleLongrunningOperation>
|
|
4658
|
+
): void;
|
|
4659
|
+
bulkRestore(
|
|
4660
|
+
params: Params$Resource$Objects$Bulkrestore,
|
|
4661
|
+
callback: BodyResponseCallback<Schema$GoogleLongrunningOperation>
|
|
4662
|
+
): void;
|
|
4663
|
+
bulkRestore(
|
|
4664
|
+
callback: BodyResponseCallback<Schema$GoogleLongrunningOperation>
|
|
4665
|
+
): void;
|
|
4666
|
+
bulkRestore(
|
|
4667
|
+
paramsOrCallback?:
|
|
4668
|
+
| Params$Resource$Objects$Bulkrestore
|
|
4669
|
+
| BodyResponseCallback<Schema$GoogleLongrunningOperation>
|
|
4670
|
+
| BodyResponseCallback<Readable>,
|
|
4671
|
+
optionsOrCallback?:
|
|
4672
|
+
| MethodOptions
|
|
4673
|
+
| StreamMethodOptions
|
|
4674
|
+
| BodyResponseCallback<Schema$GoogleLongrunningOperation>
|
|
4675
|
+
| BodyResponseCallback<Readable>,
|
|
4676
|
+
callback?:
|
|
4677
|
+
| BodyResponseCallback<Schema$GoogleLongrunningOperation>
|
|
4678
|
+
| BodyResponseCallback<Readable>
|
|
4679
|
+
):
|
|
4680
|
+
| void
|
|
4681
|
+
| GaxiosPromise<Schema$GoogleLongrunningOperation>
|
|
4682
|
+
| GaxiosPromise<Readable> {
|
|
4683
|
+
let params = (paramsOrCallback ||
|
|
4684
|
+
{}) as Params$Resource$Objects$Bulkrestore;
|
|
4685
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
4686
|
+
|
|
4687
|
+
if (typeof paramsOrCallback === 'function') {
|
|
4688
|
+
callback = paramsOrCallback;
|
|
4689
|
+
params = {} as Params$Resource$Objects$Bulkrestore;
|
|
4690
|
+
options = {};
|
|
4691
|
+
}
|
|
4692
|
+
|
|
4693
|
+
if (typeof optionsOrCallback === 'function') {
|
|
4694
|
+
callback = optionsOrCallback;
|
|
4695
|
+
options = {};
|
|
4696
|
+
}
|
|
4697
|
+
|
|
4698
|
+
const rootUrl = options.rootUrl || 'https://storage.googleapis.com/';
|
|
4699
|
+
const parameters = {
|
|
4700
|
+
options: Object.assign(
|
|
4701
|
+
{
|
|
4702
|
+
url: (rootUrl + '/storage/v1/b/{bucket}/o/bulkRestore').replace(
|
|
4703
|
+
/([^:]\/)\/+/g,
|
|
4704
|
+
'$1'
|
|
4705
|
+
),
|
|
4706
|
+
method: 'POST',
|
|
4707
|
+
},
|
|
4708
|
+
options
|
|
4709
|
+
),
|
|
4710
|
+
params,
|
|
4711
|
+
requiredParams: ['bucket'],
|
|
4712
|
+
pathParams: ['bucket'],
|
|
4713
|
+
context: this.context,
|
|
4714
|
+
};
|
|
4715
|
+
if (callback) {
|
|
4716
|
+
createAPIRequest<Schema$GoogleLongrunningOperation>(
|
|
4717
|
+
parameters,
|
|
4718
|
+
callback as BodyResponseCallback<unknown>
|
|
4719
|
+
);
|
|
4720
|
+
} else {
|
|
4721
|
+
return createAPIRequest<Schema$GoogleLongrunningOperation>(parameters);
|
|
4722
|
+
}
|
|
4723
|
+
}
|
|
4724
|
+
|
|
4517
4725
|
/**
|
|
4518
4726
|
* Concatenates a list of existing objects into a new object in the same bucket.
|
|
4519
4727
|
*
|
|
@@ -5215,6 +5423,91 @@ export namespace storage_v1 {
|
|
|
5215
5423
|
}
|
|
5216
5424
|
}
|
|
5217
5425
|
|
|
5426
|
+
/**
|
|
5427
|
+
* Restores a soft-deleted object.
|
|
5428
|
+
*
|
|
5429
|
+
* @param params - Parameters for request
|
|
5430
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
5431
|
+
* @param callback - Optional callback that handles the response.
|
|
5432
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
5433
|
+
*/
|
|
5434
|
+
restore(
|
|
5435
|
+
params: Params$Resource$Objects$Restore,
|
|
5436
|
+
options: StreamMethodOptions
|
|
5437
|
+
): GaxiosPromise<Readable>;
|
|
5438
|
+
restore(
|
|
5439
|
+
params?: Params$Resource$Objects$Restore,
|
|
5440
|
+
options?: MethodOptions
|
|
5441
|
+
): GaxiosPromise<Schema$Object>;
|
|
5442
|
+
restore(
|
|
5443
|
+
params: Params$Resource$Objects$Restore,
|
|
5444
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
5445
|
+
callback: BodyResponseCallback<Readable>
|
|
5446
|
+
): void;
|
|
5447
|
+
restore(
|
|
5448
|
+
params: Params$Resource$Objects$Restore,
|
|
5449
|
+
options: MethodOptions | BodyResponseCallback<Schema$Object>,
|
|
5450
|
+
callback: BodyResponseCallback<Schema$Object>
|
|
5451
|
+
): void;
|
|
5452
|
+
restore(
|
|
5453
|
+
params: Params$Resource$Objects$Restore,
|
|
5454
|
+
callback: BodyResponseCallback<Schema$Object>
|
|
5455
|
+
): void;
|
|
5456
|
+
restore(callback: BodyResponseCallback<Schema$Object>): void;
|
|
5457
|
+
restore(
|
|
5458
|
+
paramsOrCallback?:
|
|
5459
|
+
| Params$Resource$Objects$Restore
|
|
5460
|
+
| BodyResponseCallback<Schema$Object>
|
|
5461
|
+
| BodyResponseCallback<Readable>,
|
|
5462
|
+
optionsOrCallback?:
|
|
5463
|
+
| MethodOptions
|
|
5464
|
+
| StreamMethodOptions
|
|
5465
|
+
| BodyResponseCallback<Schema$Object>
|
|
5466
|
+
| BodyResponseCallback<Readable>,
|
|
5467
|
+
callback?:
|
|
5468
|
+
| BodyResponseCallback<Schema$Object>
|
|
5469
|
+
| BodyResponseCallback<Readable>
|
|
5470
|
+
): void | GaxiosPromise<Schema$Object> | GaxiosPromise<Readable> {
|
|
5471
|
+
let params = (paramsOrCallback || {}) as Params$Resource$Objects$Restore;
|
|
5472
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
5473
|
+
|
|
5474
|
+
if (typeof paramsOrCallback === 'function') {
|
|
5475
|
+
callback = paramsOrCallback;
|
|
5476
|
+
params = {} as Params$Resource$Objects$Restore;
|
|
5477
|
+
options = {};
|
|
5478
|
+
}
|
|
5479
|
+
|
|
5480
|
+
if (typeof optionsOrCallback === 'function') {
|
|
5481
|
+
callback = optionsOrCallback;
|
|
5482
|
+
options = {};
|
|
5483
|
+
}
|
|
5484
|
+
|
|
5485
|
+
const rootUrl = options.rootUrl || 'https://storage.googleapis.com/';
|
|
5486
|
+
const parameters = {
|
|
5487
|
+
options: Object.assign(
|
|
5488
|
+
{
|
|
5489
|
+
url: (
|
|
5490
|
+
rootUrl + '/storage/v1/b/{bucket}/o/{object}/restore'
|
|
5491
|
+
).replace(/([^:]\/)\/+/g, '$1'),
|
|
5492
|
+
method: 'POST',
|
|
5493
|
+
},
|
|
5494
|
+
options
|
|
5495
|
+
),
|
|
5496
|
+
params,
|
|
5497
|
+
requiredParams: ['bucket', 'object'],
|
|
5498
|
+
pathParams: ['bucket', 'object'],
|
|
5499
|
+
context: this.context,
|
|
5500
|
+
};
|
|
5501
|
+
if (callback) {
|
|
5502
|
+
createAPIRequest<Schema$Object>(
|
|
5503
|
+
parameters,
|
|
5504
|
+
callback as BodyResponseCallback<unknown>
|
|
5505
|
+
);
|
|
5506
|
+
} else {
|
|
5507
|
+
return createAPIRequest<Schema$Object>(parameters);
|
|
5508
|
+
}
|
|
5509
|
+
}
|
|
5510
|
+
|
|
5218
5511
|
/**
|
|
5219
5512
|
* Rewrites a source object to a destination object. Optionally overrides metadata.
|
|
5220
5513
|
*
|
|
@@ -5664,6 +5957,18 @@ export namespace storage_v1 {
|
|
|
5664
5957
|
}
|
|
5665
5958
|
}
|
|
5666
5959
|
|
|
5960
|
+
export interface Params$Resource$Objects$Bulkrestore
|
|
5961
|
+
extends StandardParameters {
|
|
5962
|
+
/**
|
|
5963
|
+
* Name of the bucket in which the object resides.
|
|
5964
|
+
*/
|
|
5965
|
+
bucket?: string;
|
|
5966
|
+
|
|
5967
|
+
/**
|
|
5968
|
+
* Request body metadata
|
|
5969
|
+
*/
|
|
5970
|
+
requestBody?: Schema$BulkRestoreObjectsRequest;
|
|
5971
|
+
}
|
|
5667
5972
|
export interface Params$Resource$Objects$Compose extends StandardParameters {
|
|
5668
5973
|
/**
|
|
5669
5974
|
* Name of the bucket containing the source objects. The destination object is stored in this bucket.
|
|
@@ -5841,6 +6146,10 @@ export namespace storage_v1 {
|
|
|
5841
6146
|
* Set of properties to return. Defaults to noAcl.
|
|
5842
6147
|
*/
|
|
5843
6148
|
projection?: string;
|
|
6149
|
+
/**
|
|
6150
|
+
* If true, only soft-deleted object versions will be listed. The default is false. For more information, see Soft Delete.
|
|
6151
|
+
*/
|
|
6152
|
+
softDeleted?: boolean;
|
|
5844
6153
|
/**
|
|
5845
6154
|
* The project to be billed for this request. Required for Requester Pays buckets.
|
|
5846
6155
|
*/
|
|
@@ -5968,6 +6277,10 @@ export namespace storage_v1 {
|
|
|
5968
6277
|
* Set of properties to return. Defaults to noAcl.
|
|
5969
6278
|
*/
|
|
5970
6279
|
projection?: string;
|
|
6280
|
+
/**
|
|
6281
|
+
* If true, only soft-deleted object versions will be listed. The default is false. For more information, see Soft Delete.
|
|
6282
|
+
*/
|
|
6283
|
+
softDeleted?: boolean;
|
|
5971
6284
|
/**
|
|
5972
6285
|
* 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
6286
|
*/
|
|
@@ -6010,6 +6323,10 @@ export namespace storage_v1 {
|
|
|
6010
6323
|
* 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).
|
|
6011
6324
|
*/
|
|
6012
6325
|
object?: string;
|
|
6326
|
+
/**
|
|
6327
|
+
* Must be true to remove the retention configuration, reduce its unlocked retention period, or change its mode from unlocked to locked.
|
|
6328
|
+
*/
|
|
6329
|
+
overrideUnlockedRetention?: boolean;
|
|
6013
6330
|
/**
|
|
6014
6331
|
* Apply a predefined set of access controls to this object.
|
|
6015
6332
|
*/
|
|
@@ -6028,6 +6345,53 @@ export namespace storage_v1 {
|
|
|
6028
6345
|
*/
|
|
6029
6346
|
requestBody?: Schema$Object;
|
|
6030
6347
|
}
|
|
6348
|
+
export interface Params$Resource$Objects$Restore extends StandardParameters {
|
|
6349
|
+
/**
|
|
6350
|
+
* Name of the bucket in which the object resides.
|
|
6351
|
+
*/
|
|
6352
|
+
bucket?: string;
|
|
6353
|
+
/**
|
|
6354
|
+
* If true, copies the source object's ACL; otherwise, uses the bucket's default object ACL. The default is false.
|
|
6355
|
+
*/
|
|
6356
|
+
copySourceAcl?: boolean;
|
|
6357
|
+
/**
|
|
6358
|
+
* Selects a specific revision of this object.
|
|
6359
|
+
*/
|
|
6360
|
+
generation?: string;
|
|
6361
|
+
/**
|
|
6362
|
+
* 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.
|
|
6363
|
+
*/
|
|
6364
|
+
ifGenerationMatch?: string;
|
|
6365
|
+
/**
|
|
6366
|
+
* 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.
|
|
6367
|
+
*/
|
|
6368
|
+
ifGenerationNotMatch?: string;
|
|
6369
|
+
/**
|
|
6370
|
+
* Makes the operation conditional on whether the object's one live metageneration matches the given value.
|
|
6371
|
+
*/
|
|
6372
|
+
ifMetagenerationMatch?: string;
|
|
6373
|
+
/**
|
|
6374
|
+
* Makes the operation conditional on whether none of the object's live metagenerations match the given value.
|
|
6375
|
+
*/
|
|
6376
|
+
ifMetagenerationNotMatch?: string;
|
|
6377
|
+
/**
|
|
6378
|
+
* Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.
|
|
6379
|
+
*/
|
|
6380
|
+
object?: string;
|
|
6381
|
+
/**
|
|
6382
|
+
* Set of properties to return. Defaults to full.
|
|
6383
|
+
*/
|
|
6384
|
+
projection?: string;
|
|
6385
|
+
/**
|
|
6386
|
+
* The project to be billed for this request. Required for Requester Pays buckets.
|
|
6387
|
+
*/
|
|
6388
|
+
userProject?: string;
|
|
6389
|
+
|
|
6390
|
+
/**
|
|
6391
|
+
* Request body metadata
|
|
6392
|
+
*/
|
|
6393
|
+
requestBody?: Schema$Object;
|
|
6394
|
+
}
|
|
6031
6395
|
export interface Params$Resource$Objects$Rewrite extends StandardParameters {
|
|
6032
6396
|
/**
|
|
6033
6397
|
* Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket value, if any.
|
|
@@ -6187,6 +6551,10 @@ export namespace storage_v1 {
|
|
|
6187
6551
|
* 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
6552
|
*/
|
|
6189
6553
|
object?: string;
|
|
6554
|
+
/**
|
|
6555
|
+
* Must be true to remove the retention configuration, reduce its unlocked retention period, or change its mode from unlocked to locked.
|
|
6556
|
+
*/
|
|
6557
|
+
overrideUnlockedRetention?: boolean;
|
|
6190
6558
|
/**
|
|
6191
6559
|
* Apply a predefined set of access controls to this object.
|
|
6192
6560
|
*/
|
|
@@ -6257,6 +6625,324 @@ export namespace storage_v1 {
|
|
|
6257
6625
|
requestBody?: Schema$Channel;
|
|
6258
6626
|
}
|
|
6259
6627
|
|
|
6628
|
+
export class Resource$Operations {
|
|
6629
|
+
context: APIRequestContext;
|
|
6630
|
+
constructor(context: APIRequestContext) {
|
|
6631
|
+
this.context = context;
|
|
6632
|
+
}
|
|
6633
|
+
|
|
6634
|
+
/**
|
|
6635
|
+
* Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed.
|
|
6636
|
+
*
|
|
6637
|
+
* @param params - Parameters for request
|
|
6638
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
6639
|
+
* @param callback - Optional callback that handles the response.
|
|
6640
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
6641
|
+
*/
|
|
6642
|
+
cancel(
|
|
6643
|
+
params: Params$Resource$Operations$Cancel,
|
|
6644
|
+
options: StreamMethodOptions
|
|
6645
|
+
): GaxiosPromise<Readable>;
|
|
6646
|
+
cancel(
|
|
6647
|
+
params?: Params$Resource$Operations$Cancel,
|
|
6648
|
+
options?: MethodOptions
|
|
6649
|
+
): GaxiosPromise<void>;
|
|
6650
|
+
cancel(
|
|
6651
|
+
params: Params$Resource$Operations$Cancel,
|
|
6652
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
6653
|
+
callback: BodyResponseCallback<Readable>
|
|
6654
|
+
): void;
|
|
6655
|
+
cancel(
|
|
6656
|
+
params: Params$Resource$Operations$Cancel,
|
|
6657
|
+
options: MethodOptions | BodyResponseCallback<void>,
|
|
6658
|
+
callback: BodyResponseCallback<void>
|
|
6659
|
+
): void;
|
|
6660
|
+
cancel(
|
|
6661
|
+
params: Params$Resource$Operations$Cancel,
|
|
6662
|
+
callback: BodyResponseCallback<void>
|
|
6663
|
+
): void;
|
|
6664
|
+
cancel(callback: BodyResponseCallback<void>): void;
|
|
6665
|
+
cancel(
|
|
6666
|
+
paramsOrCallback?:
|
|
6667
|
+
| Params$Resource$Operations$Cancel
|
|
6668
|
+
| BodyResponseCallback<void>
|
|
6669
|
+
| BodyResponseCallback<Readable>,
|
|
6670
|
+
optionsOrCallback?:
|
|
6671
|
+
| MethodOptions
|
|
6672
|
+
| StreamMethodOptions
|
|
6673
|
+
| BodyResponseCallback<void>
|
|
6674
|
+
| BodyResponseCallback<Readable>,
|
|
6675
|
+
callback?: BodyResponseCallback<void> | BodyResponseCallback<Readable>
|
|
6676
|
+
): void | GaxiosPromise<void> | GaxiosPromise<Readable> {
|
|
6677
|
+
let params = (paramsOrCallback ||
|
|
6678
|
+
{}) as Params$Resource$Operations$Cancel;
|
|
6679
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
6680
|
+
|
|
6681
|
+
if (typeof paramsOrCallback === 'function') {
|
|
6682
|
+
callback = paramsOrCallback;
|
|
6683
|
+
params = {} as Params$Resource$Operations$Cancel;
|
|
6684
|
+
options = {};
|
|
6685
|
+
}
|
|
6686
|
+
|
|
6687
|
+
if (typeof optionsOrCallback === 'function') {
|
|
6688
|
+
callback = optionsOrCallback;
|
|
6689
|
+
options = {};
|
|
6690
|
+
}
|
|
6691
|
+
|
|
6692
|
+
const rootUrl = options.rootUrl || 'https://storage.googleapis.com/';
|
|
6693
|
+
const parameters = {
|
|
6694
|
+
options: Object.assign(
|
|
6695
|
+
{
|
|
6696
|
+
url: (
|
|
6697
|
+
rootUrl + '/storage/v1/b/{bucket}/operations/{operationId}/cancel'
|
|
6698
|
+
).replace(/([^:]\/)\/+/g, '$1'),
|
|
6699
|
+
method: 'POST',
|
|
6700
|
+
},
|
|
6701
|
+
options
|
|
6702
|
+
),
|
|
6703
|
+
params,
|
|
6704
|
+
requiredParams: ['bucket', 'operationId'],
|
|
6705
|
+
pathParams: ['bucket', 'operationId'],
|
|
6706
|
+
context: this.context,
|
|
6707
|
+
};
|
|
6708
|
+
if (callback) {
|
|
6709
|
+
createAPIRequest<void>(
|
|
6710
|
+
parameters,
|
|
6711
|
+
callback as BodyResponseCallback<unknown>
|
|
6712
|
+
);
|
|
6713
|
+
} else {
|
|
6714
|
+
return createAPIRequest<void>(parameters);
|
|
6715
|
+
}
|
|
6716
|
+
}
|
|
6717
|
+
|
|
6718
|
+
/**
|
|
6719
|
+
* Gets the latest state of a long-running operation.
|
|
6720
|
+
*
|
|
6721
|
+
* @param params - Parameters for request
|
|
6722
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
6723
|
+
* @param callback - Optional callback that handles the response.
|
|
6724
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
6725
|
+
*/
|
|
6726
|
+
get(
|
|
6727
|
+
params: Params$Resource$Operations$Get,
|
|
6728
|
+
options: StreamMethodOptions
|
|
6729
|
+
): GaxiosPromise<Readable>;
|
|
6730
|
+
get(
|
|
6731
|
+
params?: Params$Resource$Operations$Get,
|
|
6732
|
+
options?: MethodOptions
|
|
6733
|
+
): GaxiosPromise<Schema$GoogleLongrunningOperation>;
|
|
6734
|
+
get(
|
|
6735
|
+
params: Params$Resource$Operations$Get,
|
|
6736
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
6737
|
+
callback: BodyResponseCallback<Readable>
|
|
6738
|
+
): void;
|
|
6739
|
+
get(
|
|
6740
|
+
params: Params$Resource$Operations$Get,
|
|
6741
|
+
options:
|
|
6742
|
+
| MethodOptions
|
|
6743
|
+
| BodyResponseCallback<Schema$GoogleLongrunningOperation>,
|
|
6744
|
+
callback: BodyResponseCallback<Schema$GoogleLongrunningOperation>
|
|
6745
|
+
): void;
|
|
6746
|
+
get(
|
|
6747
|
+
params: Params$Resource$Operations$Get,
|
|
6748
|
+
callback: BodyResponseCallback<Schema$GoogleLongrunningOperation>
|
|
6749
|
+
): void;
|
|
6750
|
+
get(
|
|
6751
|
+
callback: BodyResponseCallback<Schema$GoogleLongrunningOperation>
|
|
6752
|
+
): void;
|
|
6753
|
+
get(
|
|
6754
|
+
paramsOrCallback?:
|
|
6755
|
+
| Params$Resource$Operations$Get
|
|
6756
|
+
| BodyResponseCallback<Schema$GoogleLongrunningOperation>
|
|
6757
|
+
| BodyResponseCallback<Readable>,
|
|
6758
|
+
optionsOrCallback?:
|
|
6759
|
+
| MethodOptions
|
|
6760
|
+
| StreamMethodOptions
|
|
6761
|
+
| BodyResponseCallback<Schema$GoogleLongrunningOperation>
|
|
6762
|
+
| BodyResponseCallback<Readable>,
|
|
6763
|
+
callback?:
|
|
6764
|
+
| BodyResponseCallback<Schema$GoogleLongrunningOperation>
|
|
6765
|
+
| BodyResponseCallback<Readable>
|
|
6766
|
+
):
|
|
6767
|
+
| void
|
|
6768
|
+
| GaxiosPromise<Schema$GoogleLongrunningOperation>
|
|
6769
|
+
| GaxiosPromise<Readable> {
|
|
6770
|
+
let params = (paramsOrCallback || {}) as Params$Resource$Operations$Get;
|
|
6771
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
6772
|
+
|
|
6773
|
+
if (typeof paramsOrCallback === 'function') {
|
|
6774
|
+
callback = paramsOrCallback;
|
|
6775
|
+
params = {} as Params$Resource$Operations$Get;
|
|
6776
|
+
options = {};
|
|
6777
|
+
}
|
|
6778
|
+
|
|
6779
|
+
if (typeof optionsOrCallback === 'function') {
|
|
6780
|
+
callback = optionsOrCallback;
|
|
6781
|
+
options = {};
|
|
6782
|
+
}
|
|
6783
|
+
|
|
6784
|
+
const rootUrl = options.rootUrl || 'https://storage.googleapis.com/';
|
|
6785
|
+
const parameters = {
|
|
6786
|
+
options: Object.assign(
|
|
6787
|
+
{
|
|
6788
|
+
url: (
|
|
6789
|
+
rootUrl + '/storage/v1/b/{bucket}/operations/{operationId}'
|
|
6790
|
+
).replace(/([^:]\/)\/+/g, '$1'),
|
|
6791
|
+
method: 'GET',
|
|
6792
|
+
},
|
|
6793
|
+
options
|
|
6794
|
+
),
|
|
6795
|
+
params,
|
|
6796
|
+
requiredParams: ['bucket', 'operationId'],
|
|
6797
|
+
pathParams: ['bucket', 'operationId'],
|
|
6798
|
+
context: this.context,
|
|
6799
|
+
};
|
|
6800
|
+
if (callback) {
|
|
6801
|
+
createAPIRequest<Schema$GoogleLongrunningOperation>(
|
|
6802
|
+
parameters,
|
|
6803
|
+
callback as BodyResponseCallback<unknown>
|
|
6804
|
+
);
|
|
6805
|
+
} else {
|
|
6806
|
+
return createAPIRequest<Schema$GoogleLongrunningOperation>(parameters);
|
|
6807
|
+
}
|
|
6808
|
+
}
|
|
6809
|
+
|
|
6810
|
+
/**
|
|
6811
|
+
* Lists operations that match the specified filter in the request.
|
|
6812
|
+
*
|
|
6813
|
+
* @param params - Parameters for request
|
|
6814
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
6815
|
+
* @param callback - Optional callback that handles the response.
|
|
6816
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
6817
|
+
*/
|
|
6818
|
+
list(
|
|
6819
|
+
params: Params$Resource$Operations$List,
|
|
6820
|
+
options: StreamMethodOptions
|
|
6821
|
+
): GaxiosPromise<Readable>;
|
|
6822
|
+
list(
|
|
6823
|
+
params?: Params$Resource$Operations$List,
|
|
6824
|
+
options?: MethodOptions
|
|
6825
|
+
): GaxiosPromise<Schema$GoogleLongrunningListOperationsResponse>;
|
|
6826
|
+
list(
|
|
6827
|
+
params: Params$Resource$Operations$List,
|
|
6828
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
6829
|
+
callback: BodyResponseCallback<Readable>
|
|
6830
|
+
): void;
|
|
6831
|
+
list(
|
|
6832
|
+
params: Params$Resource$Operations$List,
|
|
6833
|
+
options:
|
|
6834
|
+
| MethodOptions
|
|
6835
|
+
| BodyResponseCallback<Schema$GoogleLongrunningListOperationsResponse>,
|
|
6836
|
+
callback: BodyResponseCallback<Schema$GoogleLongrunningListOperationsResponse>
|
|
6837
|
+
): void;
|
|
6838
|
+
list(
|
|
6839
|
+
params: Params$Resource$Operations$List,
|
|
6840
|
+
callback: BodyResponseCallback<Schema$GoogleLongrunningListOperationsResponse>
|
|
6841
|
+
): void;
|
|
6842
|
+
list(
|
|
6843
|
+
callback: BodyResponseCallback<Schema$GoogleLongrunningListOperationsResponse>
|
|
6844
|
+
): void;
|
|
6845
|
+
list(
|
|
6846
|
+
paramsOrCallback?:
|
|
6847
|
+
| Params$Resource$Operations$List
|
|
6848
|
+
| BodyResponseCallback<Schema$GoogleLongrunningListOperationsResponse>
|
|
6849
|
+
| BodyResponseCallback<Readable>,
|
|
6850
|
+
optionsOrCallback?:
|
|
6851
|
+
| MethodOptions
|
|
6852
|
+
| StreamMethodOptions
|
|
6853
|
+
| BodyResponseCallback<Schema$GoogleLongrunningListOperationsResponse>
|
|
6854
|
+
| BodyResponseCallback<Readable>,
|
|
6855
|
+
callback?:
|
|
6856
|
+
| BodyResponseCallback<Schema$GoogleLongrunningListOperationsResponse>
|
|
6857
|
+
| BodyResponseCallback<Readable>
|
|
6858
|
+
):
|
|
6859
|
+
| void
|
|
6860
|
+
| GaxiosPromise<Schema$GoogleLongrunningListOperationsResponse>
|
|
6861
|
+
| GaxiosPromise<Readable> {
|
|
6862
|
+
let params = (paramsOrCallback || {}) as Params$Resource$Operations$List;
|
|
6863
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
6864
|
+
|
|
6865
|
+
if (typeof paramsOrCallback === 'function') {
|
|
6866
|
+
callback = paramsOrCallback;
|
|
6867
|
+
params = {} as Params$Resource$Operations$List;
|
|
6868
|
+
options = {};
|
|
6869
|
+
}
|
|
6870
|
+
|
|
6871
|
+
if (typeof optionsOrCallback === 'function') {
|
|
6872
|
+
callback = optionsOrCallback;
|
|
6873
|
+
options = {};
|
|
6874
|
+
}
|
|
6875
|
+
|
|
6876
|
+
const rootUrl = options.rootUrl || 'https://storage.googleapis.com/';
|
|
6877
|
+
const parameters = {
|
|
6878
|
+
options: Object.assign(
|
|
6879
|
+
{
|
|
6880
|
+
url: (rootUrl + '/storage/v1/b/{bucket}/operations').replace(
|
|
6881
|
+
/([^:]\/)\/+/g,
|
|
6882
|
+
'$1'
|
|
6883
|
+
),
|
|
6884
|
+
method: 'GET',
|
|
6885
|
+
},
|
|
6886
|
+
options
|
|
6887
|
+
),
|
|
6888
|
+
params,
|
|
6889
|
+
requiredParams: ['bucket'],
|
|
6890
|
+
pathParams: ['bucket'],
|
|
6891
|
+
context: this.context,
|
|
6892
|
+
};
|
|
6893
|
+
if (callback) {
|
|
6894
|
+
createAPIRequest<Schema$GoogleLongrunningListOperationsResponse>(
|
|
6895
|
+
parameters,
|
|
6896
|
+
callback as BodyResponseCallback<unknown>
|
|
6897
|
+
);
|
|
6898
|
+
} else {
|
|
6899
|
+
return createAPIRequest<Schema$GoogleLongrunningListOperationsResponse>(
|
|
6900
|
+
parameters
|
|
6901
|
+
);
|
|
6902
|
+
}
|
|
6903
|
+
}
|
|
6904
|
+
}
|
|
6905
|
+
|
|
6906
|
+
export interface Params$Resource$Operations$Cancel
|
|
6907
|
+
extends StandardParameters {
|
|
6908
|
+
/**
|
|
6909
|
+
* The parent bucket of the operation resource.
|
|
6910
|
+
*/
|
|
6911
|
+
bucket?: string;
|
|
6912
|
+
/**
|
|
6913
|
+
* The ID of the operation resource.
|
|
6914
|
+
*/
|
|
6915
|
+
operationId?: string;
|
|
6916
|
+
}
|
|
6917
|
+
export interface Params$Resource$Operations$Get extends StandardParameters {
|
|
6918
|
+
/**
|
|
6919
|
+
* The parent bucket of the operation resource.
|
|
6920
|
+
*/
|
|
6921
|
+
bucket?: string;
|
|
6922
|
+
/**
|
|
6923
|
+
* The ID of the operation resource.
|
|
6924
|
+
*/
|
|
6925
|
+
operationId?: string;
|
|
6926
|
+
}
|
|
6927
|
+
export interface Params$Resource$Operations$List extends StandardParameters {
|
|
6928
|
+
/**
|
|
6929
|
+
* Name of the bucket in which to look for operations.
|
|
6930
|
+
*/
|
|
6931
|
+
bucket?: string;
|
|
6932
|
+
/**
|
|
6933
|
+
* 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).
|
|
6934
|
+
*/
|
|
6935
|
+
filter?: string;
|
|
6936
|
+
/**
|
|
6937
|
+
* 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.
|
|
6938
|
+
*/
|
|
6939
|
+
pageSize?: number;
|
|
6940
|
+
/**
|
|
6941
|
+
* A previously-returned page token representing part of the larger set of results to view.
|
|
6942
|
+
*/
|
|
6943
|
+
pageToken?: string;
|
|
6944
|
+
}
|
|
6945
|
+
|
|
6260
6946
|
export class Resource$Projects {
|
|
6261
6947
|
context: APIRequestContext;
|
|
6262
6948
|
hmacKeys: Resource$Projects$Hmackeys;
|