From fb10a517f11d7a0400ab00338eab89bc33522bb1 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 13 Jun 2022 15:44:15 +0000 Subject: [PATCH 01/10] chore(main): release 2.8.2-SNAPSHOT (#1450) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- gapic-google-cloud-storage-v2/pom.xml | 4 ++-- google-cloud-storage/pom.xml | 4 ++-- grpc-google-cloud-storage-v2/pom.xml | 4 ++-- pom.xml | 10 +++++----- proto-google-cloud-storage-v2/pom.xml | 4 ++-- samples/snapshot/pom.xml | 2 +- versions.txt | 8 ++++---- 7 files changed, 18 insertions(+), 18 deletions(-) diff --git a/gapic-google-cloud-storage-v2/pom.xml b/gapic-google-cloud-storage-v2/pom.xml index 7ee1473501..bf8b8b997e 100644 --- a/gapic-google-cloud-storage-v2/pom.xml +++ b/gapic-google-cloud-storage-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc gapic-google-cloud-storage-v2 - 2.8.1-alpha + 2.8.2-alpha-SNAPSHOT gapic-google-cloud-storage-v2 GRPC library for gapic-google-cloud-storage-v2 com.google.cloud google-cloud-storage-parent - 2.8.1 + 2.8.2-SNAPSHOT diff --git a/google-cloud-storage/pom.xml b/google-cloud-storage/pom.xml index edc69685e6..cd5bab11eb 100644 --- a/google-cloud-storage/pom.xml +++ b/google-cloud-storage/pom.xml @@ -2,7 +2,7 @@ 4.0.0 google-cloud-storage - 2.8.1 + 2.8.2-SNAPSHOT jar Google Cloud Storage https://github.com/googleapis/java-storage @@ -12,7 +12,7 @@ com.google.cloud google-cloud-storage-parent - 2.8.1 + 2.8.2-SNAPSHOT google-cloud-storage diff --git a/grpc-google-cloud-storage-v2/pom.xml b/grpc-google-cloud-storage-v2/pom.xml index dceeef4071..1268b17b45 100644 --- a/grpc-google-cloud-storage-v2/pom.xml +++ b/grpc-google-cloud-storage-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-storage-v2 - 2.8.1-alpha + 2.8.2-alpha-SNAPSHOT grpc-google-cloud-storage-v2 GRPC library for grpc-google-cloud-storage-v2 com.google.cloud google-cloud-storage-parent - 2.8.1 + 2.8.2-SNAPSHOT diff --git a/pom.xml b/pom.xml index 1e665200a8..b0710be532 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-storage-parent pom - 2.8.1 + 2.8.2-SNAPSHOT Storage Parent https://github.com/googleapis/java-storage @@ -70,7 +70,7 @@ com.google.cloud google-cloud-storage - 2.8.1 + 2.8.2-SNAPSHOT com.google.apis @@ -111,17 +111,17 @@ com.google.api.grpc proto-google-cloud-storage-v2 - 2.8.1-alpha + 2.8.2-alpha-SNAPSHOT com.google.api.grpc grpc-google-cloud-storage-v2 - 2.8.1-alpha + 2.8.2-alpha-SNAPSHOT com.google.api.grpc gapic-google-cloud-storage-v2 - 2.8.1-alpha + 2.8.2-alpha-SNAPSHOT com.google.cloud diff --git a/proto-google-cloud-storage-v2/pom.xml b/proto-google-cloud-storage-v2/pom.xml index e39dd0de42..f50b9451ec 100644 --- a/proto-google-cloud-storage-v2/pom.xml +++ b/proto-google-cloud-storage-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-storage-v2 - 2.8.1-alpha + 2.8.2-alpha-SNAPSHOT proto-google-cloud-storage-v2 PROTO library for proto-google-cloud-storage-v2 com.google.cloud google-cloud-storage-parent - 2.8.1 + 2.8.2-SNAPSHOT diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index a688007d55..ad28c305f3 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-storage - 2.8.1 + 2.8.2-SNAPSHOT diff --git a/versions.txt b/versions.txt index a3d35def02..396aedaa5f 100644 --- a/versions.txt +++ b/versions.txt @@ -1,7 +1,7 @@ # Format: # module:released-version:current-version -google-cloud-storage:2.8.1:2.8.1 -gapic-google-cloud-storage-v2:2.8.1-alpha:2.8.1-alpha -grpc-google-cloud-storage-v2:2.8.1-alpha:2.8.1-alpha -proto-google-cloud-storage-v2:2.8.1-alpha:2.8.1-alpha +google-cloud-storage:2.8.1:2.8.2-SNAPSHOT +gapic-google-cloud-storage-v2:2.8.1-alpha:2.8.2-alpha-SNAPSHOT +grpc-google-cloud-storage-v2:2.8.1-alpha:2.8.2-alpha-SNAPSHOT +proto-google-cloud-storage-v2:2.8.1-alpha:2.8.2-alpha-SNAPSHOT From fef5059617001d9125443a5e3a4dc2f365b23c98 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 14 Jun 2022 00:29:30 +0200 Subject: [PATCH 02/10] chore(deps): update dependency com.google.cloud:google-cloud-storage to v2.8.1 (#1451) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(deps): update dependency com.google.cloud:google-cloud-storage to v2.8.1 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- README.md | 6 +++--- samples/install-without-bom/pom.xml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 592cab029c..e0852bafd7 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ If you are using Maven without BOM, add this to your dependencies: com.google.cloud google-cloud-storage - 2.8.0 + 2.8.1 ``` @@ -56,13 +56,13 @@ implementation 'com.google.cloud:google-cloud-storage' If you are using Gradle without BOM, add this to your dependencies ```Groovy -implementation 'com.google.cloud:google-cloud-storage:2.8.0' +implementation 'com.google.cloud:google-cloud-storage:2.8.1' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-storage" % "2.8.0" +libraryDependencies += "com.google.cloud" % "google-cloud-storage" % "2.8.1" ``` ## Authentication diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 4b5c4fc55e..75878af5cb 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -30,7 +30,7 @@ com.google.cloud google-cloud-storage - 2.8.0 + 2.8.1 From 15baa27c97aacca115981f5c14d942a8ddd6cb1f Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 17 Jun 2022 12:56:27 -0400 Subject: [PATCH 03/10] docs: Clarified how clients should work with resumable uploads (#1457) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: Clarified how clients should work with resumable uploads docs: Clarified ListNotifications pagination docs: Made "live generation" wording consistent with docs for other Cloud Storage APIs fix: Made negative offsets larger in magnitude that object size return the full object for ReadObject operations fix: Made naming format for Logging.log_bucket be a path rather than raw bucket name, to be consistent with the rest of the API feat: Changed Custom Dual Regions to be specified in a proto message rather than a syntactic encoding within the bucket location feat: Added etag support PiperOrigin-RevId: 455465509 Source-Link: https://github.com/googleapis/googleapis/commit/0470cd6d5019a397cc132b34551a83d2bc309d35 Source-Link: https://github.com/googleapis/googleapis-gen/commit/1b1667395e707a60abca093e8ffd512f4a0a0116 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMWIxNjY3Mzk1ZTcwN2E2MGFiY2EwOTNlOGZmZDUxMmY0YTBhMDExNiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore: update clirr-ignored-differences.xml Allow list new etag and CustomPlacementConfig properties Co-authored-by: Owl Bot Co-authored-by: BenWhitehead --- .../com/google/storage/v2/StorageClient.java | 36 +- .../google/storage/v2/StorageClientTest.java | 25 + .../com/google/storage/v2/StorageGrpc.java | 78 +- .../clirr-ignored-differences.xml | 11 + .../java/com/google/storage/v2/Bucket.java | 1752 ++++++++++++++--- .../storage/v2/BucketAccessControl.java | 200 ++ .../v2/BucketAccessControlOrBuilder.java | 31 + .../google/storage/v2/BucketOrBuilder.java | 67 + .../storage/v2/DeleteObjectRequest.java | 12 +- .../v2/DeleteObjectRequestOrBuilder.java | 4 +- .../google/storage/v2/GetObjectRequest.java | 12 +- .../storage/v2/GetObjectRequestOrBuilder.java | 4 +- .../google/storage/v2/HmacKeyMetadata.java | 179 ++ .../storage/v2/HmacKeyMetadataOrBuilder.java | 25 + .../storage/v2/ListNotificationsRequest.java | 12 +- .../v2/ListNotificationsRequestOrBuilder.java | 3 +- .../com/google/storage/v2/Notification.java | 193 ++ .../storage/v2/NotificationOrBuilder.java | 29 + .../java/com/google/storage/v2/Object.java | 200 ++ .../storage/v2/ObjectAccessControl.java | 200 ++ .../v2/ObjectAccessControlOrBuilder.java | 31 + .../google/storage/v2/ObjectOrBuilder.java | 31 + .../google/storage/v2/ReadObjectRequest.java | 28 +- .../v2/ReadObjectRequestOrBuilder.java | 8 +- .../storage/v2/RewriteObjectRequest.java | 36 +- .../v2/RewriteObjectRequestOrBuilder.java | 12 +- .../com/google/storage/v2/StorageProto.java | 490 ++--- .../storage/v2/UpdateObjectRequest.java | 36 +- .../v2/UpdateObjectRequestOrBuilder.java | 10 +- .../google/storage/v2/WriteObjectSpec.java | 12 +- .../storage/v2/WriteObjectSpecOrBuilder.java | 4 +- .../proto/google/storage/v2/storage.proto | 111 +- 32 files changed, 3281 insertions(+), 601 deletions(-) diff --git a/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageClient.java b/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageClient.java index 755b46a23f..a34219f9f5 100644 --- a/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageClient.java +++ b/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageClient.java @@ -2035,8 +2035,8 @@ public final ServerStreamingCallable read * * @param object The object to update. The object's bucket and name fields are used to identify * the object to update. If present, the object's generation field selects a specific revision - * of this object whose metadata should be updated. Otherwise, assumes the current, live - * version of the object. + * of this object whose metadata should be updated. Otherwise, assumes the live version of the + * object. * @param updateMask List of fields to be updated. *

To specify ALL fields, equivalent to the JSON API's "update" function, specify a single * field with the value `*`. Note: not recommended. If a new field is introduced at a @@ -2125,12 +2125,29 @@ public final UnaryCallable updateObjectCallable() { * preconditions. Additionally, the final message must set 'finish_write' to true, or else it is * an error. * - *

For a resumable write, the client should instead call `StartResumableWrite()` and provide - * that method an `WriteObjectSpec.` They should then attach the returned `upload_id` to the first - * message of each following call to `Create`. If there is an error or the connection is broken - * during the resumable `Create()`, the client should check the status of the `Create()` by - * calling `QueryWriteStatus()` and continue writing from the returned `persisted_size`. This may - * be less than the amount of data the client previously sent. + *

For a resumable write, the client should instead call `StartResumableWrite()`, populating a + * `WriteObjectSpec` into that request. They should then attach the returned `upload_id` to the + * first message of each following call to `WriteObject`. If the stream is closed before finishing + * the upload (either explicitly by the client or due to a network error or an error response from + * the server), the client should do as follows: - Check the result Status of the stream, to + * determine if writing can be resumed on this stream or must be restarted from scratch (by + * calling `StartResumableWrite()`). The resumable errors are DEADLINE_EXCEEDED, INTERNAL, and + * UNAVAILABLE. For each case, the client should use binary exponential backoff before retrying. + * Additionally, writes can be resumed after RESOURCE_EXHAUSTED errors, but only after taking + * appropriate measures, which may include reducing aggregate send rate across clients and/or + * requesting a quota increase for your project. - If the call to `WriteObject` returns `ABORTED`, + * that indicates concurrent attempts to update the resumable write, caused either by multiple + * racing clients or by a single client where the previous request was timed out on the client + * side but nonetheless reached the server. In this case the client should take steps to prevent + * further concurrent writes (e.g., increase the timeouts, stop using more than one process to + * perform the upload, etc.), and then should follow the steps below for resuming the upload. - + * For resumable errors, the client should call `QueryWriteStatus()` and then continue writing + * from the returned `persisted_size`. This may be less than the amount of data the client + * previously sent. Note also that it is acceptable to send data starting at an offset earlier + * than the returned `persisted_size`; in this case, the service will skip data at offsets that + * were already persisted (without checking that it matches the previously written data), and + * write only the data starting from the persisted offset. This behavior can make client-side + * handling simpler in some cases. * *

The service will not view the object as complete until the client has sent a * `WriteObjectRequest` with `finish_write` set to `true`. Sending any requests on a stream after @@ -2138,6 +2155,9 @@ public final UnaryCallable updateObjectCallable() { * **should** check the response it receives to determine how much data the * service was able to commit and whether the service views the object as complete. * + *

Attempting to resume an already finalized object will result in an OK status, with a + * WriteObjectResponse containing the finalized object's metadata. + * *

Sample code: * *

{@code
diff --git a/gapic-google-cloud-storage-v2/src/test/java/com/google/storage/v2/StorageClientTest.java b/gapic-google-cloud-storage-v2/src/test/java/com/google/storage/v2/StorageClientTest.java
index 906f882718..5d8bd4159f 100644
--- a/gapic-google-cloud-storage-v2/src/test/java/com/google/storage/v2/StorageClientTest.java
+++ b/gapic-google-cloud-storage-v2/src/test/java/com/google/storage/v2/StorageClientTest.java
@@ -175,6 +175,7 @@ public void getBucketTest() throws Exception {
         Bucket.newBuilder()
             .setName(BucketName.of("[PROJECT]", "[BUCKET]").toString())
             .setBucketId("bucketId-1603305307")
+            .setEtag("etag3123477")
             .setProject(ProjectName.of("[PROJECT]").toString())
             .setMetageneration(1048558813)
             .setLocation("location1901043637")
@@ -198,6 +199,7 @@ public void getBucketTest() throws Exception {
             .setRetentionPolicy(Bucket.RetentionPolicy.newBuilder().build())
             .setIamConfig(Bucket.IamConfig.newBuilder().build())
             .setSatisfiesPzs(true)
+            .setCustomPlacementConfig(Bucket.CustomPlacementConfig.newBuilder().build())
             .setAutoclass(Bucket.Autoclass.newBuilder().build())
             .build();
     mockStorage.addResponse(expectedResponse);
@@ -238,6 +240,7 @@ public void getBucketTest2() throws Exception {
         Bucket.newBuilder()
             .setName(BucketName.of("[PROJECT]", "[BUCKET]").toString())
             .setBucketId("bucketId-1603305307")
+            .setEtag("etag3123477")
             .setProject(ProjectName.of("[PROJECT]").toString())
             .setMetageneration(1048558813)
             .setLocation("location1901043637")
@@ -261,6 +264,7 @@ public void getBucketTest2() throws Exception {
             .setRetentionPolicy(Bucket.RetentionPolicy.newBuilder().build())
             .setIamConfig(Bucket.IamConfig.newBuilder().build())
             .setSatisfiesPzs(true)
+            .setCustomPlacementConfig(Bucket.CustomPlacementConfig.newBuilder().build())
             .setAutoclass(Bucket.Autoclass.newBuilder().build())
             .build();
     mockStorage.addResponse(expectedResponse);
@@ -301,6 +305,7 @@ public void createBucketTest() throws Exception {
         Bucket.newBuilder()
             .setName(BucketName.of("[PROJECT]", "[BUCKET]").toString())
             .setBucketId("bucketId-1603305307")
+            .setEtag("etag3123477")
             .setProject(ProjectName.of("[PROJECT]").toString())
             .setMetageneration(1048558813)
             .setLocation("location1901043637")
@@ -324,6 +329,7 @@ public void createBucketTest() throws Exception {
             .setRetentionPolicy(Bucket.RetentionPolicy.newBuilder().build())
             .setIamConfig(Bucket.IamConfig.newBuilder().build())
             .setSatisfiesPzs(true)
+            .setCustomPlacementConfig(Bucket.CustomPlacementConfig.newBuilder().build())
             .setAutoclass(Bucket.Autoclass.newBuilder().build())
             .build();
     mockStorage.addResponse(expectedResponse);
@@ -370,6 +376,7 @@ public void createBucketTest2() throws Exception {
         Bucket.newBuilder()
             .setName(BucketName.of("[PROJECT]", "[BUCKET]").toString())
             .setBucketId("bucketId-1603305307")
+            .setEtag("etag3123477")
             .setProject(ProjectName.of("[PROJECT]").toString())
             .setMetageneration(1048558813)
             .setLocation("location1901043637")
@@ -393,6 +400,7 @@ public void createBucketTest2() throws Exception {
             .setRetentionPolicy(Bucket.RetentionPolicy.newBuilder().build())
             .setIamConfig(Bucket.IamConfig.newBuilder().build())
             .setSatisfiesPzs(true)
+            .setCustomPlacementConfig(Bucket.CustomPlacementConfig.newBuilder().build())
             .setAutoclass(Bucket.Autoclass.newBuilder().build())
             .build();
     mockStorage.addResponse(expectedResponse);
@@ -527,6 +535,7 @@ public void lockBucketRetentionPolicyTest() throws Exception {
         Bucket.newBuilder()
             .setName(BucketName.of("[PROJECT]", "[BUCKET]").toString())
             .setBucketId("bucketId-1603305307")
+            .setEtag("etag3123477")
             .setProject(ProjectName.of("[PROJECT]").toString())
             .setMetageneration(1048558813)
             .setLocation("location1901043637")
@@ -550,6 +559,7 @@ public void lockBucketRetentionPolicyTest() throws Exception {
             .setRetentionPolicy(Bucket.RetentionPolicy.newBuilder().build())
             .setIamConfig(Bucket.IamConfig.newBuilder().build())
             .setSatisfiesPzs(true)
+            .setCustomPlacementConfig(Bucket.CustomPlacementConfig.newBuilder().build())
             .setAutoclass(Bucket.Autoclass.newBuilder().build())
             .build();
     mockStorage.addResponse(expectedResponse);
@@ -591,6 +601,7 @@ public void lockBucketRetentionPolicyTest2() throws Exception {
         Bucket.newBuilder()
             .setName(BucketName.of("[PROJECT]", "[BUCKET]").toString())
             .setBucketId("bucketId-1603305307")
+            .setEtag("etag3123477")
             .setProject(ProjectName.of("[PROJECT]").toString())
             .setMetageneration(1048558813)
             .setLocation("location1901043637")
@@ -614,6 +625,7 @@ public void lockBucketRetentionPolicyTest2() throws Exception {
             .setRetentionPolicy(Bucket.RetentionPolicy.newBuilder().build())
             .setIamConfig(Bucket.IamConfig.newBuilder().build())
             .setSatisfiesPzs(true)
+            .setCustomPlacementConfig(Bucket.CustomPlacementConfig.newBuilder().build())
             .setAutoclass(Bucket.Autoclass.newBuilder().build())
             .build();
     mockStorage.addResponse(expectedResponse);
@@ -909,6 +921,7 @@ public void updateBucketTest() throws Exception {
         Bucket.newBuilder()
             .setName(BucketName.of("[PROJECT]", "[BUCKET]").toString())
             .setBucketId("bucketId-1603305307")
+            .setEtag("etag3123477")
             .setProject(ProjectName.of("[PROJECT]").toString())
             .setMetageneration(1048558813)
             .setLocation("location1901043637")
@@ -932,6 +945,7 @@ public void updateBucketTest() throws Exception {
             .setRetentionPolicy(Bucket.RetentionPolicy.newBuilder().build())
             .setIamConfig(Bucket.IamConfig.newBuilder().build())
             .setSatisfiesPzs(true)
+            .setCustomPlacementConfig(Bucket.CustomPlacementConfig.newBuilder().build())
             .setAutoclass(Bucket.Autoclass.newBuilder().build())
             .build();
     mockStorage.addResponse(expectedResponse);
@@ -1043,6 +1057,7 @@ public void getNotificationTest() throws Exception {
         Notification.newBuilder()
             .setName(NotificationName.of("[PROJECT]", "[BUCKET]", "[NOTIFICATION]").toString())
             .setTopic("topic110546223")
+            .setEtag("etag3123477")
             .addAllEventTypes(new ArrayList())
             .putAllCustomAttributes(new HashMap())
             .setObjectNamePrefix("objectNamePrefix-1978236516")
@@ -1086,6 +1101,7 @@ public void getNotificationTest2() throws Exception {
         Notification.newBuilder()
             .setName(NotificationName.of("[PROJECT]", "[BUCKET]", "[NOTIFICATION]").toString())
             .setTopic("topic110546223")
+            .setEtag("etag3123477")
             .addAllEventTypes(new ArrayList())
             .putAllCustomAttributes(new HashMap())
             .setObjectNamePrefix("objectNamePrefix-1978236516")
@@ -1129,6 +1145,7 @@ public void createNotificationTest() throws Exception {
         Notification.newBuilder()
             .setName(NotificationName.of("[PROJECT]", "[BUCKET]", "[NOTIFICATION]").toString())
             .setTopic("topic110546223")
+            .setEtag("etag3123477")
             .addAllEventTypes(new ArrayList())
             .putAllCustomAttributes(new HashMap())
             .setObjectNamePrefix("objectNamePrefix-1978236516")
@@ -1175,6 +1192,7 @@ public void createNotificationTest2() throws Exception {
         Notification.newBuilder()
             .setName(NotificationName.of("[PROJECT]", "[BUCKET]", "[NOTIFICATION]").toString())
             .setTopic("topic110546223")
+            .setEtag("etag3123477")
             .addAllEventTypes(new ArrayList())
             .putAllCustomAttributes(new HashMap())
             .setObjectNamePrefix("objectNamePrefix-1978236516")
@@ -1309,6 +1327,7 @@ public void composeObjectTest() throws Exception {
         Object.newBuilder()
             .setName("name3373707")
             .setBucket(BucketName.of("[PROJECT]", "[BUCKET]").toString())
+            .setEtag("etag3123477")
             .setGeneration(305703192)
             .setMetageneration(1048558813)
             .setStorageClass("storageClass871353277")
@@ -1482,6 +1501,7 @@ public void getObjectTest() throws Exception {
         Object.newBuilder()
             .setName("name3373707")
             .setBucket(BucketName.of("[PROJECT]", "[BUCKET]").toString())
+            .setEtag("etag3123477")
             .setGeneration(305703192)
             .setMetageneration(1048558813)
             .setStorageClass("storageClass871353277")
@@ -1550,6 +1570,7 @@ public void getObjectTest2() throws Exception {
         Object.newBuilder()
             .setName("name3373707")
             .setBucket(BucketName.of("[PROJECT]", "[BUCKET]").toString())
+            .setEtag("etag3123477")
             .setGeneration(305703192)
             .setMetageneration(1048558813)
             .setStorageClass("storageClass871353277")
@@ -1692,6 +1713,7 @@ public void updateObjectTest() throws Exception {
         Object.newBuilder()
             .setName("name3373707")
             .setBucket(BucketName.of("[PROJECT]", "[BUCKET]").toString())
+            .setEtag("etag3123477")
             .setGeneration(305703192)
             .setMetageneration(1048558813)
             .setStorageClass("storageClass871353277")
@@ -2352,6 +2374,7 @@ public void getHmacKeyTest() throws Exception {
             .setState("state109757585")
             .setCreateTime(Timestamp.newBuilder().build())
             .setUpdateTime(Timestamp.newBuilder().build())
+            .setEtag("etag3123477")
             .build();
     mockStorage.addResponse(expectedResponse);
 
@@ -2399,6 +2422,7 @@ public void getHmacKeyTest2() throws Exception {
             .setState("state109757585")
             .setCreateTime(Timestamp.newBuilder().build())
             .setUpdateTime(Timestamp.newBuilder().build())
+            .setEtag("etag3123477")
             .build();
     mockStorage.addResponse(expectedResponse);
 
@@ -2534,6 +2558,7 @@ public void updateHmacKeyTest() throws Exception {
             .setState("state109757585")
             .setCreateTime(Timestamp.newBuilder().build())
             .setUpdateTime(Timestamp.newBuilder().build())
+            .setEtag("etag3123477")
             .build();
     mockStorage.addResponse(expectedResponse);
 
diff --git a/grpc-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageGrpc.java b/grpc-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageGrpc.java
index f3774e9a5f..9ad3549918 100644
--- a/grpc-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageGrpc.java
+++ b/grpc-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageGrpc.java
@@ -1579,19 +1579,46 @@ public void updateObject(
      * preconditions. Additionally, the final message must set 'finish_write' to
      * true, or else it is an error.
      * For a resumable write, the client should instead call
-     * `StartResumableWrite()` and provide that method an `WriteObjectSpec.`
+     * `StartResumableWrite()`, populating a `WriteObjectSpec` into that request.
      * They should then attach the returned `upload_id` to the first message of
-     * each following call to `Create`. If there is an error or the connection is
-     * broken during the resumable `Create()`, the client should check the status
-     * of the `Create()` by calling `QueryWriteStatus()` and continue writing from
-     * the returned `persisted_size`. This may be less than the amount of data the
-     * client previously sent.
+     * each following call to `WriteObject`. If the stream is closed before
+     * finishing the upload (either explicitly by the client or due to a network
+     * error or an error response from the server), the client should do as
+     * follows:
+     *   - Check the result Status of the stream, to determine if writing can be
+     *     resumed on this stream or must be restarted from scratch (by calling
+     *     `StartResumableWrite()`). The resumable errors are DEADLINE_EXCEEDED,
+     *     INTERNAL, and UNAVAILABLE. For each case, the client should use binary
+     *     exponential backoff before retrying.  Additionally, writes can be
+     *     resumed after RESOURCE_EXHAUSTED errors, but only after taking
+     *     appropriate measures, which may include reducing aggregate send rate
+     *     across clients and/or requesting a quota increase for your project.
+     *   - If the call to `WriteObject` returns `ABORTED`, that indicates
+     *     concurrent attempts to update the resumable write, caused either by
+     *     multiple racing clients or by a single client where the previous
+     *     request was timed out on the client side but nonetheless reached the
+     *     server. In this case the client should take steps to prevent further
+     *     concurrent writes (e.g., increase the timeouts, stop using more than
+     *     one process to perform the upload, etc.), and then should follow the
+     *     steps below for resuming the upload.
+     *   - For resumable errors, the client should call `QueryWriteStatus()` and
+     *     then continue writing from the returned `persisted_size`. This may be
+     *     less than the amount of data the client previously sent. Note also that
+     *     it is acceptable to send data starting at an offset earlier than the
+     *     returned `persisted_size`; in this case, the service will skip data at
+     *     offsets that were already persisted (without checking that it matches
+     *     the previously written data), and write only the data starting from the
+     *     persisted offset. This behavior can make client-side handling simpler
+     *     in some cases.
      * The service will not view the object as complete until the client has
      * sent a `WriteObjectRequest` with `finish_write` set to `true`. Sending any
      * requests on a stream after sending a request with `finish_write` set to
      * `true` will cause an error. The client **should** check the response it
      * receives to determine how much data the service was able to commit and
      * whether the service views the object as complete.
+     * Attempting to resume an already finalized object will result in an OK
+     * status, with a WriteObjectResponse containing the finalized object's
+     * metadata.
      * 
*/ public io.grpc.stub.StreamObserver writeObject( @@ -2277,19 +2304,46 @@ public void updateObject( * preconditions. Additionally, the final message must set 'finish_write' to * true, or else it is an error. * For a resumable write, the client should instead call - * `StartResumableWrite()` and provide that method an `WriteObjectSpec.` + * `StartResumableWrite()`, populating a `WriteObjectSpec` into that request. * They should then attach the returned `upload_id` to the first message of - * each following call to `Create`. If there is an error or the connection is - * broken during the resumable `Create()`, the client should check the status - * of the `Create()` by calling `QueryWriteStatus()` and continue writing from - * the returned `persisted_size`. This may be less than the amount of data the - * client previously sent. + * each following call to `WriteObject`. If the stream is closed before + * finishing the upload (either explicitly by the client or due to a network + * error or an error response from the server), the client should do as + * follows: + * - Check the result Status of the stream, to determine if writing can be + * resumed on this stream or must be restarted from scratch (by calling + * `StartResumableWrite()`). The resumable errors are DEADLINE_EXCEEDED, + * INTERNAL, and UNAVAILABLE. For each case, the client should use binary + * exponential backoff before retrying. Additionally, writes can be + * resumed after RESOURCE_EXHAUSTED errors, but only after taking + * appropriate measures, which may include reducing aggregate send rate + * across clients and/or requesting a quota increase for your project. + * - If the call to `WriteObject` returns `ABORTED`, that indicates + * concurrent attempts to update the resumable write, caused either by + * multiple racing clients or by a single client where the previous + * request was timed out on the client side but nonetheless reached the + * server. In this case the client should take steps to prevent further + * concurrent writes (e.g., increase the timeouts, stop using more than + * one process to perform the upload, etc.), and then should follow the + * steps below for resuming the upload. + * - For resumable errors, the client should call `QueryWriteStatus()` and + * then continue writing from the returned `persisted_size`. This may be + * less than the amount of data the client previously sent. Note also that + * it is acceptable to send data starting at an offset earlier than the + * returned `persisted_size`; in this case, the service will skip data at + * offsets that were already persisted (without checking that it matches + * the previously written data), and write only the data starting from the + * persisted offset. This behavior can make client-side handling simpler + * in some cases. * The service will not view the object as complete until the client has * sent a `WriteObjectRequest` with `finish_write` set to `true`. Sending any * requests on a stream after sending a request with `finish_write` set to * `true` will cause an error. The client **should** check the response it * receives to determine how much data the service was able to commit and * whether the service views the object as complete. + * Attempting to resume an already finalized object will result in an OK + * status, with a WriteObjectResponse containing the finalized object's + * metadata. * */ public io.grpc.stub.StreamObserver writeObject( diff --git a/proto-google-cloud-storage-v2/clirr-ignored-differences.xml b/proto-google-cloud-storage-v2/clirr-ignored-differences.xml index af53e7fa5e..4a3695b3ba 100644 --- a/proto-google-cloud-storage-v2/clirr-ignored-differences.xml +++ b/proto-google-cloud-storage-v2/clirr-ignored-differences.xml @@ -17,4 +17,15 @@ * *CommonRequestParams*(*) + + 7012 + com/google/storage/v2/*OrBuilder + * *Etag*(*) + + + 7012 + com/google/storage/v2/*OrBuilder + * *CustomPlacementConfig*(*) + + diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/Bucket.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/Bucket.java index c5893b6f34..1c12c9ddf6 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/Bucket.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/Bucket.java @@ -40,6 +40,7 @@ private Bucket(com.google.protobuf.GeneratedMessageV3.Builder builder) { private Bucket() { name_ = ""; bucketId_ = ""; + etag_ = ""; project_ = ""; location_ = ""; locationType_ = ""; @@ -353,6 +354,23 @@ private Bucket( case 200: { satisfiesPzs_ = input.readBool(); + break; + } + case 210: + { + com.google.storage.v2.Bucket.CustomPlacementConfig.Builder subBuilder = null; + if (customPlacementConfig_ != null) { + subBuilder = customPlacementConfig_.toBuilder(); + } + customPlacementConfig_ = + input.readMessage( + com.google.storage.v2.Bucket.CustomPlacementConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(customPlacementConfig_); + customPlacementConfig_ = subBuilder.buildPartial(); + } + break; } case 218: @@ -376,6 +394,13 @@ private Bucket( autoclass_ = subBuilder.buildPartial(); } + break; + } + case 234: + { + java.lang.String s = input.readStringRequireUtf8(); + + etag_ = s; break; } default: @@ -11600,7 +11625,8 @@ public interface LoggingOrBuilder * * *
-     * The destination bucket where the current bucket's logs should be placed.
+     * The destination bucket where the current bucket's logs should be placed,
+     * using path format (like `projects/123456/buckets/foo`).
      * 
* * string log_bucket = 1; @@ -11612,7 +11638,8 @@ public interface LoggingOrBuilder * * *
-     * The destination bucket where the current bucket's logs should be placed.
+     * The destination bucket where the current bucket's logs should be placed,
+     * using path format (like `projects/123456/buckets/foo`).
      * 
* * string log_bucket = 1; @@ -11755,7 +11782,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-     * The destination bucket where the current bucket's logs should be placed.
+     * The destination bucket where the current bucket's logs should be placed,
+     * using path format (like `projects/123456/buckets/foo`).
      * 
* * string log_bucket = 1; @@ -11778,7 +11806,8 @@ public java.lang.String getLogBucket() { * * *
-     * The destination bucket where the current bucket's logs should be placed.
+     * The destination bucket where the current bucket's logs should be placed,
+     * using path format (like `projects/123456/buckets/foo`).
      * 
* * string log_bucket = 1; @@ -12187,7 +12216,8 @@ public Builder mergeFrom( * * *
-       * The destination bucket where the current bucket's logs should be placed.
+       * The destination bucket where the current bucket's logs should be placed,
+       * using path format (like `projects/123456/buckets/foo`).
        * 
* * string log_bucket = 1; @@ -12209,7 +12239,8 @@ public java.lang.String getLogBucket() { * * *
-       * The destination bucket where the current bucket's logs should be placed.
+       * The destination bucket where the current bucket's logs should be placed,
+       * using path format (like `projects/123456/buckets/foo`).
        * 
* * string log_bucket = 1; @@ -12231,7 +12262,8 @@ public com.google.protobuf.ByteString getLogBucketBytes() { * * *
-       * The destination bucket where the current bucket's logs should be placed.
+       * The destination bucket where the current bucket's logs should be placed,
+       * using path format (like `projects/123456/buckets/foo`).
        * 
* * string log_bucket = 1; @@ -12252,7 +12284,8 @@ public Builder setLogBucket(java.lang.String value) { * * *
-       * The destination bucket where the current bucket's logs should be placed.
+       * The destination bucket where the current bucket's logs should be placed,
+       * using path format (like `projects/123456/buckets/foo`).
        * 
* * string log_bucket = 1; @@ -12269,7 +12302,8 @@ public Builder clearLogBucket() { * * *
-       * The destination bucket where the current bucket's logs should be placed.
+       * The destination bucket where the current bucket's logs should be placed,
+       * using path format (like `projects/123456/buckets/foo`).
        * 
* * string log_bucket = 1; @@ -14915,99 +14949,91 @@ public com.google.storage.v2.Bucket.Website getDefaultInstanceForType() { } } - public interface AutoclassOrBuilder + public interface CustomPlacementConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.storage.v2.Bucket.Autoclass) + // @@protoc_insertion_point(interface_extends:google.storage.v2.Bucket.CustomPlacementConfig) com.google.protobuf.MessageOrBuilder { /** * * *
-     * Enables Autoclass.
+     * List of locations to use for data placement.
      * 
* - * bool enabled = 1; + * repeated string data_locations = 1; * - * @return The enabled. + * @return A list containing the dataLocations. */ - boolean getEnabled(); - + java.util.List getDataLocationsList(); /** * * *
-     * Output only. Latest instant at which the `enabled` field was set to true after being
-     * disabled/unconfigured or set to false after being enabled. If Autoclass
-     * is enabled when the bucket is created, the toggle_time is set to the
-     * bucket creation time.
+     * List of locations to use for data placement.
      * 
* - * - * .google.protobuf.Timestamp toggle_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated string data_locations = 1; * - * @return Whether the toggleTime field is set. + * @return The count of dataLocations. */ - boolean hasToggleTime(); + int getDataLocationsCount(); /** * * *
-     * Output only. Latest instant at which the `enabled` field was set to true after being
-     * disabled/unconfigured or set to false after being enabled. If Autoclass
-     * is enabled when the bucket is created, the toggle_time is set to the
-     * bucket creation time.
+     * List of locations to use for data placement.
      * 
* - * - * .google.protobuf.Timestamp toggle_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated string data_locations = 1; * - * @return The toggleTime. + * @param index The index of the element to return. + * @return The dataLocations at the given index. */ - com.google.protobuf.Timestamp getToggleTime(); + java.lang.String getDataLocations(int index); /** * * *
-     * Output only. Latest instant at which the `enabled` field was set to true after being
-     * disabled/unconfigured or set to false after being enabled. If Autoclass
-     * is enabled when the bucket is created, the toggle_time is set to the
-     * bucket creation time.
+     * List of locations to use for data placement.
      * 
* - * - * .google.protobuf.Timestamp toggle_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated string data_locations = 1; + * + * @param index The index of the value to return. + * @return The bytes of the dataLocations at the given index. */ - com.google.protobuf.TimestampOrBuilder getToggleTimeOrBuilder(); + com.google.protobuf.ByteString getDataLocationsBytes(int index); } /** * * *
-   * Configuration for a bucket's Autoclass feature.
+   * Configuration for Custom Dual Regions.  It should specify precisely two
+   * eligible regions within the same Multiregion. More information on regions
+   * may be found [https://cloud.google.com/storage/docs/locations][here].
    * 
* - * Protobuf type {@code google.storage.v2.Bucket.Autoclass} + * Protobuf type {@code google.storage.v2.Bucket.CustomPlacementConfig} */ - public static final class Autoclass extends com.google.protobuf.GeneratedMessageV3 + public static final class CustomPlacementConfig extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.storage.v2.Bucket.Autoclass) - AutoclassOrBuilder { + // @@protoc_insertion_point(message_implements:google.storage.v2.Bucket.CustomPlacementConfig) + CustomPlacementConfigOrBuilder { private static final long serialVersionUID = 0L; - // Use Autoclass.newBuilder() to construct. - private Autoclass(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use CustomPlacementConfig.newBuilder() to construct. + private CustomPlacementConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private Autoclass() {} + private CustomPlacementConfig() { + dataLocations_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Autoclass(); + return new CustomPlacementConfig(); } @java.lang.Override @@ -15015,7 +15041,7 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Autoclass( + private CustomPlacementConfig( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -15023,6 +15049,7 @@ private Autoclass( if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } + int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { @@ -15033,24 +15060,14 @@ private Autoclass( case 0: done = true; break; - case 8: - { - enabled_ = input.readBool(); - break; - } - case 18: + case 10: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (toggleTime_ != null) { - subBuilder = toggleTime_.toBuilder(); - } - toggleTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(toggleTime_); - toggleTime_ = subBuilder.buildPartial(); + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + dataLocations_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; } - + dataLocations_.add(s); break; } default: @@ -15069,6 +15086,9 @@ private Autoclass( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + dataLocations_ = dataLocations_.getUnmodifiableView(); + } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } @@ -15076,96 +15096,78 @@ private Autoclass( public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_Bucket_Autoclass_descriptor; + .internal_static_google_storage_v2_Bucket_CustomPlacementConfig_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_Bucket_Autoclass_fieldAccessorTable + .internal_static_google_storage_v2_Bucket_CustomPlacementConfig_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.storage.v2.Bucket.Autoclass.class, - com.google.storage.v2.Bucket.Autoclass.Builder.class); + com.google.storage.v2.Bucket.CustomPlacementConfig.class, + com.google.storage.v2.Bucket.CustomPlacementConfig.Builder.class); } - public static final int ENABLED_FIELD_NUMBER = 1; - private boolean enabled_; + public static final int DATA_LOCATIONS_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList dataLocations_; /** * * *
-     * Enables Autoclass.
+     * List of locations to use for data placement.
      * 
* - * bool enabled = 1; + * repeated string data_locations = 1; * - * @return The enabled. + * @return A list containing the dataLocations. */ - @java.lang.Override - public boolean getEnabled() { - return enabled_; + public com.google.protobuf.ProtocolStringList getDataLocationsList() { + return dataLocations_; } - - public static final int TOGGLE_TIME_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp toggleTime_; /** * * *
-     * Output only. Latest instant at which the `enabled` field was set to true after being
-     * disabled/unconfigured or set to false after being enabled. If Autoclass
-     * is enabled when the bucket is created, the toggle_time is set to the
-     * bucket creation time.
+     * List of locations to use for data placement.
      * 
* - * - * .google.protobuf.Timestamp toggle_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated string data_locations = 1; * - * @return Whether the toggleTime field is set. + * @return The count of dataLocations. */ - @java.lang.Override - public boolean hasToggleTime() { - return toggleTime_ != null; + public int getDataLocationsCount() { + return dataLocations_.size(); } /** * * *
-     * Output only. Latest instant at which the `enabled` field was set to true after being
-     * disabled/unconfigured or set to false after being enabled. If Autoclass
-     * is enabled when the bucket is created, the toggle_time is set to the
-     * bucket creation time.
+     * List of locations to use for data placement.
      * 
* - * - * .google.protobuf.Timestamp toggle_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated string data_locations = 1; * - * @return The toggleTime. + * @param index The index of the element to return. + * @return The dataLocations at the given index. */ - @java.lang.Override - public com.google.protobuf.Timestamp getToggleTime() { - return toggleTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : toggleTime_; + public java.lang.String getDataLocations(int index) { + return dataLocations_.get(index); } /** * * *
-     * Output only. Latest instant at which the `enabled` field was set to true after being
-     * disabled/unconfigured or set to false after being enabled. If Autoclass
-     * is enabled when the bucket is created, the toggle_time is set to the
-     * bucket creation time.
+     * List of locations to use for data placement.
      * 
* - * - * .google.protobuf.Timestamp toggle_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated string data_locations = 1; + * + * @param index The index of the value to return. + * @return The bytes of the dataLocations at the given index. */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getToggleTimeOrBuilder() { - return getToggleTime(); + public com.google.protobuf.ByteString getDataLocationsBytes(int index) { + return dataLocations_.getByteString(index); } private byte memoizedIsInitialized = -1; @@ -15182,11 +15184,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (enabled_ != false) { - output.writeBool(1, enabled_); - } - if (toggleTime_ != null) { - output.writeMessage(2, getToggleTime()); + for (int i = 0; i < dataLocations_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, dataLocations_.getRaw(i)); } unknownFields.writeTo(output); } @@ -15197,11 +15196,13 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (enabled_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, enabled_); - } - if (toggleTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getToggleTime()); + { + int dataSize = 0; + for (int i = 0; i < dataLocations_.size(); i++) { + dataSize += computeStringSizeNoTag(dataLocations_.getRaw(i)); + } + size += dataSize; + size += 1 * getDataLocationsList().size(); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -15213,16 +15214,13 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.storage.v2.Bucket.Autoclass)) { + if (!(obj instanceof com.google.storage.v2.Bucket.CustomPlacementConfig)) { return super.equals(obj); } - com.google.storage.v2.Bucket.Autoclass other = (com.google.storage.v2.Bucket.Autoclass) obj; + com.google.storage.v2.Bucket.CustomPlacementConfig other = + (com.google.storage.v2.Bucket.CustomPlacementConfig) obj; - if (getEnabled() != other.getEnabled()) return false; - if (hasToggleTime() != other.hasToggleTime()) return false; - if (hasToggleTime()) { - if (!getToggleTime().equals(other.getToggleTime())) return false; - } + if (!getDataLocationsList().equals(other.getDataLocationsList())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -15234,82 +15232,80 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ENABLED_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnabled()); - if (hasToggleTime()) { - hash = (37 * hash) + TOGGLE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getToggleTime().hashCode(); + if (getDataLocationsCount() > 0) { + hash = (37 * hash) + DATA_LOCATIONS_FIELD_NUMBER; + hash = (53 * hash) + getDataLocationsList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.storage.v2.Bucket.Autoclass parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.storage.v2.Bucket.CustomPlacementConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.storage.v2.Bucket.Autoclass parseFrom( + public static com.google.storage.v2.Bucket.CustomPlacementConfig parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.storage.v2.Bucket.Autoclass parseFrom( + public static com.google.storage.v2.Bucket.CustomPlacementConfig parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.storage.v2.Bucket.Autoclass parseFrom( + public static com.google.storage.v2.Bucket.CustomPlacementConfig parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.storage.v2.Bucket.Autoclass parseFrom(byte[] data) + public static com.google.storage.v2.Bucket.CustomPlacementConfig parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.storage.v2.Bucket.Autoclass parseFrom( + public static com.google.storage.v2.Bucket.CustomPlacementConfig parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.storage.v2.Bucket.Autoclass parseFrom(java.io.InputStream input) - throws java.io.IOException { + public static com.google.storage.v2.Bucket.CustomPlacementConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.storage.v2.Bucket.Autoclass parseFrom( + public static com.google.storage.v2.Bucket.CustomPlacementConfig parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.storage.v2.Bucket.Autoclass parseDelimitedFrom( + public static com.google.storage.v2.Bucket.CustomPlacementConfig parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.storage.v2.Bucket.Autoclass parseDelimitedFrom( + public static com.google.storage.v2.Bucket.CustomPlacementConfig parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } - public static com.google.storage.v2.Bucket.Autoclass parseFrom( + public static com.google.storage.v2.Bucket.CustomPlacementConfig parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.storage.v2.Bucket.Autoclass parseFrom( + public static com.google.storage.v2.Bucket.CustomPlacementConfig parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -15326,7 +15322,7 @@ public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.storage.v2.Bucket.Autoclass prototype) { + public static Builder newBuilder(com.google.storage.v2.Bucket.CustomPlacementConfig prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -15345,32 +15341,34 @@ protected Builder newBuilderForType( * * *
-     * Configuration for a bucket's Autoclass feature.
+     * Configuration for Custom Dual Regions.  It should specify precisely two
+     * eligible regions within the same Multiregion. More information on regions
+     * may be found [https://cloud.google.com/storage/docs/locations][here].
      * 
* - * Protobuf type {@code google.storage.v2.Bucket.Autoclass} + * Protobuf type {@code google.storage.v2.Bucket.CustomPlacementConfig} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.storage.v2.Bucket.Autoclass) - com.google.storage.v2.Bucket.AutoclassOrBuilder { + // @@protoc_insertion_point(builder_implements:google.storage.v2.Bucket.CustomPlacementConfig) + com.google.storage.v2.Bucket.CustomPlacementConfigOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_Bucket_Autoclass_descriptor; + .internal_static_google_storage_v2_Bucket_CustomPlacementConfig_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_Bucket_Autoclass_fieldAccessorTable + .internal_static_google_storage_v2_Bucket_CustomPlacementConfig_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.storage.v2.Bucket.Autoclass.class, - com.google.storage.v2.Bucket.Autoclass.Builder.class); + com.google.storage.v2.Bucket.CustomPlacementConfig.class, + com.google.storage.v2.Bucket.CustomPlacementConfig.Builder.class); } - // Construct using com.google.storage.v2.Bucket.Autoclass.newBuilder() + // Construct using com.google.storage.v2.Bucket.CustomPlacementConfig.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -15387,31 +15385,25 @@ private void maybeForceBuilderInitialization() { @java.lang.Override public Builder clear() { super.clear(); - enabled_ = false; - - if (toggleTimeBuilder_ == null) { - toggleTime_ = null; - } else { - toggleTime_ = null; - toggleTimeBuilder_ = null; - } + dataLocations_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_Bucket_Autoclass_descriptor; + .internal_static_google_storage_v2_Bucket_CustomPlacementConfig_descriptor; } @java.lang.Override - public com.google.storage.v2.Bucket.Autoclass getDefaultInstanceForType() { - return com.google.storage.v2.Bucket.Autoclass.getDefaultInstance(); + public com.google.storage.v2.Bucket.CustomPlacementConfig getDefaultInstanceForType() { + return com.google.storage.v2.Bucket.CustomPlacementConfig.getDefaultInstance(); } @java.lang.Override - public com.google.storage.v2.Bucket.Autoclass build() { - com.google.storage.v2.Bucket.Autoclass result = buildPartial(); + public com.google.storage.v2.Bucket.CustomPlacementConfig build() { + com.google.storage.v2.Bucket.CustomPlacementConfig result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -15419,15 +15411,15 @@ public com.google.storage.v2.Bucket.Autoclass build() { } @java.lang.Override - public com.google.storage.v2.Bucket.Autoclass buildPartial() { - com.google.storage.v2.Bucket.Autoclass result = - new com.google.storage.v2.Bucket.Autoclass(this); - result.enabled_ = enabled_; - if (toggleTimeBuilder_ == null) { - result.toggleTime_ = toggleTime_; - } else { - result.toggleTime_ = toggleTimeBuilder_.build(); + public com.google.storage.v2.Bucket.CustomPlacementConfig buildPartial() { + com.google.storage.v2.Bucket.CustomPlacementConfig result = + new com.google.storage.v2.Bucket.CustomPlacementConfig(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + dataLocations_ = dataLocations_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); } + result.dataLocations_ = dataLocations_; onBuilt(); return result; } @@ -15469,21 +15461,26 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.storage.v2.Bucket.Autoclass) { - return mergeFrom((com.google.storage.v2.Bucket.Autoclass) other); + if (other instanceof com.google.storage.v2.Bucket.CustomPlacementConfig) { + return mergeFrom((com.google.storage.v2.Bucket.CustomPlacementConfig) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.storage.v2.Bucket.Autoclass other) { - if (other == com.google.storage.v2.Bucket.Autoclass.getDefaultInstance()) return this; - if (other.getEnabled() != false) { - setEnabled(other.getEnabled()); - } - if (other.hasToggleTime()) { - mergeToggleTime(other.getToggleTime()); + public Builder mergeFrom(com.google.storage.v2.Bucket.CustomPlacementConfig other) { + if (other == com.google.storage.v2.Bucket.CustomPlacementConfig.getDefaultInstance()) + return this; + if (!other.dataLocations_.isEmpty()) { + if (dataLocations_.isEmpty()) { + dataLocations_ = other.dataLocations_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDataLocationsIsMutable(); + dataLocations_.addAll(other.dataLocations_); + } + onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); @@ -15500,11 +15497,12 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.storage.v2.Bucket.Autoclass parsedMessage = null; + com.google.storage.v2.Bucket.CustomPlacementConfig parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.storage.v2.Bucket.Autoclass) e.getUnfinishedMessage(); + parsedMessage = + (com.google.storage.v2.Bucket.CustomPlacementConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -15514,54 +15512,875 @@ public Builder mergeFrom( return this; } - private boolean enabled_; + private int bitField0_; + + private com.google.protobuf.LazyStringList dataLocations_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureDataLocationsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + dataLocations_ = new com.google.protobuf.LazyStringArrayList(dataLocations_); + bitField0_ |= 0x00000001; + } + } /** * * *
-       * Enables Autoclass.
+       * List of locations to use for data placement.
        * 
* - * bool enabled = 1; + * repeated string data_locations = 1; * - * @return The enabled. + * @return A list containing the dataLocations. */ - @java.lang.Override - public boolean getEnabled() { - return enabled_; + public com.google.protobuf.ProtocolStringList getDataLocationsList() { + return dataLocations_.getUnmodifiableView(); } /** * * *
-       * Enables Autoclass.
+       * List of locations to use for data placement.
        * 
* - * bool enabled = 1; + * repeated string data_locations = 1; * - * @param value The enabled to set. - * @return This builder for chaining. + * @return The count of dataLocations. */ - public Builder setEnabled(boolean value) { - - enabled_ = value; - onChanged(); - return this; + public int getDataLocationsCount() { + return dataLocations_.size(); } /** * * *
-       * Enables Autoclass.
+       * List of locations to use for data placement.
        * 
* - * bool enabled = 1; + * repeated string data_locations = 1; * - * @return This builder for chaining. + * @param index The index of the element to return. + * @return The dataLocations at the given index. */ - public Builder clearEnabled() { - - enabled_ = false; + public java.lang.String getDataLocations(int index) { + return dataLocations_.get(index); + } + /** + * + * + *
+       * List of locations to use for data placement.
+       * 
+ * + * repeated string data_locations = 1; + * + * @param index The index of the value to return. + * @return The bytes of the dataLocations at the given index. + */ + public com.google.protobuf.ByteString getDataLocationsBytes(int index) { + return dataLocations_.getByteString(index); + } + /** + * + * + *
+       * List of locations to use for data placement.
+       * 
+ * + * repeated string data_locations = 1; + * + * @param index The index to set the value at. + * @param value The dataLocations to set. + * @return This builder for chaining. + */ + public Builder setDataLocations(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataLocationsIsMutable(); + dataLocations_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * List of locations to use for data placement.
+       * 
+ * + * repeated string data_locations = 1; + * + * @param value The dataLocations to add. + * @return This builder for chaining. + */ + public Builder addDataLocations(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataLocationsIsMutable(); + dataLocations_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * List of locations to use for data placement.
+       * 
+ * + * repeated string data_locations = 1; + * + * @param values The dataLocations to add. + * @return This builder for chaining. + */ + public Builder addAllDataLocations(java.lang.Iterable values) { + ensureDataLocationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dataLocations_); + onChanged(); + return this; + } + /** + * + * + *
+       * List of locations to use for data placement.
+       * 
+ * + * repeated string data_locations = 1; + * + * @return This builder for chaining. + */ + public Builder clearDataLocations() { + dataLocations_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * List of locations to use for data placement.
+       * 
+ * + * repeated string data_locations = 1; + * + * @param value The bytes of the dataLocations to add. + * @return This builder for chaining. + */ + public Builder addDataLocationsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureDataLocationsIsMutable(); + dataLocations_.add(value); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.storage.v2.Bucket.CustomPlacementConfig) + } + + // @@protoc_insertion_point(class_scope:google.storage.v2.Bucket.CustomPlacementConfig) + private static final com.google.storage.v2.Bucket.CustomPlacementConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.storage.v2.Bucket.CustomPlacementConfig(); + } + + public static com.google.storage.v2.Bucket.CustomPlacementConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CustomPlacementConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CustomPlacementConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.storage.v2.Bucket.CustomPlacementConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface AutoclassOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.storage.v2.Bucket.Autoclass) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Enables Autoclass.
+     * 
+ * + * bool enabled = 1; + * + * @return The enabled. + */ + boolean getEnabled(); + + /** + * + * + *
+     * Output only. Latest instant at which the `enabled` field was set to true after being
+     * disabled/unconfigured or set to false after being enabled. If Autoclass
+     * is enabled when the bucket is created, the toggle_time is set to the
+     * bucket creation time.
+     * 
+ * + * + * .google.protobuf.Timestamp toggle_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the toggleTime field is set. + */ + boolean hasToggleTime(); + /** + * + * + *
+     * Output only. Latest instant at which the `enabled` field was set to true after being
+     * disabled/unconfigured or set to false after being enabled. If Autoclass
+     * is enabled when the bucket is created, the toggle_time is set to the
+     * bucket creation time.
+     * 
+ * + * + * .google.protobuf.Timestamp toggle_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The toggleTime. + */ + com.google.protobuf.Timestamp getToggleTime(); + /** + * + * + *
+     * Output only. Latest instant at which the `enabled` field was set to true after being
+     * disabled/unconfigured or set to false after being enabled. If Autoclass
+     * is enabled when the bucket is created, the toggle_time is set to the
+     * bucket creation time.
+     * 
+ * + * + * .google.protobuf.Timestamp toggle_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getToggleTimeOrBuilder(); + } + /** + * + * + *
+   * Configuration for a bucket's Autoclass feature.
+   * 
+ * + * Protobuf type {@code google.storage.v2.Bucket.Autoclass} + */ + public static final class Autoclass extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.storage.v2.Bucket.Autoclass) + AutoclassOrBuilder { + private static final long serialVersionUID = 0L; + // Use Autoclass.newBuilder() to construct. + private Autoclass(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Autoclass() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Autoclass(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Autoclass( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + enabled_ = input.readBool(); + break; + } + case 18: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (toggleTime_ != null) { + subBuilder = toggleTime_.toBuilder(); + } + toggleTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(toggleTime_); + toggleTime_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storage.v2.StorageProto + .internal_static_google_storage_v2_Bucket_Autoclass_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storage.v2.StorageProto + .internal_static_google_storage_v2_Bucket_Autoclass_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storage.v2.Bucket.Autoclass.class, + com.google.storage.v2.Bucket.Autoclass.Builder.class); + } + + public static final int ENABLED_FIELD_NUMBER = 1; + private boolean enabled_; + /** + * + * + *
+     * Enables Autoclass.
+     * 
+ * + * bool enabled = 1; + * + * @return The enabled. + */ + @java.lang.Override + public boolean getEnabled() { + return enabled_; + } + + public static final int TOGGLE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp toggleTime_; + /** + * + * + *
+     * Output only. Latest instant at which the `enabled` field was set to true after being
+     * disabled/unconfigured or set to false after being enabled. If Autoclass
+     * is enabled when the bucket is created, the toggle_time is set to the
+     * bucket creation time.
+     * 
+ * + * + * .google.protobuf.Timestamp toggle_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the toggleTime field is set. + */ + @java.lang.Override + public boolean hasToggleTime() { + return toggleTime_ != null; + } + /** + * + * + *
+     * Output only. Latest instant at which the `enabled` field was set to true after being
+     * disabled/unconfigured or set to false after being enabled. If Autoclass
+     * is enabled when the bucket is created, the toggle_time is set to the
+     * bucket creation time.
+     * 
+ * + * + * .google.protobuf.Timestamp toggle_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The toggleTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getToggleTime() { + return toggleTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : toggleTime_; + } + /** + * + * + *
+     * Output only. Latest instant at which the `enabled` field was set to true after being
+     * disabled/unconfigured or set to false after being enabled. If Autoclass
+     * is enabled when the bucket is created, the toggle_time is set to the
+     * bucket creation time.
+     * 
+ * + * + * .google.protobuf.Timestamp toggle_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getToggleTimeOrBuilder() { + return getToggleTime(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (enabled_ != false) { + output.writeBool(1, enabled_); + } + if (toggleTime_ != null) { + output.writeMessage(2, getToggleTime()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (enabled_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, enabled_); + } + if (toggleTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getToggleTime()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.storage.v2.Bucket.Autoclass)) { + return super.equals(obj); + } + com.google.storage.v2.Bucket.Autoclass other = (com.google.storage.v2.Bucket.Autoclass) obj; + + if (getEnabled() != other.getEnabled()) return false; + if (hasToggleTime() != other.hasToggleTime()) return false; + if (hasToggleTime()) { + if (!getToggleTime().equals(other.getToggleTime())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENABLED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnabled()); + if (hasToggleTime()) { + hash = (37 * hash) + TOGGLE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getToggleTime().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.storage.v2.Bucket.Autoclass parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.v2.Bucket.Autoclass parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storage.v2.Bucket.Autoclass parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.v2.Bucket.Autoclass parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storage.v2.Bucket.Autoclass parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.v2.Bucket.Autoclass parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storage.v2.Bucket.Autoclass parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storage.v2.Bucket.Autoclass parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.storage.v2.Bucket.Autoclass parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.storage.v2.Bucket.Autoclass parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.storage.v2.Bucket.Autoclass parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storage.v2.Bucket.Autoclass parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.storage.v2.Bucket.Autoclass prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Configuration for a bucket's Autoclass feature.
+     * 
+ * + * Protobuf type {@code google.storage.v2.Bucket.Autoclass} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.storage.v2.Bucket.Autoclass) + com.google.storage.v2.Bucket.AutoclassOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storage.v2.StorageProto + .internal_static_google_storage_v2_Bucket_Autoclass_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storage.v2.StorageProto + .internal_static_google_storage_v2_Bucket_Autoclass_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storage.v2.Bucket.Autoclass.class, + com.google.storage.v2.Bucket.Autoclass.Builder.class); + } + + // Construct using com.google.storage.v2.Bucket.Autoclass.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + enabled_ = false; + + if (toggleTimeBuilder_ == null) { + toggleTime_ = null; + } else { + toggleTime_ = null; + toggleTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.storage.v2.StorageProto + .internal_static_google_storage_v2_Bucket_Autoclass_descriptor; + } + + @java.lang.Override + public com.google.storage.v2.Bucket.Autoclass getDefaultInstanceForType() { + return com.google.storage.v2.Bucket.Autoclass.getDefaultInstance(); + } + + @java.lang.Override + public com.google.storage.v2.Bucket.Autoclass build() { + com.google.storage.v2.Bucket.Autoclass result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.storage.v2.Bucket.Autoclass buildPartial() { + com.google.storage.v2.Bucket.Autoclass result = + new com.google.storage.v2.Bucket.Autoclass(this); + result.enabled_ = enabled_; + if (toggleTimeBuilder_ == null) { + result.toggleTime_ = toggleTime_; + } else { + result.toggleTime_ = toggleTimeBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.storage.v2.Bucket.Autoclass) { + return mergeFrom((com.google.storage.v2.Bucket.Autoclass) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.storage.v2.Bucket.Autoclass other) { + if (other == com.google.storage.v2.Bucket.Autoclass.getDefaultInstance()) return this; + if (other.getEnabled() != false) { + setEnabled(other.getEnabled()); + } + if (other.hasToggleTime()) { + mergeToggleTime(other.getToggleTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.storage.v2.Bucket.Autoclass parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.storage.v2.Bucket.Autoclass) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean enabled_; + /** + * + * + *
+       * Enables Autoclass.
+       * 
+ * + * bool enabled = 1; + * + * @return The enabled. + */ + @java.lang.Override + public boolean getEnabled() { + return enabled_; + } + /** + * + * + *
+       * Enables Autoclass.
+       * 
+ * + * bool enabled = 1; + * + * @param value The enabled to set. + * @return This builder for chaining. + */ + public Builder setEnabled(boolean value) { + + enabled_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Enables Autoclass.
+       * 
+ * + * bool enabled = 1; + * + * @return This builder for chaining. + */ + public Builder clearEnabled() { + + enabled_ = false; onChanged(); return this; } @@ -15890,37 +16709,90 @@ public com.google.protobuf.ByteString getNameBytes() { if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BUCKET_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object bucketId_; + /** + * + * + *
+   * Output only. The user-chosen part of the bucket name. The `{bucket}` portion of the
+   * `name` field. For globally unique buckets, this is equal to the "bucket
+   * name" of other Cloud Storage APIs. Example: "pub".
+   * 
+ * + * string bucket_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bucketId. + */ + @java.lang.Override + public java.lang.String getBucketId() { + java.lang.Object ref = bucketId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + bucketId_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The user-chosen part of the bucket name. The `{bucket}` portion of the
+   * `name` field. For globally unique buckets, this is equal to the "bucket
+   * name" of other Cloud Storage APIs. Example: "pub".
+   * 
+ * + * string bucket_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for bucketId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBucketIdBytes() { + java.lang.Object ref = bucketId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + bucketId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - public static final int BUCKET_ID_FIELD_NUMBER = 2; - private volatile java.lang.Object bucketId_; + public static final int ETAG_FIELD_NUMBER = 29; + private volatile java.lang.Object etag_; /** * * *
-   * Output only. The user-chosen part of the bucket name. The `{bucket}` portion of the
-   * `name` field. For globally unique buckets, this is equal to the "bucket
-   * name" of other Cloud Storage APIs. Example: "pub".
+   * The etag of the bucket.
+   * If included in the metadata of an UpdateBucketRequest, the operation will
+   * only be performed if the etag matches that of the bucket.
    * 
* - * string bucket_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string etag = 29; * - * @return The bucketId. + * @return The etag. */ @java.lang.Override - public java.lang.String getBucketId() { - java.lang.Object ref = bucketId_; + public java.lang.String getEtag() { + java.lang.Object ref = etag_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - bucketId_ = s; + etag_ = s; return s; } } @@ -15928,22 +16800,22 @@ public java.lang.String getBucketId() { * * *
-   * Output only. The user-chosen part of the bucket name. The `{bucket}` portion of the
-   * `name` field. For globally unique buckets, this is equal to the "bucket
-   * name" of other Cloud Storage APIs. Example: "pub".
+   * The etag of the bucket.
+   * If included in the metadata of an UpdateBucketRequest, the operation will
+   * only be performed if the etag matches that of the bucket.
    * 
* - * string bucket_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string etag = 29; * - * @return The bytes for bucketId. + * @return The bytes for etag. */ @java.lang.Override - public com.google.protobuf.ByteString getBucketIdBytes() { - java.lang.Object ref = bucketId_; + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - bucketId_ = b; + etag_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -17202,6 +18074,58 @@ public boolean getSatisfiesPzs() { return satisfiesPzs_; } + public static final int CUSTOM_PLACEMENT_CONFIG_FIELD_NUMBER = 26; + private com.google.storage.v2.Bucket.CustomPlacementConfig customPlacementConfig_; + /** + * + * + *
+   * Configuration that, if present, specifies the data placement for a Custom
+   * Dual Region.
+   * 
+ * + * .google.storage.v2.Bucket.CustomPlacementConfig custom_placement_config = 26; + * + * @return Whether the customPlacementConfig field is set. + */ + @java.lang.Override + public boolean hasCustomPlacementConfig() { + return customPlacementConfig_ != null; + } + /** + * + * + *
+   * Configuration that, if present, specifies the data placement for a Custom
+   * Dual Region.
+   * 
+ * + * .google.storage.v2.Bucket.CustomPlacementConfig custom_placement_config = 26; + * + * @return The customPlacementConfig. + */ + @java.lang.Override + public com.google.storage.v2.Bucket.CustomPlacementConfig getCustomPlacementConfig() { + return customPlacementConfig_ == null + ? com.google.storage.v2.Bucket.CustomPlacementConfig.getDefaultInstance() + : customPlacementConfig_; + } + /** + * + * + *
+   * Configuration that, if present, specifies the data placement for a Custom
+   * Dual Region.
+   * 
+ * + * .google.storage.v2.Bucket.CustomPlacementConfig custom_placement_config = 26; + */ + @java.lang.Override + public com.google.storage.v2.Bucket.CustomPlacementConfigOrBuilder + getCustomPlacementConfigOrBuilder() { + return getCustomPlacementConfig(); + } + public static final int AUTOCLASS_FIELD_NUMBER = 28; private com.google.storage.v2.Bucket.Autoclass autoclass_; /** @@ -17338,12 +18262,18 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (satisfiesPzs_ != false) { output.writeBool(25, satisfiesPzs_); } + if (customPlacementConfig_ != null) { + output.writeMessage(26, getCustomPlacementConfig()); + } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rpo_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 27, rpo_); } if (autoclass_ != null) { output.writeMessage(28, getAutoclass()); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 29, etag_); + } unknownFields.writeTo(output); } @@ -17432,12 +18362,19 @@ public int getSerializedSize() { if (satisfiesPzs_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(25, satisfiesPzs_); } + if (customPlacementConfig_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(26, getCustomPlacementConfig()); + } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rpo_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(27, rpo_); } if (autoclass_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(28, getAutoclass()); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(29, etag_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -17455,6 +18392,7 @@ public boolean equals(final java.lang.Object obj) { if (!getName().equals(other.getName())) return false; if (!getBucketId().equals(other.getBucketId())) return false; + if (!getEtag().equals(other.getEtag())) return false; if (!getProject().equals(other.getProject())) return false; if (getMetageneration() != other.getMetageneration()) return false; if (!getLocation().equals(other.getLocation())) return false; @@ -17511,6 +18449,10 @@ public boolean equals(final java.lang.Object obj) { if (!getIamConfig().equals(other.getIamConfig())) return false; } if (getSatisfiesPzs() != other.getSatisfiesPzs()) return false; + if (hasCustomPlacementConfig() != other.hasCustomPlacementConfig()) return false; + if (hasCustomPlacementConfig()) { + if (!getCustomPlacementConfig().equals(other.getCustomPlacementConfig())) return false; + } if (hasAutoclass() != other.hasAutoclass()) return false; if (hasAutoclass()) { if (!getAutoclass().equals(other.getAutoclass())) return false; @@ -17530,6 +18472,8 @@ public int hashCode() { hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + BUCKET_ID_FIELD_NUMBER; hash = (53 * hash) + getBucketId().hashCode(); + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); hash = (37 * hash) + PROJECT_FIELD_NUMBER; hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + METAGENERATION_FIELD_NUMBER; @@ -17606,6 +18550,10 @@ public int hashCode() { } hash = (37 * hash) + SATISFIES_PZS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSatisfiesPzs()); + if (hasCustomPlacementConfig()) { + hash = (37 * hash) + CUSTOM_PLACEMENT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getCustomPlacementConfig().hashCode(); + } if (hasAutoclass()) { hash = (37 * hash) + AUTOCLASS_FIELD_NUMBER; hash = (53 * hash) + getAutoclass().hashCode(); @@ -17780,6 +18728,8 @@ public Builder clear() { bucketId_ = ""; + etag_ = ""; + project_ = ""; metageneration_ = 0L; @@ -17881,6 +18831,12 @@ public Builder clear() { } satisfiesPzs_ = false; + if (customPlacementConfigBuilder_ == null) { + customPlacementConfig_ = null; + } else { + customPlacementConfig_ = null; + customPlacementConfigBuilder_ = null; + } if (autoclassBuilder_ == null) { autoclass_ = null; } else { @@ -17915,6 +18871,7 @@ public com.google.storage.v2.Bucket buildPartial() { int from_bitField0_ = bitField0_; result.name_ = name_; result.bucketId_ = bucketId_; + result.etag_ = etag_; result.project_ = project_; result.metageneration_ = metageneration_; result.location_ = location_; @@ -18007,6 +18964,11 @@ public com.google.storage.v2.Bucket buildPartial() { result.iamConfig_ = iamConfigBuilder_.build(); } result.satisfiesPzs_ = satisfiesPzs_; + if (customPlacementConfigBuilder_ == null) { + result.customPlacementConfig_ = customPlacementConfig_; + } else { + result.customPlacementConfig_ = customPlacementConfigBuilder_.build(); + } if (autoclassBuilder_ == null) { result.autoclass_ = autoclass_; } else { @@ -18069,6 +19031,10 @@ public Builder mergeFrom(com.google.storage.v2.Bucket other) { bucketId_ = other.bucketId_; onChanged(); } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + onChanged(); + } if (!other.getProject().isEmpty()) { project_ = other.project_; onChanged(); @@ -18213,6 +19179,9 @@ public Builder mergeFrom(com.google.storage.v2.Bucket other) { if (other.getSatisfiesPzs() != false) { setSatisfiesPzs(other.getSatisfiesPzs()); } + if (other.hasCustomPlacementConfig()) { + mergeCustomPlacementConfig(other.getCustomPlacementConfig()); + } if (other.hasAutoclass()) { mergeAutoclass(other.getAutoclass()); } @@ -18469,6 +19438,122 @@ public Builder setBucketIdBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object etag_ = ""; + /** + * + * + *
+     * The etag of the bucket.
+     * If included in the metadata of an UpdateBucketRequest, the operation will
+     * only be performed if the etag matches that of the bucket.
+     * 
+ * + * string etag = 29; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The etag of the bucket.
+     * If included in the metadata of an UpdateBucketRequest, the operation will
+     * only be performed if the etag matches that of the bucket.
+     * 
+ * + * string etag = 29; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The etag of the bucket.
+     * If included in the metadata of an UpdateBucketRequest, the operation will
+     * only be performed if the etag matches that of the bucket.
+     * 
+ * + * string etag = 29; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + etag_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The etag of the bucket.
+     * If included in the metadata of an UpdateBucketRequest, the operation will
+     * only be performed if the etag matches that of the bucket.
+     * 
+ * + * string etag = 29; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + + etag_ = getDefaultInstance().getEtag(); + onChanged(); + return this; + } + /** + * + * + *
+     * The etag of the bucket.
+     * If included in the metadata of an UpdateBucketRequest, the operation will
+     * only be performed if the etag matches that of the bucket.
+     * 
+ * + * string etag = 29; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + etag_ = value; + onChanged(); + return this; + } + private java.lang.Object project_ = ""; /** * @@ -22806,6 +23891,205 @@ public Builder clearSatisfiesPzs() { return this; } + private com.google.storage.v2.Bucket.CustomPlacementConfig customPlacementConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storage.v2.Bucket.CustomPlacementConfig, + com.google.storage.v2.Bucket.CustomPlacementConfig.Builder, + com.google.storage.v2.Bucket.CustomPlacementConfigOrBuilder> + customPlacementConfigBuilder_; + /** + * + * + *
+     * Configuration that, if present, specifies the data placement for a Custom
+     * Dual Region.
+     * 
+ * + * .google.storage.v2.Bucket.CustomPlacementConfig custom_placement_config = 26; + * + * @return Whether the customPlacementConfig field is set. + */ + public boolean hasCustomPlacementConfig() { + return customPlacementConfigBuilder_ != null || customPlacementConfig_ != null; + } + /** + * + * + *
+     * Configuration that, if present, specifies the data placement for a Custom
+     * Dual Region.
+     * 
+ * + * .google.storage.v2.Bucket.CustomPlacementConfig custom_placement_config = 26; + * + * @return The customPlacementConfig. + */ + public com.google.storage.v2.Bucket.CustomPlacementConfig getCustomPlacementConfig() { + if (customPlacementConfigBuilder_ == null) { + return customPlacementConfig_ == null + ? com.google.storage.v2.Bucket.CustomPlacementConfig.getDefaultInstance() + : customPlacementConfig_; + } else { + return customPlacementConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Configuration that, if present, specifies the data placement for a Custom
+     * Dual Region.
+     * 
+ * + * .google.storage.v2.Bucket.CustomPlacementConfig custom_placement_config = 26; + */ + public Builder setCustomPlacementConfig( + com.google.storage.v2.Bucket.CustomPlacementConfig value) { + if (customPlacementConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + customPlacementConfig_ = value; + onChanged(); + } else { + customPlacementConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Configuration that, if present, specifies the data placement for a Custom
+     * Dual Region.
+     * 
+ * + * .google.storage.v2.Bucket.CustomPlacementConfig custom_placement_config = 26; + */ + public Builder setCustomPlacementConfig( + com.google.storage.v2.Bucket.CustomPlacementConfig.Builder builderForValue) { + if (customPlacementConfigBuilder_ == null) { + customPlacementConfig_ = builderForValue.build(); + onChanged(); + } else { + customPlacementConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Configuration that, if present, specifies the data placement for a Custom
+     * Dual Region.
+     * 
+ * + * .google.storage.v2.Bucket.CustomPlacementConfig custom_placement_config = 26; + */ + public Builder mergeCustomPlacementConfig( + com.google.storage.v2.Bucket.CustomPlacementConfig value) { + if (customPlacementConfigBuilder_ == null) { + if (customPlacementConfig_ != null) { + customPlacementConfig_ = + com.google.storage.v2.Bucket.CustomPlacementConfig.newBuilder(customPlacementConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + customPlacementConfig_ = value; + } + onChanged(); + } else { + customPlacementConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Configuration that, if present, specifies the data placement for a Custom
+     * Dual Region.
+     * 
+ * + * .google.storage.v2.Bucket.CustomPlacementConfig custom_placement_config = 26; + */ + public Builder clearCustomPlacementConfig() { + if (customPlacementConfigBuilder_ == null) { + customPlacementConfig_ = null; + onChanged(); + } else { + customPlacementConfig_ = null; + customPlacementConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Configuration that, if present, specifies the data placement for a Custom
+     * Dual Region.
+     * 
+ * + * .google.storage.v2.Bucket.CustomPlacementConfig custom_placement_config = 26; + */ + public com.google.storage.v2.Bucket.CustomPlacementConfig.Builder + getCustomPlacementConfigBuilder() { + + onChanged(); + return getCustomPlacementConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Configuration that, if present, specifies the data placement for a Custom
+     * Dual Region.
+     * 
+ * + * .google.storage.v2.Bucket.CustomPlacementConfig custom_placement_config = 26; + */ + public com.google.storage.v2.Bucket.CustomPlacementConfigOrBuilder + getCustomPlacementConfigOrBuilder() { + if (customPlacementConfigBuilder_ != null) { + return customPlacementConfigBuilder_.getMessageOrBuilder(); + } else { + return customPlacementConfig_ == null + ? com.google.storage.v2.Bucket.CustomPlacementConfig.getDefaultInstance() + : customPlacementConfig_; + } + } + /** + * + * + *
+     * Configuration that, if present, specifies the data placement for a Custom
+     * Dual Region.
+     * 
+ * + * .google.storage.v2.Bucket.CustomPlacementConfig custom_placement_config = 26; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storage.v2.Bucket.CustomPlacementConfig, + com.google.storage.v2.Bucket.CustomPlacementConfig.Builder, + com.google.storage.v2.Bucket.CustomPlacementConfigOrBuilder> + getCustomPlacementConfigFieldBuilder() { + if (customPlacementConfigBuilder_ == null) { + customPlacementConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.storage.v2.Bucket.CustomPlacementConfig, + com.google.storage.v2.Bucket.CustomPlacementConfig.Builder, + com.google.storage.v2.Bucket.CustomPlacementConfigOrBuilder>( + getCustomPlacementConfig(), getParentForChildren(), isClean()); + customPlacementConfig_ = null; + } + return customPlacementConfigBuilder_; + } + private com.google.storage.v2.Bucket.Autoclass autoclass_; private com.google.protobuf.SingleFieldBuilderV3< com.google.storage.v2.Bucket.Autoclass, diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/BucketAccessControl.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/BucketAccessControl.java index 7b63846476..53dda1ffc2 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/BucketAccessControl.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/BucketAccessControl.java @@ -42,6 +42,7 @@ private BucketAccessControl() { id_ = ""; entity_ = ""; entityId_ = ""; + etag_ = ""; email_ = ""; domain_ = ""; } @@ -130,6 +131,13 @@ private BucketAccessControl( projectTeam_ = subBuilder.buildPartial(); } + break; + } + case 66: + { + java.lang.String s = input.readStringRequireUtf8(); + + etag_ = s; break; } default: @@ -392,6 +400,61 @@ public com.google.protobuf.ByteString getEntityIdBytes() { } } + public static final int ETAG_FIELD_NUMBER = 8; + private volatile java.lang.Object etag_; + /** + * + * + *
+   * The etag of the BucketAccessControl.
+   * If included in the metadata of an update or delete request message, the
+   * operation operation will only be performed if the etag matches that of the
+   * bucket's BucketAccessControl.
+   * 
+ * + * string etag = 8; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } + } + /** + * + * + *
+   * The etag of the BucketAccessControl.
+   * If included in the metadata of an update or delete request message, the
+   * operation operation will only be performed if the etag matches that of the
+   * bucket's BucketAccessControl.
+   * 
+ * + * string etag = 8; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + public static final int EMAIL_FIELD_NUMBER = 5; private volatile java.lang.Object email_; /** @@ -573,6 +636,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (projectTeam_ != null) { output.writeMessage(7, getProjectTeam()); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, etag_); + } unknownFields.writeTo(output); } @@ -603,6 +669,9 @@ public int getSerializedSize() { if (projectTeam_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getProjectTeam()); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, etag_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -623,6 +692,7 @@ public boolean equals(final java.lang.Object obj) { if (!getId().equals(other.getId())) return false; if (!getEntity().equals(other.getEntity())) return false; if (!getEntityId().equals(other.getEntityId())) return false; + if (!getEtag().equals(other.getEtag())) return false; if (!getEmail().equals(other.getEmail())) return false; if (!getDomain().equals(other.getDomain())) return false; if (hasProjectTeam() != other.hasProjectTeam()) return false; @@ -648,6 +718,8 @@ public int hashCode() { hash = (53 * hash) + getEntity().hashCode(); hash = (37 * hash) + ENTITY_ID_FIELD_NUMBER; hash = (53 * hash) + getEntityId().hashCode(); + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); hash = (37 * hash) + EMAIL_FIELD_NUMBER; hash = (53 * hash) + getEmail().hashCode(); hash = (37 * hash) + DOMAIN_FIELD_NUMBER; @@ -809,6 +881,8 @@ public Builder clear() { entityId_ = ""; + etag_ = ""; + email_ = ""; domain_ = ""; @@ -850,6 +924,7 @@ public com.google.storage.v2.BucketAccessControl buildPartial() { result.id_ = id_; result.entity_ = entity_; result.entityId_ = entityId_; + result.etag_ = etag_; result.email_ = email_; result.domain_ = domain_; if (projectTeamBuilder_ == null) { @@ -922,6 +997,10 @@ public Builder mergeFrom(com.google.storage.v2.BucketAccessControl other) { entityId_ = other.entityId_; onChanged(); } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + onChanged(); + } if (!other.getEmail().isEmpty()) { email_ = other.email_; onChanged(); @@ -1456,6 +1535,127 @@ public Builder setEntityIdBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object etag_ = ""; + /** + * + * + *
+     * The etag of the BucketAccessControl.
+     * If included in the metadata of an update or delete request message, the
+     * operation operation will only be performed if the etag matches that of the
+     * bucket's BucketAccessControl.
+     * 
+ * + * string etag = 8; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The etag of the BucketAccessControl.
+     * If included in the metadata of an update or delete request message, the
+     * operation operation will only be performed if the etag matches that of the
+     * bucket's BucketAccessControl.
+     * 
+ * + * string etag = 8; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The etag of the BucketAccessControl.
+     * If included in the metadata of an update or delete request message, the
+     * operation operation will only be performed if the etag matches that of the
+     * bucket's BucketAccessControl.
+     * 
+ * + * string etag = 8; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + etag_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The etag of the BucketAccessControl.
+     * If included in the metadata of an update or delete request message, the
+     * operation operation will only be performed if the etag matches that of the
+     * bucket's BucketAccessControl.
+     * 
+ * + * string etag = 8; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + + etag_ = getDefaultInstance().getEtag(); + onChanged(); + return this; + } + /** + * + * + *
+     * The etag of the BucketAccessControl.
+     * If included in the metadata of an update or delete request message, the
+     * operation operation will only be performed if the etag matches that of the
+     * bucket's BucketAccessControl.
+     * 
+ * + * string etag = 8; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + etag_ = value; + onChanged(); + return this; + } + private java.lang.Object email_ = ""; /** * diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/BucketAccessControlOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/BucketAccessControlOrBuilder.java index 073daa3bef..04451af6d0 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/BucketAccessControlOrBuilder.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/BucketAccessControlOrBuilder.java @@ -151,6 +151,37 @@ public interface BucketAccessControlOrBuilder */ com.google.protobuf.ByteString getEntityIdBytes(); + /** + * + * + *
+   * The etag of the BucketAccessControl.
+   * If included in the metadata of an update or delete request message, the
+   * operation operation will only be performed if the etag matches that of the
+   * bucket's BucketAccessControl.
+   * 
+ * + * string etag = 8; + * + * @return The etag. + */ + java.lang.String getEtag(); + /** + * + * + *
+   * The etag of the BucketAccessControl.
+   * If included in the metadata of an update or delete request message, the
+   * operation operation will only be performed if the etag matches that of the
+   * bucket's BucketAccessControl.
+   * 
+ * + * string etag = 8; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); + /** * * diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/BucketOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/BucketOrBuilder.java index a30ce772eb..50ec1b91df 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/BucketOrBuilder.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/BucketOrBuilder.java @@ -77,6 +77,35 @@ public interface BucketOrBuilder */ com.google.protobuf.ByteString getBucketIdBytes(); + /** + * + * + *
+   * The etag of the bucket.
+   * If included in the metadata of an UpdateBucketRequest, the operation will
+   * only be performed if the etag matches that of the bucket.
+   * 
+ * + * string etag = 29; + * + * @return The etag. + */ + java.lang.String getEtag(); + /** + * + * + *
+   * The etag of the bucket.
+   * If included in the metadata of an UpdateBucketRequest, the operation will
+   * only be performed if the etag matches that of the bucket.
+   * 
+ * + * string etag = 29; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); + /** * * @@ -971,6 +1000,44 @@ java.lang.String getLabelsOrDefault( */ boolean getSatisfiesPzs(); + /** + * + * + *
+   * Configuration that, if present, specifies the data placement for a Custom
+   * Dual Region.
+   * 
+ * + * .google.storage.v2.Bucket.CustomPlacementConfig custom_placement_config = 26; + * + * @return Whether the customPlacementConfig field is set. + */ + boolean hasCustomPlacementConfig(); + /** + * + * + *
+   * Configuration that, if present, specifies the data placement for a Custom
+   * Dual Region.
+   * 
+ * + * .google.storage.v2.Bucket.CustomPlacementConfig custom_placement_config = 26; + * + * @return The customPlacementConfig. + */ + com.google.storage.v2.Bucket.CustomPlacementConfig getCustomPlacementConfig(); + /** + * + * + *
+   * Configuration that, if present, specifies the data placement for a Custom
+   * Dual Region.
+   * 
+ * + * .google.storage.v2.Bucket.CustomPlacementConfig custom_placement_config = 26; + */ + com.google.storage.v2.Bucket.CustomPlacementConfigOrBuilder getCustomPlacementConfigOrBuilder(); + /** * * diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/DeleteObjectRequest.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/DeleteObjectRequest.java index 5cd7c37da5..38dfd20424 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/DeleteObjectRequest.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/DeleteObjectRequest.java @@ -390,7 +390,7 @@ public long getIfGenerationMatch() { * * *
-   * Makes the operation conditional on whether the object's current generation
+   * Makes the operation conditional on whether the object's live generation
    * does not match the given value. If no live object exists, the precondition
    * fails. Setting to 0 makes the operation succeed only if there is a live
    * version of the object.
@@ -408,7 +408,7 @@ public boolean hasIfGenerationNotMatch() {
    *
    *
    * 
-   * Makes the operation conditional on whether the object's current generation
+   * Makes the operation conditional on whether the object's live generation
    * does not match the given value. If no live object exists, the precondition
    * fails. Setting to 0 makes the operation succeed only if there is a live
    * version of the object.
@@ -1497,7 +1497,7 @@ public Builder clearIfGenerationMatch() {
      *
      *
      * 
-     * Makes the operation conditional on whether the object's current generation
+     * Makes the operation conditional on whether the object's live generation
      * does not match the given value. If no live object exists, the precondition
      * fails. Setting to 0 makes the operation succeed only if there is a live
      * version of the object.
@@ -1515,7 +1515,7 @@ public boolean hasIfGenerationNotMatch() {
      *
      *
      * 
-     * Makes the operation conditional on whether the object's current generation
+     * Makes the operation conditional on whether the object's live generation
      * does not match the given value. If no live object exists, the precondition
      * fails. Setting to 0 makes the operation succeed only if there is a live
      * version of the object.
@@ -1533,7 +1533,7 @@ public long getIfGenerationNotMatch() {
      *
      *
      * 
-     * Makes the operation conditional on whether the object's current generation
+     * Makes the operation conditional on whether the object's live generation
      * does not match the given value. If no live object exists, the precondition
      * fails. Setting to 0 makes the operation succeed only if there is a live
      * version of the object.
@@ -1554,7 +1554,7 @@ public Builder setIfGenerationNotMatch(long value) {
      *
      *
      * 
-     * Makes the operation conditional on whether the object's current generation
+     * Makes the operation conditional on whether the object's live generation
      * does not match the given value. If no live object exists, the precondition
      * fails. Setting to 0 makes the operation succeed only if there is a live
      * version of the object.
diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/DeleteObjectRequestOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/DeleteObjectRequestOrBuilder.java
index 11cf2596f4..dfd8e1f803 100644
--- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/DeleteObjectRequestOrBuilder.java
+++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/DeleteObjectRequestOrBuilder.java
@@ -149,7 +149,7 @@ public interface DeleteObjectRequestOrBuilder
    *
    *
    * 
-   * Makes the operation conditional on whether the object's current generation
+   * Makes the operation conditional on whether the object's live generation
    * does not match the given value. If no live object exists, the precondition
    * fails. Setting to 0 makes the operation succeed only if there is a live
    * version of the object.
@@ -164,7 +164,7 @@ public interface DeleteObjectRequestOrBuilder
    *
    *
    * 
-   * Makes the operation conditional on whether the object's current generation
+   * Makes the operation conditional on whether the object's live generation
    * does not match the given value. If no live object exists, the precondition
    * fails. Setting to 0 makes the operation succeed only if there is a live
    * version of the object.
diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetObjectRequest.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetObjectRequest.java
index 22cfb4353c..a3a09a3cd0 100644
--- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetObjectRequest.java
+++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetObjectRequest.java
@@ -343,7 +343,7 @@ public long getIfGenerationMatch() {
    *
    *
    * 
-   * Makes the operation conditional on whether the object's current generation
+   * Makes the operation conditional on whether the object's live generation
    * does not match the given value. If no live object exists, the precondition
    * fails. Setting to 0 makes the operation succeed only if there is a live
    * version of the object.
@@ -361,7 +361,7 @@ public boolean hasIfGenerationNotMatch() {
    *
    *
    * 
-   * Makes the operation conditional on whether the object's current generation
+   * Makes the operation conditional on whether the object's live generation
    * does not match the given value. If no live object exists, the precondition
    * fails. Setting to 0 makes the operation succeed only if there is a live
    * version of the object.
@@ -1404,7 +1404,7 @@ public Builder clearIfGenerationMatch() {
      *
      *
      * 
-     * Makes the operation conditional on whether the object's current generation
+     * Makes the operation conditional on whether the object's live generation
      * does not match the given value. If no live object exists, the precondition
      * fails. Setting to 0 makes the operation succeed only if there is a live
      * version of the object.
@@ -1422,7 +1422,7 @@ public boolean hasIfGenerationNotMatch() {
      *
      *
      * 
-     * Makes the operation conditional on whether the object's current generation
+     * Makes the operation conditional on whether the object's live generation
      * does not match the given value. If no live object exists, the precondition
      * fails. Setting to 0 makes the operation succeed only if there is a live
      * version of the object.
@@ -1440,7 +1440,7 @@ public long getIfGenerationNotMatch() {
      *
      *
      * 
-     * Makes the operation conditional on whether the object's current generation
+     * Makes the operation conditional on whether the object's live generation
      * does not match the given value. If no live object exists, the precondition
      * fails. Setting to 0 makes the operation succeed only if there is a live
      * version of the object.
@@ -1461,7 +1461,7 @@ public Builder setIfGenerationNotMatch(long value) {
      *
      *
      * 
-     * Makes the operation conditional on whether the object's current generation
+     * Makes the operation conditional on whether the object's live generation
      * does not match the given value. If no live object exists, the precondition
      * fails. Setting to 0 makes the operation succeed only if there is a live
      * version of the object.
diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetObjectRequestOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetObjectRequestOrBuilder.java
index 9abed62fc3..8730f04d75 100644
--- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetObjectRequestOrBuilder.java
+++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetObjectRequestOrBuilder.java
@@ -120,7 +120,7 @@ public interface GetObjectRequestOrBuilder
    *
    *
    * 
-   * Makes the operation conditional on whether the object's current generation
+   * Makes the operation conditional on whether the object's live generation
    * does not match the given value. If no live object exists, the precondition
    * fails. Setting to 0 makes the operation succeed only if there is a live
    * version of the object.
@@ -135,7 +135,7 @@ public interface GetObjectRequestOrBuilder
    *
    *
    * 
-   * Makes the operation conditional on whether the object's current generation
+   * Makes the operation conditional on whether the object's live generation
    * does not match the given value. If no live object exists, the precondition
    * fails. Setting to 0 makes the operation succeed only if there is a live
    * version of the object.
diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/HmacKeyMetadata.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/HmacKeyMetadata.java
index 1c6bd3d5c5..dc54e5902d 100644
--- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/HmacKeyMetadata.java
+++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/HmacKeyMetadata.java
@@ -43,6 +43,7 @@ private HmacKeyMetadata() {
     project_ = "";
     serviceAccountEmail_ = "";
     state_ = "";
+    etag_ = "";
   }
 
   @java.lang.Override
@@ -137,6 +138,13 @@ private HmacKeyMetadata(
                 updateTime_ = subBuilder.buildPartial();
               }
 
+              break;
+            }
+          case 66:
+            {
+              java.lang.String s = input.readStringRequireUtf8();
+
+              etag_ = s;
               break;
             }
           default:
@@ -512,6 +520,55 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() {
     return getUpdateTime();
   }
 
+  public static final int ETAG_FIELD_NUMBER = 8;
+  private volatile java.lang.Object etag_;
+  /**
+   *
+   *
+   * 
+   * The etag of the HMAC key.
+   * 
+ * + * string etag = 8; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } + } + /** + * + * + *
+   * The etag of the HMAC key.
+   * 
+ * + * string etag = 8; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -547,6 +604,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (updateTime_ != null) { output.writeMessage(7, getUpdateTime()); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, etag_); + } unknownFields.writeTo(output); } @@ -577,6 +637,9 @@ public int getSerializedSize() { if (updateTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getUpdateTime()); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, etag_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -605,6 +668,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUpdateTime()) { if (!getUpdateTime().equals(other.getUpdateTime())) return false; } + if (!getEtag().equals(other.getEtag())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -634,6 +698,8 @@ public int hashCode() { hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; hash = (53 * hash) + getUpdateTime().hashCode(); } + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -800,6 +866,8 @@ public Builder clear() { updateTime_ = null; updateTimeBuilder_ = null; } + etag_ = ""; + return this; } @@ -842,6 +910,7 @@ public com.google.storage.v2.HmacKeyMetadata buildPartial() { } else { result.updateTime_ = updateTimeBuilder_.build(); } + result.etag_ = etag_; onBuilt(); return result; } @@ -917,6 +986,10 @@ public Builder mergeFrom(com.google.storage.v2.HmacKeyMetadata other) { if (other.hasUpdateTime()) { mergeUpdateTime(other.getUpdateTime()); } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + onChanged(); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -1842,6 +1915,112 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { return updateTimeBuilder_; } + private java.lang.Object etag_ = ""; + /** + * + * + *
+     * The etag of the HMAC key.
+     * 
+ * + * string etag = 8; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The etag of the HMAC key.
+     * 
+ * + * string etag = 8; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The etag of the HMAC key.
+     * 
+ * + * string etag = 8; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + etag_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The etag of the HMAC key.
+     * 
+ * + * string etag = 8; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + + etag_ = getDefaultInstance().getEtag(); + onChanged(); + return this; + } + /** + * + * + *
+     * The etag of the HMAC key.
+     * 
+ * + * string etag = 8; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + etag_ = value; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/HmacKeyMetadataOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/HmacKeyMetadataOrBuilder.java index 489b918916..3e7bc4e830 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/HmacKeyMetadataOrBuilder.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/HmacKeyMetadataOrBuilder.java @@ -217,4 +217,29 @@ public interface HmacKeyMetadataOrBuilder * .google.protobuf.Timestamp update_time = 7; */ com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * The etag of the HMAC key.
+   * 
+ * + * string etag = 8; + * + * @return The etag. + */ + java.lang.String getEtag(); + /** + * + * + *
+   * The etag of the HMAC key.
+   * 
+ * + * string etag = 8; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); } diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListNotificationsRequest.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListNotificationsRequest.java index 773bda1b38..74d9859dfd 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListNotificationsRequest.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListNotificationsRequest.java @@ -187,7 +187,8 @@ public com.google.protobuf.ByteString getParentBytes() { *
    * The maximum number of notifications to return. The service may return fewer
    * than this value.
-   * The maximum value is 100; values above 100 will be coerced to 100.
+   * The default value is 100. Specifying a value above 100 will result in a
+   * page_size of 100.
    * 
* * int32 page_size = 2; @@ -724,7 +725,8 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { *
      * The maximum number of notifications to return. The service may return fewer
      * than this value.
-     * The maximum value is 100; values above 100 will be coerced to 100.
+     * The default value is 100. Specifying a value above 100 will result in a
+     * page_size of 100.
      * 
* * int32 page_size = 2; @@ -741,7 +743,8 @@ public int getPageSize() { *
      * The maximum number of notifications to return. The service may return fewer
      * than this value.
-     * The maximum value is 100; values above 100 will be coerced to 100.
+     * The default value is 100. Specifying a value above 100 will result in a
+     * page_size of 100.
      * 
* * int32 page_size = 2; @@ -761,7 +764,8 @@ public Builder setPageSize(int value) { *
      * The maximum number of notifications to return. The service may return fewer
      * than this value.
-     * The maximum value is 100; values above 100 will be coerced to 100.
+     * The default value is 100. Specifying a value above 100 will result in a
+     * page_size of 100.
      * 
* * int32 page_size = 2; diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListNotificationsRequestOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListNotificationsRequestOrBuilder.java index a078cac394..af80ec7637 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListNotificationsRequestOrBuilder.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListNotificationsRequestOrBuilder.java @@ -58,7 +58,8 @@ public interface ListNotificationsRequestOrBuilder *
    * The maximum number of notifications to return. The service may return fewer
    * than this value.
-   * The maximum value is 100; values above 100 will be coerced to 100.
+   * The default value is 100. Specifying a value above 100 will result in a
+   * page_size of 100.
    * 
* * int32 page_size = 2; diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/Notification.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/Notification.java index 506e55daf7..00632e30a2 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/Notification.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/Notification.java @@ -40,6 +40,7 @@ private Notification(com.google.protobuf.GeneratedMessageV3.Builder builder) private Notification() { name_ = ""; topic_ = ""; + etag_ = ""; eventTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; objectNamePrefix_ = ""; payloadFormat_ = ""; @@ -130,6 +131,13 @@ private Notification( payloadFormat_ = s; break; } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + + etag_ = s; + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -286,6 +294,59 @@ public com.google.protobuf.ByteString getTopicBytes() { } } + public static final int ETAG_FIELD_NUMBER = 7; + private volatile java.lang.Object etag_; + /** + * + * + *
+   * The etag of the Notification.
+   * If included in the metadata of GetNotificationRequest, the operation will
+   * only be performed if the etag matches that of the Notification.
+   * 
+ * + * string etag = 7; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } + } + /** + * + * + *
+   * The etag of the Notification.
+   * If included in the metadata of GetNotificationRequest, the operation will
+   * only be performed if the etag matches that of the Notification.
+   * 
+ * + * string etag = 7; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + public static final int EVENT_TYPES_FIELD_NUMBER = 3; private com.google.protobuf.LazyStringList eventTypes_; /** @@ -595,6 +656,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(payloadFormat_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, payloadFormat_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, etag_); + } unknownFields.writeTo(output); } @@ -634,6 +698,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(payloadFormat_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, payloadFormat_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, etag_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -651,6 +718,7 @@ public boolean equals(final java.lang.Object obj) { if (!getName().equals(other.getName())) return false; if (!getTopic().equals(other.getTopic())) return false; + if (!getEtag().equals(other.getEtag())) return false; if (!getEventTypesList().equals(other.getEventTypesList())) return false; if (!internalGetCustomAttributes().equals(other.internalGetCustomAttributes())) return false; if (!getObjectNamePrefix().equals(other.getObjectNamePrefix())) return false; @@ -670,6 +738,8 @@ public int hashCode() { hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + TOPIC_FIELD_NUMBER; hash = (53 * hash) + getTopic().hashCode(); + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); if (getEventTypesCount() > 0) { hash = (37 * hash) + EVENT_TYPES_FIELD_NUMBER; hash = (53 * hash) + getEventTypesList().hashCode(); @@ -850,6 +920,8 @@ public Builder clear() { topic_ = ""; + etag_ = ""; + eventTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000001); internalGetMutableCustomAttributes().clear(); @@ -886,6 +958,7 @@ public com.google.storage.v2.Notification buildPartial() { int from_bitField0_ = bitField0_; result.name_ = name_; result.topic_ = topic_; + result.etag_ = etag_; if (((bitField0_ & 0x00000001) != 0)) { eventTypes_ = eventTypes_.getUnmodifiableView(); bitField0_ = (bitField0_ & ~0x00000001); @@ -952,6 +1025,10 @@ public Builder mergeFrom(com.google.storage.v2.Notification other) { topic_ = other.topic_; onChanged(); } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + onChanged(); + } if (!other.eventTypes_.isEmpty()) { if (eventTypes_.isEmpty()) { eventTypes_ = other.eventTypes_; @@ -1234,6 +1311,122 @@ public Builder setTopicBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object etag_ = ""; + /** + * + * + *
+     * The etag of the Notification.
+     * If included in the metadata of GetNotificationRequest, the operation will
+     * only be performed if the etag matches that of the Notification.
+     * 
+ * + * string etag = 7; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The etag of the Notification.
+     * If included in the metadata of GetNotificationRequest, the operation will
+     * only be performed if the etag matches that of the Notification.
+     * 
+ * + * string etag = 7; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The etag of the Notification.
+     * If included in the metadata of GetNotificationRequest, the operation will
+     * only be performed if the etag matches that of the Notification.
+     * 
+ * + * string etag = 7; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + etag_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The etag of the Notification.
+     * If included in the metadata of GetNotificationRequest, the operation will
+     * only be performed if the etag matches that of the Notification.
+     * 
+ * + * string etag = 7; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + + etag_ = getDefaultInstance().getEtag(); + onChanged(); + return this; + } + /** + * + * + *
+     * The etag of the Notification.
+     * If included in the metadata of GetNotificationRequest, the operation will
+     * only be performed if the etag matches that of the Notification.
+     * 
+ * + * string etag = 7; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + etag_ = value; + onChanged(); + return this; + } + private com.google.protobuf.LazyStringList eventTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/NotificationOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/NotificationOrBuilder.java index f16926fe2a..5031676f53 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/NotificationOrBuilder.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/NotificationOrBuilder.java @@ -81,6 +81,35 @@ public interface NotificationOrBuilder */ com.google.protobuf.ByteString getTopicBytes(); + /** + * + * + *
+   * The etag of the Notification.
+   * If included in the metadata of GetNotificationRequest, the operation will
+   * only be performed if the etag matches that of the Notification.
+   * 
+ * + * string etag = 7; + * + * @return The etag. + */ + java.lang.String getEtag(); + /** + * + * + *
+   * The etag of the Notification.
+   * If included in the metadata of GetNotificationRequest, the operation will
+   * only be performed if the etag matches that of the Notification.
+   * 
+ * + * string etag = 7; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); + /** * * diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/Object.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/Object.java index 8b90884c7c..6b4d9c5bad 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/Object.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/Object.java @@ -40,6 +40,7 @@ private Object(com.google.protobuf.GeneratedMessageV3.Builder builder) { private Object() { name_ = ""; bucket_ = ""; + etag_ = ""; storageClass_ = ""; contentEncoding_ = ""; contentDisposition_ = ""; @@ -334,6 +335,13 @@ private Object( customTime_ = subBuilder.buildPartial(); } + break; + } + case 218: + { + java.lang.String s = input.readStringRequireUtf8(); + + etag_ = s; break; } default: @@ -499,6 +507,61 @@ public com.google.protobuf.ByteString getBucketBytes() { } } + public static final int ETAG_FIELD_NUMBER = 27; + private volatile java.lang.Object etag_; + /** + * + * + *
+   * The etag of the object.
+   * If included in the metadata of an update or delete request message, the
+   * operation will only be performed if the etag matches that of the live
+   * object.
+   * 
+ * + * string etag = 27; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } + } + /** + * + * + *
+   * The etag of the object.
+   * If included in the metadata of an update or delete request message, the
+   * operation will only be performed if the etag matches that of the live
+   * object.
+   * 
+ * + * string etag = 27; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + public static final int GENERATION_FIELD_NUMBER = 3; private long generation_; /** @@ -1789,6 +1852,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (customTime_ != null) { output.writeMessage(26, getCustomTime()); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 27, etag_); + } unknownFields.writeTo(output); } @@ -1885,6 +1951,9 @@ public int getSerializedSize() { if (customTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(26, getCustomTime()); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(27, etag_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -1902,6 +1971,7 @@ public boolean equals(final java.lang.Object obj) { if (!getName().equals(other.getName())) return false; if (!getBucket().equals(other.getBucket())) return false; + if (!getEtag().equals(other.getEtag())) return false; if (getGeneration() != other.getGeneration()) return false; if (getMetageneration() != other.getMetageneration()) return false; if (!getStorageClass().equals(other.getStorageClass())) return false; @@ -1971,6 +2041,8 @@ public int hashCode() { hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + BUCKET_FIELD_NUMBER; hash = (53 * hash) + getBucket().hashCode(); + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); hash = (37 * hash) + GENERATION_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getGeneration()); hash = (37 * hash) + METAGENERATION_FIELD_NUMBER; @@ -2211,6 +2283,8 @@ public Builder clear() { bucket_ = ""; + etag_ = ""; + generation_ = 0L; metageneration_ = 0L; @@ -2327,6 +2401,7 @@ public com.google.storage.v2.Object buildPartial() { int to_bitField0_ = 0; result.name_ = name_; result.bucket_ = bucket_; + result.etag_ = etag_; result.generation_ = generation_; result.metageneration_ = metageneration_; result.storageClass_ = storageClass_; @@ -2457,6 +2532,10 @@ public Builder mergeFrom(com.google.storage.v2.Object other) { bucket_ = other.bucket_; onChanged(); } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + onChanged(); + } if (other.getGeneration() != 0L) { setGeneration(other.getGeneration()); } @@ -2841,6 +2920,127 @@ public Builder setBucketBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object etag_ = ""; + /** + * + * + *
+     * The etag of the object.
+     * If included in the metadata of an update or delete request message, the
+     * operation will only be performed if the etag matches that of the live
+     * object.
+     * 
+ * + * string etag = 27; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The etag of the object.
+     * If included in the metadata of an update or delete request message, the
+     * operation will only be performed if the etag matches that of the live
+     * object.
+     * 
+ * + * string etag = 27; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The etag of the object.
+     * If included in the metadata of an update or delete request message, the
+     * operation will only be performed if the etag matches that of the live
+     * object.
+     * 
+ * + * string etag = 27; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + etag_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The etag of the object.
+     * If included in the metadata of an update or delete request message, the
+     * operation will only be performed if the etag matches that of the live
+     * object.
+     * 
+ * + * string etag = 27; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + + etag_ = getDefaultInstance().getEtag(); + onChanged(); + return this; + } + /** + * + * + *
+     * The etag of the object.
+     * If included in the metadata of an update or delete request message, the
+     * operation will only be performed if the etag matches that of the live
+     * object.
+     * 
+ * + * string etag = 27; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + etag_ = value; + onChanged(); + return this; + } + private long generation_; /** * diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ObjectAccessControl.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ObjectAccessControl.java index 1fbaadae9d..33f3d9b974 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ObjectAccessControl.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ObjectAccessControl.java @@ -42,6 +42,7 @@ private ObjectAccessControl() { id_ = ""; entity_ = ""; entityId_ = ""; + etag_ = ""; email_ = ""; domain_ = ""; } @@ -130,6 +131,13 @@ private ObjectAccessControl( projectTeam_ = subBuilder.buildPartial(); } + break; + } + case 66: + { + java.lang.String s = input.readStringRequireUtf8(); + + etag_ = s; break; } default: @@ -392,6 +400,61 @@ public com.google.protobuf.ByteString getEntityIdBytes() { } } + public static final int ETAG_FIELD_NUMBER = 8; + private volatile java.lang.Object etag_; + /** + * + * + *
+   * The etag of the ObjectAccessControl.
+   * If included in the metadata of an update or delete request message, the
+   * operation will only be performed if the etag matches that of the live
+   * object's ObjectAccessControl.
+   * 
+ * + * string etag = 8; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } + } + /** + * + * + *
+   * The etag of the ObjectAccessControl.
+   * If included in the metadata of an update or delete request message, the
+   * operation will only be performed if the etag matches that of the live
+   * object's ObjectAccessControl.
+   * 
+ * + * string etag = 8; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + public static final int EMAIL_FIELD_NUMBER = 5; private volatile java.lang.Object email_; /** @@ -573,6 +636,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (projectTeam_ != null) { output.writeMessage(7, getProjectTeam()); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, etag_); + } unknownFields.writeTo(output); } @@ -603,6 +669,9 @@ public int getSerializedSize() { if (projectTeam_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getProjectTeam()); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, etag_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -623,6 +692,7 @@ public boolean equals(final java.lang.Object obj) { if (!getId().equals(other.getId())) return false; if (!getEntity().equals(other.getEntity())) return false; if (!getEntityId().equals(other.getEntityId())) return false; + if (!getEtag().equals(other.getEtag())) return false; if (!getEmail().equals(other.getEmail())) return false; if (!getDomain().equals(other.getDomain())) return false; if (hasProjectTeam() != other.hasProjectTeam()) return false; @@ -648,6 +718,8 @@ public int hashCode() { hash = (53 * hash) + getEntity().hashCode(); hash = (37 * hash) + ENTITY_ID_FIELD_NUMBER; hash = (53 * hash) + getEntityId().hashCode(); + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); hash = (37 * hash) + EMAIL_FIELD_NUMBER; hash = (53 * hash) + getEmail().hashCode(); hash = (37 * hash) + DOMAIN_FIELD_NUMBER; @@ -809,6 +881,8 @@ public Builder clear() { entityId_ = ""; + etag_ = ""; + email_ = ""; domain_ = ""; @@ -850,6 +924,7 @@ public com.google.storage.v2.ObjectAccessControl buildPartial() { result.id_ = id_; result.entity_ = entity_; result.entityId_ = entityId_; + result.etag_ = etag_; result.email_ = email_; result.domain_ = domain_; if (projectTeamBuilder_ == null) { @@ -922,6 +997,10 @@ public Builder mergeFrom(com.google.storage.v2.ObjectAccessControl other) { entityId_ = other.entityId_; onChanged(); } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + onChanged(); + } if (!other.getEmail().isEmpty()) { email_ = other.email_; onChanged(); @@ -1456,6 +1535,127 @@ public Builder setEntityIdBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object etag_ = ""; + /** + * + * + *
+     * The etag of the ObjectAccessControl.
+     * If included in the metadata of an update or delete request message, the
+     * operation will only be performed if the etag matches that of the live
+     * object's ObjectAccessControl.
+     * 
+ * + * string etag = 8; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The etag of the ObjectAccessControl.
+     * If included in the metadata of an update or delete request message, the
+     * operation will only be performed if the etag matches that of the live
+     * object's ObjectAccessControl.
+     * 
+ * + * string etag = 8; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The etag of the ObjectAccessControl.
+     * If included in the metadata of an update or delete request message, the
+     * operation will only be performed if the etag matches that of the live
+     * object's ObjectAccessControl.
+     * 
+ * + * string etag = 8; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + etag_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The etag of the ObjectAccessControl.
+     * If included in the metadata of an update or delete request message, the
+     * operation will only be performed if the etag matches that of the live
+     * object's ObjectAccessControl.
+     * 
+ * + * string etag = 8; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + + etag_ = getDefaultInstance().getEtag(); + onChanged(); + return this; + } + /** + * + * + *
+     * The etag of the ObjectAccessControl.
+     * If included in the metadata of an update or delete request message, the
+     * operation will only be performed if the etag matches that of the live
+     * object's ObjectAccessControl.
+     * 
+ * + * string etag = 8; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + etag_ = value; + onChanged(); + return this; + } + private java.lang.Object email_ = ""; /** * diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ObjectAccessControlOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ObjectAccessControlOrBuilder.java index a6a45c09cf..21e493d791 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ObjectAccessControlOrBuilder.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ObjectAccessControlOrBuilder.java @@ -151,6 +151,37 @@ public interface ObjectAccessControlOrBuilder */ com.google.protobuf.ByteString getEntityIdBytes(); + /** + * + * + *
+   * The etag of the ObjectAccessControl.
+   * If included in the metadata of an update or delete request message, the
+   * operation will only be performed if the etag matches that of the live
+   * object's ObjectAccessControl.
+   * 
+ * + * string etag = 8; + * + * @return The etag. + */ + java.lang.String getEtag(); + /** + * + * + *
+   * The etag of the ObjectAccessControl.
+   * If included in the metadata of an update or delete request message, the
+   * operation will only be performed if the etag matches that of the live
+   * object's ObjectAccessControl.
+   * 
+ * + * string etag = 8; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); + /** * * diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ObjectOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ObjectOrBuilder.java index 3f0622ed98..bd6aa32c61 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ObjectOrBuilder.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ObjectOrBuilder.java @@ -89,6 +89,37 @@ public interface ObjectOrBuilder */ com.google.protobuf.ByteString getBucketBytes(); + /** + * + * + *
+   * The etag of the object.
+   * If included in the metadata of an update or delete request message, the
+   * operation will only be performed if the etag matches that of the live
+   * object.
+   * 
+ * + * string etag = 27; + * + * @return The etag. + */ + java.lang.String getEtag(); + /** + * + * + *
+   * The etag of the object.
+   * If included in the metadata of an update or delete request message, the
+   * operation will only be performed if the etag matches that of the live
+   * object.
+   * 
+ * + * string etag = 27; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); + /** * * diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ReadObjectRequest.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ReadObjectRequest.java index e559124310..13c5b08a4c 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ReadObjectRequest.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ReadObjectRequest.java @@ -322,8 +322,8 @@ public long getGeneration() { * back from the end of the object to be returned. For example, if an object's * length is 15 bytes, a ReadObjectRequest with `read_offset` = -5 and * `read_limit` = 3 would return bytes 10 through 12 of the object. Requesting - * a negative offset whose magnitude is larger than the size of the object - * will result in an error. + * a negative offset with magnitude larger than the size of the object will + * return the entire object. *
* * int64 read_offset = 4; @@ -401,7 +401,7 @@ public long getIfGenerationMatch() { * * *
-   * Makes the operation conditional on whether the object's current generation
+   * Makes the operation conditional on whether the object's live generation
    * does not match the given value. If no live object exists, the precondition
    * fails. Setting to 0 makes the operation succeed only if there is a live
    * version of the object.
@@ -419,7 +419,7 @@ public boolean hasIfGenerationNotMatch() {
    *
    *
    * 
-   * Makes the operation conditional on whether the object's current generation
+   * Makes the operation conditional on whether the object's live generation
    * does not match the given value. If no live object exists, the precondition
    * fails. Setting to 0 makes the operation succeed only if there is a live
    * version of the object.
@@ -1426,8 +1426,8 @@ public Builder clearGeneration() {
      * back from the end of the object to be returned. For example, if an object's
      * length is 15 bytes, a ReadObjectRequest with `read_offset` = -5 and
      * `read_limit` = 3 would return bytes 10 through 12 of the object. Requesting
-     * a negative offset whose magnitude is larger than the size of the object
-     * will result in an error.
+     * a negative offset with magnitude larger than the size of the object will
+     * return the entire object.
      * 
* * int64 read_offset = 4; @@ -1448,8 +1448,8 @@ public long getReadOffset() { * back from the end of the object to be returned. For example, if an object's * length is 15 bytes, a ReadObjectRequest with `read_offset` = -5 and * `read_limit` = 3 would return bytes 10 through 12 of the object. Requesting - * a negative offset whose magnitude is larger than the size of the object - * will result in an error. + * a negative offset with magnitude larger than the size of the object will + * return the entire object. *
* * int64 read_offset = 4; @@ -1473,8 +1473,8 @@ public Builder setReadOffset(long value) { * back from the end of the object to be returned. For example, if an object's * length is 15 bytes, a ReadObjectRequest with `read_offset` = -5 and * `read_limit` = 3 would return bytes 10 through 12 of the object. Requesting - * a negative offset whose magnitude is larger than the size of the object - * will result in an error. + * a negative offset with magnitude larger than the size of the object will + * return the entire object. *
* * int64 read_offset = 4; @@ -1635,7 +1635,7 @@ public Builder clearIfGenerationMatch() { * * *
-     * Makes the operation conditional on whether the object's current generation
+     * Makes the operation conditional on whether the object's live generation
      * does not match the given value. If no live object exists, the precondition
      * fails. Setting to 0 makes the operation succeed only if there is a live
      * version of the object.
@@ -1653,7 +1653,7 @@ public boolean hasIfGenerationNotMatch() {
      *
      *
      * 
-     * Makes the operation conditional on whether the object's current generation
+     * Makes the operation conditional on whether the object's live generation
      * does not match the given value. If no live object exists, the precondition
      * fails. Setting to 0 makes the operation succeed only if there is a live
      * version of the object.
@@ -1671,7 +1671,7 @@ public long getIfGenerationNotMatch() {
      *
      *
      * 
-     * Makes the operation conditional on whether the object's current generation
+     * Makes the operation conditional on whether the object's live generation
      * does not match the given value. If no live object exists, the precondition
      * fails. Setting to 0 makes the operation succeed only if there is a live
      * version of the object.
@@ -1692,7 +1692,7 @@ public Builder setIfGenerationNotMatch(long value) {
      *
      *
      * 
-     * Makes the operation conditional on whether the object's current generation
+     * Makes the operation conditional on whether the object's live generation
      * does not match the given value. If no live object exists, the precondition
      * fails. Setting to 0 makes the operation succeed only if there is a live
      * version of the object.
diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ReadObjectRequestOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ReadObjectRequestOrBuilder.java
index 20cd5315fb..5a1661cdf7 100644
--- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ReadObjectRequestOrBuilder.java
+++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ReadObjectRequestOrBuilder.java
@@ -97,8 +97,8 @@ public interface ReadObjectRequestOrBuilder
    * back from the end of the object to be returned. For example, if an object's
    * length is 15 bytes, a ReadObjectRequest with `read_offset` = -5 and
    * `read_limit` = 3 would return bytes 10 through 12 of the object. Requesting
-   * a negative offset whose magnitude is larger than the size of the object
-   * will result in an error.
+   * a negative offset with magnitude larger than the size of the object will
+   * return the entire object.
    * 
* * int64 read_offset = 4; @@ -158,7 +158,7 @@ public interface ReadObjectRequestOrBuilder * * *
-   * Makes the operation conditional on whether the object's current generation
+   * Makes the operation conditional on whether the object's live generation
    * does not match the given value. If no live object exists, the precondition
    * fails. Setting to 0 makes the operation succeed only if there is a live
    * version of the object.
@@ -173,7 +173,7 @@ public interface ReadObjectRequestOrBuilder
    *
    *
    * 
-   * Makes the operation conditional on whether the object's current generation
+   * Makes the operation conditional on whether the object's live generation
    * does not match the given value. If no live object exists, the precondition
    * fails. Setting to 0 makes the operation succeed only if there is a live
    * version of the object.
diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/RewriteObjectRequest.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/RewriteObjectRequest.java
index b792c74eef..3bf7f794d0 100644
--- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/RewriteObjectRequest.java
+++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/RewriteObjectRequest.java
@@ -784,7 +784,7 @@ public long getIfGenerationMatch() {
    *
    *
    * 
-   * Makes the operation conditional on whether the object's current generation
+   * Makes the operation conditional on whether the object's live generation
    * does not match the given value. If no live object exists, the precondition
    * fails. Setting to 0 makes the operation succeed only if there is a live
    * version of the object.
@@ -802,7 +802,7 @@ public boolean hasIfGenerationNotMatch() {
    *
    *
    * 
-   * Makes the operation conditional on whether the object's current generation
+   * Makes the operation conditional on whether the object's live generation
    * does not match the given value. If no live object exists, the precondition
    * fails. Setting to 0 makes the operation succeed only if there is a live
    * version of the object.
@@ -893,7 +893,7 @@ public long getIfMetagenerationNotMatch() {
    *
    *
    * 
-   * Makes the operation conditional on whether the source object's current
+   * Makes the operation conditional on whether the source object's live
    * generation matches the given value.
    * 
* @@ -909,7 +909,7 @@ public boolean hasIfSourceGenerationMatch() { * * *
-   * Makes the operation conditional on whether the source object's current
+   * Makes the operation conditional on whether the source object's live
    * generation matches the given value.
    * 
* @@ -928,7 +928,7 @@ public long getIfSourceGenerationMatch() { * * *
-   * Makes the operation conditional on whether the source object's current
+   * Makes the operation conditional on whether the source object's live
    * generation does not match the given value.
    * 
* @@ -944,7 +944,7 @@ public boolean hasIfSourceGenerationNotMatch() { * * *
-   * Makes the operation conditional on whether the source object's current
+   * Makes the operation conditional on whether the source object's live
    * generation does not match the given value.
    * 
* @@ -3156,7 +3156,7 @@ public Builder clearIfGenerationMatch() { * * *
-     * Makes the operation conditional on whether the object's current generation
+     * Makes the operation conditional on whether the object's live generation
      * does not match the given value. If no live object exists, the precondition
      * fails. Setting to 0 makes the operation succeed only if there is a live
      * version of the object.
@@ -3174,7 +3174,7 @@ public boolean hasIfGenerationNotMatch() {
      *
      *
      * 
-     * Makes the operation conditional on whether the object's current generation
+     * Makes the operation conditional on whether the object's live generation
      * does not match the given value. If no live object exists, the precondition
      * fails. Setting to 0 makes the operation succeed only if there is a live
      * version of the object.
@@ -3192,7 +3192,7 @@ public long getIfGenerationNotMatch() {
      *
      *
      * 
-     * Makes the operation conditional on whether the object's current generation
+     * Makes the operation conditional on whether the object's live generation
      * does not match the given value. If no live object exists, the precondition
      * fails. Setting to 0 makes the operation succeed only if there is a live
      * version of the object.
@@ -3213,7 +3213,7 @@ public Builder setIfGenerationNotMatch(long value) {
      *
      *
      * 
-     * Makes the operation conditional on whether the object's current generation
+     * Makes the operation conditional on whether the object's live generation
      * does not match the given value. If no live object exists, the precondition
      * fails. Setting to 0 makes the operation succeed only if there is a live
      * version of the object.
@@ -3377,7 +3377,7 @@ public Builder clearIfMetagenerationNotMatch() {
      *
      *
      * 
-     * Makes the operation conditional on whether the source object's current
+     * Makes the operation conditional on whether the source object's live
      * generation matches the given value.
      * 
* @@ -3393,7 +3393,7 @@ public boolean hasIfSourceGenerationMatch() { * * *
-     * Makes the operation conditional on whether the source object's current
+     * Makes the operation conditional on whether the source object's live
      * generation matches the given value.
      * 
* @@ -3409,7 +3409,7 @@ public long getIfSourceGenerationMatch() { * * *
-     * Makes the operation conditional on whether the source object's current
+     * Makes the operation conditional on whether the source object's live
      * generation matches the given value.
      * 
* @@ -3428,7 +3428,7 @@ public Builder setIfSourceGenerationMatch(long value) { * * *
-     * Makes the operation conditional on whether the source object's current
+     * Makes the operation conditional on whether the source object's live
      * generation matches the given value.
      * 
* @@ -3448,7 +3448,7 @@ public Builder clearIfSourceGenerationMatch() { * * *
-     * Makes the operation conditional on whether the source object's current
+     * Makes the operation conditional on whether the source object's live
      * generation does not match the given value.
      * 
* @@ -3464,7 +3464,7 @@ public boolean hasIfSourceGenerationNotMatch() { * * *
-     * Makes the operation conditional on whether the source object's current
+     * Makes the operation conditional on whether the source object's live
      * generation does not match the given value.
      * 
* @@ -3480,7 +3480,7 @@ public long getIfSourceGenerationNotMatch() { * * *
-     * Makes the operation conditional on whether the source object's current
+     * Makes the operation conditional on whether the source object's live
      * generation does not match the given value.
      * 
* @@ -3499,7 +3499,7 @@ public Builder setIfSourceGenerationNotMatch(long value) { * * *
-     * Makes the operation conditional on whether the source object's current
+     * Makes the operation conditional on whether the source object's live
      * generation does not match the given value.
      * 
* diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/RewriteObjectRequestOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/RewriteObjectRequestOrBuilder.java index 89315b9c4b..41ffda22fe 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/RewriteObjectRequestOrBuilder.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/RewriteObjectRequestOrBuilder.java @@ -334,7 +334,7 @@ public interface RewriteObjectRequestOrBuilder * * *
-   * Makes the operation conditional on whether the object's current generation
+   * Makes the operation conditional on whether the object's live generation
    * does not match the given value. If no live object exists, the precondition
    * fails. Setting to 0 makes the operation succeed only if there is a live
    * version of the object.
@@ -349,7 +349,7 @@ public interface RewriteObjectRequestOrBuilder
    *
    *
    * 
-   * Makes the operation conditional on whether the object's current generation
+   * Makes the operation conditional on whether the object's live generation
    * does not match the given value. If no live object exists, the precondition
    * fails. Setting to 0 makes the operation succeed only if there is a live
    * version of the object.
@@ -419,7 +419,7 @@ public interface RewriteObjectRequestOrBuilder
    *
    *
    * 
-   * Makes the operation conditional on whether the source object's current
+   * Makes the operation conditional on whether the source object's live
    * generation matches the given value.
    * 
* @@ -432,7 +432,7 @@ public interface RewriteObjectRequestOrBuilder * * *
-   * Makes the operation conditional on whether the source object's current
+   * Makes the operation conditional on whether the source object's live
    * generation matches the given value.
    * 
* @@ -446,7 +446,7 @@ public interface RewriteObjectRequestOrBuilder * * *
-   * Makes the operation conditional on whether the source object's current
+   * Makes the operation conditional on whether the source object's live
    * generation does not match the given value.
    * 
* @@ -459,7 +459,7 @@ public interface RewriteObjectRequestOrBuilder * * *
-   * Makes the operation conditional on whether the source object's current
+   * Makes the operation conditional on whether the source object's live
    * generation does not match the given value.
    * 
* diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageProto.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageProto.java index 19cf33cb88..5c95c7fc27 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageProto.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageProto.java @@ -243,6 +243,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_storage_v2_Bucket_Website_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_storage_v2_Bucket_Website_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_storage_v2_Bucket_CustomPlacementConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_storage_v2_Bucket_CustomPlacementConfig_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_storage_v2_Bucket_Autoclass_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -573,239 +577,244 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\033MAX_LABELS_KEY_VALUE_LENGTH\020?\022\037\n\032MAX_LA" + "BELS_KEY_VALUE_BYTES\020\200\001\022.\n)MAX_OBJECT_ID" + "S_PER_DELETE_OBJECTS_REQUEST\020\350\007\022\036\n\032SPLIT" - + "_TOKEN_MAX_VALID_DAYS\020\016\032\002\020\001\"\243\026\n\006Bucket\022\021" + + "_TOKEN_MAX_VALID_DAYS\020\016\032\002\020\001\"\264\027\n\006Bucket\022\021" + "\n\004name\030\001 \001(\tB\003\340A\005\022\026\n\tbucket_id\030\002 \001(\tB\003\340A" - + "\003\022D\n\007project\030\003 \001(\tB3\340A\005\372A-\n+cloudresourc" - + "emanager.googleapis.com/Project\022\033\n\016metag" - + "eneration\030\004 \001(\003B\003\340A\003\022\025\n\010location\030\005 \001(\tB\003" - + "\340A\005\022\032\n\rlocation_type\030\006 \001(\tB\003\340A\003\022\025\n\rstora" - + "ge_class\030\007 \001(\t\022\013\n\003rpo\030\033 \001(\t\0223\n\003acl\030\010 \003(\013" - + "2&.google.storage.v2.BucketAccessControl" - + "\022B\n\022default_object_acl\030\t \003(\0132&.google.st" - + "orage.v2.ObjectAccessControl\0226\n\tlifecycl" - + "e\030\n \001(\0132#.google.storage.v2.Bucket.Lifec" - + "ycle\0224\n\013create_time\030\013 \001(\0132\032.google.proto" - + "buf.TimestampB\003\340A\003\022,\n\004cors\030\014 \003(\0132\036.googl" - + "e.storage.v2.Bucket.Cors\0224\n\013update_time\030" - + "\r \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022 " - + "\n\030default_event_based_hold\030\016 \001(\010\0225\n\006labe" - + "ls\030\017 \003(\0132%.google.storage.v2.Bucket.Labe" - + "lsEntry\0222\n\007website\030\020 \001(\0132!.google.storag" - + "e.v2.Bucket.Website\0228\n\nversioning\030\021 \001(\0132" - + "$.google.storage.v2.Bucket.Versioning\0222\n" - + "\007logging\030\022 \001(\0132!.google.storage.v2.Bucke" - + "t.Logging\022,\n\005owner\030\023 \001(\0132\030.google.storag" - + "e.v2.OwnerB\003\340A\003\0228\n\nencryption\030\024 \001(\0132$.go" - + "ogle.storage.v2.Bucket.Encryption\0222\n\007bil" - + "ling\030\025 \001(\0132!.google.storage.v2.Bucket.Bi" - + "lling\022C\n\020retention_policy\030\026 \001(\0132).google" - + ".storage.v2.Bucket.RetentionPolicy\0227\n\nia" - + "m_config\030\027 \001(\0132#.google.storage.v2.Bucke" - + "t.IamConfig\022\025\n\rsatisfies_pzs\030\031 \001(\010\0226\n\tau" - + "toclass\030\034 \001(\0132#.google.storage.v2.Bucket" - + ".Autoclass\032!\n\007Billing\022\026\n\016requester_pays\030" - + "\001 \001(\010\032X\n\004Cors\022\016\n\006origin\030\001 \003(\t\022\016\n\006method\030" - + "\002 \003(\t\022\027\n\017response_header\030\003 \003(\t\022\027\n\017max_ag" - + "e_seconds\030\004 \001(\005\032M\n\nEncryption\022?\n\017default" - + "_kms_key\030\001 \001(\tB&\372A#\n!cloudkms.googleapis" - + ".com/CryptoKey\032\354\001\n\tIamConfig\022a\n\033uniform_" - + "bucket_level_access\030\001 \001(\0132<.google.stora" - + "ge.v2.Bucket.IamConfig.UniformBucketLeve" - + "lAccess\022 \n\030public_access_prevention\030\003 \001(" - + "\t\032Z\n\030UniformBucketLevelAccess\022\017\n\007enabled" - + "\030\001 \001(\010\022-\n\tlock_time\030\002 \001(\0132\032.google.proto" - + "buf.Timestamp\032\363\005\n\tLifecycle\0226\n\004rule\030\001 \003(" - + "\0132(.google.storage.v2.Bucket.Lifecycle.R" - + "ule\032\255\005\n\004Rule\022?\n\006action\030\001 \001(\0132/.google.st" - + "orage.v2.Bucket.Lifecycle.Rule.Action\022E\n" - + "\tcondition\030\002 \001(\01322.google.storage.v2.Buc" - + "ket.Lifecycle.Rule.Condition\032-\n\006Action\022\014" - + "\n\004type\030\001 \001(\t\022\025\n\rstorage_class\030\002 \001(\t\032\355\003\n\t" - + "Condition\022\025\n\010age_days\030\001 \001(\005H\000\210\001\001\022)\n\016crea" - + "ted_before\030\002 \001(\0132\021.google.type.Date\022\024\n\007i" - + "s_live\030\003 \001(\010H\001\210\001\001\022\037\n\022num_newer_versions\030" - + "\004 \001(\005H\002\210\001\001\022\035\n\025matches_storage_class\030\005 \003(" - + "\t\022#\n\026days_since_custom_time\030\007 \001(\005H\003\210\001\001\022-" - + "\n\022custom_time_before\030\010 \001(\0132\021.google.type" - + ".Date\022\'\n\032days_since_noncurrent_time\030\t \001(" - + "\005H\004\210\001\001\0221\n\026noncurrent_time_before\030\n \001(\0132\021" - + ".google.type.Date\022\026\n\016matches_prefix\030\013 \003(" - + "\t\022\026\n\016matches_suffix\030\014 \003(\tB\013\n\t_age_daysB\n" - + "\n\010_is_liveB\025\n\023_num_newer_versionsB\031\n\027_da" - + "ys_since_custom_timeB\035\n\033_days_since_nonc" - + "urrent_time\0328\n\007Logging\022\022\n\nlog_bucket\030\001 \001" - + "(\t\022\031\n\021log_object_prefix\030\002 \001(\t\032r\n\017Retenti" - + "onPolicy\0222\n\016effective_time\030\001 \001(\0132\032.googl" - + "e.protobuf.Timestamp\022\021\n\tis_locked\030\002 \001(\010\022" - + "\030\n\020retention_period\030\003 \001(\003\032\035\n\nVersioning\022" - + "\017\n\007enabled\030\001 \001(\010\032;\n\007Website\022\030\n\020main_page" - + "_suffix\030\001 \001(\t\022\026\n\016not_found_page\030\002 \001(\t\032R\n" - + "\tAutoclass\022\017\n\007enabled\030\001 \001(\010\0224\n\013toggle_ti" - + "me\030\002 \001(\0132\032.google.protobuf.TimestampB\003\340A" - + "\003\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002" - + " \001(\t:\0028\001:G\352AD\n\035storage.googleapis.com/Bu" - + "cket\022#projects/{project}/buckets/{bucket" - + "}\"\247\001\n\023BucketAccessControl\022\014\n\004role\030\001 \001(\t\022" - + "\n\n\002id\030\002 \001(\t\022\016\n\006entity\030\003 \001(\t\022\021\n\tentity_id" - + "\030\004 \001(\t\022\r\n\005email\030\005 \001(\t\022\016\n\006domain\030\006 \001(\t\0224\n" - + "\014project_team\030\007 \001(\0132\036.google.storage.v2." - + "ProjectTeam\"B\n\017ChecksummedData\022\017\n\007conten" - + "t\030\001 \001(\014\022\023\n\006crc32c\030\002 \001(\007H\000\210\001\001B\t\n\007_crc32c\"" - + "C\n\017ObjectChecksums\022\023\n\006crc32c\030\001 \001(\007H\000\210\001\001\022" - + "\020\n\010md5_hash\030\002 \001(\014B\t\n\007_crc32c\"\203\002\n\017HmacKey" - + "Metadata\022\n\n\002id\030\001 \001(\t\022\021\n\taccess_id\030\002 \001(\t\022" - + "A\n\007project\030\003 \001(\tB0\372A-\n+cloudresourcemana" - + "ger.googleapis.com/Project\022\035\n\025service_ac" - + "count_email\030\004 \001(\t\022\r\n\005state\030\005 \001(\t\022/\n\013crea" - + "te_time\030\006 \001(\0132\032.google.protobuf.Timestam" - + "p\022/\n\013update_time\030\007 \001(\0132\032.google.protobuf" - + ".Timestamp\"\217\003\n\014Notification\022\021\n\004name\030\001 \001(" - + "\tB\003\340A\002\022\022\n\005topic\030\002 \001(\tB\003\340A\002\022\030\n\013event_type" - + "s\030\003 \003(\tB\003\340A\001\022U\n\021custom_attributes\030\004 \003(\0132" - + "5.google.storage.v2.Notification.CustomA" - + "ttributesEntryB\003\340A\001\022\037\n\022object_name_prefi" - + "x\030\005 \001(\tB\003\340A\001\022\033\n\016payload_format\030\006 \001(\tB\003\340A" - + "\002\0327\n\025CustomAttributesEntry\022\013\n\003key\030\001 \001(\t\022" - + "\r\n\005value\030\002 \001(\t:\0028\001:p\352Am\n#storage.googlea" - + "pis.com/Notification\022Fprojects/{project}" - + "/buckets/{bucket}/notificationConfigs/{n" - + "otification}\"L\n\022CustomerEncryption\022\034\n\024en" - + "cryption_algorithm\030\001 \001(\t\022\030\n\020key_sha256_b" - + "ytes\030\003 \001(\014\"\364\010\n\006Object\022\021\n\004name\030\001 \001(\tB\003\340A\005" - + "\0225\n\006bucket\030\002 \001(\tB%\340A\005\372A\037\n\035storage.google" - + "apis.com/Bucket\022\027\n\ngeneration\030\003 \001(\003B\003\340A\005" - + "\022\033\n\016metageneration\030\004 \001(\003B\003\340A\003\022\025\n\rstorage" - + "_class\030\005 \001(\t\022\021\n\004size\030\006 \001(\003B\003\340A\003\022\030\n\020conte" - + "nt_encoding\030\007 \001(\t\022\033\n\023content_disposition" - + "\030\010 \001(\t\022\025\n\rcache_control\030\t \001(\t\0223\n\003acl\030\n \003" + + "\003\022\014\n\004etag\030\035 \001(\t\022D\n\007project\030\003 \001(\tB3\340A\005\372A-" + + "\n+cloudresourcemanager.googleapis.com/Pr" + + "oject\022\033\n\016metageneration\030\004 \001(\003B\003\340A\003\022\025\n\010lo" + + "cation\030\005 \001(\tB\003\340A\005\022\032\n\rlocation_type\030\006 \001(\t" + + "B\003\340A\003\022\025\n\rstorage_class\030\007 \001(\t\022\013\n\003rpo\030\033 \001(" + + "\t\0223\n\003acl\030\010 \003(\0132&.google.storage.v2.Bucke" + + "tAccessControl\022B\n\022default_object_acl\030\t \003" + "(\0132&.google.storage.v2.ObjectAccessContr" - + "ol\022\030\n\020content_language\030\013 \001(\t\0224\n\013delete_t" - + "ime\030\014 \001(\0132\032.google.protobuf.TimestampB\003\340" - + "A\003\022\024\n\014content_type\030\r \001(\t\0224\n\013create_time\030" - + "\016 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022\034" - + "\n\017component_count\030\017 \001(\005B\003\340A\003\022:\n\tchecksum" - + "s\030\020 \001(\0132\".google.storage.v2.ObjectChecks" - + "umsB\003\340A\003\0224\n\013update_time\030\021 \001(\0132\032.google.p" - + "rotobuf.TimestampB\003\340A\003\0227\n\007kms_key\030\022 \001(\tB" - + "&\372A#\n!cloudkms.googleapis.com/CryptoKey\022" - + "B\n\031update_storage_class_time\030\023 \001(\0132\032.goo" - + "gle.protobuf.TimestampB\003\340A\003\022\026\n\016temporary" - + "_hold\030\024 \001(\010\0229\n\025retention_expire_time\030\025 \001" - + "(\0132\032.google.protobuf.Timestamp\0229\n\010metada" - + "ta\030\026 \003(\0132\'.google.storage.v2.Object.Meta" - + "dataEntry\022\035\n\020event_based_hold\030\027 \001(\010H\000\210\001\001" - + "\022,\n\005owner\030\030 \001(\0132\030.google.storage.v2.Owne" - + "rB\003\340A\003\022B\n\023customer_encryption\030\031 \001(\0132%.go" - + "ogle.storage.v2.CustomerEncryption\022/\n\013cu" - + "stom_time\030\032 \001(\0132\032.google.protobuf.Timest" - + "amp\032/\n\rMetadataEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005val" - + "ue\030\002 \001(\t:\0028\001B\023\n\021_event_based_hold\"\247\001\n\023Ob" - + "jectAccessControl\022\014\n\004role\030\001 \001(\t\022\n\n\002id\030\002 " - + "\001(\t\022\016\n\006entity\030\003 \001(\t\022\021\n\tentity_id\030\004 \001(\t\022\r" - + "\n\005email\030\005 \001(\t\022\016\n\006domain\030\006 \001(\t\0224\n\014project" - + "_team\030\007 \001(\0132\036.google.storage.v2.ProjectT" - + "eam\"l\n\023ListObjectsResponse\022*\n\007objects\030\001 " - + "\003(\0132\031.google.storage.v2.Object\022\020\n\010prefix" - + "es\030\002 \003(\t\022\027\n\017next_page_token\030\003 \001(\t\"3\n\013Pro" - + "jectTeam\022\026\n\016project_number\030\001 \001(\t\022\014\n\004team" - + "\030\002 \001(\t\"\'\n\016ServiceAccount\022\025\n\remail_addres" - + "s\030\001 \001(\t\"*\n\005Owner\022\016\n\006entity\030\001 \001(\t\022\021\n\tenti" - + "ty_id\030\002 \001(\t\"C\n\014ContentRange\022\r\n\005start\030\001 \001" - + "(\003\022\013\n\003end\030\002 \001(\003\022\027\n\017complete_length\030\003 \001(\003" - + "2\260\033\n\007Storage\022W\n\014DeleteBucket\022&.google.st" - + "orage.v2.DeleteBucketRequest\032\026.google.pr" - + "otobuf.Empty\"\007\332A\004name\022T\n\tGetBucket\022#.goo" - + "gle.storage.v2.GetBucketRequest\032\031.google" - + ".storage.v2.Bucket\"\007\332A\004name\022m\n\014CreateBuc" - + "ket\022&.google.storage.v2.CreateBucketRequ" - + "est\032\031.google.storage.v2.Bucket\"\032\332A\027paren" - + "t,bucket,bucket_id\022g\n\013ListBuckets\022%.goog", - "le.storage.v2.ListBucketsRequest\032&.googl" - + "e.storage.v2.ListBucketsResponse\"\t\332A\006par" - + "ent\022v\n\031LockBucketRetentionPolicy\0223.googl" - + "e.storage.v2.LockBucketRetentionPolicyRe" - + "quest\032\031.google.storage.v2.Bucket\"\t\332A\006buc" - + "ket\022V\n\014GetIamPolicy\022\".google.iam.v1.GetI" - + "amPolicyRequest\032\025.google.iam.v1.Policy\"\013" - + "\332A\010resource\022]\n\014SetIamPolicy\022\".google.iam" - + ".v1.SetIamPolicyRequest\032\025.google.iam.v1." - + "Policy\"\022\332A\017resource,policy\022\202\001\n\022TestIamPe" - + "rmissions\022(.google.iam.v1.TestIamPermiss" - + "ionsRequest\032).google.iam.v1.TestIamPermi" - + "ssionsResponse\"\027\332A\024resource,permissions\022" - + "h\n\014UpdateBucket\022&.google.storage.v2.Upda" - + "teBucketRequest\032\031.google.storage.v2.Buck" - + "et\"\025\332A\022bucket,update_mask\022c\n\022DeleteNotif" - + "ication\022,.google.storage.v2.DeleteNotifi" - + "cationRequest\032\026.google.protobuf.Empty\"\007\332" - + "A\004name\022f\n\017GetNotification\022).google.stora" - + "ge.v2.GetNotificationRequest\032\037.google.st" - + "orage.v2.Notification\"\007\332A\004name\022{\n\022Create" - + "Notification\022,.google.storage.v2.CreateN" - + "otificationRequest\032\037.google.storage.v2.N" - + "otification\"\026\332A\023parent,notification\022y\n\021L" - + "istNotifications\022+.google.storage.v2.Lis" - + "tNotificationsRequest\032,.google.storage.v" - + "2.ListNotificationsResponse\"\t\332A\006parent\022U" - + "\n\rComposeObject\022\'.google.storage.v2.Comp" - + "oseObjectRequest\032\031.google.storage.v2.Obj" - + "ect\"\000\022{\n\014DeleteObject\022&.google.storage.v" - + "2.DeleteObjectRequest\032\026.google.protobuf." - + "Empty\"+\332A\rbucket,object\332A\030bucket,object," - + "generation\022x\n\tGetObject\022#.google.storage" - + ".v2.GetObjectRequest\032\031.google.storage.v2" - + ".Object\"+\332A\rbucket,object\332A\030bucket,objec" - + "t,generation\022\210\001\n\nReadObject\022$.google.sto" - + "rage.v2.ReadObjectRequest\032%.google.stora" - + "ge.v2.ReadObjectResponse\"+\332A\rbucket,obje" - + "ct\332A\030bucket,object,generation0\001\022h\n\014Updat" - + "eObject\022&.google.storage.v2.UpdateObject" - + "Request\032\031.google.storage.v2.Object\"\025\332A\022o" - + "bject,update_mask\022`\n\013WriteObject\022%.googl" - + "e.storage.v2.WriteObjectRequest\032&.google" - + ".storage.v2.WriteObjectResponse\"\000(\001\022g\n\013L" - + "istObjects\022%.google.storage.v2.ListObjec" - + "tsRequest\032&.google.storage.v2.ListObject" - + "sResponse\"\t\332A\006parent\022^\n\rRewriteObject\022\'." - + "google.storage.v2.RewriteObjectRequest\032\"" - + ".google.storage.v2.RewriteResponse\"\000\022v\n\023" - + "StartResumableWrite\022-.google.storage.v2." - + "StartResumableWriteRequest\032..google.stor" - + "age.v2.StartResumableWriteResponse\"\000\022y\n\020" - + "QueryWriteStatus\022*.google.storage.v2.Que" - + "ryWriteStatusRequest\032+.google.storage.v2" - + ".QueryWriteStatusResponse\"\014\332A\tupload_id\022" - + "o\n\021GetServiceAccount\022+.google.storage.v2" - + ".GetServiceAccountRequest\032!.google.stora" - + "ge.v2.ServiceAccount\"\n\332A\007project\022\204\001\n\rCre" - + "ateHmacKey\022\'.google.storage.v2.CreateHma" - + "cKeyRequest\032(.google.storage.v2.CreateHm" - + "acKeyResponse\" \332A\035project,service_accoun" - + "t_email\022f\n\rDeleteHmacKey\022\'.google.storag" - + "e.v2.DeleteHmacKeyRequest\032\026.google.proto" - + "buf.Empty\"\024\332A\021access_id,project\022l\n\nGetHm" - + "acKey\022$.google.storage.v2.GetHmacKeyRequ" + + "ol\0226\n\tlifecycle\030\n \001(\0132#.google.storage.v" + + "2.Bucket.Lifecycle\0224\n\013create_time\030\013 \001(\0132" + + "\032.google.protobuf.TimestampB\003\340A\003\022,\n\004cors" + + "\030\014 \003(\0132\036.google.storage.v2.Bucket.Cors\0224" + + "\n\013update_time\030\r \001(\0132\032.google.protobuf.Ti" + + "mestampB\003\340A\003\022 \n\030default_event_based_hold" + + "\030\016 \001(\010\0225\n\006labels\030\017 \003(\0132%.google.storage." + + "v2.Bucket.LabelsEntry\0222\n\007website\030\020 \001(\0132!" + + ".google.storage.v2.Bucket.Website\0228\n\nver" + + "sioning\030\021 \001(\0132$.google.storage.v2.Bucket" + + ".Versioning\0222\n\007logging\030\022 \001(\0132!.google.st" + + "orage.v2.Bucket.Logging\022,\n\005owner\030\023 \001(\0132\030" + + ".google.storage.v2.OwnerB\003\340A\003\0228\n\nencrypt" + + "ion\030\024 \001(\0132$.google.storage.v2.Bucket.Enc" + + "ryption\0222\n\007billing\030\025 \001(\0132!.google.storag" + + "e.v2.Bucket.Billing\022C\n\020retention_policy\030" + + "\026 \001(\0132).google.storage.v2.Bucket.Retenti" + + "onPolicy\0227\n\niam_config\030\027 \001(\0132#.google.st" + + "orage.v2.Bucket.IamConfig\022\025\n\rsatisfies_p" + + "zs\030\031 \001(\010\022P\n\027custom_placement_config\030\032 \001(" + + "\0132/.google.storage.v2.Bucket.CustomPlace" + + "mentConfig\0226\n\tautoclass\030\034 \001(\0132#.google.s" + + "torage.v2.Bucket.Autoclass\032!\n\007Billing\022\026\n" + + "\016requester_pays\030\001 \001(\010\032X\n\004Cors\022\016\n\006origin\030" + + "\001 \003(\t\022\016\n\006method\030\002 \003(\t\022\027\n\017response_header" + + "\030\003 \003(\t\022\027\n\017max_age_seconds\030\004 \001(\005\032M\n\nEncry" + + "ption\022?\n\017default_kms_key\030\001 \001(\tB&\372A#\n!clo" + + "udkms.googleapis.com/CryptoKey\032\354\001\n\tIamCo" + + "nfig\022a\n\033uniform_bucket_level_access\030\001 \001(" + + "\0132<.google.storage.v2.Bucket.IamConfig.U" + + "niformBucketLevelAccess\022 \n\030public_access" + + "_prevention\030\003 \001(\t\032Z\n\030UniformBucketLevelA" + + "ccess\022\017\n\007enabled\030\001 \001(\010\022-\n\tlock_time\030\002 \001(" + + "\0132\032.google.protobuf.Timestamp\032\363\005\n\tLifecy" + + "cle\0226\n\004rule\030\001 \003(\0132(.google.storage.v2.Bu" + + "cket.Lifecycle.Rule\032\255\005\n\004Rule\022?\n\006action\030\001" + + " \001(\0132/.google.storage.v2.Bucket.Lifecycl" + + "e.Rule.Action\022E\n\tcondition\030\002 \001(\01322.googl" + + "e.storage.v2.Bucket.Lifecycle.Rule.Condi" + + "tion\032-\n\006Action\022\014\n\004type\030\001 \001(\t\022\025\n\rstorage_" + + "class\030\002 \001(\t\032\355\003\n\tCondition\022\025\n\010age_days\030\001 " + + "\001(\005H\000\210\001\001\022)\n\016created_before\030\002 \001(\0132\021.googl" + + "e.type.Date\022\024\n\007is_live\030\003 \001(\010H\001\210\001\001\022\037\n\022num" + + "_newer_versions\030\004 \001(\005H\002\210\001\001\022\035\n\025matches_st" + + "orage_class\030\005 \003(\t\022#\n\026days_since_custom_t" + + "ime\030\007 \001(\005H\003\210\001\001\022-\n\022custom_time_before\030\010 \001" + + "(\0132\021.google.type.Date\022\'\n\032days_since_nonc" + + "urrent_time\030\t \001(\005H\004\210\001\001\0221\n\026noncurrent_tim" + + "e_before\030\n \001(\0132\021.google.type.Date\022\026\n\016mat" + + "ches_prefix\030\013 \003(\t\022\026\n\016matches_suffix\030\014 \003(" + + "\tB\013\n\t_age_daysB\n\n\010_is_liveB\025\n\023_num_newer" + + "_versionsB\031\n\027_days_since_custom_timeB\035\n\033" + + "_days_since_noncurrent_time\0328\n\007Logging\022\022" + + "\n\nlog_bucket\030\001 \001(\t\022\031\n\021log_object_prefix\030" + + "\002 \001(\t\032r\n\017RetentionPolicy\0222\n\016effective_ti" + + "me\030\001 \001(\0132\032.google.protobuf.Timestamp\022\021\n\t" + + "is_locked\030\002 \001(\010\022\030\n\020retention_period\030\003 \001(" + + "\003\032\035\n\nVersioning\022\017\n\007enabled\030\001 \001(\010\032;\n\007Webs" + + "ite\022\030\n\020main_page_suffix\030\001 \001(\t\022\026\n\016not_fou" + + "nd_page\030\002 \001(\t\032/\n\025CustomPlacementConfig\022\026" + + "\n\016data_locations\030\001 \003(\t\032R\n\tAutoclass\022\017\n\007e" + + "nabled\030\001 \001(\010\0224\n\013toggle_time\030\002 \001(\0132\032.goog" + + "le.protobuf.TimestampB\003\340A\003\032-\n\013LabelsEntr" + + "y\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:G\352AD\n\035" + + "storage.googleapis.com/Bucket\022#projects/" + + "{project}/buckets/{bucket}\"\265\001\n\023BucketAcc" + + "essControl\022\014\n\004role\030\001 \001(\t\022\n\n\002id\030\002 \001(\t\022\016\n\006" + + "entity\030\003 \001(\t\022\021\n\tentity_id\030\004 \001(\t\022\014\n\004etag\030" + + "\010 \001(\t\022\r\n\005email\030\005 \001(\t\022\016\n\006domain\030\006 \001(\t\0224\n\014" + + "project_team\030\007 \001(\0132\036.google.storage.v2.P" + + "rojectTeam\"B\n\017ChecksummedData\022\017\n\007content" + + "\030\001 \001(\014\022\023\n\006crc32c\030\002 \001(\007H\000\210\001\001B\t\n\007_crc32c\"C" + + "\n\017ObjectChecksums\022\023\n\006crc32c\030\001 \001(\007H\000\210\001\001\022\020" + + "\n\010md5_hash\030\002 \001(\014B\t\n\007_crc32c\"\221\002\n\017HmacKeyM" + + "etadata\022\n\n\002id\030\001 \001(\t\022\021\n\taccess_id\030\002 \001(\t\022A" + + "\n\007project\030\003 \001(\tB0\372A-\n+cloudresourcemanag" + + "er.googleapis.com/Project\022\035\n\025service_acc" + + "ount_email\030\004 \001(\t\022\r\n\005state\030\005 \001(\t\022/\n\013creat" + + "e_time\030\006 \001(\0132\032.google.protobuf.Timestamp" + + "\022/\n\013update_time\030\007 \001(\0132\032.google.protobuf." + + "Timestamp\022\014\n\004etag\030\010 \001(\t\"\235\003\n\014Notification" + + "\022\021\n\004name\030\001 \001(\tB\003\340A\002\022\022\n\005topic\030\002 \001(\tB\003\340A\002\022" + + "\014\n\004etag\030\007 \001(\t\022\030\n\013event_types\030\003 \003(\tB\003\340A\001\022" + + "U\n\021custom_attributes\030\004 \003(\01325.google.stor" + + "age.v2.Notification.CustomAttributesEntr" + + "yB\003\340A\001\022\037\n\022object_name_prefix\030\005 \001(\tB\003\340A\001\022" + + "\033\n\016payload_format\030\006 \001(\tB\003\340A\002\0327\n\025CustomAt" + + "tributesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(" + + "\t:\0028\001:p\352Am\n#storage.googleapis.com/Notif" + + "ication\022Fprojects/{project}/buckets/{buc" + + "ket}/notificationConfigs/{notification}\"" + + "L\n\022CustomerEncryption\022\034\n\024encryption_algo" + + "rithm\030\001 \001(\t\022\030\n\020key_sha256_bytes\030\003 \001(\014\"\202\t" + + "\n\006Object\022\021\n\004name\030\001 \001(\tB\003\340A\005\0225\n\006bucket\030\002 " + + "\001(\tB%\340A\005\372A\037\n\035storage.googleapis.com/Buck" + + "et\022\014\n\004etag\030\033 \001(\t\022\027\n\ngeneration\030\003 \001(\003B\003\340A" + + "\005\022\033\n\016metageneration\030\004 \001(\003B\003\340A\003\022\025\n\rstorag" + + "e_class\030\005 \001(\t\022\021\n\004size\030\006 \001(\003B\003\340A\003\022\030\n\020cont" + + "ent_encoding\030\007 \001(\t\022\033\n\023content_dispositio" + + "n\030\010 \001(\t\022\025\n\rcache_control\030\t \001(\t\0223\n\003acl\030\n " + + "\003(\0132&.google.storage.v2.ObjectAccessCont" + + "rol\022\030\n\020content_language\030\013 \001(\t\0224\n\013delete_" + + "time\030\014 \001(\0132\032.google.protobuf.TimestampB\003" + + "\340A\003\022\024\n\014content_type\030\r \001(\t\0224\n\013create_time" + + "\030\016 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022" + + "\034\n\017component_count\030\017 \001(\005B\003\340A\003\022:\n\tchecksu" + + "ms\030\020 \001(\0132\".google.storage.v2.ObjectCheck" + + "sumsB\003\340A\003\0224\n\013update_time\030\021 \001(\0132\032.google." + + "protobuf.TimestampB\003\340A\003\0227\n\007kms_key\030\022 \001(\t" + + "B&\372A#\n!cloudkms.googleapis.com/CryptoKey" + + "\022B\n\031update_storage_class_time\030\023 \001(\0132\032.go" + + "ogle.protobuf.TimestampB\003\340A\003\022\026\n\016temporar" + + "y_hold\030\024 \001(\010\0229\n\025retention_expire_time\030\025 " + + "\001(\0132\032.google.protobuf.Timestamp\0229\n\010metad" + + "ata\030\026 \003(\0132\'.google.storage.v2.Object.Met" + + "adataEntry\022\035\n\020event_based_hold\030\027 \001(\010H\000\210\001" + + "\001\022,\n\005owner\030\030 \001(\0132\030.google.storage.v2.Own" + + "erB\003\340A\003\022B\n\023customer_encryption\030\031 \001(\0132%.g" + + "oogle.storage.v2.CustomerEncryption\022/\n\013c" + + "ustom_time\030\032 \001(\0132\032.google.protobuf.Times" + + "tamp\032/\n\rMetadataEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005va" + + "lue\030\002 \001(\t:\0028\001B\023\n\021_event_based_hold\"\265\001\n\023O" + + "bjectAccessControl\022\014\n\004role\030\001 \001(\t\022\n\n\002id\030\002" + + " \001(\t\022\016\n\006entity\030\003 \001(\t\022\021\n\tentity_id\030\004 \001(\t\022" + + "\014\n\004etag\030\010 \001(\t\022\r\n\005email\030\005 \001(\t\022\016\n\006domain\030\006" + + " \001(\t\0224\n\014project_team\030\007 \001(\0132\036.google.stor" + + "age.v2.ProjectTeam\"l\n\023ListObjectsRespons" + + "e\022*\n\007objects\030\001 \003(\0132\031.google.storage.v2.O" + + "bject\022\020\n\010prefixes\030\002 \003(\t\022\027\n\017next_page_tok" + + "en\030\003 \001(\t\"3\n\013ProjectTeam\022\026\n\016project_numbe" + + "r\030\001 \001(\t\022\014\n\004team\030\002 \001(\t\"\'\n\016ServiceAccount\022" + + "\025\n\remail_address\030\001 \001(\t\"*\n\005Owner\022\016\n\006entit" + + "y\030\001 \001(\t\022\021\n\tentity_id\030\002 \001(\t\"C\n\014ContentRan" + + "ge\022\r\n\005start\030\001 \001(\003\022\013\n\003end\030\002 \001(\003\022\027\n\017comple" + + "te_length\030\003 \001(\0032\260\033\n\007Storage\022W\n\014DeleteBuc" + + "ket\022&.google.storage.v2.DeleteBucketRequ" + + "est\032\026.google.protobuf.Empty\"\007\332A\004name\022T\n\t", + "GetBucket\022#.google.storage.v2.GetBucketR" + + "equest\032\031.google.storage.v2.Bucket\"\007\332A\004na" + + "me\022m\n\014CreateBucket\022&.google.storage.v2.C" + + "reateBucketRequest\032\031.google.storage.v2.B" + + "ucket\"\032\332A\027parent,bucket,bucket_id\022g\n\013Lis" + + "tBuckets\022%.google.storage.v2.ListBuckets" + + "Request\032&.google.storage.v2.ListBucketsR" + + "esponse\"\t\332A\006parent\022v\n\031LockBucketRetentio" + + "nPolicy\0223.google.storage.v2.LockBucketRe" + + "tentionPolicyRequest\032\031.google.storage.v2" + + ".Bucket\"\t\332A\006bucket\022V\n\014GetIamPolicy\022\".goo" + + "gle.iam.v1.GetIamPolicyRequest\032\025.google." + + "iam.v1.Policy\"\013\332A\010resource\022]\n\014SetIamPoli" + + "cy\022\".google.iam.v1.SetIamPolicyRequest\032\025" + + ".google.iam.v1.Policy\"\022\332A\017resource,polic" + + "y\022\202\001\n\022TestIamPermissions\022(.google.iam.v1" + + ".TestIamPermissionsRequest\032).google.iam." + + "v1.TestIamPermissionsResponse\"\027\332A\024resour" + + "ce,permissions\022h\n\014UpdateBucket\022&.google." + + "storage.v2.UpdateBucketRequest\032\031.google." + + "storage.v2.Bucket\"\025\332A\022bucket,update_mask" + + "\022c\n\022DeleteNotification\022,.google.storage." + + "v2.DeleteNotificationRequest\032\026.google.pr" + + "otobuf.Empty\"\007\332A\004name\022f\n\017GetNotification" + + "\022).google.storage.v2.GetNotificationRequ" + + "est\032\037.google.storage.v2.Notification\"\007\332A" + + "\004name\022{\n\022CreateNotification\022,.google.sto" + + "rage.v2.CreateNotificationRequest\032\037.goog" + + "le.storage.v2.Notification\"\026\332A\023parent,no" + + "tification\022y\n\021ListNotifications\022+.google" + + ".storage.v2.ListNotificationsRequest\032,.g" + + "oogle.storage.v2.ListNotificationsRespon" + + "se\"\t\332A\006parent\022U\n\rComposeObject\022\'.google." + + "storage.v2.ComposeObjectRequest\032\031.google" + + ".storage.v2.Object\"\000\022{\n\014DeleteObject\022&.g" + + "oogle.storage.v2.DeleteObjectRequest\032\026.g" + + "oogle.protobuf.Empty\"+\332A\rbucket,object\332A" + + "\030bucket,object,generation\022x\n\tGetObject\022#" + + ".google.storage.v2.GetObjectRequest\032\031.go" + + "ogle.storage.v2.Object\"+\332A\rbucket,object" + + "\332A\030bucket,object,generation\022\210\001\n\nReadObje" + + "ct\022$.google.storage.v2.ReadObjectRequest" + + "\032%.google.storage.v2.ReadObjectResponse\"" + + "+\332A\rbucket,object\332A\030bucket,object,genera" + + "tion0\001\022h\n\014UpdateObject\022&.google.storage." + + "v2.UpdateObjectRequest\032\031.google.storage." + + "v2.Object\"\025\332A\022object,update_mask\022`\n\013Writ" + + "eObject\022%.google.storage.v2.WriteObjectR" + + "equest\032&.google.storage.v2.WriteObjectRe" + + "sponse\"\000(\001\022g\n\013ListObjects\022%.google.stora" + + "ge.v2.ListObjectsRequest\032&.google.storag" + + "e.v2.ListObjectsResponse\"\t\332A\006parent\022^\n\rR" + + "ewriteObject\022\'.google.storage.v2.Rewrite" + + "ObjectRequest\032\".google.storage.v2.Rewrit" + + "eResponse\"\000\022v\n\023StartResumableWrite\022-.goo" + + "gle.storage.v2.StartResumableWriteReques" + + "t\032..google.storage.v2.StartResumableWrit" + + "eResponse\"\000\022y\n\020QueryWriteStatus\022*.google" + + ".storage.v2.QueryWriteStatusRequest\032+.go" + + "ogle.storage.v2.QueryWriteStatusResponse" + + "\"\014\332A\tupload_id\022o\n\021GetServiceAccount\022+.go" + + "ogle.storage.v2.GetServiceAccountRequest" + + "\032!.google.storage.v2.ServiceAccount\"\n\332A\007" + + "project\022\204\001\n\rCreateHmacKey\022\'.google.stora" + + "ge.v2.CreateHmacKeyRequest\032(.google.stor" + + "age.v2.CreateHmacKeyResponse\" \332A\035project" + + ",service_account_email\022f\n\rDeleteHmacKey\022" + + "\'.google.storage.v2.DeleteHmacKeyRequest" + + "\032\026.google.protobuf.Empty\"\024\332A\021access_id,p" + + "roject\022l\n\nGetHmacKey\022$.google.storage.v2" + + ".GetHmacKeyRequest\032\".google.storage.v2.H" + + "macKeyMetadata\"\024\332A\021access_id,project\022k\n\014" + + "ListHmacKeys\022&.google.storage.v2.ListHma" + + "cKeysRequest\032\'.google.storage.v2.ListHma" + + "cKeysResponse\"\n\332A\007project\022u\n\rUpdateHmacK" + + "ey\022\'.google.storage.v2.UpdateHmacKeyRequ" + "est\032\".google.storage.v2.HmacKeyMetadata\"" - + "\024\332A\021access_id,project\022k\n\014ListHmacKeys\022&." - + "google.storage.v2.ListHmacKeysRequest\032\'." - + "google.storage.v2.ListHmacKeysResponse\"\n" - + "\332A\007project\022u\n\rUpdateHmacKey\022\'.google.sto" - + "rage.v2.UpdateHmacKeyRequest\032\".google.st" - + "orage.v2.HmacKeyMetadata\"\027\332A\024hmac_key,up" - + "date_mask\032\247\002\312A\026storage.googleapis.com\322A\212" - + "\002https://www.googleapis.com/auth/cloud-p" - + "latform,https://www.googleapis.com/auth/" - + "cloud-platform.read-only,https://www.goo" - + "gleapis.com/auth/devstorage.full_control" - + ",https://www.googleapis.com/auth/devstor" - + "age.read_only,https://www.googleapis.com" - + "/auth/devstorage.read_writeB\334\001\n\025com.goog" - + "le.storage.v2B\014StorageProtoP\001Z8google.go" - + "lang.org/genproto/googleapis/storage/v2;" - + "storage\352Ax\n!cloudkms.googleapis.com/Cryp" - + "toKey\022Sprojects/{project}/locations/{loc" - + "ation}/keyRings/{key_ring}/cryptoKeys/{c" - + "rypto_key}b\006proto3" + + "\027\332A\024hmac_key,update_mask\032\247\002\312A\026storage.go" + + "ogleapis.com\322A\212\002https://www.googleapis.c" + + "om/auth/cloud-platform,https://www.googl" + + "eapis.com/auth/cloud-platform.read-only," + + "https://www.googleapis.com/auth/devstora" + + "ge.full_control,https://www.googleapis.c" + + "om/auth/devstorage.read_only,https://www" + + ".googleapis.com/auth/devstorage.read_wri" + + "teB\334\001\n\025com.google.storage.v2B\014StoragePro" + + "toP\001Z8google.golang.org/genproto/googlea" + + "pis/storage/v2;storage\352Ax\n!cloudkms.goog" + + "leapis.com/CryptoKey\022Sprojects/{project}" + + "/locations/{location}/keyRings/{key_ring" + + "}/cryptoKeys/{crypto_key}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -1280,6 +1289,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Name", "BucketId", + "Etag", "Project", "Metageneration", "Location", @@ -1303,6 +1313,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "RetentionPolicy", "IamConfig", "SatisfiesPzs", + "CustomPlacementConfig", "Autoclass", }); internal_static_google_storage_v2_Bucket_Billing_descriptor = @@ -1424,8 +1435,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "MainPageSuffix", "NotFoundPage", }); - internal_static_google_storage_v2_Bucket_Autoclass_descriptor = + internal_static_google_storage_v2_Bucket_CustomPlacementConfig_descriptor = internal_static_google_storage_v2_Bucket_descriptor.getNestedTypes().get(9); + internal_static_google_storage_v2_Bucket_CustomPlacementConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_storage_v2_Bucket_CustomPlacementConfig_descriptor, + new java.lang.String[] { + "DataLocations", + }); + internal_static_google_storage_v2_Bucket_Autoclass_descriptor = + internal_static_google_storage_v2_Bucket_descriptor.getNestedTypes().get(10); internal_static_google_storage_v2_Bucket_Autoclass_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_storage_v2_Bucket_Autoclass_descriptor, @@ -1433,7 +1452,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Enabled", "ToggleTime", }); internal_static_google_storage_v2_Bucket_LabelsEntry_descriptor = - internal_static_google_storage_v2_Bucket_descriptor.getNestedTypes().get(10); + internal_static_google_storage_v2_Bucket_descriptor.getNestedTypes().get(11); internal_static_google_storage_v2_Bucket_LabelsEntry_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_storage_v2_Bucket_LabelsEntry_descriptor, @@ -1446,7 +1465,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_storage_v2_BucketAccessControl_descriptor, new java.lang.String[] { - "Role", "Id", "Entity", "EntityId", "Email", "Domain", "ProjectTeam", + "Role", "Id", "Entity", "EntityId", "Etag", "Email", "Domain", "ProjectTeam", }); internal_static_google_storage_v2_ChecksummedData_descriptor = getDescriptor().getMessageTypes().get(40); @@ -1477,6 +1496,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "State", "CreateTime", "UpdateTime", + "Etag", }); internal_static_google_storage_v2_Notification_descriptor = getDescriptor().getMessageTypes().get(43); @@ -1486,6 +1506,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Name", "Topic", + "Etag", "EventTypes", "CustomAttributes", "ObjectNamePrefix", @@ -1514,6 +1535,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Name", "Bucket", + "Etag", "Generation", "Metageneration", "StorageClass", @@ -1554,7 +1576,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_storage_v2_ObjectAccessControl_descriptor, new java.lang.String[] { - "Role", "Id", "Entity", "EntityId", "Email", "Domain", "ProjectTeam", + "Role", "Id", "Entity", "EntityId", "Etag", "Email", "Domain", "ProjectTeam", }); internal_static_google_storage_v2_ListObjectsResponse_descriptor = getDescriptor().getMessageTypes().get(47); diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/UpdateObjectRequest.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/UpdateObjectRequest.java index 379c7f2ce2..2c9b05ce59 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/UpdateObjectRequest.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/UpdateObjectRequest.java @@ -194,7 +194,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * The object's bucket and name fields are used to identify the object to * update. If present, the object's generation field selects a specific * revision of this object whose metadata should be updated. Otherwise, - * assumes the current, live version of the object. + * assumes the live version of the object. *
* * .google.storage.v2.Object object = 1; @@ -213,7 +213,7 @@ public boolean hasObject() { * The object's bucket and name fields are used to identify the object to * update. If present, the object's generation field selects a specific * revision of this object whose metadata should be updated. Otherwise, - * assumes the current, live version of the object. + * assumes the live version of the object. *
* * .google.storage.v2.Object object = 1; @@ -232,7 +232,7 @@ public com.google.storage.v2.Object getObject() { * The object's bucket and name fields are used to identify the object to * update. If present, the object's generation field selects a specific * revision of this object whose metadata should be updated. Otherwise, - * assumes the current, live version of the object. + * assumes the live version of the object. *
* * .google.storage.v2.Object object = 1; @@ -285,7 +285,7 @@ public long getIfGenerationMatch() { * * *
-   * Makes the operation conditional on whether the object's current generation
+   * Makes the operation conditional on whether the object's live generation
    * does not match the given value. If no live object exists, the precondition
    * fails. Setting to 0 makes the operation succeed only if there is a live
    * version of the object.
@@ -303,7 +303,7 @@ public boolean hasIfGenerationNotMatch() {
    *
    *
    * 
-   * Makes the operation conditional on whether the object's current generation
+   * Makes the operation conditional on whether the object's live generation
    * does not match the given value. If no live object exists, the precondition
    * fails. Setting to 0 makes the operation succeed only if there is a live
    * version of the object.
@@ -1071,7 +1071,7 @@ public Builder mergeFrom(
      * The object's bucket and name fields are used to identify the object to
      * update. If present, the object's generation field selects a specific
      * revision of this object whose metadata should be updated. Otherwise,
-     * assumes the current, live version of the object.
+     * assumes the live version of the object.
      * 
* * .google.storage.v2.Object object = 1; @@ -1089,7 +1089,7 @@ public boolean hasObject() { * The object's bucket and name fields are used to identify the object to * update. If present, the object's generation field selects a specific * revision of this object whose metadata should be updated. Otherwise, - * assumes the current, live version of the object. + * assumes the live version of the object. *
* * .google.storage.v2.Object object = 1; @@ -1111,7 +1111,7 @@ public com.google.storage.v2.Object getObject() { * The object's bucket and name fields are used to identify the object to * update. If present, the object's generation field selects a specific * revision of this object whose metadata should be updated. Otherwise, - * assumes the current, live version of the object. + * assumes the live version of the object. *
* * .google.storage.v2.Object object = 1; @@ -1137,7 +1137,7 @@ public Builder setObject(com.google.storage.v2.Object value) { * The object's bucket and name fields are used to identify the object to * update. If present, the object's generation field selects a specific * revision of this object whose metadata should be updated. Otherwise, - * assumes the current, live version of the object. + * assumes the live version of the object. *
* * .google.storage.v2.Object object = 1; @@ -1160,7 +1160,7 @@ public Builder setObject(com.google.storage.v2.Object.Builder builderForValue) { * The object's bucket and name fields are used to identify the object to * update. If present, the object's generation field selects a specific * revision of this object whose metadata should be updated. Otherwise, - * assumes the current, live version of the object. + * assumes the live version of the object. *
* * .google.storage.v2.Object object = 1; @@ -1188,7 +1188,7 @@ public Builder mergeObject(com.google.storage.v2.Object value) { * The object's bucket and name fields are used to identify the object to * update. If present, the object's generation field selects a specific * revision of this object whose metadata should be updated. Otherwise, - * assumes the current, live version of the object. + * assumes the live version of the object. *
* * .google.storage.v2.Object object = 1; @@ -1212,7 +1212,7 @@ public Builder clearObject() { * The object's bucket and name fields are used to identify the object to * update. If present, the object's generation field selects a specific * revision of this object whose metadata should be updated. Otherwise, - * assumes the current, live version of the object. + * assumes the live version of the object. *
* * .google.storage.v2.Object object = 1; @@ -1230,7 +1230,7 @@ public com.google.storage.v2.Object.Builder getObjectBuilder() { * The object's bucket and name fields are used to identify the object to * update. If present, the object's generation field selects a specific * revision of this object whose metadata should be updated. Otherwise, - * assumes the current, live version of the object. + * assumes the live version of the object. *
* * .google.storage.v2.Object object = 1; @@ -1250,7 +1250,7 @@ public com.google.storage.v2.ObjectOrBuilder getObjectOrBuilder() { * The object's bucket and name fields are used to identify the object to * update. If present, the object's generation field selects a specific * revision of this object whose metadata should be updated. Otherwise, - * assumes the current, live version of the object. + * assumes the live version of the object. *
* * .google.storage.v2.Object object = 1; @@ -1352,7 +1352,7 @@ public Builder clearIfGenerationMatch() { * * *
-     * Makes the operation conditional on whether the object's current generation
+     * Makes the operation conditional on whether the object's live generation
      * does not match the given value. If no live object exists, the precondition
      * fails. Setting to 0 makes the operation succeed only if there is a live
      * version of the object.
@@ -1370,7 +1370,7 @@ public boolean hasIfGenerationNotMatch() {
      *
      *
      * 
-     * Makes the operation conditional on whether the object's current generation
+     * Makes the operation conditional on whether the object's live generation
      * does not match the given value. If no live object exists, the precondition
      * fails. Setting to 0 makes the operation succeed only if there is a live
      * version of the object.
@@ -1388,7 +1388,7 @@ public long getIfGenerationNotMatch() {
      *
      *
      * 
-     * Makes the operation conditional on whether the object's current generation
+     * Makes the operation conditional on whether the object's live generation
      * does not match the given value. If no live object exists, the precondition
      * fails. Setting to 0 makes the operation succeed only if there is a live
      * version of the object.
@@ -1409,7 +1409,7 @@ public Builder setIfGenerationNotMatch(long value) {
      *
      *
      * 
-     * Makes the operation conditional on whether the object's current generation
+     * Makes the operation conditional on whether the object's live generation
      * does not match the given value. If no live object exists, the precondition
      * fails. Setting to 0 makes the operation succeed only if there is a live
      * version of the object.
diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/UpdateObjectRequestOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/UpdateObjectRequestOrBuilder.java
index b3ddf39586..2c599632d5 100644
--- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/UpdateObjectRequestOrBuilder.java
+++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/UpdateObjectRequestOrBuilder.java
@@ -31,7 +31,7 @@ public interface UpdateObjectRequestOrBuilder
    * The object's bucket and name fields are used to identify the object to
    * update. If present, the object's generation field selects a specific
    * revision of this object whose metadata should be updated. Otherwise,
-   * assumes the current, live version of the object.
+   * assumes the live version of the object.
    * 
* * .google.storage.v2.Object object = 1; @@ -47,7 +47,7 @@ public interface UpdateObjectRequestOrBuilder * The object's bucket and name fields are used to identify the object to * update. If present, the object's generation field selects a specific * revision of this object whose metadata should be updated. Otherwise, - * assumes the current, live version of the object. + * assumes the live version of the object. *
* * .google.storage.v2.Object object = 1; @@ -63,7 +63,7 @@ public interface UpdateObjectRequestOrBuilder * The object's bucket and name fields are used to identify the object to * update. If present, the object's generation field selects a specific * revision of this object whose metadata should be updated. Otherwise, - * assumes the current, live version of the object. + * assumes the live version of the object. *
* * .google.storage.v2.Object object = 1; @@ -103,7 +103,7 @@ public interface UpdateObjectRequestOrBuilder * * *
-   * Makes the operation conditional on whether the object's current generation
+   * Makes the operation conditional on whether the object's live generation
    * does not match the given value. If no live object exists, the precondition
    * fails. Setting to 0 makes the operation succeed only if there is a live
    * version of the object.
@@ -118,7 +118,7 @@ public interface UpdateObjectRequestOrBuilder
    *
    *
    * 
-   * Makes the operation conditional on whether the object's current generation
+   * Makes the operation conditional on whether the object's live generation
    * does not match the given value. If no live object exists, the precondition
    * fails. Setting to 0 makes the operation succeed only if there is a live
    * version of the object.
diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/WriteObjectSpec.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/WriteObjectSpec.java
index 39dcad3349..0081affc55 100644
--- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/WriteObjectSpec.java
+++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/WriteObjectSpec.java
@@ -296,7 +296,7 @@ public long getIfGenerationMatch() {
    *
    *
    * 
-   * Makes the operation conditional on whether the object's current
+   * Makes the operation conditional on whether the object's live
    * generation does not match the given value. If no live object exists, the
    * precondition fails. Setting to 0 makes the operation succeed only if
    * there is a live version of the object.
@@ -314,7 +314,7 @@ public boolean hasIfGenerationNotMatch() {
    *
    *
    * 
-   * Makes the operation conditional on whether the object's current
+   * Makes the operation conditional on whether the object's live
    * generation does not match the given value. If no live object exists, the
    * precondition fails. Setting to 0 makes the operation succeed only if
    * there is a live version of the object.
@@ -1213,7 +1213,7 @@ public Builder clearIfGenerationMatch() {
      *
      *
      * 
-     * Makes the operation conditional on whether the object's current
+     * Makes the operation conditional on whether the object's live
      * generation does not match the given value. If no live object exists, the
      * precondition fails. Setting to 0 makes the operation succeed only if
      * there is a live version of the object.
@@ -1231,7 +1231,7 @@ public boolean hasIfGenerationNotMatch() {
      *
      *
      * 
-     * Makes the operation conditional on whether the object's current
+     * Makes the operation conditional on whether the object's live
      * generation does not match the given value. If no live object exists, the
      * precondition fails. Setting to 0 makes the operation succeed only if
      * there is a live version of the object.
@@ -1249,7 +1249,7 @@ public long getIfGenerationNotMatch() {
      *
      *
      * 
-     * Makes the operation conditional on whether the object's current
+     * Makes the operation conditional on whether the object's live
      * generation does not match the given value. If no live object exists, the
      * precondition fails. Setting to 0 makes the operation succeed only if
      * there is a live version of the object.
@@ -1270,7 +1270,7 @@ public Builder setIfGenerationNotMatch(long value) {
      *
      *
      * 
-     * Makes the operation conditional on whether the object's current
+     * Makes the operation conditional on whether the object's live
      * generation does not match the given value. If no live object exists, the
      * precondition fails. Setting to 0 makes the operation succeed only if
      * there is a live version of the object.
diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/WriteObjectSpecOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/WriteObjectSpecOrBuilder.java
index 9683cca941..1b455397d1 100644
--- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/WriteObjectSpecOrBuilder.java
+++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/WriteObjectSpecOrBuilder.java
@@ -120,7 +120,7 @@ public interface WriteObjectSpecOrBuilder
    *
    *
    * 
-   * Makes the operation conditional on whether the object's current
+   * Makes the operation conditional on whether the object's live
    * generation does not match the given value. If no live object exists, the
    * precondition fails. Setting to 0 makes the operation succeed only if
    * there is a live version of the object.
@@ -135,7 +135,7 @@ public interface WriteObjectSpecOrBuilder
    *
    *
    * 
-   * Makes the operation conditional on whether the object's current
+   * Makes the operation conditional on whether the object's live
    * generation does not match the given value. If no live object exists, the
    * precondition fails. Setting to 0 makes the operation succeed only if
    * there is a live version of the object.
diff --git a/proto-google-cloud-storage-v2/src/main/proto/google/storage/v2/storage.proto b/proto-google-cloud-storage-v2/src/main/proto/google/storage/v2/storage.proto
index 00131376c6..4b0fb49aad 100644
--- a/proto-google-cloud-storage-v2/src/main/proto/google/storage/v2/storage.proto
+++ b/proto-google-cloud-storage-v2/src/main/proto/google/storage/v2/storage.proto
@@ -175,13 +175,37 @@ service Storage {
   // true, or else it is an error.
   //
   // For a resumable write, the client should instead call
-  // `StartResumableWrite()` and provide that method an `WriteObjectSpec.`
+  // `StartResumableWrite()`, populating a `WriteObjectSpec` into that request.
   // They should then attach the returned `upload_id` to the first message of
-  // each following call to `Create`. If there is an error or the connection is
-  // broken during the resumable `Create()`, the client should check the status
-  // of the `Create()` by calling `QueryWriteStatus()` and continue writing from
-  // the returned `persisted_size`. This may be less than the amount of data the
-  // client previously sent.
+  // each following call to `WriteObject`. If the stream is closed before
+  // finishing the upload (either explicitly by the client or due to a network
+  // error or an error response from the server), the client should do as
+  // follows:
+  //   - Check the result Status of the stream, to determine if writing can be
+  //     resumed on this stream or must be restarted from scratch (by calling
+  //     `StartResumableWrite()`). The resumable errors are DEADLINE_EXCEEDED,
+  //     INTERNAL, and UNAVAILABLE. For each case, the client should use binary
+  //     exponential backoff before retrying.  Additionally, writes can be
+  //     resumed after RESOURCE_EXHAUSTED errors, but only after taking
+  //     appropriate measures, which may include reducing aggregate send rate
+  //     across clients and/or requesting a quota increase for your project.
+  //   - If the call to `WriteObject` returns `ABORTED`, that indicates
+  //     concurrent attempts to update the resumable write, caused either by
+  //     multiple racing clients or by a single client where the previous
+  //     request was timed out on the client side but nonetheless reached the
+  //     server. In this case the client should take steps to prevent further
+  //     concurrent writes (e.g., increase the timeouts, stop using more than
+  //     one process to perform the upload, etc.), and then should follow the
+  //     steps below for resuming the upload.
+  //   - For resumable errors, the client should call `QueryWriteStatus()` and
+  //     then continue writing from the returned `persisted_size`. This may be
+  //     less than the amount of data the client previously sent. Note also that
+  //     it is acceptable to send data starting at an offset earlier than the
+  //     returned `persisted_size`; in this case, the service will skip data at
+  //     offsets that were already persisted (without checking that it matches
+  //     the previously written data), and write only the data starting from the
+  //     persisted offset. This behavior can make client-side handling simpler
+  //     in some cases.
   //
   // The service will not view the object as complete until the client has
   // sent a `WriteObjectRequest` with `finish_write` set to `true`. Sending any
@@ -189,6 +213,10 @@ service Storage {
   // `true` will cause an error. The client **should** check the response it
   // receives to determine how much data the service was able to commit and
   // whether the service views the object as complete.
+  //
+  // Attempting to resume an already finalized object will result in an OK
+  // status, with a WriteObjectResponse containing the finalized object's
+  // metadata.
   rpc WriteObject(stream WriteObjectRequest) returns (WriteObjectResponse) {
   }
 
@@ -472,7 +500,8 @@ message ListNotificationsRequest {
 
   // The maximum number of notifications to return. The service may return fewer
   // than this value.
-  // The maximum value is 100; values above 100 will be coerced to 100.
+  // The default value is 100. Specifying a value above 100 will result in a
+  // page_size of 100.
   int32 page_size = 2;
 
   // A page token, received from a previous `ListNotifications` call.
@@ -571,7 +600,7 @@ message DeleteObjectRequest {
   // there are no live versions of the object.
   optional int64 if_generation_match = 5;
 
-  // Makes the operation conditional on whether the object's current generation
+  // Makes the operation conditional on whether the object's live generation
   // does not match the given value. If no live object exists, the precondition
   // fails. Setting to 0 makes the operation succeed only if there is a live
   // version of the object.
@@ -608,8 +637,8 @@ message ReadObjectRequest {
   // back from the end of the object to be returned. For example, if an object's
   // length is 15 bytes, a ReadObjectRequest with `read_offset` = -5 and
   // `read_limit` = 3 would return bytes 10 through 12 of the object. Requesting
-  // a negative offset whose magnitude is larger than the size of the object
-  // will result in an error.
+  // a negative offset with magnitude larger than the size of the object will
+  // return the entire object.
   int64 read_offset = 4;
 
   // The maximum number of `data` bytes the server is allowed to return in the
@@ -626,7 +655,7 @@ message ReadObjectRequest {
   // there are no live versions of the object.
   optional int64 if_generation_match = 6;
 
-  // Makes the operation conditional on whether the object's current generation
+  // Makes the operation conditional on whether the object's live generation
   // does not match the given value. If no live object exists, the precondition
   // fails. Setting to 0 makes the operation succeed only if there is a live
   // version of the object.
@@ -668,7 +697,7 @@ message GetObjectRequest {
   // there are no live versions of the object.
   optional int64 if_generation_match = 4;
 
-  // Makes the operation conditional on whether the object's current generation
+  // Makes the operation conditional on whether the object's live generation
   // does not match the given value. If no live object exists, the precondition
   // fails. Setting to 0 makes the operation succeed only if there is a live
   // version of the object.
@@ -730,7 +759,7 @@ message WriteObjectSpec {
   // succeed only if there are no live versions of the object.
   optional int64 if_generation_match = 3;
 
-  // Makes the operation conditional on whether the object's current
+  // Makes the operation conditional on whether the object's live
   // generation does not match the given value. If no live object exists, the
   // precondition fails. Setting to 0 makes the operation succeed only if
   // there is a live version of the object.
@@ -970,7 +999,7 @@ message RewriteObjectRequest {
   // there are no live versions of the object.
   optional int64 if_generation_match = 7;
 
-  // Makes the operation conditional on whether the object's current generation
+  // Makes the operation conditional on whether the object's live generation
   // does not match the given value. If no live object exists, the precondition
   // fails. Setting to 0 makes the operation succeed only if there is a live
   // version of the object.
@@ -984,11 +1013,11 @@ message RewriteObjectRequest {
   // metageneration does not match the given value.
   optional int64 if_metageneration_not_match = 10;
 
-  // Makes the operation conditional on whether the source object's current
+  // Makes the operation conditional on whether the source object's live
   // generation matches the given value.
   optional int64 if_source_generation_match = 11;
 
-  // Makes the operation conditional on whether the source object's current
+  // Makes the operation conditional on whether the source object's live
   // generation does not match the given value.
   optional int64 if_source_generation_not_match = 12;
 
@@ -1073,7 +1102,7 @@ message UpdateObjectRequest {
   // The object's bucket and name fields are used to identify the object to
   // update. If present, the object's generation field selects a specific
   // revision of this object whose metadata should be updated. Otherwise,
-  // assumes the current, live version of the object.
+  // assumes the live version of the object.
   Object object = 1;
 
   // Makes the operation conditional on whether the object's current generation
@@ -1081,7 +1110,7 @@ message UpdateObjectRequest {
   // there are no live versions of the object.
   optional int64 if_generation_match = 2;
 
-  // Makes the operation conditional on whether the object's current generation
+  // Makes the operation conditional on whether the object's live generation
   // does not match the given value. If no live object exists, the precondition
   // fails. Setting to 0 makes the operation succeed only if there is a live
   // version of the object.
@@ -1483,7 +1512,8 @@ message Bucket {
 
   // Logging-related properties of a bucket.
   message Logging {
-    // The destination bucket where the current bucket's logs should be placed.
+    // The destination bucket where the current bucket's logs should be placed,
+    // using path format (like `projects/123456/buckets/foo`).
     string log_bucket = 1;
 
     // A prefix for log object names.
@@ -1532,6 +1562,14 @@ message Bucket {
     string not_found_page = 2;
   }
 
+  // Configuration for Custom Dual Regions.  It should specify precisely two
+  // eligible regions within the same Multiregion. More information on regions
+  // may be found [https://cloud.google.com/storage/docs/locations][here].
+  message CustomPlacementConfig {
+    // List of locations to use for data placement.
+    repeated string data_locations = 1;
+  }
+
   // Configuration for a bucket's Autoclass feature.
   message Autoclass {
     // Enables Autoclass.
@@ -1552,6 +1590,11 @@ message Bucket {
   // name" of other Cloud Storage APIs. Example: "pub".
   string bucket_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
 
+  // The etag of the bucket.
+  // If included in the metadata of an UpdateBucketRequest, the operation will
+  // only be performed if the etag matches that of the bucket.
+  string etag = 29;
+
   // Immutable. The project which owns this bucket.
   string project = 3 [
     (google.api.field_behavior) = IMMUTABLE,
@@ -1677,6 +1720,10 @@ message Bucket {
   // Reserved for future use.
   bool satisfies_pzs = 25;
 
+  // Configuration that, if present, specifies the data placement for a Custom
+  // Dual Region.
+  CustomPlacementConfig custom_placement_config = 26;
+
   // The bucket's Autoclass configuration. If there is no configuration, the
   // Autoclass feature will be disabled and have no effect on the bucket.
   Autoclass autoclass = 28;
@@ -1710,6 +1757,12 @@ message BucketAccessControl {
   // The ID for the entity, if any.
   string entity_id = 4;
 
+  // The etag of the BucketAccessControl.
+  // If included in the metadata of an update or delete request message, the
+  // operation operation will only be performed if the etag matches that of the
+  // bucket's BucketAccessControl.
+  string etag = 8;
+
   // The email address associated with the entity, if any.
   string email = 5;
 
@@ -1772,6 +1825,9 @@ message HmacKeyMetadata {
 
   // The last modification time of the HMAC key metadata.
   google.protobuf.Timestamp update_time = 7;
+
+  // The etag of the HMAC key.
+  string etag = 8;
 }
 
 // A directive to publish Pub/Sub notifications upon changes to a bucket.
@@ -1791,6 +1847,11 @@ message Notification {
   // '//pubsub.googleapis.com/projects/{project-identifier}/topics/{my-topic}'
   string topic = 2 [(google.api.field_behavior) = REQUIRED];
 
+  // The etag of the Notification.
+  // If included in the metadata of GetNotificationRequest, the operation will
+  // only be performed if the etag matches that of the Notification.
+  string etag = 7;
+
   // Optional. If present, only send notifications about listed event types. If empty,
   // sent notifications for all event types.
   repeated string event_types = 3 [(google.api.field_behavior) = OPTIONAL];
@@ -1837,6 +1898,12 @@ message Object {
     }
   ];
 
+  // The etag of the object.
+  // If included in the metadata of an update or delete request message, the
+  // operation will only be performed if the etag matches that of the live
+  // object.
+  string etag = 27;
+
   // Immutable. The content generation of this object. Used for object versioning.
   // Attempting to set or update this field will result in a
   // [FieldViolation][google.rpc.BadRequest.FieldViolation].
@@ -1998,6 +2065,12 @@ message ObjectAccessControl {
   // The ID for the entity, if any.
   string entity_id = 4;
 
+  // The etag of the ObjectAccessControl.
+  // If included in the metadata of an update or delete request message, the
+  // operation will only be performed if the etag matches that of the live
+  // object's ObjectAccessControl.
+  string etag = 8;
+
   // The email address associated with the entity, if any.
   string email = 5;
 

From d42c5704e4fe7341dfdd0562fa0bdbcd4bc99c7e Mon Sep 17 00:00:00 2001
From: WhiteSource Renovate 
Date: Wed, 22 Jun 2022 00:40:17 +0200
Subject: [PATCH 04/10] deps: update dependency
 org.graalvm.buildtools:junit-platform-native to v0.9.12 (#1463)

---
 samples/native-image-sample/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/samples/native-image-sample/pom.xml b/samples/native-image-sample/pom.xml
index 40711930f3..2a1c383e87 100644
--- a/samples/native-image-sample/pom.xml
+++ b/samples/native-image-sample/pom.xml
@@ -120,7 +120,7 @@
         
           org.graalvm.buildtools
           junit-platform-native
-          0.9.11
+          0.9.12
           test
         
       

From 2f35a4f597870a4506119946510ba82fbb7f9449 Mon Sep 17 00:00:00 2001
From: WhiteSource Renovate 
Date: Wed, 22 Jun 2022 02:06:19 +0200
Subject: [PATCH 05/10] deps: update dependency
 org.graalvm.buildtools:native-maven-plugin to v0.9.12 (#1464)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [org.graalvm.buildtools:native-maven-plugin](https://togithub.com/graalvm/native-build-tools) | `0.9.11` -> `0.9.12` | [![age](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:native-maven-plugin/0.9.12/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:native-maven-plugin/0.9.12/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:native-maven-plugin/0.9.12/compatibility-slim/0.9.11)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:native-maven-plugin/0.9.12/confidence-slim/0.9.11)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

graalvm/native-build-tools ### [`v0.9.12`](https://togithub.com/graalvm/native-build-tools/releases/tag/0.9.12) [Compare Source](https://togithub.com/graalvm/native-build-tools/compare/0.9.11...0.9.12) #### What's Changed Read what's new in the [documentation](https://graalvm.github.io/native-build-tools/latest/index.html#changelog). - Add Mockito / Byte Buddy support documentation by [@​lazar-mitrovic](https://togithub.com/lazar-mitrovic) in [https://github.com/graalvm/native-build-tools/pull/236](https://togithub.com/graalvm/native-build-tools/pull/236) - Prevent builds from failing if no test list is present by [@​lazar-mitrovic](https://togithub.com/lazar-mitrovic) in [https://github.com/graalvm/native-build-tools/pull/239](https://togithub.com/graalvm/native-build-tools/pull/239) - Support different agent modes in the native-image Gradle plugin by [@​gradinac](https://togithub.com/gradinac) in [https://github.com/graalvm/native-build-tools/pull/230](https://togithub.com/graalvm/native-build-tools/pull/230) - JVM Reachability Metadata support for Maven by [@​alvarosanchez](https://togithub.com/alvarosanchez) in [https://github.com/graalvm/native-build-tools/pull/240](https://togithub.com/graalvm/native-build-tools/pull/240) - Warn about deprecated agent DSL by [@​gradinac](https://togithub.com/gradinac) in [https://github.com/graalvm/native-build-tools/pull/242](https://togithub.com/graalvm/native-build-tools/pull/242) - Rework Maven plugin by [@​lazar-mitrovic](https://togithub.com/lazar-mitrovic) in [https://github.com/graalvm/native-build-tools/pull/247](https://togithub.com/graalvm/native-build-tools/pull/247) - Add Gradle rich output support, configure default metadata URL on Maven by [@​lazar-mitrovic](https://togithub.com/lazar-mitrovic) in [https://github.com/graalvm/native-build-tools/pull/249](https://togithub.com/graalvm/native-build-tools/pull/249) - Fix wrong scope for test dependencies by [@​melix](https://togithub.com/melix) in [https://github.com/graalvm/native-build-tools/pull/251](https://togithub.com/graalvm/native-build-tools/pull/251) - Add documentation for alternative build systems. by [@​gradinac](https://togithub.com/gradinac) in [https://github.com/graalvm/native-build-tools/pull/248](https://togithub.com/graalvm/native-build-tools/pull/248) **Full Changelog**: https://github.com/graalvm/native-build-tools/compare/0.9.11...0.9.12
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-storage). --- samples/native-image-sample/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/native-image-sample/pom.xml b/samples/native-image-sample/pom.xml index 2a1c383e87..b7880c3166 100644 --- a/samples/native-image-sample/pom.xml +++ b/samples/native-image-sample/pom.xml @@ -141,7 +141,7 @@ org.graalvm.buildtools native-maven-plugin - 0.9.11 + 0.9.12 true com.example.storage.NativeImageStorageSample From 1a817fef87e626e74dab47eaff33c1d9d3c56bb5 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 23 Jun 2022 17:36:25 +0200 Subject: [PATCH 06/10] deps: update dependency com.google.cloud:google-cloud-shared-dependencies to v2.13.0 (#1468) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-dependencies](https://togithub.com/googleapis/java-shared-dependencies) | `2.12.0` -> `2.13.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.13.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.13.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.13.0/compatibility-slim/2.12.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.13.0/confidence-slim/2.12.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-shared-dependencies ### [`v2.13.0`](https://togithub.com/googleapis/java-shared-dependencies/blob/HEAD/CHANGELOG.md#​2130-httpsgithubcomgoogleapisjava-shared-dependenciescomparev2120v2130-2022-06-22) [Compare Source](https://togithub.com/googleapis/java-shared-dependencies/compare/v2.12.0...v2.13.0) ##### Dependencies - update dependency com.google.api-client:google-api-client-bom to v1.35.0 ([#​709](https://togithub.com/googleapis/java-shared-dependencies/issues/709)) ([239f8c3](https://togithub.com/googleapis/java-shared-dependencies/commit/239f8c33a11e233e6af79aee8c7e68cd156a0554)) - update dependency com.google.api-client:google-api-client-bom to v1.35.1 ([#​713](https://togithub.com/googleapis/java-shared-dependencies/issues/713)) ([6559b45](https://togithub.com/googleapis/java-shared-dependencies/commit/6559b45b027dba783a9525d35e32183d78773cbe)) - update dependency com.google.api:api-common to v2.2.1 ([#​710](https://togithub.com/googleapis/java-shared-dependencies/issues/710)) ([650d4c5](https://togithub.com/googleapis/java-shared-dependencies/commit/650d4c5f8c3cfce711257d47280ad773cd2e2414)) - update dependency com.google.errorprone:error_prone_annotations to v2.14.0 ([#​701](https://togithub.com/googleapis/java-shared-dependencies/issues/701)) ([d24730f](https://togithub.com/googleapis/java-shared-dependencies/commit/d24730f78669f80b109e590b903446e5552e3e36)) - update dependency com.google.http-client:google-http-client-bom to v1.42.0 ([#​711](https://togithub.com/googleapis/java-shared-dependencies/issues/711)) ([5168a18](https://togithub.com/googleapis/java-shared-dependencies/commit/5168a181722128d434a0d0d2ab5cc485686bbc78)) - update dependency com.google.oauth-client:google-oauth-client-bom to v1.34.0 ([#​708](https://togithub.com/googleapis/java-shared-dependencies/issues/708)) ([620336e](https://togithub.com/googleapis/java-shared-dependencies/commit/620336e6733e2017116e5e8a7b403b183a728bc1)) - update dependency com.google.oauth-client:google-oauth-client-bom to v1.34.1 ([#​712](https://togithub.com/googleapis/java-shared-dependencies/issues/712)) ([a2c18a5](https://togithub.com/googleapis/java-shared-dependencies/commit/a2c18a5bc4152cc9034cec691a29f54a35c38a51)) - update dependency com.google.protobuf:protobuf-bom to v3.21.0 ([#​703](https://togithub.com/googleapis/java-shared-dependencies/issues/703)) ([5f9fe12](https://togithub.com/googleapis/java-shared-dependencies/commit/5f9fe1200b4bdf4c54bf947c21bd3ed02f26f990)) - update dependency com.google.protobuf:protobuf-bom to v3.21.1 ([#​705](https://togithub.com/googleapis/java-shared-dependencies/issues/705)) ([c68edfb](https://togithub.com/googleapis/java-shared-dependencies/commit/c68edfbe7e1993e1112640b867b29aa2fbcf7579)) - update dependency io.grpc:grpc-bom to v1.47.0 ([#​707](https://togithub.com/googleapis/java-shared-dependencies/issues/707)) ([d02918a](https://togithub.com/googleapis/java-shared-dependencies/commit/d02918a0418cd65d1d247f27afb0637f1f8f5666)) - update dependency org.checkerframework:checker-qual to v3.22.1 ([#​706](https://togithub.com/googleapis/java-shared-dependencies/issues/706)) ([545843b](https://togithub.com/googleapis/java-shared-dependencies/commit/545843b492cead230b8cc72a1dae7d4922f33b39)) - update dependency org.checkerframework:checker-qual to v3.22.2 ([#​717](https://togithub.com/googleapis/java-shared-dependencies/issues/717)) ([142852a](https://togithub.com/googleapis/java-shared-dependencies/commit/142852a37140f221197f5c71aed451def353b1e0)) - update gax.version to v2.18.2 ([#​718](https://togithub.com/googleapis/java-shared-dependencies/issues/718)) ([5f8156e](https://togithub.com/googleapis/java-shared-dependencies/commit/5f8156e55c6a07b018a8c5efafa68be781b4288b)) - update google.common-protos.version to v2.9.0 ([#​714](https://togithub.com/googleapis/java-shared-dependencies/issues/714)) ([9e5591e](https://togithub.com/googleapis/java-shared-dependencies/commit/9e5591ec3035350450ecbfebd00e08216433b06c)) - update google.core.version to v2.8.0 ([#​719](https://togithub.com/googleapis/java-shared-dependencies/issues/719)) ([4023c60](https://togithub.com/googleapis/java-shared-dependencies/commit/4023c6063a2c5b5308da531df1a08c90c491965d)) - update iam.version to v1.4.0 ([#​700](https://togithub.com/googleapis/java-shared-dependencies/issues/700)) ([c1097a4](https://togithub.com/googleapis/java-shared-dependencies/commit/c1097a46ab0739b0b7234bc510e4c3d9ce2c2861)) - update iam.version to v1.4.1 ([#​716](https://togithub.com/googleapis/java-shared-dependencies/issues/716)) ([e2dc7c2](https://togithub.com/googleapis/java-shared-dependencies/commit/e2dc7c21c39e007878841e2664d548ec44a72d54))
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-storage). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b0710be532..84c5bb13c6 100644 --- a/pom.xml +++ b/pom.xml @@ -54,7 +54,7 @@ UTF-8 github google-cloud-storage-parent - 2.12.0 + 2.13.0 From ceb7fa665c35f6b00aebaa665246597b9ee4632a Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 24 Jun 2022 17:00:25 +0200 Subject: [PATCH 07/10] deps: update kms.version to v0.96.3 (#1471) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.api.grpc:proto-google-cloud-kms-v1](https://togithub.com/googleapis/java-kms) | `0.96.2` -> `0.96.3` | [![age](https://badges.renovateapi.com/packages/maven/com.google.api.grpc:proto-google-cloud-kms-v1/0.96.3/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.api.grpc:proto-google-cloud-kms-v1/0.96.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.api.grpc:proto-google-cloud-kms-v1/0.96.3/compatibility-slim/0.96.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.api.grpc:proto-google-cloud-kms-v1/0.96.3/confidence-slim/0.96.2)](https://docs.renovatebot.com/merge-confidence/) | | [com.google.api.grpc:grpc-google-cloud-kms-v1](https://togithub.com/googleapis/java-kms) | `0.96.2` -> `0.96.3` | [![age](https://badges.renovateapi.com/packages/maven/com.google.api.grpc:grpc-google-cloud-kms-v1/0.96.3/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.api.grpc:grpc-google-cloud-kms-v1/0.96.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.api.grpc:grpc-google-cloud-kms-v1/0.96.3/compatibility-slim/0.96.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.api.grpc:grpc-google-cloud-kms-v1/0.96.3/confidence-slim/0.96.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-storage). --- google-cloud-storage/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google-cloud-storage/pom.xml b/google-cloud-storage/pom.xml index cd5bab11eb..9abc39cc6b 100644 --- a/google-cloud-storage/pom.xml +++ b/google-cloud-storage/pom.xml @@ -16,7 +16,7 @@ google-cloud-storage - 0.96.2 + 0.96.3 From cfb6fd8c1f13cb2115e5ff7ea7af41a9e27986b1 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 24 Jun 2022 13:54:46 -0400 Subject: [PATCH 08/10] feat: Enable REST transport for most of Java and Go clients (#1469) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Enable REST transport for most of Java and Go clients PiperOrigin-RevId: 456641589 Source-Link: https://github.com/googleapis/googleapis/commit/8a251f5225b789b2383207ffd978f6aa3d77fcf7 Source-Link: https://github.com/googleapis/googleapis-gen/commit/4ca52a529cf01308d9714950edffbea3560cfbdb Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNGNhNTJhNTI5Y2YwMTMwOGQ5NzE0OTUwZWRmZmJlYTM1NjBjZmJkYiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore: fix deps Co-authored-by: Owl Bot Co-authored-by: Neenu1995 --- gapic-google-cloud-storage-v2/pom.xml | 10 + .../com/google/storage/v2/StorageClient.java | 14 ++ .../google/storage/v2/StorageSettings.java | 23 +- .../stub/HttpJsonStorageCallableFactory.java | 105 ++++++++ .../storage/v2/stub/HttpJsonStorageStub.java | 128 ++++++++++ .../storage/v2/stub/StorageStubSettings.java | 52 +++- .../storage/v2/StorageClientHttpJsonTest.java | 237 ++++++++++++++++++ 7 files changed, 564 insertions(+), 5 deletions(-) create mode 100644 gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/stub/HttpJsonStorageCallableFactory.java create mode 100644 gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/stub/HttpJsonStorageStub.java create mode 100644 gapic-google-cloud-storage-v2/src/test/java/com/google/storage/v2/StorageClientHttpJsonTest.java diff --git a/gapic-google-cloud-storage-v2/pom.xml b/gapic-google-cloud-storage-v2/pom.xml index bf8b8b997e..f9475c87de 100644 --- a/gapic-google-cloud-storage-v2/pom.xml +++ b/gapic-google-cloud-storage-v2/pom.xml @@ -62,6 +62,10 @@ com.google.api gax-grpc + + com.google.api + gax-httpjson + com.google.guava guava @@ -77,6 +81,12 @@ testlib test + + com.google.api + gax-httpjson + testlib + test + diff --git a/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageClient.java b/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageClient.java index a34219f9f5..3200f505cd 100644 --- a/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageClient.java +++ b/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageClient.java @@ -119,6 +119,20 @@ * StorageClient storageClient = StorageClient.create(storageSettings); * }
* + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * StorageSettings storageSettings =
+ *     StorageSettings.newBuilder()
+ *         .setTransportChannelProvider(
+ *             StorageSettings.defaultHttpJsonTransportProviderBuilder().build())
+ *         .build();
+ * StorageClient storageClient = StorageClient.create(storageSettings);
+ * }
+ * *

Please refer to the GitHub repository's samples for more quickstart code snippets. */ @Generated("by gapic-generator-java") diff --git a/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageSettings.java b/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageSettings.java index a2fd7fb6aa..3800fce4b4 100644 --- a/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageSettings.java +++ b/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageSettings.java @@ -26,6 +26,7 @@ import com.google.api.gax.core.GoogleCredentialsProvider; import com.google.api.gax.core.InstantiatingExecutorProvider; import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; import com.google.api.gax.rpc.ApiClientHeaderProvider; import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.ClientSettings; @@ -259,11 +260,18 @@ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilde return StorageStubSettings.defaultCredentialsProviderBuilder(); } - /** Returns a builder for the default ChannelProvider for this service. */ + /** Returns a builder for the default gRPC ChannelProvider for this service. */ public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { return StorageStubSettings.defaultGrpcTransportProviderBuilder(); } + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return StorageStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + public static TransportChannelProvider defaultTransportChannelProvider() { return StorageStubSettings.defaultTransportChannelProvider(); } @@ -273,11 +281,17 @@ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuil return StorageStubSettings.defaultApiClientHeaderProviderBuilder(); } - /** Returns a new builder for this class. */ + /** Returns a new gRPC builder for this class. */ public static Builder newBuilder() { return Builder.createDefault(); } + /** Returns a new REST builder for this class. */ + @BetaApi + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + /** Returns a new builder for this class. */ public static Builder newBuilder(ClientContext clientContext) { return new Builder(clientContext); @@ -315,6 +329,11 @@ private static Builder createDefault() { return new Builder(StorageStubSettings.newBuilder()); } + @BetaApi + private static Builder createHttpJsonDefault() { + return new Builder(StorageStubSettings.newHttpJsonBuilder()); + } + public StorageStubSettings.Builder getStubSettingsBuilder() { return ((StorageStubSettings.Builder) getStubSettings()); } diff --git a/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/stub/HttpJsonStorageCallableFactory.java b/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/stub/HttpJsonStorageCallableFactory.java new file mode 100644 index 0000000000..320b57f4ce --- /dev/null +++ b/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/stub/HttpJsonStorageCallableFactory.java @@ -0,0 +1,105 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.storage.v2.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the Storage service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +@BetaApi +public class HttpJsonStorageCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/stub/HttpJsonStorageStub.java b/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/stub/HttpJsonStorageStub.java new file mode 100644 index 0000000000..5c9f6f729d --- /dev/null +++ b/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/stub/HttpJsonStorageStub.java @@ -0,0 +1,128 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.storage.v2.stub; + +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the Storage service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +@BetaApi +public class HttpJsonStorageStub extends StorageStub { + private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); + + private final BackgroundResource backgroundResources; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonStorageStub create(StorageStubSettings settings) throws IOException { + return new HttpJsonStorageStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonStorageStub create(ClientContext clientContext) throws IOException { + return new HttpJsonStorageStub(StorageStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonStorageStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonStorageStub( + StorageStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonStorageStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected HttpJsonStorageStub(StorageStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new HttpJsonStorageCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonStorageStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected HttpJsonStorageStub( + StorageStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + return methodDescriptors; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/stub/StorageStubSettings.java b/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/stub/StorageStubSettings.java index e2ab998b19..78d8bae919 100644 --- a/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/stub/StorageStubSettings.java +++ b/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/stub/StorageStubSettings.java @@ -30,6 +30,9 @@ import com.google.api.gax.grpc.GaxGrpcProperties; import com.google.api.gax.grpc.GrpcTransportChannel; import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; import com.google.api.gax.retrying.RetrySettings; import com.google.api.gax.rpc.ApiCallContext; import com.google.api.gax.rpc.ApiClientHeaderProvider; @@ -571,6 +574,11 @@ public StorageStub createStub() throws IOException { .equals(GrpcTransportChannel.getGrpcTransportName())) { return GrpcStorageStub.create(this); } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonStorageStub.create(this); + } throw new UnsupportedOperationException( String.format( "Transport not supported: %s", getTransportChannelProvider().getTransportName())); @@ -603,29 +611,54 @@ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilde .setUseJwtAccessWithScope(true); } - /** Returns a builder for the default ChannelProvider for this service. */ + /** Returns a builder for the default gRPC ChannelProvider for this service. */ public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { return InstantiatingGrpcChannelProvider.newBuilder() .setMaxInboundMessageSize(Integer.MAX_VALUE); } + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + public static TransportChannelProvider defaultTransportChannelProvider() { return defaultGrpcTransportProviderBuilder().build(); } @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { return ApiClientHeaderProvider.newBuilder() .setGeneratedLibToken("gapic", GaxProperties.getLibraryVersion(StorageStubSettings.class)) .setTransportToken( GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); } - /** Returns a new builder for this class. */ + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken("gapic", GaxProperties.getLibraryVersion(StorageStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return StorageStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ public static Builder newBuilder() { return Builder.createDefault(); } + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + /** Returns a new builder for this class. */ public static Builder newBuilder(ClientContext clientContext) { return new Builder(clientContext); @@ -902,6 +935,19 @@ private static Builder createDefault() { return initDefaults(builder); } + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + private static Builder initDefaults(Builder builder) { builder .deleteBucketSettings() diff --git a/gapic-google-cloud-storage-v2/src/test/java/com/google/storage/v2/StorageClientHttpJsonTest.java b/gapic-google-cloud-storage-v2/src/test/java/com/google/storage/v2/StorageClientHttpJsonTest.java new file mode 100644 index 0000000000..8ccc5a0f46 --- /dev/null +++ b/gapic-google-cloud-storage-v2/src/test/java/com/google/storage/v2/StorageClientHttpJsonTest.java @@ -0,0 +1,237 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.storage.v2; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.storage.v2.stub.HttpJsonStorageStub; +import java.io.IOException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class StorageClientHttpJsonTest { + private static MockHttpService mockService; + private static StorageClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonStorageStub.getMethodDescriptors(), StorageSettings.getDefaultEndpoint()); + StorageSettings settings = + StorageSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + StorageSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = StorageClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void deleteBucketUnsupportedMethodTest() throws Exception { + // The deleteBucket() method is not supported in REST transport. + // This empty test is generated for technical reasons. + } + + @Test + public void getBucketUnsupportedMethodTest() throws Exception { + // The getBucket() method is not supported in REST transport. + // This empty test is generated for technical reasons. + } + + @Test + public void createBucketUnsupportedMethodTest() throws Exception { + // The createBucket() method is not supported in REST transport. + // This empty test is generated for technical reasons. + } + + @Test + public void listBucketsUnsupportedMethodTest() throws Exception { + // The listBuckets() method is not supported in REST transport. + // This empty test is generated for technical reasons. + } + + @Test + public void lockBucketRetentionPolicyUnsupportedMethodTest() throws Exception { + // The lockBucketRetentionPolicy() method is not supported in REST transport. + // This empty test is generated for technical reasons. + } + + @Test + public void getIamPolicyUnsupportedMethodTest() throws Exception { + // The getIamPolicy() method is not supported in REST transport. + // This empty test is generated for technical reasons. + } + + @Test + public void setIamPolicyUnsupportedMethodTest() throws Exception { + // The setIamPolicy() method is not supported in REST transport. + // This empty test is generated for technical reasons. + } + + @Test + public void testIamPermissionsUnsupportedMethodTest() throws Exception { + // The testIamPermissions() method is not supported in REST transport. + // This empty test is generated for technical reasons. + } + + @Test + public void updateBucketUnsupportedMethodTest() throws Exception { + // The updateBucket() method is not supported in REST transport. + // This empty test is generated for technical reasons. + } + + @Test + public void deleteNotificationUnsupportedMethodTest() throws Exception { + // The deleteNotification() method is not supported in REST transport. + // This empty test is generated for technical reasons. + } + + @Test + public void getNotificationUnsupportedMethodTest() throws Exception { + // The getNotification() method is not supported in REST transport. + // This empty test is generated for technical reasons. + } + + @Test + public void createNotificationUnsupportedMethodTest() throws Exception { + // The createNotification() method is not supported in REST transport. + // This empty test is generated for technical reasons. + } + + @Test + public void listNotificationsUnsupportedMethodTest() throws Exception { + // The listNotifications() method is not supported in REST transport. + // This empty test is generated for technical reasons. + } + + @Test + public void composeObjectUnsupportedMethodTest() throws Exception { + // The composeObject() method is not supported in REST transport. + // This empty test is generated for technical reasons. + } + + @Test + public void deleteObjectUnsupportedMethodTest() throws Exception { + // The deleteObject() method is not supported in REST transport. + // This empty test is generated for technical reasons. + } + + @Test + public void getObjectUnsupportedMethodTest() throws Exception { + // The getObject() method is not supported in REST transport. + // This empty test is generated for technical reasons. + } + + @Test + public void readObjectUnsupportedMethodTest() throws Exception { + // The readObject() method is not supported in REST transport. + // This empty test is generated for technical reasons. + } + + @Test + public void updateObjectUnsupportedMethodTest() throws Exception { + // The updateObject() method is not supported in REST transport. + // This empty test is generated for technical reasons. + } + + @Test + public void writeObjectUnsupportedMethodTest() throws Exception { + // The writeObject() method is not supported in REST transport. + // This empty test is generated for technical reasons. + } + + @Test + public void listObjectsUnsupportedMethodTest() throws Exception { + // The listObjects() method is not supported in REST transport. + // This empty test is generated for technical reasons. + } + + @Test + public void rewriteObjectUnsupportedMethodTest() throws Exception { + // The rewriteObject() method is not supported in REST transport. + // This empty test is generated for technical reasons. + } + + @Test + public void startResumableWriteUnsupportedMethodTest() throws Exception { + // The startResumableWrite() method is not supported in REST transport. + // This empty test is generated for technical reasons. + } + + @Test + public void queryWriteStatusUnsupportedMethodTest() throws Exception { + // The queryWriteStatus() method is not supported in REST transport. + // This empty test is generated for technical reasons. + } + + @Test + public void getServiceAccountUnsupportedMethodTest() throws Exception { + // The getServiceAccount() method is not supported in REST transport. + // This empty test is generated for technical reasons. + } + + @Test + public void createHmacKeyUnsupportedMethodTest() throws Exception { + // The createHmacKey() method is not supported in REST transport. + // This empty test is generated for technical reasons. + } + + @Test + public void deleteHmacKeyUnsupportedMethodTest() throws Exception { + // The deleteHmacKey() method is not supported in REST transport. + // This empty test is generated for technical reasons. + } + + @Test + public void getHmacKeyUnsupportedMethodTest() throws Exception { + // The getHmacKey() method is not supported in REST transport. + // This empty test is generated for technical reasons. + } + + @Test + public void listHmacKeysUnsupportedMethodTest() throws Exception { + // The listHmacKeys() method is not supported in REST transport. + // This empty test is generated for technical reasons. + } + + @Test + public void updateHmacKeyUnsupportedMethodTest() throws Exception { + // The updateHmacKey() method is not supported in REST transport. + // This empty test is generated for technical reasons. + } +} From dbcf6d5ab1194acce8466f99d0fef49f15a78da8 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 27 Jun 2022 13:36:20 -0400 Subject: [PATCH 09/10] chore: update dependencies for regapic (#1467) (#1473) * chore: update dependencies for regapic * add more dependencies and trigger comment * update goldens * fix indentation * remove duplicate gax-httpjson dependency * remove duplicated dependencies Source-Link: https://github.com/googleapis/synthtool/commit/fa54eb2a78c6ee48613fd33152e2130e949dcbd9 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:1ec28a46062b19135b11178ceee60231e5f5a92dab454e23ae0aab72cd875906 Co-authored-by: Owl Bot --- .github/.OwlBot.lock.yaml | 4 ++-- .kokoro/common.sh | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index a79f06271b..f0625e4d94 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:2567a120ce90fadb6201999b87d649d9f67459de28815ad239bce9ebfaa18a74 -# created: 2022-05-19T15:12:45.278246753Z + digest: sha256:1ec28a46062b19135b11178ceee60231e5f5a92dab454e23ae0aab72cd875906 +# created: 2022-06-27T15:01:06.405564326Z diff --git a/.kokoro/common.sh b/.kokoro/common.sh index ace89f45a9..f8f957af11 100644 --- a/.kokoro/common.sh +++ b/.kokoro/common.sh @@ -55,4 +55,6 @@ function retry_with_backoff { ## Helper functionss function now() { date +"%Y-%m-%d %H:%M:%S" | tr -d '\n'; } function msg() { println "$*" >&2; } -function println() { printf '%s\n' "$(now) $*"; } \ No newline at end of file +function println() { printf '%s\n' "$(now) $*"; } + +## Helper comment to trigger updated repo dependency release \ No newline at end of file From 04f46fc6b4a1722a1eff927ea0465346cdfb1260 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 29 Jun 2022 11:42:32 -0400 Subject: [PATCH 10/10] chore(main): release 2.9.0 (#1459) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- CHANGELOG.md | 20 ++++++++++++++++++++ gapic-google-cloud-storage-v2/pom.xml | 4 ++-- google-cloud-storage/pom.xml | 4 ++-- grpc-google-cloud-storage-v2/pom.xml | 4 ++-- pom.xml | 10 +++++----- proto-google-cloud-storage-v2/pom.xml | 4 ++-- samples/snapshot/pom.xml | 2 +- versions.txt | 8 ++++---- 8 files changed, 38 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9146ecb154..ecb6b6c5ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,25 @@ # Changelog +## [2.9.0](https://github.com/googleapis/java-storage/compare/v2.8.1...v2.9.0) (2022-06-27) + + +### Features + +* Enable REST transport for most of Java and Go clients ([#1469](https://github.com/googleapis/java-storage/issues/1469)) ([cfb6fd8](https://github.com/googleapis/java-storage/commit/cfb6fd8c1f13cb2115e5ff7ea7af41a9e27986b1)) + + +### Documentation + +* Clarified how clients should work with resumable uploads ([#1457](https://github.com/googleapis/java-storage/issues/1457)) ([15baa27](https://github.com/googleapis/java-storage/commit/15baa27c97aacca115981f5c14d942a8ddd6cb1f)) + + +### Dependencies + +* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.13.0 ([#1468](https://github.com/googleapis/java-storage/issues/1468)) ([1a817fe](https://github.com/googleapis/java-storage/commit/1a817fef87e626e74dab47eaff33c1d9d3c56bb5)) +* update dependency org.graalvm.buildtools:junit-platform-native to v0.9.12 ([#1463](https://github.com/googleapis/java-storage/issues/1463)) ([d42c570](https://github.com/googleapis/java-storage/commit/d42c5704e4fe7341dfdd0562fa0bdbcd4bc99c7e)) +* update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.12 ([#1464](https://github.com/googleapis/java-storage/issues/1464)) ([2f35a4f](https://github.com/googleapis/java-storage/commit/2f35a4f597870a4506119946510ba82fbb7f9449)) +* update kms.version to v0.96.3 ([#1471](https://github.com/googleapis/java-storage/issues/1471)) ([ceb7fa6](https://github.com/googleapis/java-storage/commit/ceb7fa665c35f6b00aebaa665246597b9ee4632a)) + ## [2.8.1](https://github.com/googleapis/java-storage/compare/v2.8.0...v2.8.1) (2022-06-13) diff --git a/gapic-google-cloud-storage-v2/pom.xml b/gapic-google-cloud-storage-v2/pom.xml index f9475c87de..f0c0c9cef5 100644 --- a/gapic-google-cloud-storage-v2/pom.xml +++ b/gapic-google-cloud-storage-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc gapic-google-cloud-storage-v2 - 2.8.2-alpha-SNAPSHOT + 2.9.0-alpha gapic-google-cloud-storage-v2 GRPC library for gapic-google-cloud-storage-v2 com.google.cloud google-cloud-storage-parent - 2.8.2-SNAPSHOT + 2.9.0 diff --git a/google-cloud-storage/pom.xml b/google-cloud-storage/pom.xml index 9abc39cc6b..3e4c229f93 100644 --- a/google-cloud-storage/pom.xml +++ b/google-cloud-storage/pom.xml @@ -2,7 +2,7 @@ 4.0.0 google-cloud-storage - 2.8.2-SNAPSHOT + 2.9.0 jar Google Cloud Storage https://github.com/googleapis/java-storage @@ -12,7 +12,7 @@ com.google.cloud google-cloud-storage-parent - 2.8.2-SNAPSHOT + 2.9.0 google-cloud-storage diff --git a/grpc-google-cloud-storage-v2/pom.xml b/grpc-google-cloud-storage-v2/pom.xml index 1268b17b45..47c27488b1 100644 --- a/grpc-google-cloud-storage-v2/pom.xml +++ b/grpc-google-cloud-storage-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-storage-v2 - 2.8.2-alpha-SNAPSHOT + 2.9.0-alpha grpc-google-cloud-storage-v2 GRPC library for grpc-google-cloud-storage-v2 com.google.cloud google-cloud-storage-parent - 2.8.2-SNAPSHOT + 2.9.0 diff --git a/pom.xml b/pom.xml index 84c5bb13c6..6e7fd2b477 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-storage-parent pom - 2.8.2-SNAPSHOT + 2.9.0 Storage Parent https://github.com/googleapis/java-storage @@ -70,7 +70,7 @@ com.google.cloud google-cloud-storage - 2.8.2-SNAPSHOT + 2.9.0 com.google.apis @@ -111,17 +111,17 @@ com.google.api.grpc proto-google-cloud-storage-v2 - 2.8.2-alpha-SNAPSHOT + 2.9.0-alpha com.google.api.grpc grpc-google-cloud-storage-v2 - 2.8.2-alpha-SNAPSHOT + 2.9.0-alpha com.google.api.grpc gapic-google-cloud-storage-v2 - 2.8.2-alpha-SNAPSHOT + 2.9.0-alpha com.google.cloud diff --git a/proto-google-cloud-storage-v2/pom.xml b/proto-google-cloud-storage-v2/pom.xml index f50b9451ec..3d76cec7a6 100644 --- a/proto-google-cloud-storage-v2/pom.xml +++ b/proto-google-cloud-storage-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-storage-v2 - 2.8.2-alpha-SNAPSHOT + 2.9.0-alpha proto-google-cloud-storage-v2 PROTO library for proto-google-cloud-storage-v2 com.google.cloud google-cloud-storage-parent - 2.8.2-SNAPSHOT + 2.9.0 diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index ad28c305f3..52820ec296 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-storage - 2.8.2-SNAPSHOT + 2.9.0 diff --git a/versions.txt b/versions.txt index 396aedaa5f..d0173afbc7 100644 --- a/versions.txt +++ b/versions.txt @@ -1,7 +1,7 @@ # Format: # module:released-version:current-version -google-cloud-storage:2.8.1:2.8.2-SNAPSHOT -gapic-google-cloud-storage-v2:2.8.1-alpha:2.8.2-alpha-SNAPSHOT -grpc-google-cloud-storage-v2:2.8.1-alpha:2.8.2-alpha-SNAPSHOT -proto-google-cloud-storage-v2:2.8.1-alpha:2.8.2-alpha-SNAPSHOT +google-cloud-storage:2.9.0:2.9.0 +gapic-google-cloud-storage-v2:2.9.0-alpha:2.9.0-alpha +grpc-google-cloud-storage-v2:2.9.0-alpha:2.9.0-alpha +proto-google-cloud-storage-v2:2.9.0-alpha:2.9.0-alpha