@googleapis/storage 5.1.2 → 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 +18 -0
- package/build/v1.d.ts +306 -1
- package/build/v1.js +159 -0
- package/build/v1.js.map +1 -1
- package/package.json +1 -1
- package/v1.ts +688 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [6.0.0](https://github.com/googleapis/google-api-nodejs-client/compare/storage-v5.1.2...storage-v6.0.0) (2023-10-11)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### ⚠ BREAKING CHANGES
|
|
7
|
+
|
|
8
|
+
* This release has breaking changes.
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* run the generator ([#3355](https://github.com/googleapis/google-api-nodejs-client/issues/3355)) ([5504c86](https://github.com/googleapis/google-api-nodejs-client/commit/5504c86fd61740886047320e2ed70f02a164acd7))
|
|
13
|
+
* **storage:** update the API ([2d54a76](https://github.com/googleapis/google-api-nodejs-client/commit/2d54a76c2ed652ba3cad77b5e4ca41b9e5001098))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
18
|
+
* **deps:** update dependency googleapis-common to v7 ([9491ec1](https://github.com/googleapis/google-api-nodejs-client/commit/9491ec1cdc3c413e7d73edcfcd59cf5c28a7c855))
|
|
19
|
+
* **storage:** update the API ([20860bc](https://github.com/googleapis/google-api-nodejs-client/commit/20860bc1ab5ef72e0067f5414d6737dbb4ee27a5))
|
|
20
|
+
|
|
3
21
|
## [5.1.2](https://github.com/googleapis/google-api-nodejs-client/compare/storage-v5.1.1...storage-v5.1.2) (2023-08-25)
|
|
4
22
|
|
|
5
23
|
|
package/build/v1.d.ts
CHANGED
|
@@ -63,6 +63,7 @@ export declare namespace storage_v1 {
|
|
|
63
63
|
notifications: Resource$Notifications;
|
|
64
64
|
objectAccessControls: Resource$Objectaccesscontrols;
|
|
65
65
|
objects: Resource$Objects;
|
|
66
|
+
operations: Resource$Operations;
|
|
66
67
|
projects: Resource$Projects;
|
|
67
68
|
constructor(options: GlobalOptions, google?: GoogleConfigurable);
|
|
68
69
|
}
|
|
@@ -79,6 +80,8 @@ export declare namespace storage_v1 {
|
|
|
79
80
|
*/
|
|
80
81
|
autoclass?: {
|
|
81
82
|
enabled?: boolean;
|
|
83
|
+
terminalStorageClass?: string;
|
|
84
|
+
terminalStorageClassUpdateTime?: string;
|
|
82
85
|
toggleTime?: string;
|
|
83
86
|
} | null;
|
|
84
87
|
/**
|
|
@@ -196,6 +199,12 @@ export declare namespace storage_v1 {
|
|
|
196
199
|
* The name of the bucket.
|
|
197
200
|
*/
|
|
198
201
|
name?: string | null;
|
|
202
|
+
/**
|
|
203
|
+
* The bucket's object retention config.
|
|
204
|
+
*/
|
|
205
|
+
objectRetention?: {
|
|
206
|
+
mode?: string;
|
|
207
|
+
} | null;
|
|
199
208
|
/**
|
|
200
209
|
* The owner of the bucket. This is always the project team's owner group.
|
|
201
210
|
*/
|
|
@@ -227,6 +236,13 @@ export declare namespace storage_v1 {
|
|
|
227
236
|
* The URI of this bucket.
|
|
228
237
|
*/
|
|
229
238
|
selfLink?: string | null;
|
|
239
|
+
/**
|
|
240
|
+
* The bucket's soft delete policy, which defines the period of time that soft-deleted objects will be retained, and cannot be permanently deleted.
|
|
241
|
+
*/
|
|
242
|
+
softDeletePolicy?: {
|
|
243
|
+
effectiveTime?: string;
|
|
244
|
+
retentionDurationSeconds?: string;
|
|
245
|
+
} | null;
|
|
230
246
|
/**
|
|
231
247
|
* 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.
|
|
232
248
|
*/
|
|
@@ -346,6 +362,31 @@ export declare namespace storage_v1 {
|
|
|
346
362
|
*/
|
|
347
363
|
nextPageToken?: string | null;
|
|
348
364
|
}
|
|
365
|
+
/**
|
|
366
|
+
* A bulk restore objects request.
|
|
367
|
+
*/
|
|
368
|
+
export interface Schema$BulkRestoreObjectsRequest {
|
|
369
|
+
/**
|
|
370
|
+
* 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.
|
|
371
|
+
*/
|
|
372
|
+
allowOverwrite?: boolean | null;
|
|
373
|
+
/**
|
|
374
|
+
* If true, copies the source object's ACL; otherwise, uses the bucket's default object ACL. The default is false.
|
|
375
|
+
*/
|
|
376
|
+
copySourceAcl?: boolean | null;
|
|
377
|
+
/**
|
|
378
|
+
* 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.
|
|
379
|
+
*/
|
|
380
|
+
matchGlobs?: string[] | null;
|
|
381
|
+
/**
|
|
382
|
+
* Restores only the objects that were soft-deleted after this time.
|
|
383
|
+
*/
|
|
384
|
+
softDeletedAfterTime?: string | null;
|
|
385
|
+
/**
|
|
386
|
+
* Restores only the objects that were soft-deleted before this time.
|
|
387
|
+
*/
|
|
388
|
+
softDeletedBeforeTime?: string | null;
|
|
389
|
+
}
|
|
349
390
|
/**
|
|
350
391
|
* An notification channel used to watch for resource changes.
|
|
351
392
|
*/
|
|
@@ -437,6 +478,67 @@ export declare namespace storage_v1 {
|
|
|
437
478
|
*/
|
|
438
479
|
title?: string | null;
|
|
439
480
|
}
|
|
481
|
+
/**
|
|
482
|
+
* The response message for storage.buckets.operations.list.
|
|
483
|
+
*/
|
|
484
|
+
export interface Schema$GoogleLongrunningListOperationsResponse {
|
|
485
|
+
/**
|
|
486
|
+
* The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results.
|
|
487
|
+
*/
|
|
488
|
+
nextPageToken?: string | null;
|
|
489
|
+
/**
|
|
490
|
+
* A list of operations that matches the specified filter in the request.
|
|
491
|
+
*/
|
|
492
|
+
operations?: Schema$GoogleLongrunningOperation[];
|
|
493
|
+
}
|
|
494
|
+
/**
|
|
495
|
+
* This resource represents a long-running operation that is the result of a network API call.
|
|
496
|
+
*/
|
|
497
|
+
export interface Schema$GoogleLongrunningOperation {
|
|
498
|
+
/**
|
|
499
|
+
* 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.
|
|
500
|
+
*/
|
|
501
|
+
done?: boolean | null;
|
|
502
|
+
/**
|
|
503
|
+
* The error result of the operation in case of failure or cancellation.
|
|
504
|
+
*/
|
|
505
|
+
error?: Schema$GoogleRpcStatus;
|
|
506
|
+
/**
|
|
507
|
+
* 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.
|
|
508
|
+
*/
|
|
509
|
+
metadata?: {
|
|
510
|
+
[key: string]: any;
|
|
511
|
+
} | null;
|
|
512
|
+
/**
|
|
513
|
+
* 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\}".
|
|
514
|
+
*/
|
|
515
|
+
name?: string | null;
|
|
516
|
+
/**
|
|
517
|
+
* 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".
|
|
518
|
+
*/
|
|
519
|
+
response?: {
|
|
520
|
+
[key: string]: any;
|
|
521
|
+
} | null;
|
|
522
|
+
}
|
|
523
|
+
/**
|
|
524
|
+
* 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).
|
|
525
|
+
*/
|
|
526
|
+
export interface Schema$GoogleRpcStatus {
|
|
527
|
+
/**
|
|
528
|
+
* The status code, which should be an enum value of google.rpc.Code.
|
|
529
|
+
*/
|
|
530
|
+
code?: number | null;
|
|
531
|
+
/**
|
|
532
|
+
* A list of messages that carry the error details. There is a common set of message types for APIs to use.
|
|
533
|
+
*/
|
|
534
|
+
details?: Array<{
|
|
535
|
+
[key: string]: any;
|
|
536
|
+
}> | null;
|
|
537
|
+
/**
|
|
538
|
+
* A developer-facing error message, which should be in English.
|
|
539
|
+
*/
|
|
540
|
+
message?: string | null;
|
|
541
|
+
}
|
|
440
542
|
/**
|
|
441
543
|
* JSON template to produce a JSON-style HMAC Key resource for Create responses.
|
|
442
544
|
*/
|
|
@@ -635,6 +737,10 @@ export declare namespace storage_v1 {
|
|
|
635
737
|
* The content generation of this object. Used for object versioning.
|
|
636
738
|
*/
|
|
637
739
|
generation?: string | null;
|
|
740
|
+
/**
|
|
741
|
+
* 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.
|
|
742
|
+
*/
|
|
743
|
+
hardDeleteTime?: string | null;
|
|
638
744
|
/**
|
|
639
745
|
* The ID of the object, including the bucket name, object name, and generation number.
|
|
640
746
|
*/
|
|
@@ -676,6 +782,13 @@ export declare namespace storage_v1 {
|
|
|
676
782
|
entity?: string;
|
|
677
783
|
entityId?: string;
|
|
678
784
|
} | null;
|
|
785
|
+
/**
|
|
786
|
+
* A collection of object level retention parameters.
|
|
787
|
+
*/
|
|
788
|
+
retention?: {
|
|
789
|
+
mode?: string;
|
|
790
|
+
retainUntilTime?: string;
|
|
791
|
+
} | null;
|
|
679
792
|
/**
|
|
680
793
|
* 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).
|
|
681
794
|
*/
|
|
@@ -688,6 +801,10 @@ export declare namespace storage_v1 {
|
|
|
688
801
|
* Content-Length of the data in bytes.
|
|
689
802
|
*/
|
|
690
803
|
size?: string | null;
|
|
804
|
+
/**
|
|
805
|
+
* The time at which the object became soft-deleted in RFC 3339 format.
|
|
806
|
+
*/
|
|
807
|
+
softDeleteTime?: string | null;
|
|
691
808
|
/**
|
|
692
809
|
* Storage class of the object.
|
|
693
810
|
*/
|
|
@@ -701,7 +818,7 @@ export declare namespace storage_v1 {
|
|
|
701
818
|
*/
|
|
702
819
|
timeCreated?: string | null;
|
|
703
820
|
/**
|
|
704
|
-
* The
|
|
821
|
+
* 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.
|
|
705
822
|
*/
|
|
706
823
|
timeDeleted?: string | null;
|
|
707
824
|
/**
|
|
@@ -1291,6 +1408,10 @@ export declare namespace storage_v1 {
|
|
|
1291
1408
|
userProject?: string;
|
|
1292
1409
|
}
|
|
1293
1410
|
export interface Params$Resource$Buckets$Insert extends StandardParameters {
|
|
1411
|
+
/**
|
|
1412
|
+
* When set to true, object retention is enabled for this bucket.
|
|
1413
|
+
*/
|
|
1414
|
+
enableObjectRetention?: boolean;
|
|
1294
1415
|
/**
|
|
1295
1416
|
* Apply a predefined set of access controls to this bucket.
|
|
1296
1417
|
*/
|
|
@@ -1999,6 +2120,20 @@ export declare namespace storage_v1 {
|
|
|
1999
2120
|
export class Resource$Objects {
|
|
2000
2121
|
context: APIRequestContext;
|
|
2001
2122
|
constructor(context: APIRequestContext);
|
|
2123
|
+
/**
|
|
2124
|
+
* Initiates a long-running bulk restore operation on the specified bucket.
|
|
2125
|
+
*
|
|
2126
|
+
* @param params - Parameters for request
|
|
2127
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
2128
|
+
* @param callback - Optional callback that handles the response.
|
|
2129
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
2130
|
+
*/
|
|
2131
|
+
bulkRestore(params: Params$Resource$Objects$Bulkrestore, options: StreamMethodOptions): GaxiosPromise<Readable>;
|
|
2132
|
+
bulkRestore(params?: Params$Resource$Objects$Bulkrestore, options?: MethodOptions): GaxiosPromise<Schema$GoogleLongrunningOperation>;
|
|
2133
|
+
bulkRestore(params: Params$Resource$Objects$Bulkrestore, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
2134
|
+
bulkRestore(params: Params$Resource$Objects$Bulkrestore, options: MethodOptions | BodyResponseCallback<Schema$GoogleLongrunningOperation>, callback: BodyResponseCallback<Schema$GoogleLongrunningOperation>): void;
|
|
2135
|
+
bulkRestore(params: Params$Resource$Objects$Bulkrestore, callback: BodyResponseCallback<Schema$GoogleLongrunningOperation>): void;
|
|
2136
|
+
bulkRestore(callback: BodyResponseCallback<Schema$GoogleLongrunningOperation>): void;
|
|
2002
2137
|
/**
|
|
2003
2138
|
* Concatenates a list of existing objects into a new object in the same bucket.
|
|
2004
2139
|
*
|
|
@@ -2111,6 +2246,20 @@ export declare namespace storage_v1 {
|
|
|
2111
2246
|
patch(params: Params$Resource$Objects$Patch, options: MethodOptions | BodyResponseCallback<Schema$Object>, callback: BodyResponseCallback<Schema$Object>): void;
|
|
2112
2247
|
patch(params: Params$Resource$Objects$Patch, callback: BodyResponseCallback<Schema$Object>): void;
|
|
2113
2248
|
patch(callback: BodyResponseCallback<Schema$Object>): void;
|
|
2249
|
+
/**
|
|
2250
|
+
* Restores a soft-deleted object.
|
|
2251
|
+
*
|
|
2252
|
+
* @param params - Parameters for request
|
|
2253
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
2254
|
+
* @param callback - Optional callback that handles the response.
|
|
2255
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
2256
|
+
*/
|
|
2257
|
+
restore(params: Params$Resource$Objects$Restore, options: StreamMethodOptions): GaxiosPromise<Readable>;
|
|
2258
|
+
restore(params?: Params$Resource$Objects$Restore, options?: MethodOptions): GaxiosPromise<Schema$Object>;
|
|
2259
|
+
restore(params: Params$Resource$Objects$Restore, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
2260
|
+
restore(params: Params$Resource$Objects$Restore, options: MethodOptions | BodyResponseCallback<Schema$Object>, callback: BodyResponseCallback<Schema$Object>): void;
|
|
2261
|
+
restore(params: Params$Resource$Objects$Restore, callback: BodyResponseCallback<Schema$Object>): void;
|
|
2262
|
+
restore(callback: BodyResponseCallback<Schema$Object>): void;
|
|
2114
2263
|
/**
|
|
2115
2264
|
* Rewrites a source object to a destination object. Optionally overrides metadata.
|
|
2116
2265
|
*
|
|
@@ -2182,6 +2331,16 @@ export declare namespace storage_v1 {
|
|
|
2182
2331
|
watchAll(params: Params$Resource$Objects$Watchall, callback: BodyResponseCallback<Schema$Channel>): void;
|
|
2183
2332
|
watchAll(callback: BodyResponseCallback<Schema$Channel>): void;
|
|
2184
2333
|
}
|
|
2334
|
+
export interface Params$Resource$Objects$Bulkrestore extends StandardParameters {
|
|
2335
|
+
/**
|
|
2336
|
+
* Name of the bucket in which the object resides.
|
|
2337
|
+
*/
|
|
2338
|
+
bucket?: string;
|
|
2339
|
+
/**
|
|
2340
|
+
* Request body metadata
|
|
2341
|
+
*/
|
|
2342
|
+
requestBody?: Schema$BulkRestoreObjectsRequest;
|
|
2343
|
+
}
|
|
2185
2344
|
export interface Params$Resource$Objects$Compose extends StandardParameters {
|
|
2186
2345
|
/**
|
|
2187
2346
|
* Name of the bucket containing the source objects. The destination object is stored in this bucket.
|
|
@@ -2357,6 +2516,10 @@ export declare namespace storage_v1 {
|
|
|
2357
2516
|
* Set of properties to return. Defaults to noAcl.
|
|
2358
2517
|
*/
|
|
2359
2518
|
projection?: string;
|
|
2519
|
+
/**
|
|
2520
|
+
* If true, only soft-deleted object versions will be listed. The default is false. For more information, see Soft Delete.
|
|
2521
|
+
*/
|
|
2522
|
+
softDeleted?: boolean;
|
|
2360
2523
|
/**
|
|
2361
2524
|
* The project to be billed for this request. Required for Requester Pays buckets.
|
|
2362
2525
|
*/
|
|
@@ -2480,6 +2643,10 @@ export declare namespace storage_v1 {
|
|
|
2480
2643
|
* Set of properties to return. Defaults to noAcl.
|
|
2481
2644
|
*/
|
|
2482
2645
|
projection?: string;
|
|
2646
|
+
/**
|
|
2647
|
+
* If true, only soft-deleted object versions will be listed. The default is false. For more information, see Soft Delete.
|
|
2648
|
+
*/
|
|
2649
|
+
softDeleted?: boolean;
|
|
2483
2650
|
/**
|
|
2484
2651
|
* 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).
|
|
2485
2652
|
*/
|
|
@@ -2522,6 +2689,10 @@ export declare namespace storage_v1 {
|
|
|
2522
2689
|
* 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).
|
|
2523
2690
|
*/
|
|
2524
2691
|
object?: string;
|
|
2692
|
+
/**
|
|
2693
|
+
* Must be true to remove the retention configuration, reduce its unlocked retention period, or change its mode from unlocked to locked.
|
|
2694
|
+
*/
|
|
2695
|
+
overrideUnlockedRetention?: boolean;
|
|
2525
2696
|
/**
|
|
2526
2697
|
* Apply a predefined set of access controls to this object.
|
|
2527
2698
|
*/
|
|
@@ -2539,6 +2710,52 @@ export declare namespace storage_v1 {
|
|
|
2539
2710
|
*/
|
|
2540
2711
|
requestBody?: Schema$Object;
|
|
2541
2712
|
}
|
|
2713
|
+
export interface Params$Resource$Objects$Restore extends StandardParameters {
|
|
2714
|
+
/**
|
|
2715
|
+
* Name of the bucket in which the object resides.
|
|
2716
|
+
*/
|
|
2717
|
+
bucket?: string;
|
|
2718
|
+
/**
|
|
2719
|
+
* If true, copies the source object's ACL; otherwise, uses the bucket's default object ACL. The default is false.
|
|
2720
|
+
*/
|
|
2721
|
+
copySourceAcl?: boolean;
|
|
2722
|
+
/**
|
|
2723
|
+
* Selects a specific revision of this object.
|
|
2724
|
+
*/
|
|
2725
|
+
generation?: string;
|
|
2726
|
+
/**
|
|
2727
|
+
* 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.
|
|
2728
|
+
*/
|
|
2729
|
+
ifGenerationMatch?: string;
|
|
2730
|
+
/**
|
|
2731
|
+
* 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.
|
|
2732
|
+
*/
|
|
2733
|
+
ifGenerationNotMatch?: string;
|
|
2734
|
+
/**
|
|
2735
|
+
* Makes the operation conditional on whether the object's one live metageneration matches the given value.
|
|
2736
|
+
*/
|
|
2737
|
+
ifMetagenerationMatch?: string;
|
|
2738
|
+
/**
|
|
2739
|
+
* Makes the operation conditional on whether none of the object's live metagenerations match the given value.
|
|
2740
|
+
*/
|
|
2741
|
+
ifMetagenerationNotMatch?: string;
|
|
2742
|
+
/**
|
|
2743
|
+
* Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.
|
|
2744
|
+
*/
|
|
2745
|
+
object?: string;
|
|
2746
|
+
/**
|
|
2747
|
+
* Set of properties to return. Defaults to full.
|
|
2748
|
+
*/
|
|
2749
|
+
projection?: string;
|
|
2750
|
+
/**
|
|
2751
|
+
* The project to be billed for this request. Required for Requester Pays buckets.
|
|
2752
|
+
*/
|
|
2753
|
+
userProject?: string;
|
|
2754
|
+
/**
|
|
2755
|
+
* Request body metadata
|
|
2756
|
+
*/
|
|
2757
|
+
requestBody?: Schema$Object;
|
|
2758
|
+
}
|
|
2542
2759
|
export interface Params$Resource$Objects$Rewrite extends StandardParameters {
|
|
2543
2760
|
/**
|
|
2544
2761
|
* Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket value, if any.
|
|
@@ -2694,6 +2911,10 @@ export declare namespace storage_v1 {
|
|
|
2694
2911
|
* 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).
|
|
2695
2912
|
*/
|
|
2696
2913
|
object?: string;
|
|
2914
|
+
/**
|
|
2915
|
+
* Must be true to remove the retention configuration, reduce its unlocked retention period, or change its mode from unlocked to locked.
|
|
2916
|
+
*/
|
|
2917
|
+
overrideUnlockedRetention?: boolean;
|
|
2697
2918
|
/**
|
|
2698
2919
|
* Apply a predefined set of access controls to this object.
|
|
2699
2920
|
*/
|
|
@@ -2761,6 +2982,90 @@ export declare namespace storage_v1 {
|
|
|
2761
2982
|
*/
|
|
2762
2983
|
requestBody?: Schema$Channel;
|
|
2763
2984
|
}
|
|
2985
|
+
export class Resource$Operations {
|
|
2986
|
+
context: APIRequestContext;
|
|
2987
|
+
constructor(context: APIRequestContext);
|
|
2988
|
+
/**
|
|
2989
|
+
* Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed.
|
|
2990
|
+
*
|
|
2991
|
+
* @param params - Parameters for request
|
|
2992
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
2993
|
+
* @param callback - Optional callback that handles the response.
|
|
2994
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
2995
|
+
*/
|
|
2996
|
+
cancel(params: Params$Resource$Operations$Cancel, options: StreamMethodOptions): GaxiosPromise<Readable>;
|
|
2997
|
+
cancel(params?: Params$Resource$Operations$Cancel, options?: MethodOptions): GaxiosPromise<void>;
|
|
2998
|
+
cancel(params: Params$Resource$Operations$Cancel, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
2999
|
+
cancel(params: Params$Resource$Operations$Cancel, options: MethodOptions | BodyResponseCallback<void>, callback: BodyResponseCallback<void>): void;
|
|
3000
|
+
cancel(params: Params$Resource$Operations$Cancel, callback: BodyResponseCallback<void>): void;
|
|
3001
|
+
cancel(callback: BodyResponseCallback<void>): void;
|
|
3002
|
+
/**
|
|
3003
|
+
* Gets the latest state of a long-running operation.
|
|
3004
|
+
*
|
|
3005
|
+
* @param params - Parameters for request
|
|
3006
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
3007
|
+
* @param callback - Optional callback that handles the response.
|
|
3008
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
3009
|
+
*/
|
|
3010
|
+
get(params: Params$Resource$Operations$Get, options: StreamMethodOptions): GaxiosPromise<Readable>;
|
|
3011
|
+
get(params?: Params$Resource$Operations$Get, options?: MethodOptions): GaxiosPromise<Schema$GoogleLongrunningOperation>;
|
|
3012
|
+
get(params: Params$Resource$Operations$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
3013
|
+
get(params: Params$Resource$Operations$Get, options: MethodOptions | BodyResponseCallback<Schema$GoogleLongrunningOperation>, callback: BodyResponseCallback<Schema$GoogleLongrunningOperation>): void;
|
|
3014
|
+
get(params: Params$Resource$Operations$Get, callback: BodyResponseCallback<Schema$GoogleLongrunningOperation>): void;
|
|
3015
|
+
get(callback: BodyResponseCallback<Schema$GoogleLongrunningOperation>): void;
|
|
3016
|
+
/**
|
|
3017
|
+
* Lists operations that match the specified filter in the request.
|
|
3018
|
+
*
|
|
3019
|
+
* @param params - Parameters for request
|
|
3020
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
3021
|
+
* @param callback - Optional callback that handles the response.
|
|
3022
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
3023
|
+
*/
|
|
3024
|
+
list(params: Params$Resource$Operations$List, options: StreamMethodOptions): GaxiosPromise<Readable>;
|
|
3025
|
+
list(params?: Params$Resource$Operations$List, options?: MethodOptions): GaxiosPromise<Schema$GoogleLongrunningListOperationsResponse>;
|
|
3026
|
+
list(params: Params$Resource$Operations$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
3027
|
+
list(params: Params$Resource$Operations$List, options: MethodOptions | BodyResponseCallback<Schema$GoogleLongrunningListOperationsResponse>, callback: BodyResponseCallback<Schema$GoogleLongrunningListOperationsResponse>): void;
|
|
3028
|
+
list(params: Params$Resource$Operations$List, callback: BodyResponseCallback<Schema$GoogleLongrunningListOperationsResponse>): void;
|
|
3029
|
+
list(callback: BodyResponseCallback<Schema$GoogleLongrunningListOperationsResponse>): void;
|
|
3030
|
+
}
|
|
3031
|
+
export interface Params$Resource$Operations$Cancel extends StandardParameters {
|
|
3032
|
+
/**
|
|
3033
|
+
* The parent bucket of the operation resource.
|
|
3034
|
+
*/
|
|
3035
|
+
bucket?: string;
|
|
3036
|
+
/**
|
|
3037
|
+
* The ID of the operation resource.
|
|
3038
|
+
*/
|
|
3039
|
+
operationId?: string;
|
|
3040
|
+
}
|
|
3041
|
+
export interface Params$Resource$Operations$Get extends StandardParameters {
|
|
3042
|
+
/**
|
|
3043
|
+
* The parent bucket of the operation resource.
|
|
3044
|
+
*/
|
|
3045
|
+
bucket?: string;
|
|
3046
|
+
/**
|
|
3047
|
+
* The ID of the operation resource.
|
|
3048
|
+
*/
|
|
3049
|
+
operationId?: string;
|
|
3050
|
+
}
|
|
3051
|
+
export interface Params$Resource$Operations$List extends StandardParameters {
|
|
3052
|
+
/**
|
|
3053
|
+
* Name of the bucket in which to look for operations.
|
|
3054
|
+
*/
|
|
3055
|
+
bucket?: string;
|
|
3056
|
+
/**
|
|
3057
|
+
* 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).
|
|
3058
|
+
*/
|
|
3059
|
+
filter?: string;
|
|
3060
|
+
/**
|
|
3061
|
+
* 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.
|
|
3062
|
+
*/
|
|
3063
|
+
pageSize?: number;
|
|
3064
|
+
/**
|
|
3065
|
+
* A previously-returned page token representing part of the larger set of results to view.
|
|
3066
|
+
*/
|
|
3067
|
+
pageToken?: string;
|
|
3068
|
+
}
|
|
2764
3069
|
export class Resource$Projects {
|
|
2765
3070
|
context: APIRequestContext;
|
|
2766
3071
|
hmacKeys: Resource$Projects$Hmackeys;
|
package/build/v1.js
CHANGED
|
@@ -46,6 +46,7 @@ var storage_v1;
|
|
|
46
46
|
this.notifications = new Resource$Notifications(this.context);
|
|
47
47
|
this.objectAccessControls = new Resource$Objectaccesscontrols(this.context);
|
|
48
48
|
this.objects = new Resource$Objects(this.context);
|
|
49
|
+
this.operations = new Resource$Operations(this.context);
|
|
49
50
|
this.projects = new Resource$Projects(this.context);
|
|
50
51
|
}
|
|
51
52
|
}
|
|
@@ -1108,6 +1109,37 @@ var storage_v1;
|
|
|
1108
1109
|
constructor(context) {
|
|
1109
1110
|
this.context = context;
|
|
1110
1111
|
}
|
|
1112
|
+
bulkRestore(paramsOrCallback, optionsOrCallback, callback) {
|
|
1113
|
+
let params = (paramsOrCallback ||
|
|
1114
|
+
{});
|
|
1115
|
+
let options = (optionsOrCallback || {});
|
|
1116
|
+
if (typeof paramsOrCallback === 'function') {
|
|
1117
|
+
callback = paramsOrCallback;
|
|
1118
|
+
params = {};
|
|
1119
|
+
options = {};
|
|
1120
|
+
}
|
|
1121
|
+
if (typeof optionsOrCallback === 'function') {
|
|
1122
|
+
callback = optionsOrCallback;
|
|
1123
|
+
options = {};
|
|
1124
|
+
}
|
|
1125
|
+
const rootUrl = options.rootUrl || 'https://storage.googleapis.com/';
|
|
1126
|
+
const parameters = {
|
|
1127
|
+
options: Object.assign({
|
|
1128
|
+
url: (rootUrl + '/storage/v1/b/{bucket}/o/bulkRestore').replace(/([^:]\/)\/+/g, '$1'),
|
|
1129
|
+
method: 'POST',
|
|
1130
|
+
}, options),
|
|
1131
|
+
params,
|
|
1132
|
+
requiredParams: ['bucket'],
|
|
1133
|
+
pathParams: ['bucket'],
|
|
1134
|
+
context: this.context,
|
|
1135
|
+
};
|
|
1136
|
+
if (callback) {
|
|
1137
|
+
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
|
|
1138
|
+
}
|
|
1139
|
+
else {
|
|
1140
|
+
return (0, googleapis_common_1.createAPIRequest)(parameters);
|
|
1141
|
+
}
|
|
1142
|
+
}
|
|
1111
1143
|
compose(paramsOrCallback, optionsOrCallback, callback) {
|
|
1112
1144
|
let params = (paramsOrCallback || {});
|
|
1113
1145
|
let options = (optionsOrCallback || {});
|
|
@@ -1362,6 +1394,36 @@ var storage_v1;
|
|
|
1362
1394
|
return (0, googleapis_common_1.createAPIRequest)(parameters);
|
|
1363
1395
|
}
|
|
1364
1396
|
}
|
|
1397
|
+
restore(paramsOrCallback, optionsOrCallback, callback) {
|
|
1398
|
+
let params = (paramsOrCallback || {});
|
|
1399
|
+
let options = (optionsOrCallback || {});
|
|
1400
|
+
if (typeof paramsOrCallback === 'function') {
|
|
1401
|
+
callback = paramsOrCallback;
|
|
1402
|
+
params = {};
|
|
1403
|
+
options = {};
|
|
1404
|
+
}
|
|
1405
|
+
if (typeof optionsOrCallback === 'function') {
|
|
1406
|
+
callback = optionsOrCallback;
|
|
1407
|
+
options = {};
|
|
1408
|
+
}
|
|
1409
|
+
const rootUrl = options.rootUrl || 'https://storage.googleapis.com/';
|
|
1410
|
+
const parameters = {
|
|
1411
|
+
options: Object.assign({
|
|
1412
|
+
url: (rootUrl + '/storage/v1/b/{bucket}/o/{object}/restore').replace(/([^:]\/)\/+/g, '$1'),
|
|
1413
|
+
method: 'POST',
|
|
1414
|
+
}, options),
|
|
1415
|
+
params,
|
|
1416
|
+
requiredParams: ['bucket', 'object'],
|
|
1417
|
+
pathParams: ['bucket', 'object'],
|
|
1418
|
+
context: this.context,
|
|
1419
|
+
};
|
|
1420
|
+
if (callback) {
|
|
1421
|
+
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
|
|
1422
|
+
}
|
|
1423
|
+
else {
|
|
1424
|
+
return (0, googleapis_common_1.createAPIRequest)(parameters);
|
|
1425
|
+
}
|
|
1426
|
+
}
|
|
1365
1427
|
rewrite(paramsOrCallback, optionsOrCallback, callback) {
|
|
1366
1428
|
let params = (paramsOrCallback || {});
|
|
1367
1429
|
let options = (optionsOrCallback || {});
|
|
@@ -1527,6 +1589,103 @@ var storage_v1;
|
|
|
1527
1589
|
}
|
|
1528
1590
|
}
|
|
1529
1591
|
storage_v1.Resource$Objects = Resource$Objects;
|
|
1592
|
+
class Resource$Operations {
|
|
1593
|
+
constructor(context) {
|
|
1594
|
+
this.context = context;
|
|
1595
|
+
}
|
|
1596
|
+
cancel(paramsOrCallback, optionsOrCallback, callback) {
|
|
1597
|
+
let params = (paramsOrCallback ||
|
|
1598
|
+
{});
|
|
1599
|
+
let options = (optionsOrCallback || {});
|
|
1600
|
+
if (typeof paramsOrCallback === 'function') {
|
|
1601
|
+
callback = paramsOrCallback;
|
|
1602
|
+
params = {};
|
|
1603
|
+
options = {};
|
|
1604
|
+
}
|
|
1605
|
+
if (typeof optionsOrCallback === 'function') {
|
|
1606
|
+
callback = optionsOrCallback;
|
|
1607
|
+
options = {};
|
|
1608
|
+
}
|
|
1609
|
+
const rootUrl = options.rootUrl || 'https://storage.googleapis.com/';
|
|
1610
|
+
const parameters = {
|
|
1611
|
+
options: Object.assign({
|
|
1612
|
+
url: (rootUrl + '/storage/v1/b/{bucket}/operations/{operationId}/cancel').replace(/([^:]\/)\/+/g, '$1'),
|
|
1613
|
+
method: 'POST',
|
|
1614
|
+
}, options),
|
|
1615
|
+
params,
|
|
1616
|
+
requiredParams: ['bucket', 'operationId'],
|
|
1617
|
+
pathParams: ['bucket', 'operationId'],
|
|
1618
|
+
context: this.context,
|
|
1619
|
+
};
|
|
1620
|
+
if (callback) {
|
|
1621
|
+
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
|
|
1622
|
+
}
|
|
1623
|
+
else {
|
|
1624
|
+
return (0, googleapis_common_1.createAPIRequest)(parameters);
|
|
1625
|
+
}
|
|
1626
|
+
}
|
|
1627
|
+
get(paramsOrCallback, optionsOrCallback, callback) {
|
|
1628
|
+
let params = (paramsOrCallback || {});
|
|
1629
|
+
let options = (optionsOrCallback || {});
|
|
1630
|
+
if (typeof paramsOrCallback === 'function') {
|
|
1631
|
+
callback = paramsOrCallback;
|
|
1632
|
+
params = {};
|
|
1633
|
+
options = {};
|
|
1634
|
+
}
|
|
1635
|
+
if (typeof optionsOrCallback === 'function') {
|
|
1636
|
+
callback = optionsOrCallback;
|
|
1637
|
+
options = {};
|
|
1638
|
+
}
|
|
1639
|
+
const rootUrl = options.rootUrl || 'https://storage.googleapis.com/';
|
|
1640
|
+
const parameters = {
|
|
1641
|
+
options: Object.assign({
|
|
1642
|
+
url: (rootUrl + '/storage/v1/b/{bucket}/operations/{operationId}').replace(/([^:]\/)\/+/g, '$1'),
|
|
1643
|
+
method: 'GET',
|
|
1644
|
+
}, options),
|
|
1645
|
+
params,
|
|
1646
|
+
requiredParams: ['bucket', 'operationId'],
|
|
1647
|
+
pathParams: ['bucket', 'operationId'],
|
|
1648
|
+
context: this.context,
|
|
1649
|
+
};
|
|
1650
|
+
if (callback) {
|
|
1651
|
+
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
|
|
1652
|
+
}
|
|
1653
|
+
else {
|
|
1654
|
+
return (0, googleapis_common_1.createAPIRequest)(parameters);
|
|
1655
|
+
}
|
|
1656
|
+
}
|
|
1657
|
+
list(paramsOrCallback, optionsOrCallback, callback) {
|
|
1658
|
+
let params = (paramsOrCallback || {});
|
|
1659
|
+
let options = (optionsOrCallback || {});
|
|
1660
|
+
if (typeof paramsOrCallback === 'function') {
|
|
1661
|
+
callback = paramsOrCallback;
|
|
1662
|
+
params = {};
|
|
1663
|
+
options = {};
|
|
1664
|
+
}
|
|
1665
|
+
if (typeof optionsOrCallback === 'function') {
|
|
1666
|
+
callback = optionsOrCallback;
|
|
1667
|
+
options = {};
|
|
1668
|
+
}
|
|
1669
|
+
const rootUrl = options.rootUrl || 'https://storage.googleapis.com/';
|
|
1670
|
+
const parameters = {
|
|
1671
|
+
options: Object.assign({
|
|
1672
|
+
url: (rootUrl + '/storage/v1/b/{bucket}/operations').replace(/([^:]\/)\/+/g, '$1'),
|
|
1673
|
+
method: 'GET',
|
|
1674
|
+
}, options),
|
|
1675
|
+
params,
|
|
1676
|
+
requiredParams: ['bucket'],
|
|
1677
|
+
pathParams: ['bucket'],
|
|
1678
|
+
context: this.context,
|
|
1679
|
+
};
|
|
1680
|
+
if (callback) {
|
|
1681
|
+
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
|
|
1682
|
+
}
|
|
1683
|
+
else {
|
|
1684
|
+
return (0, googleapis_common_1.createAPIRequest)(parameters);
|
|
1685
|
+
}
|
|
1686
|
+
}
|
|
1687
|
+
}
|
|
1688
|
+
storage_v1.Resource$Operations = Resource$Operations;
|
|
1530
1689
|
class Resource$Projects {
|
|
1531
1690
|
constructor(context) {
|
|
1532
1691
|
this.context = context;
|