@@ -1896,7 +1896,7 @@ public Buckets buckets() {
1896
1896
public class Buckets {
1897
1897
1898
1898
/**
1899
- * Permanently deletes an empty bucket.
1899
+ * Deletes an empty bucket. Deletions are permanent unless soft delete is enabled on the bucket.
1900
1900
*
1901
1901
* Create a request for the method "buckets.delete".
1902
1902
*
@@ -1917,7 +1917,7 @@ public class Delete extends StorageRequest<Void> {
1917
1917
private static final String REST_PATH = "b/{bucket}";
1918
1918
1919
1919
/**
1920
- * Permanently deletes an empty bucket.
1920
+ * Deletes an empty bucket. Deletions are permanent unless soft delete is enabled on the bucket.
1921
1921
*
1922
1922
* Create a request for the method "buckets.delete".
1923
1923
*
@@ -2148,6 +2148,28 @@ public Get setBucket(java.lang.String bucket) {
2148
2148
return this;
2149
2149
}
2150
2150
2151
+ /**
2152
+ * If present, specifies the generation of the bucket. This is required if softDeleted is
2153
+ * true.
2154
+ */
2155
+ @com.google.api.client.util.Key
2156
+ private java.lang.Long generation;
2157
+
2158
+ /** If present, specifies the generation of the bucket. This is required if softDeleted is true.
2159
+ */
2160
+ public java.lang.Long getGeneration() {
2161
+ return generation;
2162
+ }
2163
+
2164
+ /**
2165
+ * If present, specifies the generation of the bucket. This is required if softDeleted is
2166
+ * true.
2167
+ */
2168
+ public Get setGeneration(java.lang.Long generation) {
2169
+ this.generation = generation;
2170
+ return this;
2171
+ }
2172
+
2151
2173
/**
2152
2174
* Makes the return of the bucket metadata conditional on whether the bucket's current
2153
2175
* metageneration matches the given value.
@@ -2210,6 +2232,29 @@ public Get setProjection(java.lang.String projection) {
2210
2232
return this;
2211
2233
}
2212
2234
2235
+ /**
2236
+ * If true, return the soft-deleted version of this bucket. The default is false. For more
2237
+ * information, see [Soft Delete](https://cloud.google.com/storage/docs/soft-delete).
2238
+ */
2239
+ @com.google.api.client.util.Key
2240
+ private java.lang.Boolean softDeleted;
2241
+
2242
+ /** If true, return the soft-deleted version of this bucket. The default is false. For more
2243
+ information, see [Soft Delete](https://cloud.google.com/storage/docs/soft-delete).
2244
+ */
2245
+ public java.lang.Boolean getSoftDeleted() {
2246
+ return softDeleted;
2247
+ }
2248
+
2249
+ /**
2250
+ * If true, return the soft-deleted version of this bucket. The default is false. For more
2251
+ * information, see [Soft Delete](https://cloud.google.com/storage/docs/soft-delete).
2252
+ */
2253
+ public Get setSoftDeleted(java.lang.Boolean softDeleted) {
2254
+ this.softDeleted = softDeleted;
2255
+ return this;
2256
+ }
2257
+
2213
2258
/** The project to be billed for this request. Required for Requester Pays buckets. */
2214
2259
@com.google.api.client.util.Key
2215
2260
private java.lang.String userProject;
@@ -2917,6 +2962,29 @@ public List setProjection(java.lang.String projection) {
2917
2962
return this;
2918
2963
}
2919
2964
2965
+ /**
2966
+ * If true, only soft-deleted bucket versions will be returned. The default is false. For more
2967
+ * information, see [Soft Delete](https://cloud.google.com/storage/docs/soft-delete).
2968
+ */
2969
+ @com.google.api.client.util.Key
2970
+ private java.lang.Boolean softDeleted;
2971
+
2972
+ /** If true, only soft-deleted bucket versions will be returned. The default is false. For more
2973
+ information, see [Soft Delete](https://cloud.google.com/storage/docs/soft-delete).
2974
+ */
2975
+ public java.lang.Boolean getSoftDeleted() {
2976
+ return softDeleted;
2977
+ }
2978
+
2979
+ /**
2980
+ * If true, only soft-deleted bucket versions will be returned. The default is false. For more
2981
+ * information, see [Soft Delete](https://cloud.google.com/storage/docs/soft-delete).
2982
+ */
2983
+ public List setSoftDeleted(java.lang.Boolean softDeleted) {
2984
+ this.softDeleted = softDeleted;
2985
+ return this;
2986
+ }
2987
+
2920
2988
/** The project to be billed for this request. */
2921
2989
@com.google.api.client.util.Key
2922
2990
private java.lang.String userProject;
@@ -3294,6 +3362,142 @@ public Patch set(String parameterName, Object value) {
3294
3362
return (Patch) super.set(parameterName, value);
3295
3363
}
3296
3364
}
3365
+ /**
3366
+ * Restores a soft-deleted bucket.
3367
+ *
3368
+ * Create a request for the method "buckets.restore".
3369
+ *
3370
+ * This request holds the parameters needed by the storage server. After setting any optional
3371
+ * parameters, call the {@link Restore#execute()} method to invoke the remote operation.
3372
+ *
3373
+ * @param bucket Name of a bucket.
3374
+ * @param generation Generation of a bucket.
3375
+ * @return the request
3376
+ */
3377
+ public Restore restore(java.lang.String bucket, java.lang.Long generation) throws java.io.IOException {
3378
+ Restore result = new Restore(bucket, generation);
3379
+ initialize(result);
3380
+ return result;
3381
+ }
3382
+
3383
+ public class Restore extends StorageRequest<Void> {
3384
+
3385
+ private static final String REST_PATH = "b/{bucket}/restore";
3386
+
3387
+ /**
3388
+ * Restores a soft-deleted bucket.
3389
+ *
3390
+ * Create a request for the method "buckets.restore".
3391
+ *
3392
+ * This request holds the parameters needed by the the storage server. After setting any optional
3393
+ * parameters, call the {@link Restore#execute()} method to invoke the remote operation. <p>
3394
+ * {@link
3395
+ * Restore#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
3396
+ * be called to initialize this instance immediately after invoking the constructor. </p>
3397
+ *
3398
+ * @param bucket Name of a bucket.
3399
+ * @param generation Generation of a bucket.
3400
+ * @since 1.13
3401
+ */
3402
+ protected Restore(java.lang.String bucket, java.lang.Long generation) {
3403
+ super(Storage.this, "POST", REST_PATH, null, Void.class);
3404
+ this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified.");
3405
+ this.generation = com.google.api.client.util.Preconditions.checkNotNull(generation, "Required parameter generation must be specified.");
3406
+ }
3407
+
3408
+ @Override
3409
+ public Restore setAlt(java.lang.String alt) {
3410
+ return (Restore) super.setAlt(alt);
3411
+ }
3412
+
3413
+ @Override
3414
+ public Restore setFields(java.lang.String fields) {
3415
+ return (Restore) super.setFields(fields);
3416
+ }
3417
+
3418
+ @Override
3419
+ public Restore setKey(java.lang.String key) {
3420
+ return (Restore) super.setKey(key);
3421
+ }
3422
+
3423
+ @Override
3424
+ public Restore setOauthToken(java.lang.String oauthToken) {
3425
+ return (Restore) super.setOauthToken(oauthToken);
3426
+ }
3427
+
3428
+ @Override
3429
+ public Restore setPrettyPrint(java.lang.Boolean prettyPrint) {
3430
+ return (Restore) super.setPrettyPrint(prettyPrint);
3431
+ }
3432
+
3433
+ @Override
3434
+ public Restore setQuotaUser(java.lang.String quotaUser) {
3435
+ return (Restore) super.setQuotaUser(quotaUser);
3436
+ }
3437
+
3438
+ @Override
3439
+ public Restore setUploadType(java.lang.String uploadType) {
3440
+ return (Restore) super.setUploadType(uploadType);
3441
+ }
3442
+
3443
+ @Override
3444
+ public Restore setUserIp(java.lang.String userIp) {
3445
+ return (Restore) super.setUserIp(userIp);
3446
+ }
3447
+
3448
+ /** Name of a bucket. */
3449
+ @com.google.api.client.util.Key
3450
+ private java.lang.String bucket;
3451
+
3452
+ /** Name of a bucket.
3453
+ */
3454
+ public java.lang.String getBucket() {
3455
+ return bucket;
3456
+ }
3457
+
3458
+ /** Name of a bucket. */
3459
+ public Restore setBucket(java.lang.String bucket) {
3460
+ this.bucket = bucket;
3461
+ return this;
3462
+ }
3463
+
3464
+ /** Generation of a bucket. */
3465
+ @com.google.api.client.util.Key
3466
+ private java.lang.Long generation;
3467
+
3468
+ /** Generation of a bucket.
3469
+ */
3470
+ public java.lang.Long getGeneration() {
3471
+ return generation;
3472
+ }
3473
+
3474
+ /** Generation of a bucket. */
3475
+ public Restore setGeneration(java.lang.Long generation) {
3476
+ this.generation = generation;
3477
+ return this;
3478
+ }
3479
+
3480
+ /** The project to be billed for this request. Required for Requester Pays buckets. */
3481
+ @com.google.api.client.util.Key
3482
+ private java.lang.String userProject;
3483
+
3484
+ /** The project to be billed for this request. Required for Requester Pays buckets.
3485
+ */
3486
+ public java.lang.String getUserProject() {
3487
+ return userProject;
3488
+ }
3489
+
3490
+ /** The project to be billed for this request. Required for Requester Pays buckets. */
3491
+ public Restore setUserProject(java.lang.String userProject) {
3492
+ this.userProject = userProject;
3493
+ return this;
3494
+ }
3495
+
3496
+ @Override
3497
+ public Restore set(String parameterName, Object value) {
3498
+ return (Restore) super.set(parameterName, value);
3499
+ }
3500
+ }
3297
3501
/**
3298
3502
* Updates an IAM policy for the specified bucket.
3299
3503
*
@@ -9991,21 +10195,21 @@ public Get setProjection(java.lang.String projection) {
9991
10195
9992
10196
/**
9993
10197
* If true, only soft-deleted object versions will be listed. The default is false. For more
9994
- * information, see Soft Delete.
10198
+ * information, see [ Soft Delete](https://cloud.google.com/storage/docs/soft-delete) .
9995
10199
*/
9996
10200
@com.google.api.client.util.Key
9997
10201
private java.lang.Boolean softDeleted;
9998
10202
9999
10203
/** If true, only soft-deleted object versions will be listed. The default is false. For more
10000
- information, see Soft Delete.
10204
+ information, see [ Soft Delete](https://cloud.google.com/storage/docs/soft-delete) .
10001
10205
*/
10002
10206
public java.lang.Boolean getSoftDeleted() {
10003
10207
return softDeleted;
10004
10208
}
10005
10209
10006
10210
/**
10007
10211
* If true, only soft-deleted object versions will be listed. The default is false. For more
10008
- * information, see Soft Delete.
10212
+ * information, see [ Soft Delete](https://cloud.google.com/storage/docs/soft-delete) .
10009
10213
*/
10010
10214
public Get setSoftDeleted(java.lang.Boolean softDeleted) {
10011
10215
this.softDeleted = softDeleted;
@@ -10915,21 +11119,21 @@ public List setProjection(java.lang.String projection) {
10915
11119
10916
11120
/**
10917
11121
* If true, only soft-deleted object versions will be listed. The default is false. For more
10918
- * information, see Soft Delete.
11122
+ * information, see [ Soft Delete](https://cloud.google.com/storage/docs/soft-delete) .
10919
11123
*/
10920
11124
@com.google.api.client.util.Key
10921
11125
private java.lang.Boolean softDeleted;
10922
11126
10923
11127
/** If true, only soft-deleted object versions will be listed. The default is false. For more
10924
- information, see Soft Delete.
11128
+ information, see [ Soft Delete](https://cloud.google.com/storage/docs/soft-delete) .
10925
11129
*/
10926
11130
public java.lang.Boolean getSoftDeleted() {
10927
11131
return softDeleted;
10928
11132
}
10929
11133
10930
11134
/**
10931
11135
* If true, only soft-deleted object versions will be listed. The default is false. For more
10932
- * information, see Soft Delete.
11136
+ * information, see [ Soft Delete](https://cloud.google.com/storage/docs/soft-delete) .
10933
11137
*/
10934
11138
public List setSoftDeleted(java.lang.Boolean softDeleted) {
10935
11139
this.softDeleted = softDeleted;
0 commit comments