Skip to content

Commit 34b8ac4

Browse files
chore: Update generation configuration at Tue Jan 7 02:23:57 UTC 2025 (#2838)
* chore: update clirr rules --------- Co-authored-by: BenWhitehead <[email protected]>
1 parent 1db19b4 commit 34b8ac4

File tree

158 files changed

+4379
-868
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

158 files changed

+4379
-868
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ If you are using Maven without the BOM, add this to your dependencies:
5959
If you are using Gradle 5.x or later, add this to your dependencies:
6060

6161
```Groovy
62-
implementation platform('com.google.cloud:libraries-bom:26.51.0')
62+
implementation platform('com.google.cloud:libraries-bom:26.52.0')
6363
6464
implementation 'com.google.cloud:google-cloud-storage'
6565
```

gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageClient.java

Lines changed: 165 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2024 Google LLC
2+
* Copyright 2025 Google LLC
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -476,6 +476,25 @@
476476
* </ul>
477477
* </td>
478478
* </tr>
479+
* <tr>
480+
* <td><p> MoveObject</td>
481+
* <td><p> Moves the source object to the destination object in the same bucket.</td>
482+
* <td>
483+
* <p>Request object method variants only take one parameter, a request object, which must be constructed before the call.</p>
484+
* <ul>
485+
* <li><p> moveObject(MoveObjectRequest request)
486+
* </ul>
487+
* <p>"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.</p>
488+
* <ul>
489+
* <li><p> moveObject(BucketName bucket, String sourceObject, String destinationObject)
490+
* <li><p> moveObject(String bucket, String sourceObject, String destinationObject)
491+
* </ul>
492+
* <p>Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.</p>
493+
* <ul>
494+
* <li><p> moveObjectCallable()
495+
* </ul>
496+
* </td>
497+
* </tr>
479498
* </table>
480499
*
481500
* <p>See the individual methods for example code.
@@ -3241,6 +3260,151 @@ public final QueryWriteStatusResponse queryWriteStatus(QueryWriteStatusRequest r
32413260
return stub.queryWriteStatusCallable();
32423261
}
32433262

3263+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
3264+
/**
3265+
* Moves the source object to the destination object in the same bucket.
3266+
*
3267+
* <p>Sample code:
3268+
*
3269+
* <pre>{@code
3270+
* // This snippet has been automatically generated and should be regarded as a code template only.
3271+
* // It will require modifications to work:
3272+
* // - It may require correct/in-range values for request initialization.
3273+
* // - It may require specifying regional endpoints when creating the service client as shown in
3274+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3275+
* try (StorageClient storageClient = StorageClient.create()) {
3276+
* BucketName bucket = BucketName.of("[PROJECT]", "[BUCKET]");
3277+
* String sourceObject = "sourceObject1196439354";
3278+
* String destinationObject = "destinationObject-1761603347";
3279+
* Object response = storageClient.moveObject(bucket, sourceObject, destinationObject);
3280+
* }
3281+
* }</pre>
3282+
*
3283+
* @param bucket Required. Name of the bucket in which the object resides.
3284+
* @param sourceObject Required. Name of the source object.
3285+
* @param destinationObject Required. Name of the destination object.
3286+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
3287+
*/
3288+
public final Object moveObject(BucketName bucket, String sourceObject, String destinationObject) {
3289+
MoveObjectRequest request =
3290+
MoveObjectRequest.newBuilder()
3291+
.setBucket(bucket == null ? null : bucket.toString())
3292+
.setSourceObject(sourceObject)
3293+
.setDestinationObject(destinationObject)
3294+
.build();
3295+
return moveObject(request);
3296+
}
3297+
3298+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
3299+
/**
3300+
* Moves the source object to the destination object in the same bucket.
3301+
*
3302+
* <p>Sample code:
3303+
*
3304+
* <pre>{@code
3305+
* // This snippet has been automatically generated and should be regarded as a code template only.
3306+
* // It will require modifications to work:
3307+
* // - It may require correct/in-range values for request initialization.
3308+
* // - It may require specifying regional endpoints when creating the service client as shown in
3309+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3310+
* try (StorageClient storageClient = StorageClient.create()) {
3311+
* String bucket = BucketName.of("[PROJECT]", "[BUCKET]").toString();
3312+
* String sourceObject = "sourceObject1196439354";
3313+
* String destinationObject = "destinationObject-1761603347";
3314+
* Object response = storageClient.moveObject(bucket, sourceObject, destinationObject);
3315+
* }
3316+
* }</pre>
3317+
*
3318+
* @param bucket Required. Name of the bucket in which the object resides.
3319+
* @param sourceObject Required. Name of the source object.
3320+
* @param destinationObject Required. Name of the destination object.
3321+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
3322+
*/
3323+
public final Object moveObject(String bucket, String sourceObject, String destinationObject) {
3324+
MoveObjectRequest request =
3325+
MoveObjectRequest.newBuilder()
3326+
.setBucket(bucket)
3327+
.setSourceObject(sourceObject)
3328+
.setDestinationObject(destinationObject)
3329+
.build();
3330+
return moveObject(request);
3331+
}
3332+
3333+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
3334+
/**
3335+
* Moves the source object to the destination object in the same bucket.
3336+
*
3337+
* <p>Sample code:
3338+
*
3339+
* <pre>{@code
3340+
* // This snippet has been automatically generated and should be regarded as a code template only.
3341+
* // It will require modifications to work:
3342+
* // - It may require correct/in-range values for request initialization.
3343+
* // - It may require specifying regional endpoints when creating the service client as shown in
3344+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3345+
* try (StorageClient storageClient = StorageClient.create()) {
3346+
* MoveObjectRequest request =
3347+
* MoveObjectRequest.newBuilder()
3348+
* .setBucket(BucketName.of("[PROJECT]", "[BUCKET]").toString())
3349+
* .setSourceObject("sourceObject1196439354")
3350+
* .setDestinationObject("destinationObject-1761603347")
3351+
* .setIfSourceGenerationMatch(-1427877280)
3352+
* .setIfSourceGenerationNotMatch(1575612532)
3353+
* .setIfSourceMetagenerationMatch(1143319909)
3354+
* .setIfSourceMetagenerationNotMatch(1900822777)
3355+
* .setIfGenerationMatch(-1086241088)
3356+
* .setIfGenerationNotMatch(1475720404)
3357+
* .setIfMetagenerationMatch(1043427781)
3358+
* .setIfMetagenerationNotMatch(1025430873)
3359+
* .build();
3360+
* Object response = storageClient.moveObject(request);
3361+
* }
3362+
* }</pre>
3363+
*
3364+
* @param request The request object containing all of the parameters for the API call.
3365+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
3366+
*/
3367+
public final Object moveObject(MoveObjectRequest request) {
3368+
return moveObjectCallable().call(request);
3369+
}
3370+
3371+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
3372+
/**
3373+
* Moves the source object to the destination object in the same bucket.
3374+
*
3375+
* <p>Sample code:
3376+
*
3377+
* <pre>{@code
3378+
* // This snippet has been automatically generated and should be regarded as a code template only.
3379+
* // It will require modifications to work:
3380+
* // - It may require correct/in-range values for request initialization.
3381+
* // - It may require specifying regional endpoints when creating the service client as shown in
3382+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3383+
* try (StorageClient storageClient = StorageClient.create()) {
3384+
* MoveObjectRequest request =
3385+
* MoveObjectRequest.newBuilder()
3386+
* .setBucket(BucketName.of("[PROJECT]", "[BUCKET]").toString())
3387+
* .setSourceObject("sourceObject1196439354")
3388+
* .setDestinationObject("destinationObject-1761603347")
3389+
* .setIfSourceGenerationMatch(-1427877280)
3390+
* .setIfSourceGenerationNotMatch(1575612532)
3391+
* .setIfSourceMetagenerationMatch(1143319909)
3392+
* .setIfSourceMetagenerationNotMatch(1900822777)
3393+
* .setIfGenerationMatch(-1086241088)
3394+
* .setIfGenerationNotMatch(1475720404)
3395+
* .setIfMetagenerationMatch(1043427781)
3396+
* .setIfMetagenerationNotMatch(1025430873)
3397+
* .build();
3398+
* ApiFuture<Object> future = storageClient.moveObjectCallable().futureCall(request);
3399+
* // Do something.
3400+
* Object response = future.get();
3401+
* }
3402+
* }</pre>
3403+
*/
3404+
public final UnaryCallable<MoveObjectRequest, Object> moveObjectCallable() {
3405+
return stub.moveObjectCallable();
3406+
}
3407+
32443408
@Override
32453409
public final void close() {
32463410
stub.close();

gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageSettings.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2024 Google LLC
2+
* Copyright 2025 Google LLC
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -212,6 +212,11 @@ public UnaryCallSettings<RewriteObjectRequest, RewriteResponse> rewriteObjectSet
212212
return ((StorageStubSettings) getStubSettings()).queryWriteStatusSettings();
213213
}
214214

215+
/** Returns the object with the settings used for calls to moveObject. */
216+
public UnaryCallSettings<MoveObjectRequest, Object> moveObjectSettings() {
217+
return ((StorageStubSettings) getStubSettings()).moveObjectSettings();
218+
}
219+
215220
public static final StorageSettings create(StorageStubSettings stub) throws IOException {
216221
return new StorageSettings.Builder(stub.toBuilder()).build();
217222
}
@@ -430,6 +435,11 @@ public UnaryCallSettings.Builder<UpdateObjectRequest, Object> updateObjectSettin
430435
return getStubSettingsBuilder().queryWriteStatusSettings();
431436
}
432437

438+
/** Returns the builder for the settings used for calls to moveObject. */
439+
public UnaryCallSettings.Builder<MoveObjectRequest, Object> moveObjectSettings() {
440+
return getStubSettingsBuilder().moveObjectSettings();
441+
}
442+
433443
@Override
434444
public StorageSettings build() throws IOException {
435445
return new StorageSettings(this);

gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/package-info.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2024 Google LLC
2+
* Copyright 2025 Google LLC
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/stub/GrpcStorageCallableFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2024 Google LLC
2+
* Copyright 2025 Google LLC
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/stub/GrpcStorageStub.java

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2024 Google LLC
2+
* Copyright 2025 Google LLC
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -53,6 +53,7 @@
5353
import com.google.storage.v2.ListObjectsRequest;
5454
import com.google.storage.v2.ListObjectsResponse;
5555
import com.google.storage.v2.LockBucketRetentionPolicyRequest;
56+
import com.google.storage.v2.MoveObjectRequest;
5657
import com.google.storage.v2.Object;
5758
import com.google.storage.v2.QueryWriteStatusRequest;
5859
import com.google.storage.v2.QueryWriteStatusResponse;
@@ -287,6 +288,14 @@ public class GrpcStorageStub extends StorageStub {
287288
ProtoUtils.marshaller(QueryWriteStatusResponse.getDefaultInstance()))
288289
.build();
289290

291+
private static final MethodDescriptor<MoveObjectRequest, Object> moveObjectMethodDescriptor =
292+
MethodDescriptor.<MoveObjectRequest, Object>newBuilder()
293+
.setType(MethodDescriptor.MethodType.UNARY)
294+
.setFullMethodName("google.storage.v2.Storage/MoveObject")
295+
.setRequestMarshaller(ProtoUtils.marshaller(MoveObjectRequest.getDefaultInstance()))
296+
.setResponseMarshaller(ProtoUtils.marshaller(Object.getDefaultInstance()))
297+
.build();
298+
290299
private final UnaryCallable<DeleteBucketRequest, Empty> deleteBucketCallable;
291300
private final UnaryCallable<GetBucketRequest, Bucket> getBucketCallable;
292301
private final UnaryCallable<CreateBucketRequest, Bucket> createBucketCallable;
@@ -320,6 +329,7 @@ public class GrpcStorageStub extends StorageStub {
320329
startResumableWriteCallable;
321330
private final UnaryCallable<QueryWriteStatusRequest, QueryWriteStatusResponse>
322331
queryWriteStatusCallable;
332+
private final UnaryCallable<MoveObjectRequest, Object> moveObjectCallable;
323333

324334
private final BackgroundResource backgroundResources;
325335
private final GrpcOperationsStub operationsStub;
@@ -371,6 +381,8 @@ public class GrpcStorageStub extends StorageStub {
371381
PathTemplate.create("{bucket=**}");
372382
private static final PathTemplate QUERY_WRITE_STATUS_0_PATH_TEMPLATE =
373383
PathTemplate.create("{bucket=projects/*/buckets/*}/**");
384+
private static final PathTemplate MOVE_OBJECT_0_PATH_TEMPLATE =
385+
PathTemplate.create("{bucket=**}");
374386

375387
public static final GrpcStorageStub create(StorageStubSettings settings) throws IOException {
376388
return new GrpcStorageStub(settings, ClientContext.create(settings));
@@ -655,6 +667,16 @@ protected GrpcStorageStub(
655667
return builder.build();
656668
})
657669
.build();
670+
GrpcCallSettings<MoveObjectRequest, Object> moveObjectTransportSettings =
671+
GrpcCallSettings.<MoveObjectRequest, Object>newBuilder()
672+
.setMethodDescriptor(moveObjectMethodDescriptor)
673+
.setParamsExtractor(
674+
request -> {
675+
RequestParamsBuilder builder = RequestParamsBuilder.create();
676+
builder.add(request.getBucket(), "bucket", MOVE_OBJECT_0_PATH_TEMPLATE);
677+
return builder.build();
678+
})
679+
.build();
658680

659681
this.deleteBucketCallable =
660682
callableFactory.createUnaryCallable(
@@ -736,6 +758,9 @@ protected GrpcStorageStub(
736758
this.queryWriteStatusCallable =
737759
callableFactory.createUnaryCallable(
738760
queryWriteStatusTransportSettings, settings.queryWriteStatusSettings(), clientContext);
761+
this.moveObjectCallable =
762+
callableFactory.createUnaryCallable(
763+
moveObjectTransportSettings, settings.moveObjectSettings(), clientContext);
739764

740765
this.backgroundResources =
741766
new BackgroundResourceAggregation(clientContext.getBackgroundResources());
@@ -871,6 +896,11 @@ public UnaryCallable<RewriteObjectRequest, RewriteResponse> rewriteObjectCallabl
871896
return queryWriteStatusCallable;
872897
}
873898

899+
@Override
900+
public UnaryCallable<MoveObjectRequest, Object> moveObjectCallable() {
901+
return moveObjectCallable;
902+
}
903+
874904
@Override
875905
public final void close() {
876906
try {

gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/stub/StorageStub.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2024 Google LLC
2+
* Copyright 2025 Google LLC
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -46,6 +46,7 @@
4646
import com.google.storage.v2.ListObjectsRequest;
4747
import com.google.storage.v2.ListObjectsResponse;
4848
import com.google.storage.v2.LockBucketRetentionPolicyRequest;
49+
import com.google.storage.v2.MoveObjectRequest;
4950
import com.google.storage.v2.Object;
5051
import com.google.storage.v2.QueryWriteStatusRequest;
5152
import com.google.storage.v2.QueryWriteStatusResponse;
@@ -173,6 +174,10 @@ public UnaryCallable<RewriteObjectRequest, RewriteResponse> rewriteObjectCallabl
173174
throw new UnsupportedOperationException("Not implemented: queryWriteStatusCallable()");
174175
}
175176

177+
public UnaryCallable<MoveObjectRequest, Object> moveObjectCallable() {
178+
throw new UnsupportedOperationException("Not implemented: moveObjectCallable()");
179+
}
180+
176181
@Override
177182
public abstract void close();
178183
}

0 commit comments

Comments
 (0)