From 56a640dc7d2cbea69b0c740633bda5a0257aa3c6 Mon Sep 17 00:00:00 2001 From: cloud-java-bot Date: Sat, 12 Oct 2024 02:21:31 +0000 Subject: [PATCH 01/18] chore: Update generation configuration at Sat Oct 12 02:21:22 UTC 2024 --- generation_config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generation_config.yaml b/generation_config.yaml index a4582e554..2d40bd0a6 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,5 +1,5 @@ gapic_generator_version: 2.47.0 -googleapis_commitish: de509e38d37a2a9d8b95e1ce78831189f4f3c0f4 +googleapis_commitish: 7a0dc39843032039878e26add4fed272a2c36807 libraries_bom_version: 26.48.0 libraries: - api_shortname: storage From bc44579cd9f59e0c46fc796e2bd15f0bd0f2c04b Mon Sep 17 00:00:00 2001 From: cloud-java-bot Date: Sat, 12 Oct 2024 02:24:39 +0000 Subject: [PATCH 02/18] chore: generate libraries at Sat Oct 12 02:21:49 UTC 2024 --- .../example/storage/managedfolders/CreateManagedFolderTest.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/samples/snippets/src/test/java/com/example/storage/managedfolders/CreateManagedFolderTest.java b/samples/snippets/src/test/java/com/example/storage/managedfolders/CreateManagedFolderTest.java index 3743abe44..ea266a84f 100644 --- a/samples/snippets/src/test/java/com/example/storage/managedfolders/CreateManagedFolderTest.java +++ b/samples/snippets/src/test/java/com/example/storage/managedfolders/CreateManagedFolderTest.java @@ -26,8 +26,6 @@ import com.google.cloud.storage.it.BucketCleaner; import com.google.cloud.storage.testing.RemoteStorageHelper; import com.google.cloud.testing.junit4.StdOutCaptureRule; -import com.google.storage.control.v2.DeleteManagedFolderRequest; -import com.google.storage.control.v2.ManagedFolderName; import com.google.storage.control.v2.StorageControlClient; import java.io.IOException; import java.util.UUID; From 74a4a0e856b8a45544f2d8fd93da22b6d3603093 Mon Sep 17 00:00:00 2001 From: cloud-java-bot Date: Sun, 13 Oct 2024 02:25:44 +0000 Subject: [PATCH 03/18] chore: Update generation configuration at Sun Oct 13 02:25:35 UTC 2024 --- generation_config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generation_config.yaml b/generation_config.yaml index 2d40bd0a6..c08b532e4 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,5 +1,5 @@ gapic_generator_version: 2.47.0 -googleapis_commitish: 7a0dc39843032039878e26add4fed272a2c36807 +googleapis_commitish: a26064a9cc78d4518b8a9fd2ea78891edad4d87d libraries_bom_version: 26.48.0 libraries: - api_shortname: storage From ec492dc7d245a54999a003c0da050a161d012f26 Mon Sep 17 00:00:00 2001 From: cloud-java-bot Date: Tue, 15 Oct 2024 02:24:31 +0000 Subject: [PATCH 04/18] chore: Update generation configuration at Tue Oct 15 02:24:23 UTC 2024 --- generation_config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generation_config.yaml b/generation_config.yaml index c08b532e4..3c2e00a00 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,5 +1,5 @@ gapic_generator_version: 2.47.0 -googleapis_commitish: a26064a9cc78d4518b8a9fd2ea78891edad4d87d +googleapis_commitish: f78cd2f7943b9a2eb9734e56a8f3428da75917e2 libraries_bom_version: 26.48.0 libraries: - api_shortname: storage From d551e51eff40a1c440964295e2bac70c620cac4f Mon Sep 17 00:00:00 2001 From: cloud-java-bot Date: Wed, 16 Oct 2024 02:24:57 +0000 Subject: [PATCH 05/18] chore: Update generation configuration at Wed Oct 16 02:24:47 UTC 2024 --- generation_config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generation_config.yaml b/generation_config.yaml index 3c2e00a00..c12d7306a 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,5 +1,5 @@ gapic_generator_version: 2.47.0 -googleapis_commitish: f78cd2f7943b9a2eb9734e56a8f3428da75917e2 +googleapis_commitish: d10780874de182326e198aaf25f575bdb88d0d2f libraries_bom_version: 26.48.0 libraries: - api_shortname: storage From 57950f5f8b29a7955d772758eaa60985f3af731b Mon Sep 17 00:00:00 2001 From: cloud-java-bot Date: Wed, 16 Oct 2024 02:27:58 +0000 Subject: [PATCH 06/18] chore: generate libraries at Wed Oct 16 02:25:15 UTC 2024 --- .../com/google/storage/v2/StorageClient.java | 4 + .../google/storage/v2/StorageClientTest.java | 8 + .../google/storage/v2/GetObjectRequest.java | 210 ++++ .../storage/v2/GetObjectRequestOrBuilder.java | 33 + .../java/com/google/storage/v2/Object.java | 765 +++++++----- .../google/storage/v2/ObjectOrBuilder.java | 43 + .../storage/v2/RestoreObjectRequest.java | 278 ++++- .../v2/RestoreObjectRequestOrBuilder.java | 33 + .../com/google/storage/v2/StorageProto.java | 1044 +++++++++-------- .../proto/google/storage/v2/storage.proto | 22 + 10 files changed, 1622 insertions(+), 818 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 a10a3f611..2f7aa14b0 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 @@ -2312,6 +2312,7 @@ public final Object restoreObject(String bucket, String object, long generation) * .setBucket(BucketName.of("[PROJECT]", "[BUCKET]").toString()) * .setObject("object-1023368385") * .setGeneration(305703192) + * .setRestoreToken("restoreToken1638686731") * .setIfGenerationMatch(-1086241088) * .setIfGenerationNotMatch(1475720404) * .setIfMetagenerationMatch(1043427781) @@ -2348,6 +2349,7 @@ public final Object restoreObject(RestoreObjectRequest request) { * .setBucket(BucketName.of("[PROJECT]", "[BUCKET]").toString()) * .setObject("object-1023368385") * .setGeneration(305703192) + * .setRestoreToken("restoreToken1638686731") * .setIfGenerationMatch(-1086241088) * .setIfGenerationNotMatch(1475720404) * .setIfMetagenerationMatch(1043427781) @@ -2620,6 +2622,7 @@ public final Object getObject(String bucket, String object, long generation) { * .setIfMetagenerationNotMatch(1025430873) * .setCommonObjectRequestParams(CommonObjectRequestParams.newBuilder().build()) * .setReadMask(FieldMask.newBuilder().build()) + * .setRestoreToken("restoreToken1638686731") * .build(); * Object response = storageClient.getObject(request); * } @@ -2657,6 +2660,7 @@ public final Object getObject(GetObjectRequest request) { * .setIfMetagenerationNotMatch(1025430873) * .setCommonObjectRequestParams(CommonObjectRequestParams.newBuilder().build()) * .setReadMask(FieldMask.newBuilder().build()) + * .setRestoreToken("restoreToken1638686731") * .build(); * ApiFuture future = storageClient.getObjectCallable().futureCall(request); * // Do something. 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 c2818f044..632f50829 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 @@ -1006,6 +1006,7 @@ public void composeObjectTest() throws Exception { .setBucket(BucketName.of("[PROJECT]", "[BUCKET]").toString()) .setEtag("etag3123477") .setGeneration(305703192) + .setRestoreToken("restoreToken1638686731") .setMetageneration(1048558813) .setStorageClass("storageClass871353277") .setSize(3530753) @@ -1262,6 +1263,7 @@ public void restoreObjectTest() throws Exception { .setBucket(BucketName.of("[PROJECT]", "[BUCKET]").toString()) .setEtag("etag3123477") .setGeneration(305703192) + .setRestoreToken("restoreToken1638686731") .setMetageneration(1048558813) .setStorageClass("storageClass871353277") .setSize(3530753) @@ -1336,6 +1338,7 @@ public void restoreObjectTest2() throws Exception { .setBucket(BucketName.of("[PROJECT]", "[BUCKET]").toString()) .setEtag("etag3123477") .setGeneration(305703192) + .setRestoreToken("restoreToken1638686731") .setMetageneration(1048558813) .setStorageClass("storageClass871353277") .setSize(3530753) @@ -1447,6 +1450,7 @@ public void getObjectTest() throws Exception { .setBucket(BucketName.of("[PROJECT]", "[BUCKET]").toString()) .setEtag("etag3123477") .setGeneration(305703192) + .setRestoreToken("restoreToken1638686731") .setMetageneration(1048558813) .setStorageClass("storageClass871353277") .setSize(3530753) @@ -1518,6 +1522,7 @@ public void getObjectTest2() throws Exception { .setBucket(BucketName.of("[PROJECT]", "[BUCKET]").toString()) .setEtag("etag3123477") .setGeneration(305703192) + .setRestoreToken("restoreToken1638686731") .setMetageneration(1048558813) .setStorageClass("storageClass871353277") .setSize(3530753) @@ -1589,6 +1594,7 @@ public void getObjectTest3() throws Exception { .setBucket(BucketName.of("[PROJECT]", "[BUCKET]").toString()) .setEtag("etag3123477") .setGeneration(305703192) + .setRestoreToken("restoreToken1638686731") .setMetageneration(1048558813) .setStorageClass("storageClass871353277") .setSize(3530753) @@ -1663,6 +1669,7 @@ public void getObjectTest4() throws Exception { .setBucket(BucketName.of("[PROJECT]", "[BUCKET]").toString()) .setEtag("etag3123477") .setGeneration(305703192) + .setRestoreToken("restoreToken1638686731") .setMetageneration(1048558813) .setStorageClass("storageClass871353277") .setSize(3530753) @@ -1808,6 +1815,7 @@ public void updateObjectTest() throws Exception { .setBucket(BucketName.of("[PROJECT]", "[BUCKET]").toString()) .setEtag("etag3123477") .setGeneration(305703192) + .setRestoreToken("restoreToken1638686731") .setMetageneration(1048558813) .setStorageClass("storageClass871353277") .setSize(3530753) 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 927adb243..02295dd46 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 @@ -41,6 +41,7 @@ private GetObjectRequest(com.google.protobuf.GeneratedMessageV3.Builder build private GetObjectRequest() { bucket_ = ""; object_ = ""; + restoreToken_ = ""; } @java.lang.Override @@ -475,6 +476,65 @@ public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; } + public static final int RESTORE_TOKEN_FIELD_NUMBER = 12; + + @SuppressWarnings("serial") + private volatile java.lang.Object restoreToken_ = ""; + /** + * + * + *
+   * Optional. Restore token used to differentiate soft-deleted objects with the
+   * same name and generation. Only applicable for hierarchical namespace
+   * buckets and if soft_deleted is set to true. This parameter is optional, and
+   * is only required in the rare case when there are multiple soft-deleted
+   * objects with the same name and generation.
+   * 
+ * + * string restore_token = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The restoreToken. + */ + @java.lang.Override + public java.lang.String getRestoreToken() { + java.lang.Object ref = restoreToken_; + 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(); + restoreToken_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Restore token used to differentiate soft-deleted objects with the
+   * same name and generation. Only applicable for hierarchical namespace
+   * buckets and if soft_deleted is set to true. This parameter is optional, and
+   * is only required in the rare case when there are multiple soft-deleted
+   * objects with the same name and generation.
+   * 
+ * + * string restore_token = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for restoreToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRestoreTokenBytes() { + java.lang.Object ref = restoreToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + restoreToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -519,6 +579,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeBool(11, softDeleted_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(restoreToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 12, restoreToken_); + } getUnknownFields().writeTo(output); } @@ -560,6 +623,9 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(11, softDeleted_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(restoreToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, restoreToken_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -607,6 +673,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReadMask()) { if (!getReadMask().equals(other.getReadMask())) return false; } + if (!getRestoreToken().equals(other.getRestoreToken())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -652,6 +719,8 @@ public int hashCode() { hash = (37 * hash) + READ_MASK_FIELD_NUMBER; hash = (53 * hash) + getReadMask().hashCode(); } + hash = (37 * hash) + RESTORE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getRestoreToken().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -819,6 +888,7 @@ public Builder clear() { readMaskBuilder_.dispose(); readMaskBuilder_ = null; } + restoreToken_ = ""; return this; } @@ -896,6 +966,9 @@ private void buildPartial0(com.google.storage.v2.GetObjectRequest result) { result.readMask_ = readMaskBuilder_ == null ? readMask_ : readMaskBuilder_.build(); to_bitField0_ |= 0x00000040; } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.restoreToken_ = restoreToken_; + } result.bitField0_ |= to_bitField0_; } @@ -978,6 +1051,11 @@ public Builder mergeFrom(com.google.storage.v2.GetObjectRequest other) { if (other.hasReadMask()) { mergeReadMask(other.getReadMask()); } + if (!other.getRestoreToken().isEmpty()) { + restoreToken_ = other.restoreToken_; + bitField0_ |= 0x00000400; + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1065,6 +1143,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000008; break; } // case 88 + case 98: + { + restoreToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 98 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -2129,6 +2213,132 @@ public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { return readMaskBuilder_; } + private java.lang.Object restoreToken_ = ""; + /** + * + * + *
+     * Optional. Restore token used to differentiate soft-deleted objects with the
+     * same name and generation. Only applicable for hierarchical namespace
+     * buckets and if soft_deleted is set to true. This parameter is optional, and
+     * is only required in the rare case when there are multiple soft-deleted
+     * objects with the same name and generation.
+     * 
+ * + * string restore_token = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The restoreToken. + */ + public java.lang.String getRestoreToken() { + java.lang.Object ref = restoreToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + restoreToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Restore token used to differentiate soft-deleted objects with the
+     * same name and generation. Only applicable for hierarchical namespace
+     * buckets and if soft_deleted is set to true. This parameter is optional, and
+     * is only required in the rare case when there are multiple soft-deleted
+     * objects with the same name and generation.
+     * 
+ * + * string restore_token = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for restoreToken. + */ + public com.google.protobuf.ByteString getRestoreTokenBytes() { + java.lang.Object ref = restoreToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + restoreToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Restore token used to differentiate soft-deleted objects with the
+     * same name and generation. Only applicable for hierarchical namespace
+     * buckets and if soft_deleted is set to true. This parameter is optional, and
+     * is only required in the rare case when there are multiple soft-deleted
+     * objects with the same name and generation.
+     * 
+ * + * string restore_token = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The restoreToken to set. + * @return This builder for chaining. + */ + public Builder setRestoreToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + restoreToken_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Restore token used to differentiate soft-deleted objects with the
+     * same name and generation. Only applicable for hierarchical namespace
+     * buckets and if soft_deleted is set to true. This parameter is optional, and
+     * is only required in the rare case when there are multiple soft-deleted
+     * objects with the same name and generation.
+     * 
+ * + * string restore_token = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRestoreToken() { + restoreToken_ = getDefaultInstance().getRestoreToken(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Restore token used to differentiate soft-deleted objects with the
+     * same name and generation. Only applicable for hierarchical namespace
+     * buckets and if soft_deleted is set to true. This parameter is optional, and
+     * is only required in the rare case when there are multiple soft-deleted
+     * objects with the same name and generation.
+     * 
+ * + * string restore_token = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for restoreToken to set. + * @return This builder for chaining. + */ + public Builder setRestoreTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + restoreToken_ = value; + bitField0_ |= 0x00000400; + 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/GetObjectRequestOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetObjectRequestOrBuilder.java index 593247706..9ab4ce921 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 @@ -309,4 +309,37 @@ public interface GetObjectRequestOrBuilder * optional .google.protobuf.FieldMask read_mask = 10; */ com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder(); + + /** + * + * + *
+   * Optional. Restore token used to differentiate soft-deleted objects with the
+   * same name and generation. Only applicable for hierarchical namespace
+   * buckets and if soft_deleted is set to true. This parameter is optional, and
+   * is only required in the rare case when there are multiple soft-deleted
+   * objects with the same name and generation.
+   * 
+ * + * string restore_token = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The restoreToken. + */ + java.lang.String getRestoreToken(); + /** + * + * + *
+   * Optional. Restore token used to differentiate soft-deleted objects with the
+   * same name and generation. Only applicable for hierarchical namespace
+   * buckets and if soft_deleted is set to true. This parameter is optional, and
+   * is only required in the rare case when there are multiple soft-deleted
+   * objects with the same name and generation.
+   * 
+ * + * string restore_token = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for restoreToken. + */ + com.google.protobuf.ByteString getRestoreTokenBytes(); } 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 b20d0a38d..73e9eb52c 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 @@ -42,6 +42,7 @@ private Object() { name_ = ""; bucket_ = ""; etag_ = ""; + restoreToken_ = ""; storageClass_ = ""; contentEncoding_ = ""; contentDisposition_ = ""; @@ -278,6 +279,78 @@ public long getGeneration() { return generation_; } + public static final int RESTORE_TOKEN_FIELD_NUMBER = 35; + + @SuppressWarnings("serial") + private volatile java.lang.Object restoreToken_ = ""; + /** + * + * + *
+   * Output only. Restore token used to differentiate deleted objects with the
+   * same name and generation. This field is output only, and only set for
+   * deleted objects in HNS buckets.
+   * 
+ * + * optional string restore_token = 35 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the restoreToken field is set. + */ + @java.lang.Override + public boolean hasRestoreToken() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Output only. Restore token used to differentiate deleted objects with the
+   * same name and generation. This field is output only, and only set for
+   * deleted objects in HNS buckets.
+   * 
+ * + * optional string restore_token = 35 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The restoreToken. + */ + @java.lang.Override + public java.lang.String getRestoreToken() { + java.lang.Object ref = restoreToken_; + 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(); + restoreToken_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Restore token used to differentiate deleted objects with the
+   * same name and generation. This field is output only, and only set for
+   * deleted objects in HNS buckets.
+   * 
+ * + * optional string restore_token = 35 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for restoreToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRestoreTokenBytes() { + java.lang.Object ref = restoreToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + restoreToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + public static final int METAGENERATION_FIELD_NUMBER = 4; private long metageneration_ = 0L; /** @@ -683,7 +756,7 @@ public com.google.protobuf.ByteString getContentLanguageBytes() { */ @java.lang.Override public boolean hasDeleteTime() { - return ((bitField0_ & 0x00000001) != 0); + return ((bitField0_ & 0x00000002) != 0); } /** * @@ -791,7 +864,7 @@ public com.google.protobuf.ByteString getContentTypeBytes() { */ @java.lang.Override public boolean hasCreateTime() { - return ((bitField0_ & 0x00000002) != 0); + return ((bitField0_ & 0x00000004) != 0); } /** * @@ -864,7 +937,7 @@ public int getComponentCount() { */ @java.lang.Override public boolean hasChecksums() { - return ((bitField0_ & 0x00000004) != 0); + return ((bitField0_ & 0x00000008) != 0); } /** * @@ -932,7 +1005,7 @@ public com.google.storage.v2.ObjectChecksumsOrBuilder getChecksumsOrBuilder() { */ @java.lang.Override public boolean hasUpdateTime() { - return ((bitField0_ & 0x00000008) != 0); + return ((bitField0_ & 0x00000010) != 0); } /** * @@ -1046,7 +1119,7 @@ public com.google.protobuf.ByteString getKmsKeyBytes() { */ @java.lang.Override public boolean hasUpdateStorageClassTime() { - return ((bitField0_ & 0x00000010) != 0); + return ((bitField0_ & 0x00000020) != 0); } /** * @@ -1130,7 +1203,7 @@ public boolean getTemporaryHold() { */ @java.lang.Override public boolean hasRetentionExpireTime() { - return ((bitField0_ & 0x00000020) != 0); + return ((bitField0_ & 0x00000040) != 0); } /** * @@ -1304,7 +1377,7 @@ public java.lang.String getMetadataOrThrow(java.lang.String key) { */ @java.lang.Override public boolean hasEventBasedHold() { - return ((bitField0_ & 0x00000040) != 0); + return ((bitField0_ & 0x00000080) != 0); } /** * @@ -1348,7 +1421,7 @@ public boolean getEventBasedHold() { */ @java.lang.Override public boolean hasOwner() { - return ((bitField0_ & 0x00000080) != 0); + return ((bitField0_ & 0x00000100) != 0); } /** * @@ -1397,7 +1470,7 @@ public com.google.storage.v2.OwnerOrBuilder getOwnerOrBuilder() { */ @java.lang.Override public boolean hasCustomerEncryption() { - return ((bitField0_ & 0x00000100) != 0); + return ((bitField0_ & 0x00000200) != 0); } /** * @@ -1449,7 +1522,7 @@ public com.google.storage.v2.CustomerEncryptionOrBuilder getCustomerEncryptionOr */ @java.lang.Override public boolean hasCustomTime() { - return ((bitField0_ & 0x00000200) != 0); + return ((bitField0_ & 0x00000400) != 0); } /** * @@ -1500,7 +1573,7 @@ public com.google.protobuf.TimestampOrBuilder getCustomTimeOrBuilder() { */ @java.lang.Override public boolean hasSoftDeleteTime() { - return ((bitField0_ & 0x00000400) != 0); + return ((bitField0_ & 0x00000800) != 0); } /** * @@ -1565,7 +1638,7 @@ public com.google.protobuf.TimestampOrBuilder getSoftDeleteTimeOrBuilder() { */ @java.lang.Override public boolean hasHardDeleteTime() { - return ((bitField0_ & 0x00000800) != 0); + return ((bitField0_ & 0x00001000) != 0); } /** * @@ -1657,59 +1730,62 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(contentLanguage_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 11, contentLanguage_); } - if (((bitField0_ & 0x00000001) != 0)) { + if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(12, getDeleteTime()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(contentType_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 13, contentType_); } - if (((bitField0_ & 0x00000002) != 0)) { + if (((bitField0_ & 0x00000004) != 0)) { output.writeMessage(14, getCreateTime()); } if (componentCount_ != 0) { output.writeInt32(15, componentCount_); } - if (((bitField0_ & 0x00000004) != 0)) { + if (((bitField0_ & 0x00000008) != 0)) { output.writeMessage(16, getChecksums()); } - if (((bitField0_ & 0x00000008) != 0)) { + if (((bitField0_ & 0x00000010) != 0)) { output.writeMessage(17, getUpdateTime()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKey_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 18, kmsKey_); } - if (((bitField0_ & 0x00000010) != 0)) { + if (((bitField0_ & 0x00000020) != 0)) { output.writeMessage(19, getUpdateStorageClassTime()); } if (temporaryHold_ != false) { output.writeBool(20, temporaryHold_); } - if (((bitField0_ & 0x00000020) != 0)) { + if (((bitField0_ & 0x00000040) != 0)) { output.writeMessage(21, getRetentionExpireTime()); } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetMetadata(), MetadataDefaultEntryHolder.defaultEntry, 22); - if (((bitField0_ & 0x00000040) != 0)) { + if (((bitField0_ & 0x00000080) != 0)) { output.writeBool(23, eventBasedHold_); } - if (((bitField0_ & 0x00000080) != 0)) { + if (((bitField0_ & 0x00000100) != 0)) { output.writeMessage(24, getOwner()); } - if (((bitField0_ & 0x00000100) != 0)) { + if (((bitField0_ & 0x00000200) != 0)) { output.writeMessage(25, getCustomerEncryption()); } - if (((bitField0_ & 0x00000200) != 0)) { + if (((bitField0_ & 0x00000400) != 0)) { output.writeMessage(26, getCustomTime()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 27, etag_); } - if (((bitField0_ & 0x00000400) != 0)) { + if (((bitField0_ & 0x00000800) != 0)) { output.writeMessage(28, getSoftDeleteTime()); } - if (((bitField0_ & 0x00000800) != 0)) { + if (((bitField0_ & 0x00001000) != 0)) { output.writeMessage(29, getHardDeleteTime()); } + if (((bitField0_ & 0x00000001) != 0)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 35, restoreToken_); + } getUnknownFields().writeTo(output); } @@ -1752,35 +1828,35 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(contentLanguage_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, contentLanguage_); } - if (((bitField0_ & 0x00000001) != 0)) { + if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getDeleteTime()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(contentType_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, contentType_); } - if (((bitField0_ & 0x00000002) != 0)) { + if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getCreateTime()); } if (componentCount_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(15, componentCount_); } - if (((bitField0_ & 0x00000004) != 0)) { + if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(16, getChecksums()); } - if (((bitField0_ & 0x00000008) != 0)) { + if (((bitField0_ & 0x00000010) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(17, getUpdateTime()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKey_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(18, kmsKey_); } - if (((bitField0_ & 0x00000010) != 0)) { + if (((bitField0_ & 0x00000020) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(19, getUpdateStorageClassTime()); } if (temporaryHold_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(20, temporaryHold_); } - if (((bitField0_ & 0x00000020) != 0)) { + if (((bitField0_ & 0x00000040) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(21, getRetentionExpireTime()); } @@ -1794,27 +1870,30 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(22, metadata__); } - if (((bitField0_ & 0x00000040) != 0)) { + if (((bitField0_ & 0x00000080) != 0)) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(23, eventBasedHold_); } - if (((bitField0_ & 0x00000080) != 0)) { + if (((bitField0_ & 0x00000100) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(24, getOwner()); } - if (((bitField0_ & 0x00000100) != 0)) { + if (((bitField0_ & 0x00000200) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(25, getCustomerEncryption()); } - if (((bitField0_ & 0x00000200) != 0)) { + if (((bitField0_ & 0x00000400) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(26, getCustomTime()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(27, etag_); } - if (((bitField0_ & 0x00000400) != 0)) { + if (((bitField0_ & 0x00000800) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(28, getSoftDeleteTime()); } - if (((bitField0_ & 0x00000800) != 0)) { + if (((bitField0_ & 0x00001000) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(29, getHardDeleteTime()); } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(35, restoreToken_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -1834,6 +1913,10 @@ public boolean equals(final java.lang.Object obj) { if (!getBucket().equals(other.getBucket())) return false; if (!getEtag().equals(other.getEtag())) return false; if (getGeneration() != other.getGeneration()) return false; + if (hasRestoreToken() != other.hasRestoreToken()) return false; + if (hasRestoreToken()) { + if (!getRestoreToken().equals(other.getRestoreToken())) return false; + } if (getMetageneration() != other.getMetageneration()) return false; if (!getStorageClass().equals(other.getStorageClass())) return false; if (getSize() != other.getSize()) return false; @@ -1914,6 +1997,10 @@ public int hashCode() { hash = (53 * hash) + getEtag().hashCode(); hash = (37 * hash) + GENERATION_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getGeneration()); + if (hasRestoreToken()) { + hash = (37 * hash) + RESTORE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getRestoreToken().hashCode(); + } hash = (37 * hash) + METAGENERATION_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getMetageneration()); hash = (37 * hash) + STORAGE_CLASS_FIELD_NUMBER; @@ -2174,6 +2261,7 @@ public Builder clear() { bucket_ = ""; etag_ = ""; generation_ = 0L; + restoreToken_ = ""; metageneration_ = 0L; storageClass_ = ""; size_ = 0L; @@ -2186,7 +2274,7 @@ public Builder clear() { acl_ = null; aclBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000400); + bitField0_ = (bitField0_ & ~0x00000800); contentLanguage_ = ""; deleteTime_ = null; if (deleteTimeBuilder_ != null) { @@ -2284,9 +2372,9 @@ public com.google.storage.v2.Object buildPartial() { private void buildPartialRepeatedFields(com.google.storage.v2.Object result) { if (aclBuilder_ == null) { - if (((bitField0_ & 0x00000400) != 0)) { + if (((bitField0_ & 0x00000800) != 0)) { acl_ = java.util.Collections.unmodifiableList(acl_); - bitField0_ = (bitField0_ & ~0x00000400); + bitField0_ = (bitField0_ & ~0x00000800); } result.acl_ = acl_; } else { @@ -2308,102 +2396,106 @@ private void buildPartial0(com.google.storage.v2.Object result) { if (((from_bitField0_ & 0x00000008) != 0)) { result.generation_ = generation_; } + int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000010) != 0)) { - result.metageneration_ = metageneration_; + result.restoreToken_ = restoreToken_; + to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000020) != 0)) { - result.storageClass_ = storageClass_; + result.metageneration_ = metageneration_; } if (((from_bitField0_ & 0x00000040) != 0)) { - result.size_ = size_; + result.storageClass_ = storageClass_; } if (((from_bitField0_ & 0x00000080) != 0)) { - result.contentEncoding_ = contentEncoding_; + result.size_ = size_; } if (((from_bitField0_ & 0x00000100) != 0)) { - result.contentDisposition_ = contentDisposition_; + result.contentEncoding_ = contentEncoding_; } if (((from_bitField0_ & 0x00000200) != 0)) { - result.cacheControl_ = cacheControl_; + result.contentDisposition_ = contentDisposition_; } - if (((from_bitField0_ & 0x00000800) != 0)) { - result.contentLanguage_ = contentLanguage_; + if (((from_bitField0_ & 0x00000400) != 0)) { + result.cacheControl_ = cacheControl_; } - int to_bitField0_ = 0; if (((from_bitField0_ & 0x00001000) != 0)) { - result.deleteTime_ = deleteTimeBuilder_ == null ? deleteTime_ : deleteTimeBuilder_.build(); - to_bitField0_ |= 0x00000001; + result.contentLanguage_ = contentLanguage_; } if (((from_bitField0_ & 0x00002000) != 0)) { - result.contentType_ = contentType_; + result.deleteTime_ = deleteTimeBuilder_ == null ? deleteTime_ : deleteTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; } if (((from_bitField0_ & 0x00004000) != 0)) { - result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); - to_bitField0_ |= 0x00000002; + result.contentType_ = contentType_; } if (((from_bitField0_ & 0x00008000) != 0)) { - result.componentCount_ = componentCount_; + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; } if (((from_bitField0_ & 0x00010000) != 0)) { - result.checksums_ = checksumsBuilder_ == null ? checksums_ : checksumsBuilder_.build(); - to_bitField0_ |= 0x00000004; + result.componentCount_ = componentCount_; } if (((from_bitField0_ & 0x00020000) != 0)) { - result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + result.checksums_ = checksumsBuilder_ == null ? checksums_ : checksumsBuilder_.build(); to_bitField0_ |= 0x00000008; } if (((from_bitField0_ & 0x00040000) != 0)) { - result.kmsKey_ = kmsKey_; + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000010; } if (((from_bitField0_ & 0x00080000) != 0)) { + result.kmsKey_ = kmsKey_; + } + if (((from_bitField0_ & 0x00100000) != 0)) { result.updateStorageClassTime_ = updateStorageClassTimeBuilder_ == null ? updateStorageClassTime_ : updateStorageClassTimeBuilder_.build(); - to_bitField0_ |= 0x00000010; + to_bitField0_ |= 0x00000020; } - if (((from_bitField0_ & 0x00100000) != 0)) { + if (((from_bitField0_ & 0x00200000) != 0)) { result.temporaryHold_ = temporaryHold_; } - if (((from_bitField0_ & 0x00200000) != 0)) { + if (((from_bitField0_ & 0x00400000) != 0)) { result.retentionExpireTime_ = retentionExpireTimeBuilder_ == null ? retentionExpireTime_ : retentionExpireTimeBuilder_.build(); - to_bitField0_ |= 0x00000020; + to_bitField0_ |= 0x00000040; } - if (((from_bitField0_ & 0x00400000) != 0)) { + if (((from_bitField0_ & 0x00800000) != 0)) { result.metadata_ = internalGetMetadata(); result.metadata_.makeImmutable(); } - if (((from_bitField0_ & 0x00800000) != 0)) { - result.eventBasedHold_ = eventBasedHold_; - to_bitField0_ |= 0x00000040; - } if (((from_bitField0_ & 0x01000000) != 0)) { - result.owner_ = ownerBuilder_ == null ? owner_ : ownerBuilder_.build(); + result.eventBasedHold_ = eventBasedHold_; to_bitField0_ |= 0x00000080; } if (((from_bitField0_ & 0x02000000) != 0)) { + result.owner_ = ownerBuilder_ == null ? owner_ : ownerBuilder_.build(); + to_bitField0_ |= 0x00000100; + } + if (((from_bitField0_ & 0x04000000) != 0)) { result.customerEncryption_ = customerEncryptionBuilder_ == null ? customerEncryption_ : customerEncryptionBuilder_.build(); - to_bitField0_ |= 0x00000100; - } - if (((from_bitField0_ & 0x04000000) != 0)) { - result.customTime_ = customTimeBuilder_ == null ? customTime_ : customTimeBuilder_.build(); to_bitField0_ |= 0x00000200; } if (((from_bitField0_ & 0x08000000) != 0)) { - result.softDeleteTime_ = - softDeleteTimeBuilder_ == null ? softDeleteTime_ : softDeleteTimeBuilder_.build(); + result.customTime_ = customTimeBuilder_ == null ? customTime_ : customTimeBuilder_.build(); to_bitField0_ |= 0x00000400; } if (((from_bitField0_ & 0x10000000) != 0)) { + result.softDeleteTime_ = + softDeleteTimeBuilder_ == null ? softDeleteTime_ : softDeleteTimeBuilder_.build(); + to_bitField0_ |= 0x00000800; + } + if (((from_bitField0_ & 0x20000000) != 0)) { result.hardDeleteTime_ = hardDeleteTimeBuilder_ == null ? hardDeleteTime_ : hardDeleteTimeBuilder_.build(); - to_bitField0_ |= 0x00000800; + to_bitField0_ |= 0x00001000; } result.bitField0_ |= to_bitField0_; } @@ -2471,12 +2563,17 @@ public Builder mergeFrom(com.google.storage.v2.Object other) { if (other.getGeneration() != 0L) { setGeneration(other.getGeneration()); } + if (other.hasRestoreToken()) { + restoreToken_ = other.restoreToken_; + bitField0_ |= 0x00000010; + onChanged(); + } if (other.getMetageneration() != 0L) { setMetageneration(other.getMetageneration()); } if (!other.getStorageClass().isEmpty()) { storageClass_ = other.storageClass_; - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); } if (other.getSize() != 0L) { @@ -2484,24 +2581,24 @@ public Builder mergeFrom(com.google.storage.v2.Object other) { } if (!other.getContentEncoding().isEmpty()) { contentEncoding_ = other.contentEncoding_; - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); } if (!other.getContentDisposition().isEmpty()) { contentDisposition_ = other.contentDisposition_; - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; onChanged(); } if (!other.getCacheControl().isEmpty()) { cacheControl_ = other.cacheControl_; - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; onChanged(); } if (aclBuilder_ == null) { if (!other.acl_.isEmpty()) { if (acl_.isEmpty()) { acl_ = other.acl_; - bitField0_ = (bitField0_ & ~0x00000400); + bitField0_ = (bitField0_ & ~0x00000800); } else { ensureAclIsMutable(); acl_.addAll(other.acl_); @@ -2514,7 +2611,7 @@ public Builder mergeFrom(com.google.storage.v2.Object other) { aclBuilder_.dispose(); aclBuilder_ = null; acl_ = other.acl_; - bitField0_ = (bitField0_ & ~0x00000400); + bitField0_ = (bitField0_ & ~0x00000800); aclBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getAclFieldBuilder() @@ -2526,7 +2623,7 @@ public Builder mergeFrom(com.google.storage.v2.Object other) { } if (!other.getContentLanguage().isEmpty()) { contentLanguage_ = other.contentLanguage_; - bitField0_ |= 0x00000800; + bitField0_ |= 0x00001000; onChanged(); } if (other.hasDeleteTime()) { @@ -2534,7 +2631,7 @@ public Builder mergeFrom(com.google.storage.v2.Object other) { } if (!other.getContentType().isEmpty()) { contentType_ = other.contentType_; - bitField0_ |= 0x00002000; + bitField0_ |= 0x00004000; onChanged(); } if (other.hasCreateTime()) { @@ -2551,7 +2648,7 @@ public Builder mergeFrom(com.google.storage.v2.Object other) { } if (!other.getKmsKey().isEmpty()) { kmsKey_ = other.kmsKey_; - bitField0_ |= 0x00040000; + bitField0_ |= 0x00080000; onChanged(); } if (other.hasUpdateStorageClassTime()) { @@ -2564,7 +2661,7 @@ public Builder mergeFrom(com.google.storage.v2.Object other) { mergeRetentionExpireTime(other.getRetentionExpireTime()); } internalGetMutableMetadata().mergeFrom(other.internalGetMetadata()); - bitField0_ |= 0x00400000; + bitField0_ |= 0x00800000; if (other.hasEventBasedHold()) { setEventBasedHold(other.getEventBasedHold()); } @@ -2630,37 +2727,37 @@ public Builder mergeFrom( case 32: { metageneration_ = input.readInt64(); - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; break; } // case 32 case 42: { storageClass_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; break; } // case 42 case 48: { size_ = input.readInt64(); - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; break; } // case 48 case 58: { contentEncoding_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; break; } // case 58 case 66: { contentDisposition_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; break; } // case 66 case 74: { cacheControl_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; break; } // case 74 case 82: @@ -2679,69 +2776,69 @@ public Builder mergeFrom( case 90: { contentLanguage_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000800; + bitField0_ |= 0x00001000; break; } // case 90 case 98: { input.readMessage(getDeleteTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00001000; + bitField0_ |= 0x00002000; break; } // case 98 case 106: { contentType_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00002000; + bitField0_ |= 0x00004000; break; } // case 106 case 114: { input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00004000; + bitField0_ |= 0x00008000; break; } // case 114 case 120: { componentCount_ = input.readInt32(); - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; break; } // case 120 case 130: { input.readMessage(getChecksumsFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; break; } // case 130 case 138: { input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00020000; + bitField0_ |= 0x00040000; break; } // case 138 case 146: { kmsKey_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00040000; + bitField0_ |= 0x00080000; break; } // case 146 case 154: { input.readMessage( getUpdateStorageClassTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00080000; + bitField0_ |= 0x00100000; break; } // case 154 case 160: { temporaryHold_ = input.readBool(); - bitField0_ |= 0x00100000; + bitField0_ |= 0x00200000; break; } // case 160 case 170: { input.readMessage( getRetentionExpireTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00200000; + bitField0_ |= 0x00400000; break; } // case 170 case 178: @@ -2753,32 +2850,32 @@ public Builder mergeFrom( internalGetMutableMetadata() .getMutableMap() .put(metadata__.getKey(), metadata__.getValue()); - bitField0_ |= 0x00400000; + bitField0_ |= 0x00800000; break; } // case 178 case 184: { eventBasedHold_ = input.readBool(); - bitField0_ |= 0x00800000; + bitField0_ |= 0x01000000; break; } // case 184 case 194: { input.readMessage(getOwnerFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x01000000; + bitField0_ |= 0x02000000; break; } // case 194 case 202: { input.readMessage( getCustomerEncryptionFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x02000000; + bitField0_ |= 0x04000000; break; } // case 202 case 210: { input.readMessage(getCustomTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x04000000; + bitField0_ |= 0x08000000; break; } // case 210 case 218: @@ -2790,15 +2887,21 @@ public Builder mergeFrom( case 226: { input.readMessage(getSoftDeleteTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x08000000; + bitField0_ |= 0x10000000; break; } // case 226 case 234: { input.readMessage(getHardDeleteTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x10000000; + bitField0_ |= 0x20000000; break; } // case 234 + case 282: + { + restoreToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 282 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -3169,62 +3272,188 @@ public Builder clearEtag() { * * *
-     * 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.
+     * 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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private long generation_; + /** + * + * + *
+     * Immutable. The content generation of this object. Used for object
+     * versioning.
+     * 
+ * + * int64 generation = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The generation. + */ + @java.lang.Override + public long getGeneration() { + return generation_; + } + /** + * + * + *
+     * Immutable. The content generation of this object. Used for object
+     * versioning.
+     * 
+ * + * int64 generation = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The generation to set. + * @return This builder for chaining. + */ + public Builder setGeneration(long value) { + + generation_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The content generation of this object. Used for object
+     * versioning.
+     * 
+ * + * int64 generation = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearGeneration() { + bitField0_ = (bitField0_ & ~0x00000008); + generation_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object restoreToken_ = ""; + /** + * + * + *
+     * Output only. Restore token used to differentiate deleted objects with the
+     * same name and generation. This field is output only, and only set for
+     * deleted objects in HNS buckets.
+     * 
+ * + * optional string restore_token = 35 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the restoreToken field is set. + */ + public boolean hasRestoreToken() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Output only. Restore token used to differentiate deleted objects with the
+     * same name and generation. This field is output only, and only set for
+     * deleted objects in HNS buckets.
+     * 
+ * + * optional string restore_token = 35 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The restoreToken. + */ + public java.lang.String getRestoreToken() { + java.lang.Object ref = restoreToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + restoreToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Restore token used to differentiate deleted objects with the
+     * same name and generation. This field is output only, and only set for
+     * deleted objects in HNS buckets.
      * 
* - * string etag = 27; + * optional string restore_token = 35 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * @param value The bytes for etag to set. - * @return This builder for chaining. + * @return The bytes for restoreToken. */ - public Builder setEtagBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public com.google.protobuf.ByteString getRestoreTokenBytes() { + java.lang.Object ref = restoreToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + restoreToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } - checkByteStringIsUtf8(value); - etag_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; } - - private long generation_; /** * * *
-     * Immutable. The content generation of this object. Used for object
-     * versioning.
+     * Output only. Restore token used to differentiate deleted objects with the
+     * same name and generation. This field is output only, and only set for
+     * deleted objects in HNS buckets.
      * 
* - * int64 generation = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * optional string restore_token = 35 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * @return The generation. + * @param value The restoreToken to set. + * @return This builder for chaining. */ - @java.lang.Override - public long getGeneration() { - return generation_; + public Builder setRestoreToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + restoreToken_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; } /** * * *
-     * Immutable. The content generation of this object. Used for object
-     * versioning.
+     * Output only. Restore token used to differentiate deleted objects with the
+     * same name and generation. This field is output only, and only set for
+     * deleted objects in HNS buckets.
      * 
* - * int64 generation = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * optional string restore_token = 35 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * @param value The generation to set. * @return This builder for chaining. */ - public Builder setGeneration(long value) { - - generation_ = value; - bitField0_ |= 0x00000008; + public Builder clearRestoreToken() { + restoreToken_ = getDefaultInstance().getRestoreToken(); + bitField0_ = (bitField0_ & ~0x00000010); onChanged(); return this; } @@ -3232,17 +3461,23 @@ public Builder setGeneration(long value) { * * *
-     * Immutable. The content generation of this object. Used for object
-     * versioning.
+     * Output only. Restore token used to differentiate deleted objects with the
+     * same name and generation. This field is output only, and only set for
+     * deleted objects in HNS buckets.
      * 
* - * int64 generation = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * optional string restore_token = 35 [(.google.api.field_behavior) = OUTPUT_ONLY]; * + * @param value The bytes for restoreToken to set. * @return This builder for chaining. */ - public Builder clearGeneration() { - bitField0_ = (bitField0_ & ~0x00000008); - generation_ = 0L; + public Builder setRestoreTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + restoreToken_ = value; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -3284,7 +3519,7 @@ public long getMetageneration() { public Builder setMetageneration(long value) { metageneration_ = value; - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -3303,7 +3538,7 @@ public Builder setMetageneration(long value) { * @return This builder for chaining. */ public Builder clearMetageneration() { - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000020); metageneration_ = 0L; onChanged(); return this; @@ -3371,7 +3606,7 @@ public Builder setStorageClass(java.lang.String value) { throw new NullPointerException(); } storageClass_ = value; - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -3388,7 +3623,7 @@ public Builder setStorageClass(java.lang.String value) { */ public Builder clearStorageClass() { storageClass_ = getDefaultInstance().getStorageClass(); - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000040); onChanged(); return this; } @@ -3410,7 +3645,7 @@ public Builder setStorageClassBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); storageClass_ = value; - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -3448,7 +3683,7 @@ public long getSize() { public Builder setSize(long value) { size_ = value; - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -3465,7 +3700,7 @@ public Builder setSize(long value) { * @return This builder for chaining. */ public Builder clearSize() { - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000080); size_ = 0L; onChanged(); return this; @@ -3536,7 +3771,7 @@ public Builder setContentEncoding(java.lang.String value) { throw new NullPointerException(); } contentEncoding_ = value; - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -3554,7 +3789,7 @@ public Builder setContentEncoding(java.lang.String value) { */ public Builder clearContentEncoding() { contentEncoding_ = getDefaultInstance().getContentEncoding(); - bitField0_ = (bitField0_ & ~0x00000080); + bitField0_ = (bitField0_ & ~0x00000100); onChanged(); return this; } @@ -3577,7 +3812,7 @@ public Builder setContentEncodingBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); contentEncoding_ = value; - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -3647,7 +3882,7 @@ public Builder setContentDisposition(java.lang.String value) { throw new NullPointerException(); } contentDisposition_ = value; - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -3665,7 +3900,7 @@ public Builder setContentDisposition(java.lang.String value) { */ public Builder clearContentDisposition() { contentDisposition_ = getDefaultInstance().getContentDisposition(); - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00000200); onChanged(); return this; } @@ -3688,7 +3923,7 @@ public Builder setContentDispositionBytes(com.google.protobuf.ByteString value) } checkByteStringIsUtf8(value); contentDisposition_ = value; - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -3764,7 +3999,7 @@ public Builder setCacheControl(java.lang.String value) { throw new NullPointerException(); } cacheControl_ = value; - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -3784,7 +4019,7 @@ public Builder setCacheControl(java.lang.String value) { */ public Builder clearCacheControl() { cacheControl_ = getDefaultInstance().getCacheControl(); - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00000400); onChanged(); return this; } @@ -3809,7 +4044,7 @@ public Builder setCacheControlBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); cacheControl_ = value; - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -3818,9 +4053,9 @@ public Builder setCacheControlBytes(com.google.protobuf.ByteString value) { java.util.Collections.emptyList(); private void ensureAclIsMutable() { - if (!((bitField0_ & 0x00000400) != 0)) { + if (!((bitField0_ & 0x00000800) != 0)) { acl_ = new java.util.ArrayList(acl_); - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; } } @@ -4057,7 +4292,7 @@ public Builder addAllAcl( public Builder clearAcl() { if (aclBuilder_ == null) { acl_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000400); + bitField0_ = (bitField0_ & ~0x00000800); onChanged(); } else { aclBuilder_.clear(); @@ -4192,7 +4427,7 @@ public java.util.List getAclB com.google.storage.v2.ObjectAccessControl, com.google.storage.v2.ObjectAccessControl.Builder, com.google.storage.v2.ObjectAccessControlOrBuilder>( - acl_, ((bitField0_ & 0x00000400) != 0), getParentForChildren(), isClean()); + acl_, ((bitField0_ & 0x00000800) != 0), getParentForChildren(), isClean()); acl_ = null; } return aclBuilder_; @@ -4263,7 +4498,7 @@ public Builder setContentLanguage(java.lang.String value) { throw new NullPointerException(); } contentLanguage_ = value; - bitField0_ |= 0x00000800; + bitField0_ |= 0x00001000; onChanged(); return this; } @@ -4281,7 +4516,7 @@ public Builder setContentLanguage(java.lang.String value) { */ public Builder clearContentLanguage() { contentLanguage_ = getDefaultInstance().getContentLanguage(); - bitField0_ = (bitField0_ & ~0x00000800); + bitField0_ = (bitField0_ & ~0x00001000); onChanged(); return this; } @@ -4304,7 +4539,7 @@ public Builder setContentLanguageBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); contentLanguage_ = value; - bitField0_ |= 0x00000800; + bitField0_ |= 0x00001000; onChanged(); return this; } @@ -4330,7 +4565,7 @@ public Builder setContentLanguageBytes(com.google.protobuf.ByteString value) { * @return Whether the deleteTime field is set. */ public boolean hasDeleteTime() { - return ((bitField0_ & 0x00001000) != 0); + return ((bitField0_ & 0x00002000) != 0); } /** * @@ -4376,7 +4611,7 @@ public Builder setDeleteTime(com.google.protobuf.Timestamp value) { } else { deleteTimeBuilder_.setMessage(value); } - bitField0_ |= 0x00001000; + bitField0_ |= 0x00002000; onChanged(); return this; } @@ -4398,7 +4633,7 @@ public Builder setDeleteTime(com.google.protobuf.Timestamp.Builder builderForVal } else { deleteTimeBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00001000; + bitField0_ |= 0x00002000; onChanged(); return this; } @@ -4416,7 +4651,7 @@ public Builder setDeleteTime(com.google.protobuf.Timestamp.Builder builderForVal */ public Builder mergeDeleteTime(com.google.protobuf.Timestamp value) { if (deleteTimeBuilder_ == null) { - if (((bitField0_ & 0x00001000) != 0) + if (((bitField0_ & 0x00002000) != 0) && deleteTime_ != null && deleteTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { getDeleteTimeBuilder().mergeFrom(value); @@ -4427,7 +4662,7 @@ public Builder mergeDeleteTime(com.google.protobuf.Timestamp value) { deleteTimeBuilder_.mergeFrom(value); } if (deleteTime_ != null) { - bitField0_ |= 0x00001000; + bitField0_ |= 0x00002000; onChanged(); } return this; @@ -4445,7 +4680,7 @@ public Builder mergeDeleteTime(com.google.protobuf.Timestamp value) { * */ public Builder clearDeleteTime() { - bitField0_ = (bitField0_ & ~0x00001000); + bitField0_ = (bitField0_ & ~0x00002000); deleteTime_ = null; if (deleteTimeBuilder_ != null) { deleteTimeBuilder_.dispose(); @@ -4467,7 +4702,7 @@ public Builder clearDeleteTime() { * */ public com.google.protobuf.Timestamp.Builder getDeleteTimeBuilder() { - bitField0_ |= 0x00001000; + bitField0_ |= 0x00002000; onChanged(); return getDeleteTimeFieldBuilder().getBuilder(); } @@ -4592,7 +4827,7 @@ public Builder setContentType(java.lang.String value) { throw new NullPointerException(); } contentType_ = value; - bitField0_ |= 0x00002000; + bitField0_ |= 0x00004000; onChanged(); return this; } @@ -4612,7 +4847,7 @@ public Builder setContentType(java.lang.String value) { */ public Builder clearContentType() { contentType_ = getDefaultInstance().getContentType(); - bitField0_ = (bitField0_ & ~0x00002000); + bitField0_ = (bitField0_ & ~0x00004000); onChanged(); return this; } @@ -4637,7 +4872,7 @@ public Builder setContentTypeBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); contentType_ = value; - bitField0_ |= 0x00002000; + bitField0_ |= 0x00004000; onChanged(); return this; } @@ -4662,7 +4897,7 @@ public Builder setContentTypeBytes(com.google.protobuf.ByteString value) { * @return Whether the createTime field is set. */ public boolean hasCreateTime() { - return ((bitField0_ & 0x00004000) != 0); + return ((bitField0_ & 0x00008000) != 0); } /** * @@ -4706,7 +4941,7 @@ public Builder setCreateTime(com.google.protobuf.Timestamp value) { } else { createTimeBuilder_.setMessage(value); } - bitField0_ |= 0x00004000; + bitField0_ |= 0x00008000; onChanged(); return this; } @@ -4727,7 +4962,7 @@ public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForVal } else { createTimeBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00004000; + bitField0_ |= 0x00008000; onChanged(); return this; } @@ -4744,7 +4979,7 @@ public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForVal */ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { if (createTimeBuilder_ == null) { - if (((bitField0_ & 0x00004000) != 0) + if (((bitField0_ & 0x00008000) != 0) && createTime_ != null && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { getCreateTimeBuilder().mergeFrom(value); @@ -4755,7 +4990,7 @@ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { createTimeBuilder_.mergeFrom(value); } if (createTime_ != null) { - bitField0_ |= 0x00004000; + bitField0_ |= 0x00008000; onChanged(); } return this; @@ -4772,7 +5007,7 @@ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { * */ public Builder clearCreateTime() { - bitField0_ = (bitField0_ & ~0x00004000); + bitField0_ = (bitField0_ & ~0x00008000); createTime_ = null; if (createTimeBuilder_ != null) { createTimeBuilder_.dispose(); @@ -4793,7 +5028,7 @@ public Builder clearCreateTime() { * */ public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - bitField0_ |= 0x00004000; + bitField0_ |= 0x00008000; onChanged(); return getCreateTimeFieldBuilder().getBuilder(); } @@ -4878,7 +5113,7 @@ public int getComponentCount() { public Builder setComponentCount(int value) { componentCount_ = value; - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; onChanged(); return this; } @@ -4895,7 +5130,7 @@ public Builder setComponentCount(int value) { * @return This builder for chaining. */ public Builder clearComponentCount() { - bitField0_ = (bitField0_ & ~0x00008000); + bitField0_ = (bitField0_ & ~0x00010000); componentCount_ = 0; onChanged(); return this; @@ -4925,7 +5160,7 @@ public Builder clearComponentCount() { * @return Whether the checksums field is set. */ public boolean hasChecksums() { - return ((bitField0_ & 0x00010000) != 0); + return ((bitField0_ & 0x00020000) != 0); } /** * @@ -4977,7 +5212,7 @@ public Builder setChecksums(com.google.storage.v2.ObjectChecksums value) { } else { checksumsBuilder_.setMessage(value); } - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; onChanged(); return this; } @@ -5002,7 +5237,7 @@ public Builder setChecksums(com.google.storage.v2.ObjectChecksums.Builder builde } else { checksumsBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; onChanged(); return this; } @@ -5023,7 +5258,7 @@ public Builder setChecksums(com.google.storage.v2.ObjectChecksums.Builder builde */ public Builder mergeChecksums(com.google.storage.v2.ObjectChecksums value) { if (checksumsBuilder_ == null) { - if (((bitField0_ & 0x00010000) != 0) + if (((bitField0_ & 0x00020000) != 0) && checksums_ != null && checksums_ != com.google.storage.v2.ObjectChecksums.getDefaultInstance()) { getChecksumsBuilder().mergeFrom(value); @@ -5034,7 +5269,7 @@ public Builder mergeChecksums(com.google.storage.v2.ObjectChecksums value) { checksumsBuilder_.mergeFrom(value); } if (checksums_ != null) { - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; onChanged(); } return this; @@ -5055,7 +5290,7 @@ public Builder mergeChecksums(com.google.storage.v2.ObjectChecksums value) { * */ public Builder clearChecksums() { - bitField0_ = (bitField0_ & ~0x00010000); + bitField0_ = (bitField0_ & ~0x00020000); checksums_ = null; if (checksumsBuilder_ != null) { checksumsBuilder_.dispose(); @@ -5080,7 +5315,7 @@ public Builder clearChecksums() { * */ public com.google.storage.v2.ObjectChecksums.Builder getChecksumsBuilder() { - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; onChanged(); return getChecksumsFieldBuilder().getBuilder(); } @@ -5165,7 +5400,7 @@ public com.google.storage.v2.ObjectChecksumsOrBuilder getChecksumsOrBuilder() { * @return Whether the updateTime field is set. */ public boolean hasUpdateTime() { - return ((bitField0_ & 0x00020000) != 0); + return ((bitField0_ & 0x00040000) != 0); } /** * @@ -5219,7 +5454,7 @@ public Builder setUpdateTime(com.google.protobuf.Timestamp value) { } else { updateTimeBuilder_.setMessage(value); } - bitField0_ |= 0x00020000; + bitField0_ |= 0x00040000; onChanged(); return this; } @@ -5245,7 +5480,7 @@ public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForVal } else { updateTimeBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00020000; + bitField0_ |= 0x00040000; onChanged(); return this; } @@ -5267,7 +5502,7 @@ public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForVal */ public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { if (updateTimeBuilder_ == null) { - if (((bitField0_ & 0x00020000) != 0) + if (((bitField0_ & 0x00040000) != 0) && updateTime_ != null && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { getUpdateTimeBuilder().mergeFrom(value); @@ -5278,7 +5513,7 @@ public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { updateTimeBuilder_.mergeFrom(value); } if (updateTime_ != null) { - bitField0_ |= 0x00020000; + bitField0_ |= 0x00040000; onChanged(); } return this; @@ -5300,7 +5535,7 @@ public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { * */ public Builder clearUpdateTime() { - bitField0_ = (bitField0_ & ~0x00020000); + bitField0_ = (bitField0_ & ~0x00040000); updateTime_ = null; if (updateTimeBuilder_ != null) { updateTimeBuilder_.dispose(); @@ -5326,7 +5561,7 @@ public Builder clearUpdateTime() { * */ public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { - bitField0_ |= 0x00020000; + bitField0_ |= 0x00040000; onChanged(); return getUpdateTimeFieldBuilder().getBuilder(); } @@ -5453,7 +5688,7 @@ public Builder setKmsKey(java.lang.String value) { throw new NullPointerException(); } kmsKey_ = value; - bitField0_ |= 0x00040000; + bitField0_ |= 0x00080000; onChanged(); return this; } @@ -5471,7 +5706,7 @@ public Builder setKmsKey(java.lang.String value) { */ public Builder clearKmsKey() { kmsKey_ = getDefaultInstance().getKmsKey(); - bitField0_ = (bitField0_ & ~0x00040000); + bitField0_ = (bitField0_ & ~0x00080000); onChanged(); return this; } @@ -5494,7 +5729,7 @@ public Builder setKmsKeyBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); kmsKey_ = value; - bitField0_ |= 0x00040000; + bitField0_ |= 0x00080000; onChanged(); return this; } @@ -5520,7 +5755,7 @@ public Builder setKmsKeyBytes(com.google.protobuf.ByteString value) { * @return Whether the updateStorageClassTime field is set. */ public boolean hasUpdateStorageClassTime() { - return ((bitField0_ & 0x00080000) != 0); + return ((bitField0_ & 0x00100000) != 0); } /** * @@ -5566,7 +5801,7 @@ public Builder setUpdateStorageClassTime(com.google.protobuf.Timestamp value) { } else { updateStorageClassTimeBuilder_.setMessage(value); } - bitField0_ |= 0x00080000; + bitField0_ |= 0x00100000; onChanged(); return this; } @@ -5589,7 +5824,7 @@ public Builder setUpdateStorageClassTime( } else { updateStorageClassTimeBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00080000; + bitField0_ |= 0x00100000; onChanged(); return this; } @@ -5607,7 +5842,7 @@ public Builder setUpdateStorageClassTime( */ public Builder mergeUpdateStorageClassTime(com.google.protobuf.Timestamp value) { if (updateStorageClassTimeBuilder_ == null) { - if (((bitField0_ & 0x00080000) != 0) + if (((bitField0_ & 0x00100000) != 0) && updateStorageClassTime_ != null && updateStorageClassTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { getUpdateStorageClassTimeBuilder().mergeFrom(value); @@ -5618,7 +5853,7 @@ public Builder mergeUpdateStorageClassTime(com.google.protobuf.Timestamp value) updateStorageClassTimeBuilder_.mergeFrom(value); } if (updateStorageClassTime_ != null) { - bitField0_ |= 0x00080000; + bitField0_ |= 0x00100000; onChanged(); } return this; @@ -5636,7 +5871,7 @@ public Builder mergeUpdateStorageClassTime(com.google.protobuf.Timestamp value) * */ public Builder clearUpdateStorageClassTime() { - bitField0_ = (bitField0_ & ~0x00080000); + bitField0_ = (bitField0_ & ~0x00100000); updateStorageClassTime_ = null; if (updateStorageClassTimeBuilder_ != null) { updateStorageClassTimeBuilder_.dispose(); @@ -5658,7 +5893,7 @@ public Builder clearUpdateStorageClassTime() { * */ public com.google.protobuf.Timestamp.Builder getUpdateStorageClassTimeBuilder() { - bitField0_ |= 0x00080000; + bitField0_ |= 0x00100000; onChanged(); return getUpdateStorageClassTimeFieldBuilder().getBuilder(); } @@ -5751,7 +5986,7 @@ public boolean getTemporaryHold() { public Builder setTemporaryHold(boolean value) { temporaryHold_ = value; - bitField0_ |= 0x00100000; + bitField0_ |= 0x00200000; onChanged(); return this; } @@ -5771,7 +6006,7 @@ public Builder setTemporaryHold(boolean value) { * @return This builder for chaining. */ public Builder clearTemporaryHold() { - bitField0_ = (bitField0_ & ~0x00100000); + bitField0_ = (bitField0_ & ~0x00200000); temporaryHold_ = false; onChanged(); return this; @@ -5801,7 +6036,7 @@ public Builder clearTemporaryHold() { * @return Whether the retentionExpireTime field is set. */ public boolean hasRetentionExpireTime() { - return ((bitField0_ & 0x00200000) != 0); + return ((bitField0_ & 0x00400000) != 0); } /** * @@ -5853,7 +6088,7 @@ public Builder setRetentionExpireTime(com.google.protobuf.Timestamp value) { } else { retentionExpireTimeBuilder_.setMessage(value); } - bitField0_ |= 0x00200000; + bitField0_ |= 0x00400000; onChanged(); return this; } @@ -5878,7 +6113,7 @@ public Builder setRetentionExpireTime(com.google.protobuf.Timestamp.Builder buil } else { retentionExpireTimeBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00200000; + bitField0_ |= 0x00400000; onChanged(); return this; } @@ -5899,7 +6134,7 @@ public Builder setRetentionExpireTime(com.google.protobuf.Timestamp.Builder buil */ public Builder mergeRetentionExpireTime(com.google.protobuf.Timestamp value) { if (retentionExpireTimeBuilder_ == null) { - if (((bitField0_ & 0x00200000) != 0) + if (((bitField0_ & 0x00400000) != 0) && retentionExpireTime_ != null && retentionExpireTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { getRetentionExpireTimeBuilder().mergeFrom(value); @@ -5910,7 +6145,7 @@ public Builder mergeRetentionExpireTime(com.google.protobuf.Timestamp value) { retentionExpireTimeBuilder_.mergeFrom(value); } if (retentionExpireTime_ != null) { - bitField0_ |= 0x00200000; + bitField0_ |= 0x00400000; onChanged(); } return this; @@ -5931,7 +6166,7 @@ public Builder mergeRetentionExpireTime(com.google.protobuf.Timestamp value) { * .google.protobuf.Timestamp retention_expire_time = 21; */ public Builder clearRetentionExpireTime() { - bitField0_ = (bitField0_ & ~0x00200000); + bitField0_ = (bitField0_ & ~0x00400000); retentionExpireTime_ = null; if (retentionExpireTimeBuilder_ != null) { retentionExpireTimeBuilder_.dispose(); @@ -5956,7 +6191,7 @@ public Builder clearRetentionExpireTime() { * .google.protobuf.Timestamp retention_expire_time = 21; */ public com.google.protobuf.Timestamp.Builder getRetentionExpireTimeBuilder() { - bitField0_ |= 0x00200000; + bitField0_ |= 0x00400000; onChanged(); return getRetentionExpireTimeFieldBuilder().getBuilder(); } @@ -6034,7 +6269,7 @@ private com.google.protobuf.MapField interna if (!metadata_.isMutable()) { metadata_ = metadata_.copy(); } - bitField0_ |= 0x00400000; + bitField0_ |= 0x00800000; onChanged(); return metadata_; } @@ -6119,7 +6354,7 @@ public java.lang.String getMetadataOrThrow(java.lang.String key) { } public Builder clearMetadata() { - bitField0_ = (bitField0_ & ~0x00400000); + bitField0_ = (bitField0_ & ~0x00800000); internalGetMutableMetadata().getMutableMap().clear(); return this; } @@ -6142,7 +6377,7 @@ public Builder removeMetadata(java.lang.String key) { /** Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutableMetadata() { - bitField0_ |= 0x00400000; + bitField0_ |= 0x00800000; return internalGetMutableMetadata().getMutableMap(); } /** @@ -6162,7 +6397,7 @@ public Builder putMetadata(java.lang.String key, java.lang.String value) { throw new NullPointerException("map value"); } internalGetMutableMetadata().getMutableMap().put(key, value); - bitField0_ |= 0x00400000; + bitField0_ |= 0x00800000; return this; } /** @@ -6176,7 +6411,7 @@ public Builder putMetadata(java.lang.String key, java.lang.String value) { */ public Builder putAllMetadata(java.util.Map values) { internalGetMutableMetadata().getMutableMap().putAll(values); - bitField0_ |= 0x00400000; + bitField0_ |= 0x00800000; return this; } @@ -6204,7 +6439,7 @@ public Builder putAllMetadata(java.util.Map */ @java.lang.Override public boolean hasEventBasedHold() { - return ((bitField0_ & 0x00800000) != 0); + return ((bitField0_ & 0x01000000) != 0); } /** * @@ -6256,7 +6491,7 @@ public boolean getEventBasedHold() { public Builder setEventBasedHold(boolean value) { eventBasedHold_ = value; - bitField0_ |= 0x00800000; + bitField0_ |= 0x01000000; onChanged(); return this; } @@ -6282,7 +6517,7 @@ public Builder setEventBasedHold(boolean value) { * @return This builder for chaining. */ public Builder clearEventBasedHold() { - bitField0_ = (bitField0_ & ~0x00800000); + bitField0_ = (bitField0_ & ~0x01000000); eventBasedHold_ = false; onChanged(); return this; @@ -6308,7 +6543,7 @@ public Builder clearEventBasedHold() { * @return Whether the owner field is set. */ public boolean hasOwner() { - return ((bitField0_ & 0x01000000) != 0); + return ((bitField0_ & 0x02000000) != 0); } /** * @@ -6350,7 +6585,7 @@ public Builder setOwner(com.google.storage.v2.Owner value) { } else { ownerBuilder_.setMessage(value); } - bitField0_ |= 0x01000000; + bitField0_ |= 0x02000000; onChanged(); return this; } @@ -6371,7 +6606,7 @@ public Builder setOwner(com.google.storage.v2.Owner.Builder builderForValue) { } else { ownerBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x01000000; + bitField0_ |= 0x02000000; onChanged(); return this; } @@ -6388,7 +6623,7 @@ public Builder setOwner(com.google.storage.v2.Owner.Builder builderForValue) { */ public Builder mergeOwner(com.google.storage.v2.Owner value) { if (ownerBuilder_ == null) { - if (((bitField0_ & 0x01000000) != 0) + if (((bitField0_ & 0x02000000) != 0) && owner_ != null && owner_ != com.google.storage.v2.Owner.getDefaultInstance()) { getOwnerBuilder().mergeFrom(value); @@ -6399,7 +6634,7 @@ public Builder mergeOwner(com.google.storage.v2.Owner value) { ownerBuilder_.mergeFrom(value); } if (owner_ != null) { - bitField0_ |= 0x01000000; + bitField0_ |= 0x02000000; onChanged(); } return this; @@ -6416,7 +6651,7 @@ public Builder mergeOwner(com.google.storage.v2.Owner value) { * */ public Builder clearOwner() { - bitField0_ = (bitField0_ & ~0x01000000); + bitField0_ = (bitField0_ & ~0x02000000); owner_ = null; if (ownerBuilder_ != null) { ownerBuilder_.dispose(); @@ -6437,7 +6672,7 @@ public Builder clearOwner() { * */ public com.google.storage.v2.Owner.Builder getOwnerBuilder() { - bitField0_ |= 0x01000000; + bitField0_ |= 0x02000000; onChanged(); return getOwnerFieldBuilder().getBuilder(); } @@ -6506,7 +6741,7 @@ public com.google.storage.v2.OwnerOrBuilder getOwnerOrBuilder() { * @return Whether the customerEncryption field is set. */ public boolean hasCustomerEncryption() { - return ((bitField0_ & 0x02000000) != 0); + return ((bitField0_ & 0x04000000) != 0); } /** * @@ -6548,7 +6783,7 @@ public Builder setCustomerEncryption(com.google.storage.v2.CustomerEncryption va } else { customerEncryptionBuilder_.setMessage(value); } - bitField0_ |= 0x02000000; + bitField0_ |= 0x04000000; onChanged(); return this; } @@ -6569,7 +6804,7 @@ public Builder setCustomerEncryption( } else { customerEncryptionBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x02000000; + bitField0_ |= 0x04000000; onChanged(); return this; } @@ -6585,7 +6820,7 @@ public Builder setCustomerEncryption( */ public Builder mergeCustomerEncryption(com.google.storage.v2.CustomerEncryption value) { if (customerEncryptionBuilder_ == null) { - if (((bitField0_ & 0x02000000) != 0) + if (((bitField0_ & 0x04000000) != 0) && customerEncryption_ != null && customerEncryption_ != com.google.storage.v2.CustomerEncryption.getDefaultInstance()) { @@ -6597,7 +6832,7 @@ public Builder mergeCustomerEncryption(com.google.storage.v2.CustomerEncryption customerEncryptionBuilder_.mergeFrom(value); } if (customerEncryption_ != null) { - bitField0_ |= 0x02000000; + bitField0_ |= 0x04000000; onChanged(); } return this; @@ -6613,7 +6848,7 @@ public Builder mergeCustomerEncryption(com.google.storage.v2.CustomerEncryption * .google.storage.v2.CustomerEncryption customer_encryption = 25; */ public Builder clearCustomerEncryption() { - bitField0_ = (bitField0_ & ~0x02000000); + bitField0_ = (bitField0_ & ~0x04000000); customerEncryption_ = null; if (customerEncryptionBuilder_ != null) { customerEncryptionBuilder_.dispose(); @@ -6633,7 +6868,7 @@ public Builder clearCustomerEncryption() { * .google.storage.v2.CustomerEncryption customer_encryption = 25; */ public com.google.storage.v2.CustomerEncryption.Builder getCustomerEncryptionBuilder() { - bitField0_ |= 0x02000000; + bitField0_ |= 0x04000000; onChanged(); return getCustomerEncryptionFieldBuilder().getBuilder(); } @@ -6701,7 +6936,7 @@ public com.google.storage.v2.CustomerEncryptionOrBuilder getCustomerEncryptionOr * @return Whether the customTime field is set. */ public boolean hasCustomTime() { - return ((bitField0_ & 0x04000000) != 0); + return ((bitField0_ & 0x08000000) != 0); } /** * @@ -6741,7 +6976,7 @@ public Builder setCustomTime(com.google.protobuf.Timestamp value) { } else { customTimeBuilder_.setMessage(value); } - bitField0_ |= 0x04000000; + bitField0_ |= 0x08000000; onChanged(); return this; } @@ -6760,7 +6995,7 @@ public Builder setCustomTime(com.google.protobuf.Timestamp.Builder builderForVal } else { customTimeBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x04000000; + bitField0_ |= 0x08000000; onChanged(); return this; } @@ -6775,7 +7010,7 @@ public Builder setCustomTime(com.google.protobuf.Timestamp.Builder builderForVal */ public Builder mergeCustomTime(com.google.protobuf.Timestamp value) { if (customTimeBuilder_ == null) { - if (((bitField0_ & 0x04000000) != 0) + if (((bitField0_ & 0x08000000) != 0) && customTime_ != null && customTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { getCustomTimeBuilder().mergeFrom(value); @@ -6786,7 +7021,7 @@ public Builder mergeCustomTime(com.google.protobuf.Timestamp value) { customTimeBuilder_.mergeFrom(value); } if (customTime_ != null) { - bitField0_ |= 0x04000000; + bitField0_ |= 0x08000000; onChanged(); } return this; @@ -6801,7 +7036,7 @@ public Builder mergeCustomTime(com.google.protobuf.Timestamp value) { * .google.protobuf.Timestamp custom_time = 26; */ public Builder clearCustomTime() { - bitField0_ = (bitField0_ & ~0x04000000); + bitField0_ = (bitField0_ & ~0x08000000); customTime_ = null; if (customTimeBuilder_ != null) { customTimeBuilder_.dispose(); @@ -6820,7 +7055,7 @@ public Builder clearCustomTime() { * .google.protobuf.Timestamp custom_time = 26; */ public com.google.protobuf.Timestamp.Builder getCustomTimeBuilder() { - bitField0_ |= 0x04000000; + bitField0_ |= 0x08000000; onChanged(); return getCustomTimeFieldBuilder().getBuilder(); } @@ -6891,7 +7126,7 @@ public com.google.protobuf.TimestampOrBuilder getCustomTimeOrBuilder() { * @return Whether the softDeleteTime field is set. */ public boolean hasSoftDeleteTime() { - return ((bitField0_ & 0x08000000) != 0); + return ((bitField0_ & 0x10000000) != 0); } /** * @@ -6941,7 +7176,7 @@ public Builder setSoftDeleteTime(com.google.protobuf.Timestamp value) { } else { softDeleteTimeBuilder_.setMessage(value); } - bitField0_ |= 0x08000000; + bitField0_ |= 0x10000000; onChanged(); return this; } @@ -6965,7 +7200,7 @@ public Builder setSoftDeleteTime(com.google.protobuf.Timestamp.Builder builderFo } else { softDeleteTimeBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x08000000; + bitField0_ |= 0x10000000; onChanged(); return this; } @@ -6985,7 +7220,7 @@ public Builder setSoftDeleteTime(com.google.protobuf.Timestamp.Builder builderFo */ public Builder mergeSoftDeleteTime(com.google.protobuf.Timestamp value) { if (softDeleteTimeBuilder_ == null) { - if (((bitField0_ & 0x08000000) != 0) + if (((bitField0_ & 0x10000000) != 0) && softDeleteTime_ != null && softDeleteTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { getSoftDeleteTimeBuilder().mergeFrom(value); @@ -6996,7 +7231,7 @@ public Builder mergeSoftDeleteTime(com.google.protobuf.Timestamp value) { softDeleteTimeBuilder_.mergeFrom(value); } if (softDeleteTime_ != null) { - bitField0_ |= 0x08000000; + bitField0_ |= 0x10000000; onChanged(); } return this; @@ -7016,7 +7251,7 @@ public Builder mergeSoftDeleteTime(com.google.protobuf.Timestamp value) { * */ public Builder clearSoftDeleteTime() { - bitField0_ = (bitField0_ & ~0x08000000); + bitField0_ = (bitField0_ & ~0x10000000); softDeleteTime_ = null; if (softDeleteTimeBuilder_ != null) { softDeleteTimeBuilder_.dispose(); @@ -7040,7 +7275,7 @@ public Builder clearSoftDeleteTime() { * */ public com.google.protobuf.Timestamp.Builder getSoftDeleteTimeBuilder() { - bitField0_ |= 0x08000000; + bitField0_ |= 0x10000000; onChanged(); return getSoftDeleteTimeFieldBuilder().getBuilder(); } @@ -7121,7 +7356,7 @@ public com.google.protobuf.TimestampOrBuilder getSoftDeleteTimeOrBuilder() { * @return Whether the hardDeleteTime field is set. */ public boolean hasHardDeleteTime() { - return ((bitField0_ & 0x10000000) != 0); + return ((bitField0_ & 0x20000000) != 0); } /** * @@ -7171,7 +7406,7 @@ public Builder setHardDeleteTime(com.google.protobuf.Timestamp value) { } else { hardDeleteTimeBuilder_.setMessage(value); } - bitField0_ |= 0x10000000; + bitField0_ |= 0x20000000; onChanged(); return this; } @@ -7195,7 +7430,7 @@ public Builder setHardDeleteTime(com.google.protobuf.Timestamp.Builder builderFo } else { hardDeleteTimeBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x10000000; + bitField0_ |= 0x20000000; onChanged(); return this; } @@ -7215,7 +7450,7 @@ public Builder setHardDeleteTime(com.google.protobuf.Timestamp.Builder builderFo */ public Builder mergeHardDeleteTime(com.google.protobuf.Timestamp value) { if (hardDeleteTimeBuilder_ == null) { - if (((bitField0_ & 0x10000000) != 0) + if (((bitField0_ & 0x20000000) != 0) && hardDeleteTime_ != null && hardDeleteTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { getHardDeleteTimeBuilder().mergeFrom(value); @@ -7226,7 +7461,7 @@ public Builder mergeHardDeleteTime(com.google.protobuf.Timestamp value) { hardDeleteTimeBuilder_.mergeFrom(value); } if (hardDeleteTime_ != null) { - bitField0_ |= 0x10000000; + bitField0_ |= 0x20000000; onChanged(); } return this; @@ -7246,7 +7481,7 @@ public Builder mergeHardDeleteTime(com.google.protobuf.Timestamp value) { * */ public Builder clearHardDeleteTime() { - bitField0_ = (bitField0_ & ~0x10000000); + bitField0_ = (bitField0_ & ~0x20000000); hardDeleteTime_ = null; if (hardDeleteTimeBuilder_ != null) { hardDeleteTimeBuilder_.dispose(); @@ -7270,7 +7505,7 @@ public Builder clearHardDeleteTime() { * */ public com.google.protobuf.Timestamp.Builder getHardDeleteTimeBuilder() { - bitField0_ |= 0x10000000; + bitField0_ |= 0x20000000; onChanged(); return getHardDeleteTimeFieldBuilder().getBuilder(); } 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 2d78bd781..b2b3c4225 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 @@ -135,6 +135,49 @@ public interface ObjectOrBuilder */ long getGeneration(); + /** + * + * + *
+   * Output only. Restore token used to differentiate deleted objects with the
+   * same name and generation. This field is output only, and only set for
+   * deleted objects in HNS buckets.
+   * 
+ * + * optional string restore_token = 35 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the restoreToken field is set. + */ + boolean hasRestoreToken(); + /** + * + * + *
+   * Output only. Restore token used to differentiate deleted objects with the
+   * same name and generation. This field is output only, and only set for
+   * deleted objects in HNS buckets.
+   * 
+ * + * optional string restore_token = 35 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The restoreToken. + */ + java.lang.String getRestoreToken(); + /** + * + * + *
+   * Output only. Restore token used to differentiate deleted objects with the
+   * same name and generation. This field is output only, and only set for
+   * deleted objects in HNS buckets.
+   * 
+ * + * optional string restore_token = 35 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for restoreToken. + */ + com.google.protobuf.ByteString getRestoreTokenBytes(); + /** * * diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/RestoreObjectRequest.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/RestoreObjectRequest.java index adaf91b3d..9307bff18 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/RestoreObjectRequest.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/RestoreObjectRequest.java @@ -42,6 +42,7 @@ private RestoreObjectRequest(com.google.protobuf.GeneratedMessageV3.Builder b private RestoreObjectRequest() { bucket_ = ""; object_ = ""; + restoreToken_ = ""; } @java.lang.Override @@ -190,6 +191,65 @@ public long getGeneration() { return generation_; } + public static final int RESTORE_TOKEN_FIELD_NUMBER = 11; + + @SuppressWarnings("serial") + private volatile java.lang.Object restoreToken_ = ""; + /** + * + * + *
+   * Optional. Restore token used to differentiate soft-deleted objects with the
+   * same name and generation. Only applicable for hierarchical namespace
+   * buckets. This parameter is optional, and is only required in the rare case
+   * when there are multiple soft-deleted objects with the same name and
+   * generation.
+   * 
+ * + * string restore_token = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The restoreToken. + */ + @java.lang.Override + public java.lang.String getRestoreToken() { + java.lang.Object ref = restoreToken_; + 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(); + restoreToken_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Restore token used to differentiate soft-deleted objects with the
+   * same name and generation. Only applicable for hierarchical namespace
+   * buckets. This parameter is optional, and is only required in the rare case
+   * when there are multiple soft-deleted objects with the same name and
+   * generation.
+   * 
+ * + * string restore_token = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for restoreToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRestoreTokenBytes() { + java.lang.Object ref = restoreToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + restoreToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + public static final int IF_GENERATION_MATCH_FIELD_NUMBER = 4; private long ifGenerationMatch_ = 0L; /** @@ -465,6 +525,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(9, copySourceAcl_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(restoreToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, restoreToken_); + } getUnknownFields().writeTo(output); } @@ -503,6 +566,9 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000010) != 0)) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(9, copySourceAcl_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(restoreToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, restoreToken_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -522,6 +588,7 @@ public boolean equals(final java.lang.Object obj) { if (!getBucket().equals(other.getBucket())) return false; if (!getObject().equals(other.getObject())) return false; if (getGeneration() != other.getGeneration()) return false; + if (!getRestoreToken().equals(other.getRestoreToken())) return false; if (hasIfGenerationMatch() != other.hasIfGenerationMatch()) return false; if (hasIfGenerationMatch()) { if (getIfGenerationMatch() != other.getIfGenerationMatch()) return false; @@ -564,6 +631,8 @@ public int hashCode() { hash = (53 * hash) + getObject().hashCode(); hash = (37 * hash) + GENERATION_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getGeneration()); + hash = (37 * hash) + RESTORE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getRestoreToken().hashCode(); if (hasIfGenerationMatch()) { hash = (37 * hash) + IF_GENERATION_MATCH_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getIfGenerationMatch()); @@ -740,6 +809,7 @@ public Builder clear() { bucket_ = ""; object_ = ""; generation_ = 0L; + restoreToken_ = ""; ifGenerationMatch_ = 0L; ifGenerationNotMatch_ = 0L; ifMetagenerationMatch_ = 0L; @@ -795,28 +865,31 @@ private void buildPartial0(com.google.storage.v2.RestoreObjectRequest result) { if (((from_bitField0_ & 0x00000004) != 0)) { result.generation_ = generation_; } - int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000008) != 0)) { + result.restoreToken_ = restoreToken_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000010) != 0)) { result.ifGenerationMatch_ = ifGenerationMatch_; to_bitField0_ |= 0x00000001; } - if (((from_bitField0_ & 0x00000010) != 0)) { + if (((from_bitField0_ & 0x00000020) != 0)) { result.ifGenerationNotMatch_ = ifGenerationNotMatch_; to_bitField0_ |= 0x00000002; } - if (((from_bitField0_ & 0x00000020) != 0)) { + if (((from_bitField0_ & 0x00000040) != 0)) { result.ifMetagenerationMatch_ = ifMetagenerationMatch_; to_bitField0_ |= 0x00000004; } - if (((from_bitField0_ & 0x00000040) != 0)) { + if (((from_bitField0_ & 0x00000080) != 0)) { result.ifMetagenerationNotMatch_ = ifMetagenerationNotMatch_; to_bitField0_ |= 0x00000008; } - if (((from_bitField0_ & 0x00000080) != 0)) { + if (((from_bitField0_ & 0x00000100) != 0)) { result.copySourceAcl_ = copySourceAcl_; to_bitField0_ |= 0x00000010; } - if (((from_bitField0_ & 0x00000100) != 0)) { + if (((from_bitField0_ & 0x00000200) != 0)) { result.commonObjectRequestParams_ = commonObjectRequestParamsBuilder_ == null ? commonObjectRequestParams_ @@ -884,6 +957,11 @@ public Builder mergeFrom(com.google.storage.v2.RestoreObjectRequest other) { if (other.getGeneration() != 0L) { setGeneration(other.getGeneration()); } + if (!other.getRestoreToken().isEmpty()) { + restoreToken_ = other.restoreToken_; + bitField0_ |= 0x00000008; + onChanged(); + } if (other.hasIfGenerationMatch()) { setIfGenerationMatch(other.getIfGenerationMatch()); } @@ -949,40 +1027,46 @@ public Builder mergeFrom( case 32: { ifGenerationMatch_ = input.readInt64(); - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; break; } // case 32 case 40: { ifGenerationNotMatch_ = input.readInt64(); - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; break; } // case 40 case 48: { ifMetagenerationMatch_ = input.readInt64(); - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; break; } // case 48 case 56: { ifMetagenerationNotMatch_ = input.readInt64(); - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; break; } // case 56 case 66: { input.readMessage( getCommonObjectRequestParamsFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; break; } // case 66 case 72: { copySourceAcl_ = input.readBool(); - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; break; } // case 72 + case 90: + { + restoreToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 90 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1277,6 +1361,132 @@ public Builder clearGeneration() { return this; } + private java.lang.Object restoreToken_ = ""; + /** + * + * + *
+     * Optional. Restore token used to differentiate soft-deleted objects with the
+     * same name and generation. Only applicable for hierarchical namespace
+     * buckets. This parameter is optional, and is only required in the rare case
+     * when there are multiple soft-deleted objects with the same name and
+     * generation.
+     * 
+ * + * string restore_token = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The restoreToken. + */ + public java.lang.String getRestoreToken() { + java.lang.Object ref = restoreToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + restoreToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Restore token used to differentiate soft-deleted objects with the
+     * same name and generation. Only applicable for hierarchical namespace
+     * buckets. This parameter is optional, and is only required in the rare case
+     * when there are multiple soft-deleted objects with the same name and
+     * generation.
+     * 
+ * + * string restore_token = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for restoreToken. + */ + public com.google.protobuf.ByteString getRestoreTokenBytes() { + java.lang.Object ref = restoreToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + restoreToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Restore token used to differentiate soft-deleted objects with the
+     * same name and generation. Only applicable for hierarchical namespace
+     * buckets. This parameter is optional, and is only required in the rare case
+     * when there are multiple soft-deleted objects with the same name and
+     * generation.
+     * 
+ * + * string restore_token = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The restoreToken to set. + * @return This builder for chaining. + */ + public Builder setRestoreToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + restoreToken_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Restore token used to differentiate soft-deleted objects with the
+     * same name and generation. Only applicable for hierarchical namespace
+     * buckets. This parameter is optional, and is only required in the rare case
+     * when there are multiple soft-deleted objects with the same name and
+     * generation.
+     * 
+ * + * string restore_token = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRestoreToken() { + restoreToken_ = getDefaultInstance().getRestoreToken(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Restore token used to differentiate soft-deleted objects with the
+     * same name and generation. Only applicable for hierarchical namespace
+     * buckets. This parameter is optional, and is only required in the rare case
+     * when there are multiple soft-deleted objects with the same name and
+     * generation.
+     * 
+ * + * string restore_token = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for restoreToken to set. + * @return This builder for chaining. + */ + public Builder setRestoreTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + restoreToken_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + private long ifGenerationMatch_; /** * @@ -1293,7 +1503,7 @@ public Builder clearGeneration() { */ @java.lang.Override public boolean hasIfGenerationMatch() { - return ((bitField0_ & 0x00000008) != 0); + return ((bitField0_ & 0x00000010) != 0); } /** * @@ -1329,7 +1539,7 @@ public long getIfGenerationMatch() { public Builder setIfGenerationMatch(long value) { ifGenerationMatch_ = value; - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -1347,7 +1557,7 @@ public Builder setIfGenerationMatch(long value) { * @return This builder for chaining. */ public Builder clearIfGenerationMatch() { - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); ifGenerationMatch_ = 0L; onChanged(); return this; @@ -1370,7 +1580,7 @@ public Builder clearIfGenerationMatch() { */ @java.lang.Override public boolean hasIfGenerationNotMatch() { - return ((bitField0_ & 0x00000010) != 0); + return ((bitField0_ & 0x00000020) != 0); } /** * @@ -1408,7 +1618,7 @@ public long getIfGenerationNotMatch() { public Builder setIfGenerationNotMatch(long value) { ifGenerationNotMatch_ = value; - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -1427,7 +1637,7 @@ public Builder setIfGenerationNotMatch(long value) { * @return This builder for chaining. */ public Builder clearIfGenerationNotMatch() { - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000020); ifGenerationNotMatch_ = 0L; onChanged(); return this; @@ -1448,7 +1658,7 @@ public Builder clearIfGenerationNotMatch() { */ @java.lang.Override public boolean hasIfMetagenerationMatch() { - return ((bitField0_ & 0x00000020) != 0); + return ((bitField0_ & 0x00000040) != 0); } /** * @@ -1482,7 +1692,7 @@ public long getIfMetagenerationMatch() { public Builder setIfMetagenerationMatch(long value) { ifMetagenerationMatch_ = value; - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -1499,7 +1709,7 @@ public Builder setIfMetagenerationMatch(long value) { * @return This builder for chaining. */ public Builder clearIfMetagenerationMatch() { - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000040); ifMetagenerationMatch_ = 0L; onChanged(); return this; @@ -1520,7 +1730,7 @@ public Builder clearIfMetagenerationMatch() { */ @java.lang.Override public boolean hasIfMetagenerationNotMatch() { - return ((bitField0_ & 0x00000040) != 0); + return ((bitField0_ & 0x00000080) != 0); } /** * @@ -1554,7 +1764,7 @@ public long getIfMetagenerationNotMatch() { public Builder setIfMetagenerationNotMatch(long value) { ifMetagenerationNotMatch_ = value; - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -1571,7 +1781,7 @@ public Builder setIfMetagenerationNotMatch(long value) { * @return This builder for chaining. */ public Builder clearIfMetagenerationNotMatch() { - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000080); ifMetagenerationNotMatch_ = 0L; onChanged(); return this; @@ -1593,7 +1803,7 @@ public Builder clearIfMetagenerationNotMatch() { */ @java.lang.Override public boolean hasCopySourceAcl() { - return ((bitField0_ & 0x00000080) != 0); + return ((bitField0_ & 0x00000100) != 0); } /** * @@ -1629,7 +1839,7 @@ public boolean getCopySourceAcl() { public Builder setCopySourceAcl(boolean value) { copySourceAcl_ = value; - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -1647,7 +1857,7 @@ public Builder setCopySourceAcl(boolean value) { * @return This builder for chaining. */ public Builder clearCopySourceAcl() { - bitField0_ = (bitField0_ & ~0x00000080); + bitField0_ = (bitField0_ & ~0x00000100); copySourceAcl_ = false; onChanged(); return this; @@ -1671,7 +1881,7 @@ public Builder clearCopySourceAcl() { * @return Whether the commonObjectRequestParams field is set. */ public boolean hasCommonObjectRequestParams() { - return ((bitField0_ & 0x00000100) != 0); + return ((bitField0_ & 0x00000200) != 0); } /** * @@ -1712,7 +1922,7 @@ public Builder setCommonObjectRequestParams( } else { commonObjectRequestParamsBuilder_.setMessage(value); } - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -1732,7 +1942,7 @@ public Builder setCommonObjectRequestParams( } else { commonObjectRequestParamsBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -1748,7 +1958,7 @@ public Builder setCommonObjectRequestParams( public Builder mergeCommonObjectRequestParams( com.google.storage.v2.CommonObjectRequestParams value) { if (commonObjectRequestParamsBuilder_ == null) { - if (((bitField0_ & 0x00000100) != 0) + if (((bitField0_ & 0x00000200) != 0) && commonObjectRequestParams_ != null && commonObjectRequestParams_ != com.google.storage.v2.CommonObjectRequestParams.getDefaultInstance()) { @@ -1760,7 +1970,7 @@ public Builder mergeCommonObjectRequestParams( commonObjectRequestParamsBuilder_.mergeFrom(value); } if (commonObjectRequestParams_ != null) { - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; onChanged(); } return this; @@ -1775,7 +1985,7 @@ public Builder mergeCommonObjectRequestParams( * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; */ public Builder clearCommonObjectRequestParams() { - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00000200); commonObjectRequestParams_ = null; if (commonObjectRequestParamsBuilder_ != null) { commonObjectRequestParamsBuilder_.dispose(); @@ -1795,7 +2005,7 @@ public Builder clearCommonObjectRequestParams() { */ public com.google.storage.v2.CommonObjectRequestParams.Builder getCommonObjectRequestParamsBuilder() { - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; onChanged(); return getCommonObjectRequestParamsFieldBuilder().getBuilder(); } diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/RestoreObjectRequestOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/RestoreObjectRequestOrBuilder.java index 411e3ac5f..447085ec1 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/RestoreObjectRequestOrBuilder.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/RestoreObjectRequestOrBuilder.java @@ -91,6 +91,39 @@ public interface RestoreObjectRequestOrBuilder */ long getGeneration(); + /** + * + * + *
+   * Optional. Restore token used to differentiate soft-deleted objects with the
+   * same name and generation. Only applicable for hierarchical namespace
+   * buckets. This parameter is optional, and is only required in the rare case
+   * when there are multiple soft-deleted objects with the same name and
+   * generation.
+   * 
+ * + * string restore_token = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The restoreToken. + */ + java.lang.String getRestoreToken(); + /** + * + * + *
+   * Optional. Restore token used to differentiate soft-deleted objects with the
+   * same name and generation. Only applicable for hierarchical namespace
+   * buckets. This parameter is optional, and is only required in the rare case
+   * when there are multiple soft-deleted objects with the same name and
+   * generation.
+   * 
+ * + * string restore_token = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for restoreToken. + */ + com.google.protobuf.ByteString getRestoreTokenBytes(); + /** * * 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 c8119ea2e..0a1640875 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 @@ -429,530 +429,533 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + ".CommonObjectRequestParamsB\026\n\024_if_genera" + "tion_matchB\032\n\030_if_generation_not_matchB\032" + "\n\030_if_metageneration_matchB\036\n\034_if_metage" - + "neration_not_match\"\211\004\n\024RestoreObjectRequ" + + "neration_not_match\"\245\004\n\024RestoreObjectRequ" + "est\0225\n\006bucket\030\001 \001(\tB%\340A\002\372A\037\n\035storage.goo" + "gleapis.com/Bucket\022\023\n\006object\030\002 \001(\tB\003\340A\002\022" - + "\027\n\ngeneration\030\003 \001(\003B\003\340A\002\022 \n\023if_generatio" - + "n_match\030\004 \001(\003H\000\210\001\001\022$\n\027if_generation_not_" - + "match\030\005 \001(\003H\001\210\001\001\022$\n\027if_metageneration_ma" - + "tch\030\006 \001(\003H\002\210\001\001\022(\n\033if_metageneration_not_" - + "match\030\007 \001(\003H\003\210\001\001\022\034\n\017copy_source_acl\030\t \001(" - + "\010H\004\210\001\001\022R\n\034common_object_request_params\030\010" - + " \001(\0132,.google.storage.v2.CommonObjectReq" - + "uestParamsB\026\n\024_if_generation_matchB\032\n\030_i" - + "f_generation_not_matchB\032\n\030_if_metagenera" - + "tion_matchB\036\n\034_if_metageneration_not_mat" - + "chB\022\n\020_copy_source_acl\"5\n\033CancelResumabl" - + "eWriteRequest\022\026\n\tupload_id\030\001 \001(\tB\003\340A\002\"\036\n" - + "\034CancelResumableWriteResponse\"\272\004\n\021ReadOb" + + "\027\n\ngeneration\030\003 \001(\003B\003\340A\002\022\032\n\rrestore_toke" + + "n\030\013 \001(\tB\003\340A\001\022 \n\023if_generation_match\030\004 \001(" + + "\003H\000\210\001\001\022$\n\027if_generation_not_match\030\005 \001(\003H" + + "\001\210\001\001\022$\n\027if_metageneration_match\030\006 \001(\003H\002\210" + + "\001\001\022(\n\033if_metageneration_not_match\030\007 \001(\003H" + + "\003\210\001\001\022\034\n\017copy_source_acl\030\t \001(\010H\004\210\001\001\022R\n\034co" + + "mmon_object_request_params\030\010 \001(\0132,.googl" + + "e.storage.v2.CommonObjectRequestParamsB\026" + + "\n\024_if_generation_matchB\032\n\030_if_generation" + + "_not_matchB\032\n\030_if_metageneration_matchB\036" + + "\n\034_if_metageneration_not_matchB\022\n\020_copy_" + + "source_acl\"5\n\033CancelResumableWriteReques" + + "t\022\026\n\tupload_id\030\001 \001(\tB\003\340A\002\"\036\n\034CancelResum" + + "ableWriteResponse\"\272\004\n\021ReadObjectRequest\022" + + "5\n\006bucket\030\001 \001(\tB%\340A\002\372A\037\n\035storage.googlea" + + "pis.com/Bucket\022\023\n\006object\030\002 \001(\tB\003\340A\002\022\022\n\ng" + + "eneration\030\003 \001(\003\022\023\n\013read_offset\030\004 \001(\003\022\022\n\n" + + "read_limit\030\005 \001(\003\022 \n\023if_generation_match\030" + + "\006 \001(\003H\000\210\001\001\022$\n\027if_generation_not_match\030\007 " + + "\001(\003H\001\210\001\001\022$\n\027if_metageneration_match\030\010 \001(" + + "\003H\002\210\001\001\022(\n\033if_metageneration_not_match\030\t " + + "\001(\003H\003\210\001\001\022R\n\034common_object_request_params" + + "\030\n \001(\0132,.google.storage.v2.CommonObjectR" + + "equestParams\0222\n\tread_mask\030\014 \001(\0132\032.google" + + ".protobuf.FieldMaskH\004\210\001\001B\026\n\024_if_generati" + + "on_matchB\032\n\030_if_generation_not_matchB\032\n\030" + + "_if_metageneration_matchB\036\n\034_if_metagene" + + "ration_not_matchB\014\n\n_read_mask\"\330\004\n\020GetOb" + "jectRequest\0225\n\006bucket\030\001 \001(\tB%\340A\002\372A\037\n\035sto" + "rage.googleapis.com/Bucket\022\023\n\006object\030\002 \001" - + "(\tB\003\340A\002\022\022\n\ngeneration\030\003 \001(\003\022\023\n\013read_offs" - + "et\030\004 \001(\003\022\022\n\nread_limit\030\005 \001(\003\022 \n\023if_gener" - + "ation_match\030\006 \001(\003H\000\210\001\001\022$\n\027if_generation_" - + "not_match\030\007 \001(\003H\001\210\001\001\022$\n\027if_metageneratio" - + "n_match\030\010 \001(\003H\002\210\001\001\022(\n\033if_metageneration_" - + "not_match\030\t \001(\003H\003\210\001\001\022R\n\034common_object_re" - + "quest_params\030\n \001(\0132,.google.storage.v2.C" - + "ommonObjectRequestParams\0222\n\tread_mask\030\014 " - + "\001(\0132\032.google.protobuf.FieldMaskH\004\210\001\001B\026\n\024" - + "_if_generation_matchB\032\n\030_if_generation_n" - + "ot_matchB\032\n\030_if_metageneration_matchB\036\n\034" - + "_if_metageneration_not_matchB\014\n\n_read_ma" - + "sk\"\274\004\n\020GetObjectRequest\0225\n\006bucket\030\001 \001(\tB" - + "%\340A\002\372A\037\n\035storage.googleapis.com/Bucket\022\023" - + "\n\006object\030\002 \001(\tB\003\340A\002\022\022\n\ngeneration\030\003 \001(\003\022" - + "\031\n\014soft_deleted\030\013 \001(\010H\000\210\001\001\022 \n\023if_generat" - + "ion_match\030\004 \001(\003H\001\210\001\001\022$\n\027if_generation_no" - + "t_match\030\005 \001(\003H\002\210\001\001\022$\n\027if_metageneration_" - + "match\030\006 \001(\003H\003\210\001\001\022(\n\033if_metageneration_no" - + "t_match\030\007 \001(\003H\004\210\001\001\022R\n\034common_object_requ" - + "est_params\030\010 \001(\0132,.google.storage.v2.Com" - + "monObjectRequestParams\0222\n\tread_mask\030\n \001(" - + "\0132\032.google.protobuf.FieldMaskH\005\210\001\001B\017\n\r_s" - + "oft_deletedB\026\n\024_if_generation_matchB\032\n\030_" - + "if_generation_not_matchB\032\n\030_if_metagener" - + "ation_matchB\036\n\034_if_metageneration_not_ma" - + "tchB\014\n\n_read_mask\"\365\001\n\022ReadObjectResponse" - + "\022<\n\020checksummed_data\030\001 \001(\0132\".google.stor" - + "age.v2.ChecksummedData\022<\n\020object_checksu" - + "ms\030\002 \001(\0132\".google.storage.v2.ObjectCheck" - + "sums\0226\n\rcontent_range\030\003 \001(\0132\037.google.sto" - + "rage.v2.ContentRange\022+\n\010metadata\030\004 \001(\0132\031" - + ".google.storage.v2.Object\"\215\003\n\017WriteObjec" - + "tSpec\0220\n\010resource\030\001 \001(\0132\031.google.storage" - + ".v2.ObjectB\003\340A\002\022\026\n\016predefined_acl\030\007 \001(\t\022" - + " \n\023if_generation_match\030\003 \001(\003H\000\210\001\001\022$\n\027if_" - + "generation_not_match\030\004 \001(\003H\001\210\001\001\022$\n\027if_me" - + "tageneration_match\030\005 \001(\003H\002\210\001\001\022(\n\033if_meta" - + "generation_not_match\030\006 \001(\003H\003\210\001\001\022\030\n\013objec" - + "t_size\030\010 \001(\003H\004\210\001\001B\026\n\024_if_generation_matc" - + "hB\032\n\030_if_generation_not_matchB\032\n\030_if_met" - + "ageneration_matchB\036\n\034_if_metageneration_" - + "not_matchB\016\n\014_object_size\"\206\003\n\022WriteObjec" - + "tRequest\022\023\n\tupload_id\030\001 \001(\tH\000\022?\n\021write_o" - + "bject_spec\030\002 \001(\0132\".google.storage.v2.Wri" - + "teObjectSpecH\000\022\031\n\014write_offset\030\003 \001(\003B\003\340A" - + "\002\022>\n\020checksummed_data\030\004 \001(\0132\".google.sto" - + "rage.v2.ChecksummedDataH\001\022<\n\020object_chec" - + "ksums\030\006 \001(\0132\".google.storage.v2.ObjectCh" - + "ecksums\022\024\n\014finish_write\030\007 \001(\010\022R\n\034common_" - + "object_request_params\030\010 \001(\0132,.google.sto" - + "rage.v2.CommonObjectRequestParamsB\017\n\rfir" - + "st_messageB\006\n\004data\"n\n\023WriteObjectRespons" - + "e\022\030\n\016persisted_size\030\001 \001(\003H\000\022-\n\010resource\030" - + "\002 \001(\0132\031.google.storage.v2.ObjectH\000B\016\n\014wr" - + "ite_status\"\257\003\n\026BidiWriteObjectRequest\022\023\n" - + "\tupload_id\030\001 \001(\tH\000\022?\n\021write_object_spec\030" - + "\002 \001(\0132\".google.storage.v2.WriteObjectSpe" - + "cH\000\022\031\n\014write_offset\030\003 \001(\003B\003\340A\002\022>\n\020checks" - + "ummed_data\030\004 \001(\0132\".google.storage.v2.Che" - + "cksummedDataH\001\022<\n\020object_checksums\030\006 \001(\013" - + "2\".google.storage.v2.ObjectChecksums\022\024\n\014" - + "state_lookup\030\007 \001(\010\022\r\n\005flush\030\010 \001(\010\022\024\n\014fin" - + "ish_write\030\t \001(\010\022R\n\034common_object_request" - + "_params\030\n \001(\0132,.google.storage.v2.Common" - + "ObjectRequestParamsB\017\n\rfirst_messageB\006\n\004" - + "data\"r\n\027BidiWriteObjectResponse\022\030\n\016persi" - + "sted_size\030\001 \001(\003H\000\022-\n\010resource\030\002 \001(\0132\031.go" - + "ogle.storage.v2.ObjectH\000B\016\n\014write_status" - + "\"\255\003\n\022ListObjectsRequest\0225\n\006parent\030\001 \001(\tB" - + "%\340A\002\372A\037\n\035storage.googleapis.com/Bucket\022\021" - + "\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022\021\n" - + "\tdelimiter\030\004 \001(\t\022\"\n\032include_trailing_del" - + "imiter\030\005 \001(\010\022\016\n\006prefix\030\006 \001(\t\022\020\n\010versions" - + "\030\007 \001(\010\0222\n\tread_mask\030\010 \001(\0132\032.google.proto" - + "buf.FieldMaskH\000\210\001\001\022 \n\023lexicographic_star" - + "t\030\n \001(\tB\003\340A\001\022\036\n\021lexicographic_end\030\013 \001(\tB" - + "\003\340A\001\022\031\n\014soft_deleted\030\014 \001(\010B\003\340A\001\022(\n\033inclu" - + "de_folders_as_prefixes\030\r \001(\010B\003\340A\001\022\027\n\nmat" - + "ch_glob\030\016 \001(\tB\003\340A\001B\014\n\n_read_mask\"\205\001\n\027Que" - + "ryWriteStatusRequest\022\026\n\tupload_id\030\001 \001(\tB" - + "\003\340A\002\022R\n\034common_object_request_params\030\002 \001" - + "(\0132,.google.storage.v2.CommonObjectReque" - + "stParams\"s\n\030QueryWriteStatusResponse\022\030\n\016" - + "persisted_size\030\001 \001(\003H\000\022-\n\010resource\030\002 \001(\013" - + "2\031.google.storage.v2.ObjectH\000B\016\n\014write_s" - + "tatus\"\250\n\n\024RewriteObjectRequest\022 \n\020destin" - + "ation_name\030\030 \001(\tB\006\340A\002\340A\005\022D\n\022destination_" - + "bucket\030\031 \001(\tB(\340A\002\340A\005\372A\037\n\035storage.googlea" - + "pis.com/Bucket\022C\n\023destination_kms_key\030\033 " - + "\001(\tB&\372A#\n!cloudkms.googleapis.com/Crypto" - + "Key\022.\n\013destination\030\001 \001(\0132\031.google.storag" - + "e.v2.Object\022<\n\rsource_bucket\030\002 \001(\tB%\340A\002\372" - + "A\037\n\035storage.googleapis.com/Bucket\022\032\n\rsou" - + "rce_object\030\003 \001(\tB\003\340A\002\022\031\n\021source_generati" - + "on\030\004 \001(\003\022\025\n\rrewrite_token\030\005 \001(\t\022\"\n\032desti" - + "nation_predefined_acl\030\034 \001(\t\022 \n\023if_genera" - + "tion_match\030\007 \001(\003H\000\210\001\001\022$\n\027if_generation_n" - + "ot_match\030\010 \001(\003H\001\210\001\001\022$\n\027if_metageneration" - + "_match\030\t \001(\003H\002\210\001\001\022(\n\033if_metageneration_n" - + "ot_match\030\n \001(\003H\003\210\001\001\022\'\n\032if_source_generat" - + "ion_match\030\013 \001(\003H\004\210\001\001\022+\n\036if_source_genera" - + "tion_not_match\030\014 \001(\003H\005\210\001\001\022+\n\036if_source_m" - + "etageneration_match\030\r \001(\003H\006\210\001\001\022/\n\"if_sou" - + "rce_metageneration_not_match\030\016 \001(\003H\007\210\001\001\022" - + "$\n\034max_bytes_rewritten_per_call\030\017 \001(\003\022(\n" - + " copy_source_encryption_algorithm\030\020 \001(\t\022" - + "(\n copy_source_encryption_key_bytes\030\025 \001(" - + "\014\022/\n\'copy_source_encryption_key_sha256_b" - + "ytes\030\026 \001(\014\022R\n\034common_object_request_para" - + "ms\030\023 \001(\0132,.google.storage.v2.CommonObjec" - + "tRequestParams\022<\n\020object_checksums\030\035 \001(\013" - + "2\".google.storage.v2.ObjectChecksumsB\026\n\024" - + "_if_generation_matchB\032\n\030_if_generation_n" - + "ot_matchB\032\n\030_if_metageneration_matchB\036\n\034" - + "_if_metageneration_not_matchB\035\n\033_if_sour" - + "ce_generation_matchB!\n\037_if_source_genera" - + "tion_not_matchB!\n\037_if_source_metagenerat" - + "ion_matchB%\n#_if_source_metageneration_n" - + "ot_match\"\227\001\n\017RewriteResponse\022\035\n\025total_by" - + "tes_rewritten\030\001 \001(\003\022\023\n\013object_size\030\002 \001(\003" - + "\022\014\n\004done\030\003 \001(\010\022\025\n\rrewrite_token\030\004 \001(\t\022+\n" - + "\010resource\030\005 \001(\0132\031.google.storage.v2.Obje" - + "ct\"\362\001\n\032StartResumableWriteRequest\022B\n\021wri" - + "te_object_spec\030\001 \001(\0132\".google.storage.v2" - + ".WriteObjectSpecB\003\340A\002\022R\n\034common_object_r" - + "equest_params\030\003 \001(\0132,.google.storage.v2." - + "CommonObjectRequestParams\022<\n\020object_chec" - + "ksums\030\005 \001(\0132\".google.storage.v2.ObjectCh" - + "ecksums\"0\n\033StartResumableWriteResponse\022\021" - + "\n\tupload_id\030\001 \001(\t\"\357\003\n\023UpdateObjectReques" - + "t\022.\n\006object\030\001 \001(\0132\031.google.storage.v2.Ob" - + "jectB\003\340A\002\022 \n\023if_generation_match\030\002 \001(\003H\000" - + "\210\001\001\022$\n\027if_generation_not_match\030\003 \001(\003H\001\210\001" - + "\001\022$\n\027if_metageneration_match\030\004 \001(\003H\002\210\001\001\022" - + "(\n\033if_metageneration_not_match\030\005 \001(\003H\003\210\001" - + "\001\022\026\n\016predefined_acl\030\n \001(\t\0224\n\013update_mask" - + "\030\007 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\002\022" - + "R\n\034common_object_request_params\030\010 \001(\0132,." - + "google.storage.v2.CommonObjectRequestPar" - + "amsB\026\n\024_if_generation_matchB\032\n\030_if_gener" - + "ation_not_matchB\032\n\030_if_metageneration_ma" - + "tchB\036\n\034_if_metageneration_not_match\"`\n\030G" - + "etServiceAccountRequest\022D\n\007project\030\001 \001(\t" - + "B3\340A\002\372A-\n+cloudresourcemanager.googleapi" - + "s.com/Project\"\'\n\016ServiceAccount\022\025\n\remail" - + "_address\030\001 \001(\t\"\200\001\n\024CreateHmacKeyRequest\022" + + "(\tB\003\340A\002\022\022\n\ngeneration\030\003 \001(\003\022\031\n\014soft_dele" + + "ted\030\013 \001(\010H\000\210\001\001\022 \n\023if_generation_match\030\004 " + + "\001(\003H\001\210\001\001\022$\n\027if_generation_not_match\030\005 \001(" + + "\003H\002\210\001\001\022$\n\027if_metageneration_match\030\006 \001(\003H" + + "\003\210\001\001\022(\n\033if_metageneration_not_match\030\007 \001(" + + "\003H\004\210\001\001\022R\n\034common_object_request_params\030\010" + + " \001(\0132,.google.storage.v2.CommonObjectReq" + + "uestParams\0222\n\tread_mask\030\n \001(\0132\032.google.p" + + "rotobuf.FieldMaskH\005\210\001\001\022\032\n\rrestore_token\030" + + "\014 \001(\tB\003\340A\001B\017\n\r_soft_deletedB\026\n\024_if_gener" + + "ation_matchB\032\n\030_if_generation_not_matchB" + + "\032\n\030_if_metageneration_matchB\036\n\034_if_metag" + + "eneration_not_matchB\014\n\n_read_mask\"\365\001\n\022Re" + + "adObjectResponse\022<\n\020checksummed_data\030\001 \001" + + "(\0132\".google.storage.v2.ChecksummedData\022<" + + "\n\020object_checksums\030\002 \001(\0132\".google.storag" + + "e.v2.ObjectChecksums\0226\n\rcontent_range\030\003 " + + "\001(\0132\037.google.storage.v2.ContentRange\022+\n\010" + + "metadata\030\004 \001(\0132\031.google.storage.v2.Objec" + + "t\"\215\003\n\017WriteObjectSpec\0220\n\010resource\030\001 \001(\0132" + + "\031.google.storage.v2.ObjectB\003\340A\002\022\026\n\016prede" + + "fined_acl\030\007 \001(\t\022 \n\023if_generation_match\030\003" + + " \001(\003H\000\210\001\001\022$\n\027if_generation_not_match\030\004 \001" + + "(\003H\001\210\001\001\022$\n\027if_metageneration_match\030\005 \001(\003" + + "H\002\210\001\001\022(\n\033if_metageneration_not_match\030\006 \001" + + "(\003H\003\210\001\001\022\030\n\013object_size\030\010 \001(\003H\004\210\001\001B\026\n\024_if" + + "_generation_matchB\032\n\030_if_generation_not_" + + "matchB\032\n\030_if_metageneration_matchB\036\n\034_if" + + "_metageneration_not_matchB\016\n\014_object_siz" + + "e\"\206\003\n\022WriteObjectRequest\022\023\n\tupload_id\030\001 " + + "\001(\tH\000\022?\n\021write_object_spec\030\002 \001(\0132\".googl" + + "e.storage.v2.WriteObjectSpecH\000\022\031\n\014write_" + + "offset\030\003 \001(\003B\003\340A\002\022>\n\020checksummed_data\030\004 " + + "\001(\0132\".google.storage.v2.ChecksummedDataH" + + "\001\022<\n\020object_checksums\030\006 \001(\0132\".google.sto" + + "rage.v2.ObjectChecksums\022\024\n\014finish_write\030" + + "\007 \001(\010\022R\n\034common_object_request_params\030\010 " + + "\001(\0132,.google.storage.v2.CommonObjectRequ" + + "estParamsB\017\n\rfirst_messageB\006\n\004data\"n\n\023Wr" + + "iteObjectResponse\022\030\n\016persisted_size\030\001 \001(" + + "\003H\000\022-\n\010resource\030\002 \001(\0132\031.google.storage.v" + + "2.ObjectH\000B\016\n\014write_status\"\257\003\n\026BidiWrite" + + "ObjectRequest\022\023\n\tupload_id\030\001 \001(\tH\000\022?\n\021wr" + + "ite_object_spec\030\002 \001(\0132\".google.storage.v" + + "2.WriteObjectSpecH\000\022\031\n\014write_offset\030\003 \001(" + + "\003B\003\340A\002\022>\n\020checksummed_data\030\004 \001(\0132\".googl" + + "e.storage.v2.ChecksummedDataH\001\022<\n\020object" + + "_checksums\030\006 \001(\0132\".google.storage.v2.Obj" + + "ectChecksums\022\024\n\014state_lookup\030\007 \001(\010\022\r\n\005fl" + + "ush\030\010 \001(\010\022\024\n\014finish_write\030\t \001(\010\022R\n\034commo" + + "n_object_request_params\030\n \001(\0132,.google.s" + + "torage.v2.CommonObjectRequestParamsB\017\n\rf" + + "irst_messageB\006\n\004data\"r\n\027BidiWriteObjectR" + + "esponse\022\030\n\016persisted_size\030\001 \001(\003H\000\022-\n\010res" + + "ource\030\002 \001(\0132\031.google.storage.v2.ObjectH\000" + + "B\016\n\014write_status\"\255\003\n\022ListObjectsRequest\022" + + "5\n\006parent\030\001 \001(\tB%\340A\002\372A\037\n\035storage.googlea" + + "pis.com/Bucket\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npag" + + "e_token\030\003 \001(\t\022\021\n\tdelimiter\030\004 \001(\t\022\"\n\032incl" + + "ude_trailing_delimiter\030\005 \001(\010\022\016\n\006prefix\030\006" + + " \001(\t\022\020\n\010versions\030\007 \001(\010\0222\n\tread_mask\030\010 \001(" + + "\0132\032.google.protobuf.FieldMaskH\000\210\001\001\022 \n\023le" + + "xicographic_start\030\n \001(\tB\003\340A\001\022\036\n\021lexicogr" + + "aphic_end\030\013 \001(\tB\003\340A\001\022\031\n\014soft_deleted\030\014 \001" + + "(\010B\003\340A\001\022(\n\033include_folders_as_prefixes\030\r" + + " \001(\010B\003\340A\001\022\027\n\nmatch_glob\030\016 \001(\tB\003\340A\001B\014\n\n_r" + + "ead_mask\"\205\001\n\027QueryWriteStatusRequest\022\026\n\t" + + "upload_id\030\001 \001(\tB\003\340A\002\022R\n\034common_object_re" + + "quest_params\030\002 \001(\0132,.google.storage.v2.C" + + "ommonObjectRequestParams\"s\n\030QueryWriteSt" + + "atusResponse\022\030\n\016persisted_size\030\001 \001(\003H\000\022-" + + "\n\010resource\030\002 \001(\0132\031.google.storage.v2.Obj" + + "ectH\000B\016\n\014write_status\"\250\n\n\024RewriteObjectR" + + "equest\022 \n\020destination_name\030\030 \001(\tB\006\340A\002\340A\005" + + "\022D\n\022destination_bucket\030\031 \001(\tB(\340A\002\340A\005\372A\037\n" + + "\035storage.googleapis.com/Bucket\022C\n\023destin" + + "ation_kms_key\030\033 \001(\tB&\372A#\n!cloudkms.googl" + + "eapis.com/CryptoKey\022.\n\013destination\030\001 \001(\013" + + "2\031.google.storage.v2.Object\022<\n\rsource_bu" + + "cket\030\002 \001(\tB%\340A\002\372A\037\n\035storage.googleapis.c" + + "om/Bucket\022\032\n\rsource_object\030\003 \001(\tB\003\340A\002\022\031\n" + + "\021source_generation\030\004 \001(\003\022\025\n\rrewrite_toke" + + "n\030\005 \001(\t\022\"\n\032destination_predefined_acl\030\034 " + + "\001(\t\022 \n\023if_generation_match\030\007 \001(\003H\000\210\001\001\022$\n" + + "\027if_generation_not_match\030\010 \001(\003H\001\210\001\001\022$\n\027i" + + "f_metageneration_match\030\t \001(\003H\002\210\001\001\022(\n\033if_" + + "metageneration_not_match\030\n \001(\003H\003\210\001\001\022\'\n\032i" + + "f_source_generation_match\030\013 \001(\003H\004\210\001\001\022+\n\036" + + "if_source_generation_not_match\030\014 \001(\003H\005\210\001" + + "\001\022+\n\036if_source_metageneration_match\030\r \001(" + + "\003H\006\210\001\001\022/\n\"if_source_metageneration_not_m" + + "atch\030\016 \001(\003H\007\210\001\001\022$\n\034max_bytes_rewritten_p" + + "er_call\030\017 \001(\003\022(\n copy_source_encryption_" + + "algorithm\030\020 \001(\t\022(\n copy_source_encryptio" + + "n_key_bytes\030\025 \001(\014\022/\n\'copy_source_encrypt" + + "ion_key_sha256_bytes\030\026 \001(\014\022R\n\034common_obj" + + "ect_request_params\030\023 \001(\0132,.google.storag" + + "e.v2.CommonObjectRequestParams\022<\n\020object" + + "_checksums\030\035 \001(\0132\".google.storage.v2.Obj" + + "ectChecksumsB\026\n\024_if_generation_matchB\032\n\030" + + "_if_generation_not_matchB\032\n\030_if_metagene" + + "ration_matchB\036\n\034_if_metageneration_not_m" + + "atchB\035\n\033_if_source_generation_matchB!\n\037_" + + "if_source_generation_not_matchB!\n\037_if_so" + + "urce_metageneration_matchB%\n#_if_source_" + + "metageneration_not_match\"\227\001\n\017RewriteResp" + + "onse\022\035\n\025total_bytes_rewritten\030\001 \001(\003\022\023\n\013o" + + "bject_size\030\002 \001(\003\022\014\n\004done\030\003 \001(\010\022\025\n\rrewrit" + + "e_token\030\004 \001(\t\022+\n\010resource\030\005 \001(\0132\031.google" + + ".storage.v2.Object\"\362\001\n\032StartResumableWri" + + "teRequest\022B\n\021write_object_spec\030\001 \001(\0132\".g" + + "oogle.storage.v2.WriteObjectSpecB\003\340A\002\022R\n" + + "\034common_object_request_params\030\003 \001(\0132,.go" + + "ogle.storage.v2.CommonObjectRequestParam" + + "s\022<\n\020object_checksums\030\005 \001(\0132\".google.sto" + + "rage.v2.ObjectChecksums\"0\n\033StartResumabl" + + "eWriteResponse\022\021\n\tupload_id\030\001 \001(\t\"\357\003\n\023Up" + + "dateObjectRequest\022.\n\006object\030\001 \001(\0132\031.goog" + + "le.storage.v2.ObjectB\003\340A\002\022 \n\023if_generati" + + "on_match\030\002 \001(\003H\000\210\001\001\022$\n\027if_generation_not" + + "_match\030\003 \001(\003H\001\210\001\001\022$\n\027if_metageneration_m" + + "atch\030\004 \001(\003H\002\210\001\001\022(\n\033if_metageneration_not" + + "_match\030\005 \001(\003H\003\210\001\001\022\026\n\016predefined_acl\030\n \001(" + + "\t\0224\n\013update_mask\030\007 \001(\0132\032.google.protobuf" + + ".FieldMaskB\003\340A\002\022R\n\034common_object_request" + + "_params\030\010 \001(\0132,.google.storage.v2.Common" + + "ObjectRequestParamsB\026\n\024_if_generation_ma" + + "tchB\032\n\030_if_generation_not_matchB\032\n\030_if_m" + + "etageneration_matchB\036\n\034_if_metageneratio" + + "n_not_match\"`\n\030GetServiceAccountRequest\022" + "D\n\007project\030\001 \001(\tB3\340A\002\372A-\n+cloudresourcem" - + "anager.googleapis.com/Project\022\"\n\025service" - + "_account_email\030\002 \001(\tB\003\340A\002\"g\n\025CreateHmacK" - + "eyResponse\0224\n\010metadata\030\001 \001(\0132\".google.st" - + "orage.v2.HmacKeyMetadata\022\030\n\020secret_key_b" - + "ytes\030\003 \001(\014\"t\n\024DeleteHmacKeyRequest\022\026\n\tac" - + "cess_id\030\001 \001(\tB\003\340A\002\022D\n\007project\030\002 \001(\tB3\340A\002" - + "\372A-\n+cloudresourcemanager.googleapis.com" - + "/Project\"q\n\021GetHmacKeyRequest\022\026\n\taccess_" - + "id\030\001 \001(\tB\003\340A\002\022D\n\007project\030\002 \001(\tB3\340A\002\372A-\n+" - + "cloudresourcemanager.googleapis.com/Proj" - + "ect\"\274\001\n\023ListHmacKeysRequest\022D\n\007project\030\001" - + " \001(\tB3\340A\002\372A-\n+cloudresourcemanager.googl" - + "eapis.com/Project\022\021\n\tpage_size\030\002 \001(\005\022\022\n\n" - + "page_token\030\003 \001(\t\022\035\n\025service_account_emai" - + "l\030\004 \001(\t\022\031\n\021show_deleted_keys\030\005 \001(\010\"f\n\024Li" - + "stHmacKeysResponse\0225\n\thmac_keys\030\001 \003(\0132\"." - + "google.storage.v2.HmacKeyMetadata\022\027\n\017nex" - + "t_page_token\030\002 \001(\t\"\202\001\n\024UpdateHmacKeyRequ" - + "est\0229\n\010hmac_key\030\001 \001(\0132\".google.storage.v" - + "2.HmacKeyMetadataB\003\340A\002\022/\n\013update_mask\030\003 " - + "\001(\0132\032.google.protobuf.FieldMask\"\267\002\n\017Hmac" - + "KeyMetadata\022\017\n\002id\030\001 \001(\tB\003\340A\005\022\026\n\taccess_i" - + "d\030\002 \001(\tB\003\340A\005\022D\n\007project\030\003 \001(\tB3\340A\005\372A-\n+c" - + "loudresourcemanager.googleapis.com/Proje" - + "ct\022\"\n\025service_account_email\030\004 \001(\tB\003\340A\003\022\022" - + "\n\005state\030\005 \001(\tB\003\340A\001\0224\n\013create_time\030\006 \001(\0132" - + "\032.google.protobuf.TimestampB\003\340A\003\0224\n\013upda" - + "te_time\030\007 \001(\0132\032.google.protobuf.Timestam" - + "pB\003\340A\003\022\021\n\004etag\030\010 \001(\tB\003\340A\001\"|\n\031CommonObjec" - + "tRequestParams\022\034\n\024encryption_algorithm\030\001" - + " \001(\t\022\034\n\024encryption_key_bytes\030\004 \001(\014\022#\n\033en" - + "cryption_key_sha256_bytes\030\005 \001(\014\"\312\005\n\020Serv" - + "iceConstants\"\265\005\n\006Values\022\026\n\022VALUES_UNSPEC" - + "IFIED\020\000\022\033\n\024MAX_READ_CHUNK_BYTES\020\200\200\200\001\022\034\n\025" - + "MAX_WRITE_CHUNK_BYTES\020\200\200\200\001\022\031\n\022MAX_OBJECT" - + "_SIZE_MB\020\200\200\300\002\022)\n$MAX_CUSTOM_METADATA_FIE" - + "LD_NAME_BYTES\020\200\010\022*\n%MAX_CUSTOM_METADATA_" - + "FIELD_VALUE_BYTES\020\200 \022)\n$MAX_CUSTOM_METAD" - + "ATA_TOTAL_SIZE_BYTES\020\200@\022*\n$MAX_BUCKET_ME" - + "TADATA_TOTAL_SIZE_BYTES\020\200\240\001\022\'\n#MAX_NOTIF" - + "ICATION_CONFIGS_PER_BUCKET\020d\022\"\n\036MAX_LIFE" - + "CYCLE_RULES_PER_BUCKET\020d\022&\n\"MAX_NOTIFICA" - + "TION_CUSTOM_ATTRIBUTES\020\005\0221\n,MAX_NOTIFICA" - + "TION_CUSTOM_ATTRIBUTE_KEY_LENGTH\020\200\002\0223\n.M" - + "AX_NOTIFICATION_CUSTOM_ATTRIBUTE_VALUE_L" - + "ENGTH\020\200\010\022\034\n\030MAX_LABELS_ENTRIES_COUNT\020@\022\037" - + "\n\033MAX_LABELS_KEY_VALUE_LENGTH\020?\022\037\n\032MAX_L" - + "ABELS_KEY_VALUE_BYTES\020\200\001\022.\n)MAX_OBJECT_I" - + "DS_PER_DELETE_OBJECTS_REQUEST\020\350\007\022\036\n\032SPLI" - + "T_TOKEN_MAX_VALID_DAYS\020\016\032\002\020\001\"\222\034\n\006Bucket\022" - + "\021\n\004name\030\001 \001(\tB\003\340A\005\022\026\n\tbucket_id\030\002 \001(\tB\003\340" - + "A\003\022\014\n\004etag\030\035 \001(\t\022D\n\007project\030\003 \001(\tB3\340A\005\372A" - + "-\n+cloudresourcemanager.googleapis.com/P" - + "roject\022\033\n\016metageneration\030\004 \001(\003B\003\340A\003\022\025\n\010l" - + "ocation\030\005 \001(\tB\003\340A\005\022\032\n\rlocation_type\030\006 \001(" - + "\tB\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.Buck" - + "etAccessControl\022B\n\022default_object_acl\030\t " - + "\003(\0132&.google.storage.v2.ObjectAccessCont" - + "rol\0226\n\tlifecycle\030\n \001(\0132#.google.storage." - + "v2.Bucket.Lifecycle\0224\n\013create_time\030\013 \001(\013" - + "2\032.google.protobuf.TimestampB\003\340A\003\022,\n\004cor" - + "s\030\014 \003(\0132\036.google.storage.v2.Bucket.Cors\022" - + "4\n\013update_time\030\r \001(\0132\032.google.protobuf.T" - + "imestampB\003\340A\003\022 \n\030default_event_based_hol" - + "d\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\nve" - + "rsioning\030\021 \001(\0132$.google.storage.v2.Bucke" - + "t.Versioning\0222\n\007logging\030\022 \001(\0132!.google.s" - + "torage.v2.Bucket.Logging\022,\n\005owner\030\023 \001(\0132" - + "\030.google.storage.v2.OwnerB\003\340A\003\0228\n\nencryp" - + "tion\030\024 \001(\0132$.google.storage.v2.Bucket.En" - + "cryption\0222\n\007billing\030\025 \001(\0132!.google.stora" - + "ge.v2.Bucket.Billing\022C\n\020retention_policy" - + "\030\026 \001(\0132).google.storage.v2.Bucket.Retent" - + "ionPolicy\0227\n\niam_config\030\027 \001(\0132#.google.s" - + "torage.v2.Bucket.IamConfig\022\025\n\rsatisfies_" - + "pzs\030\031 \001(\010\022P\n\027custom_placement_config\030\032 \001" - + "(\0132/.google.storage.v2.Bucket.CustomPlac" - + "ementConfig\0226\n\tautoclass\030\034 \001(\0132#.google." - + "storage.v2.Bucket.Autoclass\022T\n\026hierarchi" - + "cal_namespace\030 \001(\0132/.google.storage.v2." - + "Bucket.HierarchicalNamespaceB\003\340A\001\022K\n\022sof" - + "t_delete_policy\030\037 \001(\0132*.google.storage.v" - + "2.Bucket.SoftDeletePolicyB\003\340A\001\032!\n\007Billin" - + "g\022\026\n\016requester_pays\030\001 \001(\010\032X\n\004Cors\022\016\n\006ori" - + "gin\030\001 \003(\t\022\016\n\006method\030\002 \003(\t\022\027\n\017response_he" - + "ader\030\003 \003(\t\022\027\n\017max_age_seconds\030\004 \001(\005\032M\n\nE" - + "ncryption\022?\n\017default_kms_key\030\001 \001(\tB&\372A#\n" - + "!cloudkms.googleapis.com/CryptoKey\032\354\001\n\tI" - + "amConfig\022a\n\033uniform_bucket_level_access\030" - + "\001 \001(\0132<.google.storage.v2.Bucket.IamConf" - + "ig.UniformBucketLevelAccess\022 \n\030public_ac" - + "cess_prevention\030\003 \001(\t\032Z\n\030UniformBucketLe" - + "velAccess\022\017\n\007enabled\030\001 \001(\010\022-\n\tlock_time\030" - + "\002 \001(\0132\032.google.protobuf.Timestamp\032\363\005\n\tLi" - + "fecycle\0226\n\004rule\030\001 \003(\0132(.google.storage.v" - + "2.Bucket.Lifecycle.Rule\032\255\005\n\004Rule\022?\n\006acti" - + "on\030\001 \001(\0132/.google.storage.v2.Bucket.Life" - + "cycle.Rule.Action\022E\n\tcondition\030\002 \001(\01322.g" - + "oogle.storage.v2.Bucket.Lifecycle.Rule.C" - + "ondition\032-\n\006Action\022\014\n\004type\030\001 \001(\t\022\025\n\rstor" - + "age_class\030\002 \001(\t\032\355\003\n\tCondition\022\025\n\010age_day" - + "s\030\001 \001(\005H\000\210\001\001\022)\n\016created_before\030\002 \001(\0132\021.g" - + "oogle.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\025matche" - + "s_storage_class\030\005 \003(\t\022#\n\026days_since_cust" - + "om_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_n" - + "ewer_versionsB\031\n\027_days_since_custom_time" - + "B\035\n\033_days_since_noncurrent_time\0328\n\007Loggi" - + "ng\022\022\n\nlog_bucket\030\001 \001(\t\022\031\n\021log_object_pre" - + "fix\030\002 \001(\t\032\217\001\n\017RetentionPolicy\0222\n\016effecti" - + "ve_time\030\001 \001(\0132\032.google.protobuf.Timestam" - + "p\022\021\n\tis_locked\030\002 \001(\010\0225\n\022retention_durati" - + "on\030\004 \001(\0132\031.google.protobuf.Duration\032\261\001\n\020" - + "SoftDeletePolicy\022:\n\022retention_duration\030\001" - + " \001(\0132\031.google.protobuf.DurationH\000\210\001\001\0227\n\016" - + "effective_time\030\002 \001(\0132\032.google.protobuf.T" - + "imestampH\001\210\001\001B\025\n\023_retention_durationB\021\n\017" - + "_effective_time\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\032/\n\025CustomPla" - + "cementConfig\022\026\n\016data_locations\030\001 \003(\t\032\213\002\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\022#\n\026terminal_storage_class\030\003 \001(\tH\000\210\001\001\022P" - + "\n\"terminal_storage_class_update_time\030\004 \001" - + "(\0132\032.google.protobuf.TimestampB\003\340A\003H\001\210\001\001" - + "B\031\n\027_terminal_storage_classB%\n#_terminal" - + "_storage_class_update_time\032-\n\025Hierarchic" - + "alNamespace\022\024\n\007enabled\030\001 \001(\010B\003\340A\001\032-\n\013Lab" - + "elsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001" - + ":G\352AD\n\035storage.googleapis.com/Bucket\022#pr" - + "ojects/{project}/buckets/{bucket}\"\316\001\n\023Bu" - + "cketAccessControl\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\027\n\nentity_alt\030\t \001(\tB" - + "\003\340A\003\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.storage.v2.ProjectTe" - + "am\"I\n\017ChecksummedData\022\026\n\007content\030\001 \001(\014B\005" - + "\010\001\340A\001\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\"L\n\022CustomerEn" - + "cryption\022\034\n\024encryption_algorithm\030\001 \001(\t\022\030" - + "\n\020key_sha256_bytes\030\003 \001(\014\"\254\n\n\006Object\022\021\n\004n" - + "ame\030\001 \001(\tB\003\340A\005\0225\n\006bucket\030\002 \001(\tB%\340A\005\372A\037\n\035" - + "storage.googleapis.com/Bucket\022\014\n\004etag\030\033 " - + "\001(\t\022\027\n\ngeneration\030\003 \001(\003B\003\340A\005\022\033\n\016metagene" - + "ration\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\020content_encoding\030" - + "\007 \001(\t\022\033\n\023content_disposition\030\010 \001(\t\022\025\n\rca" - + "che_control\030\t \001(\t\0223\n\003acl\030\n \003(\0132&.google.", - "storage.v2.ObjectAccessControl\022\030\n\020conten" - + "t_language\030\013 \001(\t\0224\n\013delete_time\030\014 \001(\0132\032." - + "google.protobuf.TimestampB\003\340A\003\022\024\n\014conten" - + "t_type\030\r \001(\t\0224\n\013create_time\030\016 \001(\0132\032.goog" - + "le.protobuf.TimestampB\003\340A\003\022\034\n\017component_" - + "count\030\017 \001(\005B\003\340A\003\022:\n\tchecksums\030\020 \001(\0132\".go" - + "ogle.storage.v2.ObjectChecksumsB\003\340A\003\0224\n\013" - + "update_time\030\021 \001(\0132\032.google.protobuf.Time" - + "stampB\003\340A\003\0227\n\007kms_key\030\022 \001(\tB&\372A#\n!cloudk" - + "ms.googleapis.com/CryptoKey\022B\n\031update_st" - + "orage_class_time\030\023 \001(\0132\032.google.protobuf" - + ".TimestampB\003\340A\003\022\026\n\016temporary_hold\030\024 \001(\010\022" - + "9\n\025retention_expire_time\030\025 \001(\0132\032.google." - + "protobuf.Timestamp\0229\n\010metadata\030\026 \003(\0132\'.g" - + "oogle.storage.v2.Object.MetadataEntry\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.OwnerB\003\340A\003\022B\n\023cu" - + "stomer_encryption\030\031 \001(\0132%.google.storage" - + ".v2.CustomerEncryption\022/\n\013custom_time\030\032 " - + "\001(\0132\032.google.protobuf.Timestamp\022>\n\020soft_" - + "delete_time\030\034 \001(\0132\032.google.protobuf.Time" - + "stampB\003\340A\003H\001\210\001\001\022>\n\020hard_delete_time\030\035 \001(" - + "\0132\032.google.protobuf.TimestampB\003\340A\003H\002\210\001\001\032" - + "/\n\rMetadataEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002" - + " \001(\t:\0028\001B\023\n\021_event_based_holdB\023\n\021_soft_d" - + "elete_timeB\023\n\021_hard_delete_time\"\316\001\n\023Obje" - + "ctAccessControl\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\027\n\nentity_alt\030\t \001(\tB\003\340" - + "A\003\022\021\n\tentity_id\030\004 \001(\t\022\014\n\004etag\030\010 \001(\t\022\r\n\005e" - + "mail\030\005 \001(\t\022\016\n\006domain\030\006 \001(\t\0224\n\014project_te" - + "am\030\007 \001(\0132\036.google.storage.v2.ProjectTeam" - + "\"l\n\023ListObjectsResponse\022*\n\007objects\030\001 \003(\013" - + "2\031.google.storage.v2.Object\022\020\n\010prefixes\030" - + "\002 \003(\t\022\027\n\017next_page_token\030\003 \001(\t\"3\n\013Projec" - + "tTeam\022\026\n\016project_number\030\001 \001(\t\022\014\n\004team\030\002 " - + "\001(\t\"*\n\005Owner\022\016\n\006entity\030\001 \001(\t\022\021\n\tentity_i" - + "d\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\"b\n\037" - + "DeleteNotificationConfigRequest\022?\n\004name\030" - + "\001 \001(\tB1\340A\002\372A+\n)storage.googleapis.com/No" - + "tificationConfig\"_\n\034GetNotificationConfi" - + "gRequest\022?\n\004name\030\001 \001(\tB1\340A\002\372A+\n)storage." - + "googleapis.com/NotificationConfig\"\255\001\n\037Cr" - + "eateNotificationConfigRequest\022A\n\006parent\030" - + "\001 \001(\tB1\340A\002\372A+\022)storage.googleapis.com/No" - + "tificationConfig\022G\n\023notification_config\030" - + "\002 \001(\0132%.google.storage.v2.NotificationCo" - + "nfigB\003\340A\002\"\224\001\n\036ListNotificationConfigsReq" - + "uest\022A\n\006parent\030\001 \001(\tB1\340A\002\372A+\022)storage.go" - + "ogleapis.com/NotificationConfig\022\026\n\tpage_" - + "size\030\002 \001(\005B\003\340A\001\022\027\n\npage_token\030\003 \001(\tB\003\340A\001" - + "\"\177\n\037ListNotificationConfigsResponse\022C\n\024n" - + "otification_configs\030\001 \003(\0132%.google.stora" - + "ge.v2.NotificationConfig\022\027\n\017next_page_to" - + "ken\030\002 \001(\t\"\273\003\n\022NotificationConfig\022\021\n\004name" - + "\030\001 \001(\tB\003\340A\002\022\022\n\005topic\030\002 \001(\tB\003\340A\002\022\021\n\004etag\030" - + "\007 \001(\tB\003\340A\001\022\030\n\013event_types\030\003 \003(\tB\003\340A\001\022[\n\021" - + "custom_attributes\030\004 \003(\0132;.google.storage" - + ".v2.NotificationConfig.CustomAttributesE" - + "ntryB\003\340A\001\022\037\n\022object_name_prefix\030\005 \001(\tB\003\340" - + "A\001\022\033\n\016payload_format\030\006 \001(\tB\003\340A\002\0327\n\025Custo" - + "mAttributesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002" - + " \001(\t:\0028\001:}\352Az\n)storage.googleapis.com/No" - + "tificationConfig\022Mprojects/{project}/buc" - + "kets/{bucket}/notificationConfigs/{notif" - + "ication_config}2\210(\n\007Storage\022r\n\014DeleteBuc" - + "ket\022&.google.storage.v2.DeleteBucketRequ" - + "est\032\026.google.protobuf.Empty\"\"\332A\004name\212\323\344\223" - + "\002\025\022\023\n\004name\022\013{bucket=**}\022o\n\tGetBucket\022#.g" - + "oogle.storage.v2.GetBucketRequest\032\031.goog" - + "le.storage.v2.Bucket\"\"\332A\004name\212\323\344\223\002\025\022\023\n\004n" - + "ame\022\013{bucket=**}\022\253\001\n\014CreateBucket\022&.goog" - + "le.storage.v2.CreateBucketRequest\032\031.goog" - + "le.storage.v2.Bucket\"X\332A\027parent,bucket,b" - + "ucket_id\212\323\344\223\0028\022\026\n\006parent\022\014{project=**}\022\036" - + "\n\016bucket.project\022\014{project=**}\022\205\001\n\013ListB" - + "uckets\022%.google.storage.v2.ListBucketsRe" - + "quest\032&.google.storage.v2.ListBucketsRes" - + "ponse\"\'\332A\006parent\212\323\344\223\002\030\022\026\n\006parent\022\014{proje" - + "ct=**}\022\223\001\n\031LockBucketRetentionPolicy\0223.g" - + "oogle.storage.v2.LockBucketRetentionPoli" - + "cyRequest\032\031.google.storage.v2.Bucket\"&\332A" - + "\006bucket\212\323\344\223\002\027\022\025\n\006bucket\022\013{bucket=**}\022u\n\014" - + "GetIamPolicy\022\".google.iam.v1.GetIamPolic" - + "yRequest\032\025.google.iam.v1.Policy\"*\332A\010reso" - + "urce\212\323\344\223\002\031\022\027\n\010resource\022\013{bucket=**}\022|\n\014S" - + "etIamPolicy\022\".google.iam.v1.SetIamPolicy" - + "Request\032\025.google.iam.v1.Policy\"1\332A\017resou" - + "rce,policy\212\323\344\223\002\031\022\027\n\010resource\022\013{bucket=**" - + "}\022\226\002\n\022TestIamPermissions\022(.google.iam.v1" - + ".TestIamPermissionsRequest\032).google.iam." - + "v1.TestIamPermissionsResponse\"\252\001\332A\024resou" - + "rce,permissions\212\323\344\223\002\214\001\022\027\n\010resource\022\013{buc" - + "ket=**}\0224\n\010resource\022({bucket=projects/*/" - + "buckets/*}/objects/**\022;\n\010resource\022/{buck" - + "et=projects/*/buckets/*}/managedFolders/" - + "**\022\212\001\n\014UpdateBucket\022&.google.storage.v2." - + "UpdateBucketRequest\032\031.google.storage.v2." - + "Bucket\"7\332A\022bucket,update_mask\212\323\344\223\002\034\022\032\n\013b" - + "ucket.name\022\013{bucket=**}\022~\n\rComposeObject" - + "\022\'.google.storage.v2.ComposeObjectReques" - + "t\032\031.google.storage.v2.Object\")\212\323\344\223\002#\022!\n\022" - + "destination.bucket\022\013{bucket=**}\022\230\001\n\014Dele" - + "teObject\022&.google.storage.v2.DeleteObjec" - + "tRequest\032\026.google.protobuf.Empty\"H\332A\rbuc" - + "ket,object\332A\030bucket,object,generation\212\323\344" - + "\223\002\027\022\025\n\006bucket\022\013{bucket=**}\022\215\001\n\rRestoreOb" - + "ject\022\'.google.storage.v2.RestoreObjectRe" - + "quest\032\031.google.storage.v2.Object\"8\332A\030buc" - + "ket,object,generation\212\323\344\223\002\027\022\025\n\006bucket\022\013{" - + "bucket=**}\022\272\001\n\024CancelResumableWrite\022..go" - + "ogle.storage.v2.CancelResumableWriteRequ" - + "est\032/.google.storage.v2.CancelResumableW" - + "riteResponse\"A\332A\tupload_id\212\323\344\223\002/\022-\n\tuplo" - + "ad_id\022 {bucket=projects/*/buckets/*}/**\022" - + "\225\001\n\tGetObject\022#.google.storage.v2.GetObj" - + "ectRequest\032\031.google.storage.v2.Object\"H\332" - + "A\rbucket,object\332A\030bucket,object,generati" - + "on\212\323\344\223\002\027\022\025\n\006bucket\022\013{bucket=**}\022\245\001\n\nRead" - + "Object\022$.google.storage.v2.ReadObjectReq" - + "uest\032%.google.storage.v2.ReadObjectRespo" - + "nse\"H\332A\rbucket,object\332A\030bucket,object,ge" - + "neration\212\323\344\223\002\027\022\025\n\006bucket\022\013{bucket=**}0\001\022" - + "\214\001\n\014UpdateObject\022&.google.storage.v2.Upd" - + "ateObjectRequest\032\031.google.storage.v2.Obj" - + "ect\"9\332A\022object,update_mask\212\323\344\223\002\036\022\034\n\robje" - + "ct.bucket\022\013{bucket=**}\022`\n\013WriteObject\022%." - + "google.storage.v2.WriteObjectRequest\032&.g" - + "oogle.storage.v2.WriteObjectResponse\"\000(\001" - + "\022n\n\017BidiWriteObject\022).google.storage.v2." - + "BidiWriteObjectRequest\032*.google.storage." - + "v2.BidiWriteObjectResponse\"\000(\0010\001\022\204\001\n\013Lis" - + "tObjects\022%.google.storage.v2.ListObjects" - + "Request\032&.google.storage.v2.ListObjectsR" - + "esponse\"&\332A\006parent\212\323\344\223\002\027\022\025\n\006parent\022\013{buc" - + "ket=**}\022\230\001\n\rRewriteObject\022\'.google.stora" - + "ge.v2.RewriteObjectRequest\032\".google.stor" - + "age.v2.RewriteResponse\":\212\323\344\223\0024\022\017\n\rsource" - + "_bucket\022!\n\022destination_bucket\022\013{bucket=*" - + "*}\022\256\001\n\023StartResumableWrite\022-.google.stor" - + "age.v2.StartResumableWriteRequest\032..goog" - + "le.storage.v2.StartResumableWriteRespons" - + "e\"8\212\323\344\223\0022\0220\n!write_object_spec.resource." - + "bucket\022\013{bucket=**}\022\256\001\n\020QueryWriteStatus" - + "\022*.google.storage.v2.QueryWriteStatusReq" - + "uest\032+.google.storage.v2.QueryWriteStatu" - + "sResponse\"A\332A\tupload_id\212\323\344\223\002/\022-\n\tupload_" - + "id\022 {bucket=projects/*/buckets/*}/**\022\203\001\n" - + "\021GetServiceAccount\022+.google.storage.v2.G" - + "etServiceAccountRequest\032!.google.storage" - + ".v2.ServiceAccount\"\036\210\002\001\332A\007project\212\323\344\223\002\013\022" - + "\t\n\007project\022\230\001\n\rCreateHmacKey\022\'.google.st" - + "orage.v2.CreateHmacKeyRequest\032(.google.s" - + "torage.v2.CreateHmacKeyResponse\"4\210\002\001\332A\035p" - + "roject,service_account_email\212\323\344\223\002\013\022\t\n\007pr" - + "oject\022z\n\rDeleteHmacKey\022\'.google.storage." - + "v2.DeleteHmacKeyRequest\032\026.google.protobu" - + "f.Empty\"(\210\002\001\332A\021access_id,project\212\323\344\223\002\013\022\t" - + "\n\007project\022\200\001\n\nGetHmacKey\022$.google.storag" - + "e.v2.GetHmacKeyRequest\032\".google.storage." - + "v2.HmacKeyMetadata\"(\210\002\001\332A\021access_id,proj" - + "ect\212\323\344\223\002\013\022\t\n\007project\022\177\n\014ListHmacKeys\022&.g" - + "oogle.storage.v2.ListHmacKeysRequest\032\'.g" - + "oogle.storage.v2.ListHmacKeysResponse\"\036\210" - + "\002\001\332A\007project\212\323\344\223\002\013\022\t\n\007project\022\240\001\n\rUpdate" - + "HmacKey\022\'.google.storage.v2.UpdateHmacKe" - + "yRequest\032\".google.storage.v2.HmacKeyMeta" - + "data\"B\210\002\001\332A\024hmac_key,update_mask\212\323\344\223\002\"\022 " - + "\n\020hmac_key.project\022\014{project=**}\022\242\001\n\030Del" - + "eteNotificationConfig\0222.google.storage.v" - + "2.DeleteNotificationConfigRequest\032\026.goog" - + "le.protobuf.Empty\":\210\002\001\332A\004name\212\323\344\223\002*\022(\n\004n" - + "ame\022 {bucket=projects/*/buckets/*}/**\022\253\001" - + "\n\025GetNotificationConfig\022/.google.storage" - + ".v2.GetNotificationConfigRequest\032%.googl" - + "e.storage.v2.NotificationConfig\":\210\002\001\332A\004n" - + "ame\212\323\344\223\002*\022(\n\004name\022 {bucket=projects/*/bu" - + "ckets/*}/**\022\264\001\n\030CreateNotificationConfig" - + "\0222.google.storage.v2.CreateNotificationC" - + "onfigRequest\032%.google.storage.v2.Notific" - + "ationConfig\"=\210\002\001\332A\032parent,notification_c" - + "onfig\212\323\344\223\002\027\022\025\n\006parent\022\013{bucket=**}\022\253\001\n\027L" - + "istNotificationConfigs\0221.google.storage." - + "v2.ListNotificationConfigsRequest\0322.goog" - + "le.storage.v2.ListNotificationConfigsRes" - + "ponse\")\210\002\001\332A\006parent\212\323\344\223\002\027\022\025\n\006parent\022\013{bu" - + "cket=**}\032\247\002\312A\026storage.googleapis.com\322A\212\002" - + "https://www.googleapis.com/auth/cloud-pl" - + "atform,https://www.googleapis.com/auth/c" - + "loud-platform.read-only,https://www.goog" - + "leapis.com/auth/devstorage.full_control," - + "https://www.googleapis.com/auth/devstora" - + "ge.read_only,https://www.googleapis.com/" - + "auth/devstorage.read_writeB\342\001\n\025com.googl" - + "e.storage.v2B\014StorageProtoP\001Z>cloud.goog" - + "le.com/go/storage/internal/apiv2/storage" - + "pb;storagepb\352Ax\n!cloudkms.googleapis.com" - + "/CryptoKey\022Sprojects/{project}/locations" - + "/{location}/keyRings/{key_ring}/cryptoKe" - + "ys/{crypto_key}b\006proto3" + + "anager.googleapis.com/Project\"\'\n\016Service" + + "Account\022\025\n\remail_address\030\001 \001(\t\"\200\001\n\024Creat" + + "eHmacKeyRequest\022D\n\007project\030\001 \001(\tB3\340A\002\372A-" + + "\n+cloudresourcemanager.googleapis.com/Pr" + + "oject\022\"\n\025service_account_email\030\002 \001(\tB\003\340A" + + "\002\"g\n\025CreateHmacKeyResponse\0224\n\010metadata\030\001" + + " \001(\0132\".google.storage.v2.HmacKeyMetadata" + + "\022\030\n\020secret_key_bytes\030\003 \001(\014\"t\n\024DeleteHmac" + + "KeyRequest\022\026\n\taccess_id\030\001 \001(\tB\003\340A\002\022D\n\007pr" + + "oject\030\002 \001(\tB3\340A\002\372A-\n+cloudresourcemanage" + + "r.googleapis.com/Project\"q\n\021GetHmacKeyRe" + + "quest\022\026\n\taccess_id\030\001 \001(\tB\003\340A\002\022D\n\007project" + + "\030\002 \001(\tB3\340A\002\372A-\n+cloudresourcemanager.goo" + + "gleapis.com/Project\"\274\001\n\023ListHmacKeysRequ" + + "est\022D\n\007project\030\001 \001(\tB3\340A\002\372A-\n+cloudresou" + + "rcemanager.googleapis.com/Project\022\021\n\tpag" + + "e_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022\035\n\025serv" + + "ice_account_email\030\004 \001(\t\022\031\n\021show_deleted_" + + "keys\030\005 \001(\010\"f\n\024ListHmacKeysResponse\0225\n\thm" + + "ac_keys\030\001 \003(\0132\".google.storage.v2.HmacKe" + + "yMetadata\022\027\n\017next_page_token\030\002 \001(\t\"\202\001\n\024U" + + "pdateHmacKeyRequest\0229\n\010hmac_key\030\001 \001(\0132\"." + + "google.storage.v2.HmacKeyMetadataB\003\340A\002\022/" + + "\n\013update_mask\030\003 \001(\0132\032.google.protobuf.Fi" + + "eldMask\"\267\002\n\017HmacKeyMetadata\022\017\n\002id\030\001 \001(\tB" + + "\003\340A\005\022\026\n\taccess_id\030\002 \001(\tB\003\340A\005\022D\n\007project\030" + + "\003 \001(\tB3\340A\005\372A-\n+cloudresourcemanager.goog" + + "leapis.com/Project\022\"\n\025service_account_em" + + "ail\030\004 \001(\tB\003\340A\003\022\022\n\005state\030\005 \001(\tB\003\340A\001\0224\n\013cr" + + "eate_time\030\006 \001(\0132\032.google.protobuf.Timest" + + "ampB\003\340A\003\0224\n\013update_time\030\007 \001(\0132\032.google.p" + + "rotobuf.TimestampB\003\340A\003\022\021\n\004etag\030\010 \001(\tB\003\340A" + + "\001\"|\n\031CommonObjectRequestParams\022\034\n\024encryp" + + "tion_algorithm\030\001 \001(\t\022\034\n\024encryption_key_b" + + "ytes\030\004 \001(\014\022#\n\033encryption_key_sha256_byte" + + "s\030\005 \001(\014\"\312\005\n\020ServiceConstants\"\265\005\n\006Values\022" + + "\026\n\022VALUES_UNSPECIFIED\020\000\022\033\n\024MAX_READ_CHUN" + + "K_BYTES\020\200\200\200\001\022\034\n\025MAX_WRITE_CHUNK_BYTES\020\200\200" + + "\200\001\022\031\n\022MAX_OBJECT_SIZE_MB\020\200\200\300\002\022)\n$MAX_CUS" + + "TOM_METADATA_FIELD_NAME_BYTES\020\200\010\022*\n%MAX_" + + "CUSTOM_METADATA_FIELD_VALUE_BYTES\020\200 \022)\n$" + + "MAX_CUSTOM_METADATA_TOTAL_SIZE_BYTES\020\200@\022" + + "*\n$MAX_BUCKET_METADATA_TOTAL_SIZE_BYTES\020" + + "\200\240\001\022\'\n#MAX_NOTIFICATION_CONFIGS_PER_BUCK" + + "ET\020d\022\"\n\036MAX_LIFECYCLE_RULES_PER_BUCKET\020d" + + "\022&\n\"MAX_NOTIFICATION_CUSTOM_ATTRIBUTES\020\005" + + "\0221\n,MAX_NOTIFICATION_CUSTOM_ATTRIBUTE_KE" + + "Y_LENGTH\020\200\002\0223\n.MAX_NOTIFICATION_CUSTOM_A" + + "TTRIBUTE_VALUE_LENGTH\020\200\010\022\034\n\030MAX_LABELS_E" + + "NTRIES_COUNT\020@\022\037\n\033MAX_LABELS_KEY_VALUE_L" + + "ENGTH\020?\022\037\n\032MAX_LABELS_KEY_VALUE_BYTES\020\200\001" + + "\022.\n)MAX_OBJECT_IDS_PER_DELETE_OBJECTS_RE" + + "QUEST\020\350\007\022\036\n\032SPLIT_TOKEN_MAX_VALID_DAYS\020\016" + + "\032\002\020\001\"\243\034\n\006Bucket\022\021\n\004name\030\001 \001(\tB\003\340A\005\022\026\n\tbu" + + "cket_id\030\002 \001(\tB\003\340A\003\022\014\n\004etag\030\035 \001(\t\022D\n\007proj" + + "ect\030\003 \001(\tB3\340A\005\372A-\n+cloudresourcemanager." + + "googleapis.com/Project\022\033\n\016metageneration" + + "\030\004 \001(\003B\003\340A\003\022\025\n\010location\030\005 \001(\tB\003\340A\005\022\032\n\rlo" + + "cation_type\030\006 \001(\tB\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.BucketAccessControl\022B\n\022defau" + + "lt_object_acl\030\t \003(\0132&.google.storage.v2." + + "ObjectAccessControl\0226\n\tlifecycle\030\n \001(\0132#" + + ".google.storage.v2.Bucket.Lifecycle\0224\n\013c" + + "reate_time\030\013 \001(\0132\032.google.protobuf.Times" + + "tampB\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.g" + + "oogle.protobuf.TimestampB\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.Buck" + + "et.Website\0228\n\nversioning\030\021 \001(\0132$.google." + + "storage.v2.Bucket.Versioning\0222\n\007logging\030" + + "\022 \001(\0132!.google.storage.v2.Bucket.Logging" + + "\022,\n\005owner\030\023 \001(\0132\030.google.storage.v2.Owne" + + "rB\003\340A\003\0228\n\nencryption\030\024 \001(\0132$.google.stor" + + "age.v2.Bucket.Encryption\0222\n\007billing\030\025 \001(" + + "\0132!.google.storage.v2.Bucket.Billing\022C\n\020" + + "retention_policy\030\026 \001(\0132).google.storage." + + "v2.Bucket.RetentionPolicy\0227\n\niam_config\030" + + "\027 \001(\0132#.google.storage.v2.Bucket.IamConf" + + "ig\022\025\n\rsatisfies_pzs\030\031 \001(\010\022P\n\027custom_plac" + + "ement_config\030\032 \001(\0132/.google.storage.v2.B" + + "ucket.CustomPlacementConfig\0226\n\tautoclass" + + "\030\034 \001(\0132#.google.storage.v2.Bucket.Autocl" + + "ass\022T\n\026hierarchical_namespace\030 \001(\0132/.go" + + "ogle.storage.v2.Bucket.HierarchicalNames" + + "paceB\003\340A\001\022K\n\022soft_delete_policy\030\037 \001(\0132*." + + "google.storage.v2.Bucket.SoftDeletePolic" + + "yB\003\340A\001\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_se" + + "conds\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_buck" + + "et_level_access\030\001 \001(\0132<.google.storage.v" + + "2.Bucket.IamConfig.UniformBucketLevelAcc" + + "ess\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.protobuf." + + "Timestamp\032\363\005\n\tLifecycle\0226\n\004rule\030\001 \003(\0132(." + + "google.storage.v2.Bucket.Lifecycle.Rule\032" + + "\255\005\n\004Rule\022?\n\006action\030\001 \001(\0132/.google.storag" + + "e.v2.Bucket.Lifecycle.Rule.Action\022E\n\tcon" + + "dition\030\002 \001(\01322.google.storage.v2.Bucket." + + "Lifecycle.Rule.Condition\032-\n\006Action\022\014\n\004ty" + + "pe\030\001 \001(\t\022\025\n\rstorage_class\030\002 \001(\t\032\355\003\n\tCond" + + "ition\022\025\n\010age_days\030\001 \001(\005H\000\210\001\001\022)\n\016created_" + + "before\030\002 \001(\0132\021.google.type.Date\022\024\n\007is_li" + + "ve\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\022cu" + + "stom_time_before\030\010 \001(\0132\021.google.type.Dat" + + "e\022\'\n\032days_since_noncurrent_time\030\t \001(\005H\004\210" + + "\001\001\0221\n\026noncurrent_time_before\030\n \001(\0132\021.goo" + + "gle.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_i" + + "s_liveB\025\n\023_num_newer_versionsB\031\n\027_days_s" + + "ince_custom_timeB\035\n\033_days_since_noncurre" + + "nt_time\0328\n\007Logging\022\022\n\nlog_bucket\030\001 \001(\t\022\031" + + "\n\021log_object_prefix\030\002 \001(\t\032\217\001\n\017RetentionP" + + "olicy\0222\n\016effective_time\030\001 \001(\0132\032.google.p" + + "rotobuf.Timestamp\022\021\n\tis_locked\030\002 \001(\010\0225\n\022" + + "retention_duration\030\004 \001(\0132\031.google.protob" + + "uf.Duration\032\261\001\n\020SoftDeletePolicy\022:\n\022rete" + + "ntion_duration\030\001 \001(\0132\031.google.protobuf.D" + + "urationH\000\210\001\001\0227\n\016effective_time\030\002 \001(\0132\032.g" + + "oogle.protobuf.TimestampH\001\210\001\001B\025\n\023_retent" + + "ion_durationB\021\n\017_effective_time\032\035\n\nVersi" + + "oning\022\017\n\007enabled\030\001 \001(\010\032;\n\007Website\022\030\n\020mai" + + "n_page_suffix\030\001 \001(\t\022\026\n\016not_found_page\030\002 " + + "\001(\t\032/\n\025CustomPlacementConfig\022\026\n\016data_loc" + + "ations\030\001 \003(\t\032\213\002\n\tAutoclass\022\017\n\007enabled\030\001 " + + "\001(\010\0224\n\013toggle_time\030\002 \001(\0132\032.google.protob" + + "uf.TimestampB\003\340A\003\022#\n\026terminal_storage_cl" + + "ass\030\003 \001(\tH\000\210\001\001\022P\n\"terminal_storage_class" + + "_update_time\030\004 \001(\0132\032.google.protobuf.Tim" + + "estampB\003\340A\003H\001\210\001\001B\031\n\027_terminal_storage_cl" + + "assB%\n#_terminal_storage_class_update_ti" + + "me\032-\n\025HierarchicalNamespace\022\024\n\007enabled\030\001" + + " \001(\010B\003\340A\001\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001:X\352AU\n\035storage.googleapi" + + "s.com/Bucket\022#projects/{project}/buckets" + + "/{bucket}*\007buckets2\006bucket\"\316\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\027\n\nentity_alt\030\t \001(\tB\003\340A\003\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.storage.v2.ProjectTeam\"I\n\017C" + + "hecksummedData\022\026\n\007content\030\001 \001(\014B\005\010\001\340A\001\022\023" + + "\n\006crc32c\030\002 \001(\007H\000\210\001\001B\t\n\007_crc32c\"C\n\017Object" + + "Checksums\022\023\n\006crc32c\030\001 \001(\007H\000\210\001\001\022\020\n\010md5_ha" + + "sh\030\002 \001(\014B\t\n\007_crc32c\"L\n\022CustomerEncryptio" + + "n\022\034\n\024encryption_algorithm\030\001 \001(\t\022\030\n\020key_s" + + "ha256_bytes\030\003 \001(\014\"\337\n\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/Bucket\022\014\n\004etag\030\033 \001(\t\022\027\n\n" + + "generation\030\003 \001(\003B\003\340A\005\022\037\n\rrestore_token\030#" + + " \001(\tB\003\340A\003H\000\210\001\001\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(\003", + "B\003\340A\003\022\030\n\020content_encoding\030\007 \001(\t\022\033\n\023conte" + + "nt_disposition\030\010 \001(\t\022\025\n\rcache_control\030\t " + + "\001(\t\0223\n\003acl\030\n \003(\0132&.google.storage.v2.Obj" + + "ectAccessControl\022\030\n\020content_language\030\013 \001" + + "(\t\0224\n\013delete_time\030\014 \001(\0132\032.google.protobu" + + "f.TimestampB\003\340A\003\022\024\n\014content_type\030\r \001(\t\0224" + + "\n\013create_time\030\016 \001(\0132\032.google.protobuf.Ti" + + "mestampB\003\340A\003\022\034\n\017component_count\030\017 \001(\005B\003\340" + + "A\003\022:\n\tchecksums\030\020 \001(\0132\".google.storage.v" + + "2.ObjectChecksumsB\003\340A\003\0224\n\013update_time\030\021 " + + "\001(\0132\032.google.protobuf.TimestampB\003\340A\003\0227\n\007" + + "kms_key\030\022 \001(\tB&\372A#\n!cloudkms.googleapis." + + "com/CryptoKey\022B\n\031update_storage_class_ti" + + "me\030\023 \001(\0132\032.google.protobuf.TimestampB\003\340A" + + "\003\022\026\n\016temporary_hold\030\024 \001(\010\0229\n\025retention_e" + + "xpire_time\030\025 \001(\0132\032.google.protobuf.Times" + + "tamp\0229\n\010metadata\030\026 \003(\0132\'.google.storage." + + "v2.Object.MetadataEntry\022\035\n\020event_based_h" + + "old\030\027 \001(\010H\001\210\001\001\022,\n\005owner\030\030 \001(\0132\030.google.s" + + "torage.v2.OwnerB\003\340A\003\022B\n\023customer_encrypt" + + "ion\030\031 \001(\0132%.google.storage.v2.CustomerEn" + + "cryption\022/\n\013custom_time\030\032 \001(\0132\032.google.p" + + "rotobuf.Timestamp\022>\n\020soft_delete_time\030\034 " + + "\001(\0132\032.google.protobuf.TimestampB\003\340A\003H\002\210\001" + + "\001\022>\n\020hard_delete_time\030\035 \001(\0132\032.google.pro" + + "tobuf.TimestampB\003\340A\003H\003\210\001\001\032/\n\rMetadataEnt" + + "ry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\020\n\016_r" + + "estore_tokenB\023\n\021_event_based_holdB\023\n\021_so" + + "ft_delete_timeB\023\n\021_hard_delete_time\"\316\001\n\023" + + "ObjectAccessControl\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\027\n\nentity_alt\030\t \001(" + + "\tB\003\340A\003\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\014projec" + + "t_team\030\007 \001(\0132\036.google.storage.v2.Project" + + "Team\"l\n\023ListObjectsResponse\022*\n\007objects\030\001" + + " \003(\0132\031.google.storage.v2.Object\022\020\n\010prefi" + + "xes\030\002 \003(\t\022\027\n\017next_page_token\030\003 \001(\t\"3\n\013Pr" + + "ojectTeam\022\026\n\016project_number\030\001 \001(\t\022\014\n\004tea" + + "m\030\002 \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" + + "\"b\n\037DeleteNotificationConfigRequest\022?\n\004n" + + "ame\030\001 \001(\tB1\340A\002\372A+\n)storage.googleapis.co" + + "m/NotificationConfig\"_\n\034GetNotificationC" + + "onfigRequest\022?\n\004name\030\001 \001(\tB1\340A\002\372A+\n)stor" + + "age.googleapis.com/NotificationConfig\"\255\001" + + "\n\037CreateNotificationConfigRequest\022A\n\006par" + + "ent\030\001 \001(\tB1\340A\002\372A+\022)storage.googleapis.co" + + "m/NotificationConfig\022G\n\023notification_con" + + "fig\030\002 \001(\0132%.google.storage.v2.Notificati" + + "onConfigB\003\340A\002\"\224\001\n\036ListNotificationConfig" + + "sRequest\022A\n\006parent\030\001 \001(\tB1\340A\002\372A+\022)storag" + + "e.googleapis.com/NotificationConfig\022\026\n\tp" + + "age_size\030\002 \001(\005B\003\340A\001\022\027\n\npage_token\030\003 \001(\tB" + + "\003\340A\001\"\177\n\037ListNotificationConfigsResponse\022" + + "C\n\024notification_configs\030\001 \003(\0132%.google.s" + + "torage.v2.NotificationConfig\022\027\n\017next_pag" + + "e_token\030\002 \001(\t\"\273\003\n\022NotificationConfig\022\021\n\004" + + "name\030\001 \001(\tB\003\340A\002\022\022\n\005topic\030\002 \001(\tB\003\340A\002\022\021\n\004e" + + "tag\030\007 \001(\tB\003\340A\001\022\030\n\013event_types\030\003 \003(\tB\003\340A\001" + + "\022[\n\021custom_attributes\030\004 \003(\0132;.google.sto" + + "rage.v2.NotificationConfig.CustomAttribu" + + "tesEntryB\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\025C" + + "ustomAttributesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005val" + + "ue\030\002 \001(\t:\0028\001:}\352Az\n)storage.googleapis.co" + + "m/NotificationConfig\022Mprojects/{project}" + + "/buckets/{bucket}/notificationConfigs/{n" + + "otification_config}2\210(\n\007Storage\022r\n\014Delet" + + "eBucket\022&.google.storage.v2.DeleteBucket" + + "Request\032\026.google.protobuf.Empty\"\"\332A\004name" + + "\212\323\344\223\002\025\022\023\n\004name\022\013{bucket=**}\022o\n\tGetBucket" + + "\022#.google.storage.v2.GetBucketRequest\032\031." + + "google.storage.v2.Bucket\"\"\332A\004name\212\323\344\223\002\025\022" + + "\023\n\004name\022\013{bucket=**}\022\253\001\n\014CreateBucket\022&." + + "google.storage.v2.CreateBucketRequest\032\031." + + "google.storage.v2.Bucket\"X\332A\027parent,buck" + + "et,bucket_id\212\323\344\223\0028\022\026\n\006parent\022\014{project=*" + + "*}\022\036\n\016bucket.project\022\014{project=**}\022\205\001\n\013L" + + "istBuckets\022%.google.storage.v2.ListBucke" + + "tsRequest\032&.google.storage.v2.ListBucket" + + "sResponse\"\'\332A\006parent\212\323\344\223\002\030\022\026\n\006parent\022\014{p" + + "roject=**}\022\223\001\n\031LockBucketRetentionPolicy" + + "\0223.google.storage.v2.LockBucketRetention" + + "PolicyRequest\032\031.google.storage.v2.Bucket" + + "\"&\332A\006bucket\212\323\344\223\002\027\022\025\n\006bucket\022\013{bucket=**}" + + "\022u\n\014GetIamPolicy\022\".google.iam.v1.GetIamP" + + "olicyRequest\032\025.google.iam.v1.Policy\"*\332A\010" + + "resource\212\323\344\223\002\031\022\027\n\010resource\022\013{bucket=**}\022" + + "|\n\014SetIamPolicy\022\".google.iam.v1.SetIamPo" + + "licyRequest\032\025.google.iam.v1.Policy\"1\332A\017r" + + "esource,policy\212\323\344\223\002\031\022\027\n\010resource\022\013{bucke" + + "t=**}\022\226\002\n\022TestIamPermissions\022(.google.ia" + + "m.v1.TestIamPermissionsRequest\032).google." + + "iam.v1.TestIamPermissionsResponse\"\252\001\332A\024r" + + "esource,permissions\212\323\344\223\002\214\001\022\027\n\010resource\022\013" + + "{bucket=**}\0224\n\010resource\022({bucket=project" + + "s/*/buckets/*}/objects/**\022;\n\010resource\022/{" + + "bucket=projects/*/buckets/*}/managedFold" + + "ers/**\022\212\001\n\014UpdateBucket\022&.google.storage" + + ".v2.UpdateBucketRequest\032\031.google.storage" + + ".v2.Bucket\"7\332A\022bucket,update_mask\212\323\344\223\002\034\022" + + "\032\n\013bucket.name\022\013{bucket=**}\022~\n\rComposeOb" + + "ject\022\'.google.storage.v2.ComposeObjectRe" + + "quest\032\031.google.storage.v2.Object\")\212\323\344\223\002#" + + "\022!\n\022destination.bucket\022\013{bucket=**}\022\230\001\n\014" + + "DeleteObject\022&.google.storage.v2.DeleteO" + + "bjectRequest\032\026.google.protobuf.Empty\"H\332A" + + "\rbucket,object\332A\030bucket,object,generatio" + + "n\212\323\344\223\002\027\022\025\n\006bucket\022\013{bucket=**}\022\215\001\n\rResto" + + "reObject\022\'.google.storage.v2.RestoreObje" + + "ctRequest\032\031.google.storage.v2.Object\"8\332A" + + "\030bucket,object,generation\212\323\344\223\002\027\022\025\n\006bucke" + + "t\022\013{bucket=**}\022\272\001\n\024CancelResumableWrite\022" + + "..google.storage.v2.CancelResumableWrite" + + "Request\032/.google.storage.v2.CancelResuma" + + "bleWriteResponse\"A\332A\tupload_id\212\323\344\223\002/\022-\n\t" + + "upload_id\022 {bucket=projects/*/buckets/*}" + + "/**\022\225\001\n\tGetObject\022#.google.storage.v2.Ge" + + "tObjectRequest\032\031.google.storage.v2.Objec" + + "t\"H\332A\rbucket,object\332A\030bucket,object,gene" + + "ration\212\323\344\223\002\027\022\025\n\006bucket\022\013{bucket=**}\022\245\001\n\n" + + "ReadObject\022$.google.storage.v2.ReadObjec" + + "tRequest\032%.google.storage.v2.ReadObjectR" + + "esponse\"H\332A\rbucket,object\332A\030bucket,objec" + + "t,generation\212\323\344\223\002\027\022\025\n\006bucket\022\013{bucket=**" + + "}0\001\022\214\001\n\014UpdateObject\022&.google.storage.v2" + + ".UpdateObjectRequest\032\031.google.storage.v2" + + ".Object\"9\332A\022object,update_mask\212\323\344\223\002\036\022\034\n\r" + + "object.bucket\022\013{bucket=**}\022`\n\013WriteObjec" + + "t\022%.google.storage.v2.WriteObjectRequest" + + "\032&.google.storage.v2.WriteObjectResponse" + + "\"\000(\001\022n\n\017BidiWriteObject\022).google.storage" + + ".v2.BidiWriteObjectRequest\032*.google.stor" + + "age.v2.BidiWriteObjectResponse\"\000(\0010\001\022\204\001\n" + + "\013ListObjects\022%.google.storage.v2.ListObj" + + "ectsRequest\032&.google.storage.v2.ListObje" + + "ctsResponse\"&\332A\006parent\212\323\344\223\002\027\022\025\n\006parent\022\013" + + "{bucket=**}\022\230\001\n\rRewriteObject\022\'.google.s" + + "torage.v2.RewriteObjectRequest\032\".google." + + "storage.v2.RewriteResponse\":\212\323\344\223\0024\022\017\n\rso" + + "urce_bucket\022!\n\022destination_bucket\022\013{buck" + + "et=**}\022\256\001\n\023StartResumableWrite\022-.google." + + "storage.v2.StartResumableWriteRequest\032.." + + "google.storage.v2.StartResumableWriteRes" + + "ponse\"8\212\323\344\223\0022\0220\n!write_object_spec.resou" + + "rce.bucket\022\013{bucket=**}\022\256\001\n\020QueryWriteSt" + + "atus\022*.google.storage.v2.QueryWriteStatu" + + "sRequest\032+.google.storage.v2.QueryWriteS" + + "tatusResponse\"A\332A\tupload_id\212\323\344\223\002/\022-\n\tupl" + + "oad_id\022 {bucket=projects/*/buckets/*}/**" + + "\022\203\001\n\021GetServiceAccount\022+.google.storage." + + "v2.GetServiceAccountRequest\032!.google.sto" + + "rage.v2.ServiceAccount\"\036\210\002\001\332A\007project\212\323\344" + + "\223\002\013\022\t\n\007project\022\230\001\n\rCreateHmacKey\022\'.googl" + + "e.storage.v2.CreateHmacKeyRequest\032(.goog" + + "le.storage.v2.CreateHmacKeyResponse\"4\210\002\001" + + "\332A\035project,service_account_email\212\323\344\223\002\013\022\t" + + "\n\007project\022z\n\rDeleteHmacKey\022\'.google.stor" + + "age.v2.DeleteHmacKeyRequest\032\026.google.pro" + + "tobuf.Empty\"(\210\002\001\332A\021access_id,project\212\323\344\223" + + "\002\013\022\t\n\007project\022\200\001\n\nGetHmacKey\022$.google.st" + + "orage.v2.GetHmacKeyRequest\032\".google.stor" + + "age.v2.HmacKeyMetadata\"(\210\002\001\332A\021access_id," + + "project\212\323\344\223\002\013\022\t\n\007project\022\177\n\014ListHmacKeys" + + "\022&.google.storage.v2.ListHmacKeysRequest" + + "\032\'.google.storage.v2.ListHmacKeysRespons" + + "e\"\036\210\002\001\332A\007project\212\323\344\223\002\013\022\t\n\007project\022\240\001\n\rUp" + + "dateHmacKey\022\'.google.storage.v2.UpdateHm" + + "acKeyRequest\032\".google.storage.v2.HmacKey" + + "Metadata\"B\210\002\001\332A\024hmac_key,update_mask\212\323\344\223" + + "\002\"\022 \n\020hmac_key.project\022\014{project=**}\022\242\001\n" + + "\030DeleteNotificationConfig\0222.google.stora" + + "ge.v2.DeleteNotificationConfigRequest\032\026." + + "google.protobuf.Empty\":\210\002\001\332A\004name\212\323\344\223\002*\022" + + "(\n\004name\022 {bucket=projects/*/buckets/*}/*" + + "*\022\253\001\n\025GetNotificationConfig\022/.google.sto" + + "rage.v2.GetNotificationConfigRequest\032%.g" + + "oogle.storage.v2.NotificationConfig\":\210\002\001" + + "\332A\004name\212\323\344\223\002*\022(\n\004name\022 {bucket=projects/" + + "*/buckets/*}/**\022\264\001\n\030CreateNotificationCo" + + "nfig\0222.google.storage.v2.CreateNotificat" + + "ionConfigRequest\032%.google.storage.v2.Not" + + "ificationConfig\"=\210\002\001\332A\032parent,notificati" + + "on_config\212\323\344\223\002\027\022\025\n\006parent\022\013{bucket=**}\022\253" + + "\001\n\027ListNotificationConfigs\0221.google.stor" + + "age.v2.ListNotificationConfigsRequest\0322." + + "google.storage.v2.ListNotificationConfig" + + "sResponse\")\210\002\001\332A\006parent\212\323\344\223\002\027\022\025\n\006parent\022" + + "\013{bucket=**}\032\247\002\312A\026storage.googleapis.com" + + "\322A\212\002https://www.googleapis.com/auth/clou" + + "d-platform,https://www.googleapis.com/au" + + "th/cloud-platform.read-only,https://www." + + "googleapis.com/auth/devstorage.full_cont" + + "rol,https://www.googleapis.com/auth/devs" + + "torage.read_only,https://www.googleapis." + + "com/auth/devstorage.read_writeB\342\001\n\025com.g" + + "oogle.storage.v2B\014StorageProtoP\001Z>cloud." + + "google.com/go/storage/internal/apiv2/sto" + + "ragepb;storagepb\352Ax\n!cloudkms.googleapis" + + ".com/CryptoKey\022Sprojects/{project}/locat" + + "ions/{location}/keyRings/{key_ring}/cryp" + + "toKeys/{crypto_key}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -1088,6 +1091,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Bucket", "Object", "Generation", + "RestoreToken", "IfGenerationMatch", "IfGenerationNotMatch", "IfMetagenerationMatch", @@ -1143,6 +1147,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "IfMetagenerationNotMatch", "CommonObjectRequestParams", "ReadMask", + "RestoreToken", }); internal_static_google_storage_v2_ReadObjectResponse_descriptor = getDescriptor().getMessageTypes().get(14); @@ -1661,6 +1666,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Bucket", "Etag", "Generation", + "RestoreToken", "Metageneration", "StorageClass", "Size", 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 0799b082c..31a716438 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 @@ -764,6 +764,13 @@ message RestoreObjectRequest { // Required. The specific revision of the object to restore. int64 generation = 3 [(google.api.field_behavior) = REQUIRED]; + // Optional. Restore token used to differentiate soft-deleted objects with the + // same name and generation. Only applicable for hierarchical namespace + // buckets. This parameter is optional, and is only required in the rare case + // when there are multiple soft-deleted objects with the same name and + // generation. + string restore_token = 11 [(google.api.field_behavior) = OPTIONAL]; + // Makes the operation conditional on whether the object's current generation // matches the given value. Setting to 0 makes the operation succeed only if // there are no live versions of the object. @@ -914,6 +921,13 @@ message GetObjectRequest { // metadata.owner. // * may be used to mean "all fields". optional google.protobuf.FieldMask read_mask = 10; + + // Optional. Restore token used to differentiate soft-deleted objects with the + // same name and generation. Only applicable for hierarchical namespace + // buckets and if soft_deleted is set to true. This parameter is optional, and + // is only required in the rare case when there are multiple soft-deleted + // objects with the same name and generation. + string restore_token = 12 [(google.api.field_behavior) = OPTIONAL]; } // Response message for ReadObject. @@ -1735,6 +1749,8 @@ message Bucket { option (google.api.resource) = { type: "storage.googleapis.com/Bucket" pattern: "projects/{project}/buckets/{bucket}" + plural: "buckets" + singular: "bucket" }; // Billing properties of a bucket. @@ -2267,6 +2283,12 @@ message Object { // versioning. int64 generation = 3 [(google.api.field_behavior) = IMMUTABLE]; + // Output only. Restore token used to differentiate deleted objects with the + // same name and generation. This field is output only, and only set for + // deleted objects in HNS buckets. + optional string restore_token = 35 + [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. The version of the metadata for this generation of this // object. Used for preconditions and for detecting changes in metadata. A // metageneration number is only meaningful in the context of a particular From 100b8726b45841fed6248914597476f1c65e0663 Mon Sep 17 00:00:00 2001 From: cloud-java-bot Date: Thu, 17 Oct 2024 02:23:55 +0000 Subject: [PATCH 07/18] chore: Update generation configuration at Thu Oct 17 02:23:46 UTC 2024 --- generation_config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generation_config.yaml b/generation_config.yaml index c12d7306a..f8fe2b7dc 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,6 +1,6 @@ gapic_generator_version: 2.47.0 -googleapis_commitish: d10780874de182326e198aaf25f575bdb88d0d2f -libraries_bom_version: 26.48.0 +googleapis_commitish: 8a54a42f4af577626d8bf0d86cc7ef982951cd77 +libraries_bom_version: 26.49.0 libraries: - api_shortname: storage name_pretty: Cloud Storage From cd5eb07470cd413b8f646edc7a709dbe1e4ae3d3 Mon Sep 17 00:00:00 2001 From: cloud-java-bot Date: Thu, 17 Oct 2024 02:26:53 +0000 Subject: [PATCH 08/18] chore: generate libraries at Thu Oct 17 02:24:14 UTC 2024 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ffe56bf16..bb3070f52 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ If you are using Maven without the BOM, add this to your dependencies: If you are using Gradle 5.x or later, add this to your dependencies: ```Groovy -implementation platform('com.google.cloud:libraries-bom:26.48.0') +implementation platform('com.google.cloud:libraries-bom:26.49.0') implementation 'com.google.cloud:google-cloud-storage' ``` From dbbb56465f5659b55845df50517d7736db9ed92d Mon Sep 17 00:00:00 2001 From: cloud-java-bot Date: Fri, 18 Oct 2024 02:24:26 +0000 Subject: [PATCH 09/18] chore: Update generation configuration at Fri Oct 18 02:24:14 UTC 2024 --- generation_config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generation_config.yaml b/generation_config.yaml index f8fe2b7dc..4098a8f9d 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,5 +1,5 @@ gapic_generator_version: 2.47.0 -googleapis_commitish: 8a54a42f4af577626d8bf0d86cc7ef982951cd77 +googleapis_commitish: 5ebb5c1e3d2953efd05c068b27138098eecc8308 libraries_bom_version: 26.49.0 libraries: - api_shortname: storage From c2be07978adc9c4ff2e0bfcee98074f9e2569db0 Mon Sep 17 00:00:00 2001 From: cloud-java-bot Date: Sat, 19 Oct 2024 02:22:50 +0000 Subject: [PATCH 10/18] chore: Update generation configuration at Sat Oct 19 02:22:41 UTC 2024 --- generation_config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generation_config.yaml b/generation_config.yaml index 4098a8f9d..65cebc81e 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,5 +1,5 @@ gapic_generator_version: 2.47.0 -googleapis_commitish: 5ebb5c1e3d2953efd05c068b27138098eecc8308 +googleapis_commitish: 211a72fa5cd90bfbfe2d86d4e8163eee23171687 libraries_bom_version: 26.49.0 libraries: - api_shortname: storage From 55a621aba77309e53450de3c4efc218b63aa09e1 Mon Sep 17 00:00:00 2001 From: cloud-java-bot Date: Sat, 19 Oct 2024 02:25:53 +0000 Subject: [PATCH 11/18] chore: generate libraries at Sat Oct 19 02:23:09 UTC 2024 --- .../com/google/storage/v2/StorageClient.java | 1776 +------------- .../google/storage/v2/StorageSettings.java | 222 -- .../storage/v2/stub/GrpcStorageStub.java | 385 --- .../google/storage/v2/stub/StorageStub.java | 83 - .../storage/v2/stub/StorageStubSettings.java | 508 +--- .../com.google.storage.v2/reflect-config.json | 288 --- .../com/google/storage/v2/gapic_metadata.json | 30 - .../google/storage/v2/MockStorageImpl.java | 211 -- .../google/storage/v2/StorageClientTest.java | 822 ------- .../com/google/storage/v2/StorageGrpc.java | 1236 +--------- .../storage/v2/CreateHmacKeyRequest.java | 834 ------- .../v2/CreateHmacKeyRequestOrBuilder.java | 84 - .../storage/v2/CreateHmacKeyResponse.java | 821 ------- .../v2/CreateHmacKeyResponseOrBuilder.java | 75 - .../v2/CreateNotificationConfigRequest.java | 950 -------- ...ateNotificationConfigRequestOrBuilder.java | 96 - .../storage/v2/DeleteHmacKeyRequest.java | 834 ------- .../v2/DeleteHmacKeyRequestOrBuilder.java | 84 - .../v2/DeleteNotificationConfigRequest.java | 641 ----- ...eteNotificationConfigRequestOrBuilder.java | 55 - .../google/storage/v2/GetHmacKeyRequest.java | 833 ------- .../v2/GetHmacKeyRequestOrBuilder.java | 84 - .../v2/GetNotificationConfigRequest.java | 653 ----- ...GetNotificationConfigRequestOrBuilder.java | 59 - .../storage/v2/GetServiceAccountRequest.java | 645 ----- .../v2/GetServiceAccountRequestOrBuilder.java | 57 - .../google/storage/v2/HmacKeyMetadata.java | 2162 ----------------- .../storage/v2/HmacKeyMetadataOrBuilder.java | 266 -- .../storage/v2/ListHmacKeysRequest.java | 1202 --------- .../v2/ListHmacKeysRequestOrBuilder.java | 135 - .../storage/v2/ListHmacKeysResponse.java | 1122 --------- .../v2/ListHmacKeysResponseOrBuilder.java | 105 - .../v2/ListNotificationConfigsRequest.java | 951 -------- ...stNotificationConfigsRequestOrBuilder.java | 103 - .../v2/ListNotificationConfigsResponse.java | 1139 --------- ...tNotificationConfigsResponseOrBuilder.java | 105 - .../google/storage/v2/NotificationConfig.java | 2075 ---------------- .../storage/v2/NotificationConfigName.java | 228 -- .../v2/NotificationConfigOrBuilder.java | 295 --- .../com/google/storage/v2/ServiceAccount.java | 625 ----- .../storage/v2/ServiceAccountOrBuilder.java | 51 - .../com/google/storage/v2/StorageProto.java | 874 +++---- .../storage/v2/UpdateHmacKeyRequest.java | 1070 -------- .../v2/UpdateHmacKeyRequestOrBuilder.java | 117 - .../proto/google/storage/v2/storage.proto | 387 --- 45 files changed, 321 insertions(+), 25057 deletions(-) delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CreateHmacKeyRequest.java delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CreateHmacKeyRequestOrBuilder.java delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CreateHmacKeyResponse.java delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CreateHmacKeyResponseOrBuilder.java delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CreateNotificationConfigRequest.java delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CreateNotificationConfigRequestOrBuilder.java delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/DeleteHmacKeyRequest.java delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/DeleteHmacKeyRequestOrBuilder.java delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/DeleteNotificationConfigRequest.java delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/DeleteNotificationConfigRequestOrBuilder.java delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetHmacKeyRequest.java delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetHmacKeyRequestOrBuilder.java delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetNotificationConfigRequest.java delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetNotificationConfigRequestOrBuilder.java delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetServiceAccountRequest.java delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetServiceAccountRequestOrBuilder.java delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/HmacKeyMetadata.java delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/HmacKeyMetadataOrBuilder.java delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListHmacKeysRequest.java delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListHmacKeysRequestOrBuilder.java delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListHmacKeysResponse.java delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListHmacKeysResponseOrBuilder.java delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListNotificationConfigsRequest.java delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListNotificationConfigsRequestOrBuilder.java delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListNotificationConfigsResponse.java delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListNotificationConfigsResponseOrBuilder.java delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/NotificationConfig.java delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/NotificationConfigName.java delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/NotificationConfigOrBuilder.java delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ServiceAccount.java delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ServiceAccountOrBuilder.java delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/UpdateHmacKeyRequest.java delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/UpdateHmacKeyRequestOrBuilder.java 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 2f7aa14b0..3dfec9ca3 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 @@ -476,197 +476,6 @@ * * * - * - *

GetServiceAccount - *

Retrieves the name of a project's Google Cloud Storage service account. - * - *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

- *
    - *
  • getServiceAccount(GetServiceAccountRequest request) - *

- *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

- *
    - *
  • getServiceAccount(ProjectName project) - *

  • getServiceAccount(String project) - *

- *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

- *
    - *
  • getServiceAccountCallable() - *

- * - * - * - *

CreateHmacKey - *

Creates a new HMAC key for the given service account. - * - *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

- *
    - *
  • createHmacKey(CreateHmacKeyRequest request) - *

- *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

- *
    - *
  • createHmacKey(ProjectName project, String serviceAccountEmail) - *

  • createHmacKey(String project, String serviceAccountEmail) - *

- *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

- *
    - *
  • createHmacKeyCallable() - *

- * - * - * - *

DeleteHmacKey - *

Deletes a given HMAC key. Key must be in an INACTIVE state. - * - *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

- *
    - *
  • deleteHmacKey(DeleteHmacKeyRequest request) - *

- *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

- *
    - *
  • deleteHmacKey(String accessId, ProjectName project) - *

  • deleteHmacKey(String accessId, String project) - *

- *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

- *
    - *
  • deleteHmacKeyCallable() - *

- * - * - * - *

GetHmacKey - *

Gets an existing HMAC key metadata for the given id. - * - *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

- *
    - *
  • getHmacKey(GetHmacKeyRequest request) - *

- *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

- *
    - *
  • getHmacKey(String accessId, ProjectName project) - *

  • getHmacKey(String accessId, String project) - *

- *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

- *
    - *
  • getHmacKeyCallable() - *

- * - * - * - *

ListHmacKeys - *

Lists HMAC keys under a given project with the additional filters provided. - * - *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

- *
    - *
  • listHmacKeys(ListHmacKeysRequest request) - *

- *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

- *
    - *
  • listHmacKeys(ProjectName project) - *

  • listHmacKeys(String project) - *

- *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

- *
    - *
  • listHmacKeysPagedCallable() - *

  • listHmacKeysCallable() - *

- * - * - * - *

UpdateHmacKey - *

Updates a given HMAC key state between ACTIVE and INACTIVE. - * - *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

- *
    - *
  • updateHmacKey(UpdateHmacKeyRequest request) - *

- *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

- *
    - *
  • updateHmacKey(HmacKeyMetadata hmacKey, FieldMask updateMask) - *

- *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

- *
    - *
  • updateHmacKeyCallable() - *

- * - * - * - *

DeleteNotificationConfig - *

Permanently deletes a NotificationConfig. - * - *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

- *
    - *
  • deleteNotificationConfig(DeleteNotificationConfigRequest request) - *

- *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

- *
    - *
  • deleteNotificationConfig(NotificationConfigName name) - *

  • deleteNotificationConfig(String name) - *

- *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

- *
    - *
  • deleteNotificationConfigCallable() - *

- * - * - * - *

GetNotificationConfig - *

View a NotificationConfig. - * - *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

- *
    - *
  • getNotificationConfig(GetNotificationConfigRequest request) - *

- *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

- *
    - *
  • getNotificationConfig(NotificationConfigName name) - *

  • getNotificationConfig(String name) - *

- *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

- *
    - *
  • getNotificationConfigCallable() - *

- * - * - * - *

CreateNotificationConfig - *

Creates a NotificationConfig for a given bucket. These NotificationConfigs, when triggered, publish messages to the specified Pub/Sub topics. See https://cloud.google.com/storage/docs/pubsub-notifications. - * - *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

- *
    - *
  • createNotificationConfig(CreateNotificationConfigRequest request) - *

- *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

- *
    - *
  • createNotificationConfig(BucketName parent, NotificationConfig notificationConfig) - *

  • createNotificationConfig(String parent, NotificationConfig notificationConfig) - *

- *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

- *
    - *
  • createNotificationConfigCallable() - *

- * - * - * - *

ListNotificationConfigs - *

Retrieves a list of NotificationConfigs for a given bucket. - * - *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

- *
    - *
  • listNotificationConfigs(ListNotificationConfigsRequest request) - *

- *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

- *
    - *
  • listNotificationConfigs(BucketName parent) - *

  • listNotificationConfigs(String parent) - *

- *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

- *
    - *
  • listNotificationConfigsPagedCallable() - *

  • listNotificationConfigsCallable() - *

- * - * * * *

See the individual methods for example code. @@ -3432,1419 +3241,34 @@ public final QueryWriteStatusResponse queryWriteStatus(QueryWriteStatusRequest r return stub.queryWriteStatusCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Retrieves the name of a project's Google Cloud Storage service account. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   ServiceAccount response = storageClient.getServiceAccount(project);
-   * }
-   * }
- * - * @param project Required. Project ID, in the format of "projects/{projectIdentifier}". - * {projectIdentifier} can be the project ID or project number. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final ServiceAccount getServiceAccount(ProjectName project) { - GetServiceAccountRequest request = - GetServiceAccountRequest.newBuilder() - .setProject(project == null ? null : project.toString()) - .build(); - return getServiceAccount(request); + @Override + public final void close() { + stub.close(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Retrieves the name of a project's Google Cloud Storage service account. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   String project = ProjectName.of("[PROJECT]").toString();
-   *   ServiceAccount response = storageClient.getServiceAccount(project);
-   * }
-   * }
- * - * @param project Required. Project ID, in the format of "projects/{projectIdentifier}". - * {projectIdentifier} can be the project ID or project number. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final ServiceAccount getServiceAccount(String project) { - GetServiceAccountRequest request = - GetServiceAccountRequest.newBuilder().setProject(project).build(); - return getServiceAccount(request); + @Override + public void shutdown() { + stub.shutdown(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Retrieves the name of a project's Google Cloud Storage service account. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   GetServiceAccountRequest request =
-   *       GetServiceAccountRequest.newBuilder()
-   *           .setProject(ProjectName.of("[PROJECT]").toString())
-   *           .build();
-   *   ServiceAccount response = storageClient.getServiceAccount(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final ServiceAccount getServiceAccount(GetServiceAccountRequest request) { - return getServiceAccountCallable().call(request); + @Override + public boolean isShutdown() { + return stub.isShutdown(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Retrieves the name of a project's Google Cloud Storage service account. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   GetServiceAccountRequest request =
-   *       GetServiceAccountRequest.newBuilder()
-   *           .setProject(ProjectName.of("[PROJECT]").toString())
-   *           .build();
-   *   ApiFuture future =
-   *       storageClient.getServiceAccountCallable().futureCall(request);
-   *   // Do something.
-   *   ServiceAccount response = future.get();
-   * }
-   * }
- * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final UnaryCallable getServiceAccountCallable() { - return stub.getServiceAccountCallable(); + @Override + public boolean isTerminated() { + return stub.isTerminated(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new HMAC key for the given service account. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   String serviceAccountEmail = "serviceAccountEmail1825953988";
-   *   CreateHmacKeyResponse response = storageClient.createHmacKey(project, serviceAccountEmail);
-   * }
-   * }
- * - * @param project Required. The project that the HMAC-owning service account lives in, in the - * format of "projects/{projectIdentifier}". {projectIdentifier} can be the project ID or - * project number. - * @param serviceAccountEmail Required. The service account to create the HMAC for. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final CreateHmacKeyResponse createHmacKey( - ProjectName project, String serviceAccountEmail) { - CreateHmacKeyRequest request = - CreateHmacKeyRequest.newBuilder() - .setProject(project == null ? null : project.toString()) - .setServiceAccountEmail(serviceAccountEmail) - .build(); - return createHmacKey(request); + @Override + public void shutdownNow() { + stub.shutdownNow(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new HMAC key for the given service account. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   String project = ProjectName.of("[PROJECT]").toString();
-   *   String serviceAccountEmail = "serviceAccountEmail1825953988";
-   *   CreateHmacKeyResponse response = storageClient.createHmacKey(project, serviceAccountEmail);
-   * }
-   * }
- * - * @param project Required. The project that the HMAC-owning service account lives in, in the - * format of "projects/{projectIdentifier}". {projectIdentifier} can be the project ID or - * project number. - * @param serviceAccountEmail Required. The service account to create the HMAC for. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final CreateHmacKeyResponse createHmacKey(String project, String serviceAccountEmail) { - CreateHmacKeyRequest request = - CreateHmacKeyRequest.newBuilder() - .setProject(project) - .setServiceAccountEmail(serviceAccountEmail) - .build(); - return createHmacKey(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new HMAC key for the given service account. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   CreateHmacKeyRequest request =
-   *       CreateHmacKeyRequest.newBuilder()
-   *           .setProject(ProjectName.of("[PROJECT]").toString())
-   *           .setServiceAccountEmail("serviceAccountEmail1825953988")
-   *           .build();
-   *   CreateHmacKeyResponse response = storageClient.createHmacKey(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final CreateHmacKeyResponse createHmacKey(CreateHmacKeyRequest request) { - return createHmacKeyCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new HMAC key for the given service account. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   CreateHmacKeyRequest request =
-   *       CreateHmacKeyRequest.newBuilder()
-   *           .setProject(ProjectName.of("[PROJECT]").toString())
-   *           .setServiceAccountEmail("serviceAccountEmail1825953988")
-   *           .build();
-   *   ApiFuture future =
-   *       storageClient.createHmacKeyCallable().futureCall(request);
-   *   // Do something.
-   *   CreateHmacKeyResponse response = future.get();
-   * }
-   * }
- * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final UnaryCallable createHmacKeyCallable() { - return stub.createHmacKeyCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a given HMAC key. Key must be in an INACTIVE state. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   String accessId = "accessId-2146437729";
-   *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   storageClient.deleteHmacKey(accessId, project);
-   * }
-   * }
- * - * @param accessId Required. The identifying key for the HMAC to delete. - * @param project Required. The project that owns the HMAC key, in the format of - * "projects/{projectIdentifier}". {projectIdentifier} can be the project ID or project - * number. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final void deleteHmacKey(String accessId, ProjectName project) { - DeleteHmacKeyRequest request = - DeleteHmacKeyRequest.newBuilder() - .setAccessId(accessId) - .setProject(project == null ? null : project.toString()) - .build(); - deleteHmacKey(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a given HMAC key. Key must be in an INACTIVE state. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   String accessId = "accessId-2146437729";
-   *   String project = ProjectName.of("[PROJECT]").toString();
-   *   storageClient.deleteHmacKey(accessId, project);
-   * }
-   * }
- * - * @param accessId Required. The identifying key for the HMAC to delete. - * @param project Required. The project that owns the HMAC key, in the format of - * "projects/{projectIdentifier}". {projectIdentifier} can be the project ID or project - * number. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final void deleteHmacKey(String accessId, String project) { - DeleteHmacKeyRequest request = - DeleteHmacKeyRequest.newBuilder().setAccessId(accessId).setProject(project).build(); - deleteHmacKey(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a given HMAC key. Key must be in an INACTIVE state. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   DeleteHmacKeyRequest request =
-   *       DeleteHmacKeyRequest.newBuilder()
-   *           .setAccessId("accessId-2146437729")
-   *           .setProject(ProjectName.of("[PROJECT]").toString())
-   *           .build();
-   *   storageClient.deleteHmacKey(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final void deleteHmacKey(DeleteHmacKeyRequest request) { - deleteHmacKeyCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a given HMAC key. Key must be in an INACTIVE state. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   DeleteHmacKeyRequest request =
-   *       DeleteHmacKeyRequest.newBuilder()
-   *           .setAccessId("accessId-2146437729")
-   *           .setProject(ProjectName.of("[PROJECT]").toString())
-   *           .build();
-   *   ApiFuture future = storageClient.deleteHmacKeyCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final UnaryCallable deleteHmacKeyCallable() { - return stub.deleteHmacKeyCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets an existing HMAC key metadata for the given id. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   String accessId = "accessId-2146437729";
-   *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   HmacKeyMetadata response = storageClient.getHmacKey(accessId, project);
-   * }
-   * }
- * - * @param accessId Required. The identifying key for the HMAC to delete. - * @param project Required. The project the HMAC key lies in, in the format of - * "projects/{projectIdentifier}". {projectIdentifier} can be the project ID or project - * number. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final HmacKeyMetadata getHmacKey(String accessId, ProjectName project) { - GetHmacKeyRequest request = - GetHmacKeyRequest.newBuilder() - .setAccessId(accessId) - .setProject(project == null ? null : project.toString()) - .build(); - return getHmacKey(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets an existing HMAC key metadata for the given id. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   String accessId = "accessId-2146437729";
-   *   String project = ProjectName.of("[PROJECT]").toString();
-   *   HmacKeyMetadata response = storageClient.getHmacKey(accessId, project);
-   * }
-   * }
- * - * @param accessId Required. The identifying key for the HMAC to delete. - * @param project Required. The project the HMAC key lies in, in the format of - * "projects/{projectIdentifier}". {projectIdentifier} can be the project ID or project - * number. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final HmacKeyMetadata getHmacKey(String accessId, String project) { - GetHmacKeyRequest request = - GetHmacKeyRequest.newBuilder().setAccessId(accessId).setProject(project).build(); - return getHmacKey(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets an existing HMAC key metadata for the given id. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   GetHmacKeyRequest request =
-   *       GetHmacKeyRequest.newBuilder()
-   *           .setAccessId("accessId-2146437729")
-   *           .setProject(ProjectName.of("[PROJECT]").toString())
-   *           .build();
-   *   HmacKeyMetadata response = storageClient.getHmacKey(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final HmacKeyMetadata getHmacKey(GetHmacKeyRequest request) { - return getHmacKeyCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets an existing HMAC key metadata for the given id. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   GetHmacKeyRequest request =
-   *       GetHmacKeyRequest.newBuilder()
-   *           .setAccessId("accessId-2146437729")
-   *           .setProject(ProjectName.of("[PROJECT]").toString())
-   *           .build();
-   *   ApiFuture future = storageClient.getHmacKeyCallable().futureCall(request);
-   *   // Do something.
-   *   HmacKeyMetadata response = future.get();
-   * }
-   * }
- * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final UnaryCallable getHmacKeyCallable() { - return stub.getHmacKeyCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists HMAC keys under a given project with the additional filters provided. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (HmacKeyMetadata element : storageClient.listHmacKeys(project).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param project Required. The project to list HMAC keys for, in the format of - * "projects/{projectIdentifier}". {projectIdentifier} can be the project ID or project - * number. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final ListHmacKeysPagedResponse listHmacKeys(ProjectName project) { - ListHmacKeysRequest request = - ListHmacKeysRequest.newBuilder() - .setProject(project == null ? null : project.toString()) - .build(); - return listHmacKeys(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists HMAC keys under a given project with the additional filters provided. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   String project = ProjectName.of("[PROJECT]").toString();
-   *   for (HmacKeyMetadata element : storageClient.listHmacKeys(project).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param project Required. The project to list HMAC keys for, in the format of - * "projects/{projectIdentifier}". {projectIdentifier} can be the project ID or project - * number. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final ListHmacKeysPagedResponse listHmacKeys(String project) { - ListHmacKeysRequest request = ListHmacKeysRequest.newBuilder().setProject(project).build(); - return listHmacKeys(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists HMAC keys under a given project with the additional filters provided. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   ListHmacKeysRequest request =
-   *       ListHmacKeysRequest.newBuilder()
-   *           .setProject(ProjectName.of("[PROJECT]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .setServiceAccountEmail("serviceAccountEmail1825953988")
-   *           .setShowDeletedKeys(true)
-   *           .build();
-   *   for (HmacKeyMetadata element : storageClient.listHmacKeys(request).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final ListHmacKeysPagedResponse listHmacKeys(ListHmacKeysRequest request) { - return listHmacKeysPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists HMAC keys under a given project with the additional filters provided. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   ListHmacKeysRequest request =
-   *       ListHmacKeysRequest.newBuilder()
-   *           .setProject(ProjectName.of("[PROJECT]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .setServiceAccountEmail("serviceAccountEmail1825953988")
-   *           .setShowDeletedKeys(true)
-   *           .build();
-   *   ApiFuture future =
-   *       storageClient.listHmacKeysPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (HmacKeyMetadata element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final UnaryCallable - listHmacKeysPagedCallable() { - return stub.listHmacKeysPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists HMAC keys under a given project with the additional filters provided. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   ListHmacKeysRequest request =
-   *       ListHmacKeysRequest.newBuilder()
-   *           .setProject(ProjectName.of("[PROJECT]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .setServiceAccountEmail("serviceAccountEmail1825953988")
-   *           .setShowDeletedKeys(true)
-   *           .build();
-   *   while (true) {
-   *     ListHmacKeysResponse response = storageClient.listHmacKeysCallable().call(request);
-   *     for (HmacKeyMetadata element : response.getHmacKeysList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final UnaryCallable listHmacKeysCallable() { - return stub.listHmacKeysCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates a given HMAC key state between ACTIVE and INACTIVE. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   HmacKeyMetadata hmacKey = HmacKeyMetadata.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   HmacKeyMetadata response = storageClient.updateHmacKey(hmacKey, updateMask);
-   * }
-   * }
- * - * @param hmacKey Required. The HMAC key to update. If present, the hmac_key's `id` field will be - * used to identify the key. Otherwise, the hmac_key's access_id and project fields will be - * used to identify the key. - * @param updateMask Update mask for hmac_key. Not specifying any fields will mean only the - * `state` field is updated to the value specified in `hmac_key`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final HmacKeyMetadata updateHmacKey(HmacKeyMetadata hmacKey, FieldMask updateMask) { - UpdateHmacKeyRequest request = - UpdateHmacKeyRequest.newBuilder().setHmacKey(hmacKey).setUpdateMask(updateMask).build(); - return updateHmacKey(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates a given HMAC key state between ACTIVE and INACTIVE. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   UpdateHmacKeyRequest request =
-   *       UpdateHmacKeyRequest.newBuilder()
-   *           .setHmacKey(HmacKeyMetadata.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   HmacKeyMetadata response = storageClient.updateHmacKey(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final HmacKeyMetadata updateHmacKey(UpdateHmacKeyRequest request) { - return updateHmacKeyCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates a given HMAC key state between ACTIVE and INACTIVE. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   UpdateHmacKeyRequest request =
-   *       UpdateHmacKeyRequest.newBuilder()
-   *           .setHmacKey(HmacKeyMetadata.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   ApiFuture future = storageClient.updateHmacKeyCallable().futureCall(request);
-   *   // Do something.
-   *   HmacKeyMetadata response = future.get();
-   * }
-   * }
- * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final UnaryCallable updateHmacKeyCallable() { - return stub.updateHmacKeyCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Permanently deletes a NotificationConfig. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   NotificationConfigName name =
-   *       NotificationConfigName.of("[PROJECT]", "[BUCKET]", "[NOTIFICATION_CONFIG]");
-   *   storageClient.deleteNotificationConfig(name);
-   * }
-   * }
- * - * @param name Required. The parent bucket of the NotificationConfig. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final void deleteNotificationConfig(NotificationConfigName name) { - DeleteNotificationConfigRequest request = - DeleteNotificationConfigRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - deleteNotificationConfig(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Permanently deletes a NotificationConfig. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   String name =
-   *       NotificationConfigName.of("[PROJECT]", "[BUCKET]", "[NOTIFICATION_CONFIG]").toString();
-   *   storageClient.deleteNotificationConfig(name);
-   * }
-   * }
- * - * @param name Required. The parent bucket of the NotificationConfig. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final void deleteNotificationConfig(String name) { - DeleteNotificationConfigRequest request = - DeleteNotificationConfigRequest.newBuilder().setName(name).build(); - deleteNotificationConfig(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Permanently deletes a NotificationConfig. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   DeleteNotificationConfigRequest request =
-   *       DeleteNotificationConfigRequest.newBuilder()
-   *           .setName(
-   *               NotificationConfigName.of("[PROJECT]", "[BUCKET]", "[NOTIFICATION_CONFIG]")
-   *                   .toString())
-   *           .build();
-   *   storageClient.deleteNotificationConfig(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final void deleteNotificationConfig(DeleteNotificationConfigRequest request) { - deleteNotificationConfigCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Permanently deletes a NotificationConfig. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   DeleteNotificationConfigRequest request =
-   *       DeleteNotificationConfigRequest.newBuilder()
-   *           .setName(
-   *               NotificationConfigName.of("[PROJECT]", "[BUCKET]", "[NOTIFICATION_CONFIG]")
-   *                   .toString())
-   *           .build();
-   *   ApiFuture future =
-   *       storageClient.deleteNotificationConfigCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final UnaryCallable - deleteNotificationConfigCallable() { - return stub.deleteNotificationConfigCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * View a NotificationConfig. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   NotificationConfigName name =
-   *       NotificationConfigName.of("[PROJECT]", "[BUCKET]", "[NOTIFICATION_CONFIG]");
-   *   NotificationConfig response = storageClient.getNotificationConfig(name);
-   * }
-   * }
- * - * @param name Required. The parent bucket of the NotificationConfig. Format: - * `projects/{project}/buckets/{bucket}/notificationConfigs/{notificationConfig}` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final NotificationConfig getNotificationConfig(NotificationConfigName name) { - GetNotificationConfigRequest request = - GetNotificationConfigRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - return getNotificationConfig(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * View a NotificationConfig. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   String name =
-   *       NotificationConfigName.of("[PROJECT]", "[BUCKET]", "[NOTIFICATION_CONFIG]").toString();
-   *   NotificationConfig response = storageClient.getNotificationConfig(name);
-   * }
-   * }
- * - * @param name Required. The parent bucket of the NotificationConfig. Format: - * `projects/{project}/buckets/{bucket}/notificationConfigs/{notificationConfig}` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final NotificationConfig getNotificationConfig(String name) { - GetNotificationConfigRequest request = - GetNotificationConfigRequest.newBuilder().setName(name).build(); - return getNotificationConfig(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * View a NotificationConfig. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   GetNotificationConfigRequest request =
-   *       GetNotificationConfigRequest.newBuilder()
-   *           .setName(
-   *               NotificationConfigName.of("[PROJECT]", "[BUCKET]", "[NOTIFICATION_CONFIG]")
-   *                   .toString())
-   *           .build();
-   *   NotificationConfig response = storageClient.getNotificationConfig(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final NotificationConfig getNotificationConfig(GetNotificationConfigRequest request) { - return getNotificationConfigCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * View a NotificationConfig. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   GetNotificationConfigRequest request =
-   *       GetNotificationConfigRequest.newBuilder()
-   *           .setName(
-   *               NotificationConfigName.of("[PROJECT]", "[BUCKET]", "[NOTIFICATION_CONFIG]")
-   *                   .toString())
-   *           .build();
-   *   ApiFuture future =
-   *       storageClient.getNotificationConfigCallable().futureCall(request);
-   *   // Do something.
-   *   NotificationConfig response = future.get();
-   * }
-   * }
- * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final UnaryCallable - getNotificationConfigCallable() { - return stub.getNotificationConfigCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a NotificationConfig for a given bucket. These NotificationConfigs, when triggered, - * publish messages to the specified Pub/Sub topics. See - * https://cloud.google.com/storage/docs/pubsub-notifications. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   BucketName parent = BucketName.of("[PROJECT]", "[BUCKET]");
-   *   NotificationConfig notificationConfig = NotificationConfig.newBuilder().build();
-   *   NotificationConfig response =
-   *       storageClient.createNotificationConfig(parent, notificationConfig);
-   * }
-   * }
- * - * @param parent Required. The bucket to which this NotificationConfig belongs. - * @param notificationConfig Required. Properties of the NotificationConfig to be inserted. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final NotificationConfig createNotificationConfig( - BucketName parent, NotificationConfig notificationConfig) { - CreateNotificationConfigRequest request = - CreateNotificationConfigRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setNotificationConfig(notificationConfig) - .build(); - return createNotificationConfig(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a NotificationConfig for a given bucket. These NotificationConfigs, when triggered, - * publish messages to the specified Pub/Sub topics. See - * https://cloud.google.com/storage/docs/pubsub-notifications. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   String parent = BucketName.of("[PROJECT]", "[BUCKET]").toString();
-   *   NotificationConfig notificationConfig = NotificationConfig.newBuilder().build();
-   *   NotificationConfig response =
-   *       storageClient.createNotificationConfig(parent, notificationConfig);
-   * }
-   * }
- * - * @param parent Required. The bucket to which this NotificationConfig belongs. - * @param notificationConfig Required. Properties of the NotificationConfig to be inserted. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final NotificationConfig createNotificationConfig( - String parent, NotificationConfig notificationConfig) { - CreateNotificationConfigRequest request = - CreateNotificationConfigRequest.newBuilder() - .setParent(parent) - .setNotificationConfig(notificationConfig) - .build(); - return createNotificationConfig(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a NotificationConfig for a given bucket. These NotificationConfigs, when triggered, - * publish messages to the specified Pub/Sub topics. See - * https://cloud.google.com/storage/docs/pubsub-notifications. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   CreateNotificationConfigRequest request =
-   *       CreateNotificationConfigRequest.newBuilder()
-   *           .setParent(BucketName.of("[PROJECT]", "[BUCKET]").toString())
-   *           .setNotificationConfig(NotificationConfig.newBuilder().build())
-   *           .build();
-   *   NotificationConfig response = storageClient.createNotificationConfig(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final NotificationConfig createNotificationConfig( - CreateNotificationConfigRequest request) { - return createNotificationConfigCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a NotificationConfig for a given bucket. These NotificationConfigs, when triggered, - * publish messages to the specified Pub/Sub topics. See - * https://cloud.google.com/storage/docs/pubsub-notifications. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   CreateNotificationConfigRequest request =
-   *       CreateNotificationConfigRequest.newBuilder()
-   *           .setParent(BucketName.of("[PROJECT]", "[BUCKET]").toString())
-   *           .setNotificationConfig(NotificationConfig.newBuilder().build())
-   *           .build();
-   *   ApiFuture future =
-   *       storageClient.createNotificationConfigCallable().futureCall(request);
-   *   // Do something.
-   *   NotificationConfig response = future.get();
-   * }
-   * }
- * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final UnaryCallable - createNotificationConfigCallable() { - return stub.createNotificationConfigCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Retrieves a list of NotificationConfigs for a given bucket. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   BucketName parent = BucketName.of("[PROJECT]", "[BUCKET]");
-   *   for (NotificationConfig element :
-   *       storageClient.listNotificationConfigs(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. Name of a Google Cloud Storage bucket. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final ListNotificationConfigsPagedResponse listNotificationConfigs(BucketName parent) { - ListNotificationConfigsRequest request = - ListNotificationConfigsRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listNotificationConfigs(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Retrieves a list of NotificationConfigs for a given bucket. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   String parent = BucketName.of("[PROJECT]", "[BUCKET]").toString();
-   *   for (NotificationConfig element :
-   *       storageClient.listNotificationConfigs(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. Name of a Google Cloud Storage bucket. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final ListNotificationConfigsPagedResponse listNotificationConfigs(String parent) { - ListNotificationConfigsRequest request = - ListNotificationConfigsRequest.newBuilder().setParent(parent).build(); - return listNotificationConfigs(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Retrieves a list of NotificationConfigs for a given bucket. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   ListNotificationConfigsRequest request =
-   *       ListNotificationConfigsRequest.newBuilder()
-   *           .setParent(BucketName.of("[PROJECT]", "[BUCKET]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   for (NotificationConfig element :
-   *       storageClient.listNotificationConfigs(request).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final ListNotificationConfigsPagedResponse listNotificationConfigs( - ListNotificationConfigsRequest request) { - return listNotificationConfigsPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Retrieves a list of NotificationConfigs for a given bucket. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   ListNotificationConfigsRequest request =
-   *       ListNotificationConfigsRequest.newBuilder()
-   *           .setParent(BucketName.of("[PROJECT]", "[BUCKET]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   ApiFuture future =
-   *       storageClient.listNotificationConfigsPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (NotificationConfig element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final UnaryCallable - listNotificationConfigsPagedCallable() { - return stub.listNotificationConfigsPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Retrieves a list of NotificationConfigs for a given bucket. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   ListNotificationConfigsRequest request =
-   *       ListNotificationConfigsRequest.newBuilder()
-   *           .setParent(BucketName.of("[PROJECT]", "[BUCKET]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   while (true) {
-   *     ListNotificationConfigsResponse response =
-   *         storageClient.listNotificationConfigsCallable().call(request);
-   *     for (NotificationConfig element : response.getNotificationConfigsList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final UnaryCallable - listNotificationConfigsCallable() { - return stub.listNotificationConfigsCallable(); - } - - @Override - public final void close() { - stub.close(); - } - - @Override - public void shutdown() { - stub.shutdown(); - } - - @Override - public boolean isShutdown() { - return stub.isShutdown(); - } - - @Override - public boolean isTerminated() { - return stub.isTerminated(); - } - - @Override - public void shutdownNow() { - stub.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return stub.awaitTermination(duration, unit); + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); } public static class ListBucketsPagedResponse @@ -4992,168 +3416,4 @@ protected ListObjectsFixedSizeCollection createCollection( return new ListObjectsFixedSizeCollection(pages, collectionSize); } } - - public static class ListHmacKeysPagedResponse - extends AbstractPagedListResponse< - ListHmacKeysRequest, - ListHmacKeysResponse, - HmacKeyMetadata, - ListHmacKeysPage, - ListHmacKeysFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListHmacKeysPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new ListHmacKeysPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private ListHmacKeysPagedResponse(ListHmacKeysPage page) { - super(page, ListHmacKeysFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListHmacKeysPage - extends AbstractPage< - ListHmacKeysRequest, ListHmacKeysResponse, HmacKeyMetadata, ListHmacKeysPage> { - - private ListHmacKeysPage( - PageContext context, - ListHmacKeysResponse response) { - super(context, response); - } - - private static ListHmacKeysPage createEmptyPage() { - return new ListHmacKeysPage(null, null); - } - - @Override - protected ListHmacKeysPage createPage( - PageContext context, - ListHmacKeysResponse response) { - return new ListHmacKeysPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListHmacKeysFixedSizeCollection - extends AbstractFixedSizeCollection< - ListHmacKeysRequest, - ListHmacKeysResponse, - HmacKeyMetadata, - ListHmacKeysPage, - ListHmacKeysFixedSizeCollection> { - - private ListHmacKeysFixedSizeCollection(List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListHmacKeysFixedSizeCollection createEmptyCollection() { - return new ListHmacKeysFixedSizeCollection(null, 0); - } - - @Override - protected ListHmacKeysFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListHmacKeysFixedSizeCollection(pages, collectionSize); - } - } - - public static class ListNotificationConfigsPagedResponse - extends AbstractPagedListResponse< - ListNotificationConfigsRequest, - ListNotificationConfigsResponse, - NotificationConfig, - ListNotificationConfigsPage, - ListNotificationConfigsFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext< - ListNotificationConfigsRequest, ListNotificationConfigsResponse, NotificationConfig> - context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListNotificationConfigsPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new ListNotificationConfigsPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private ListNotificationConfigsPagedResponse(ListNotificationConfigsPage page) { - super(page, ListNotificationConfigsFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListNotificationConfigsPage - extends AbstractPage< - ListNotificationConfigsRequest, - ListNotificationConfigsResponse, - NotificationConfig, - ListNotificationConfigsPage> { - - private ListNotificationConfigsPage( - PageContext< - ListNotificationConfigsRequest, ListNotificationConfigsResponse, NotificationConfig> - context, - ListNotificationConfigsResponse response) { - super(context, response); - } - - private static ListNotificationConfigsPage createEmptyPage() { - return new ListNotificationConfigsPage(null, null); - } - - @Override - protected ListNotificationConfigsPage createPage( - PageContext< - ListNotificationConfigsRequest, ListNotificationConfigsResponse, NotificationConfig> - context, - ListNotificationConfigsResponse response) { - return new ListNotificationConfigsPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext< - ListNotificationConfigsRequest, ListNotificationConfigsResponse, NotificationConfig> - context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListNotificationConfigsFixedSizeCollection - extends AbstractFixedSizeCollection< - ListNotificationConfigsRequest, - ListNotificationConfigsResponse, - NotificationConfig, - ListNotificationConfigsPage, - ListNotificationConfigsFixedSizeCollection> { - - private ListNotificationConfigsFixedSizeCollection( - List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListNotificationConfigsFixedSizeCollection createEmptyCollection() { - return new ListNotificationConfigsFixedSizeCollection(null, 0); - } - - @Override - protected ListNotificationConfigsFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListNotificationConfigsFixedSizeCollection(pages, collectionSize); - } - } } 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 185fbb7a4..da7cc623c 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 @@ -17,8 +17,6 @@ package com.google.storage.v2; import static com.google.storage.v2.StorageClient.ListBucketsPagedResponse; -import static com.google.storage.v2.StorageClient.ListHmacKeysPagedResponse; -import static com.google.storage.v2.StorageClient.ListNotificationConfigsPagedResponse; import static com.google.storage.v2.StorageClient.ListObjectsPagedResponse; import com.google.api.core.ApiFunction; @@ -214,114 +212,6 @@ public UnaryCallSettings rewriteObjectSet return ((StorageStubSettings) getStubSettings()).queryWriteStatusSettings(); } - /** - * Returns the object with the settings used for calls to getServiceAccount. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public UnaryCallSettings getServiceAccountSettings() { - return ((StorageStubSettings) getStubSettings()).getServiceAccountSettings(); - } - - /** - * Returns the object with the settings used for calls to createHmacKey. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public UnaryCallSettings createHmacKeySettings() { - return ((StorageStubSettings) getStubSettings()).createHmacKeySettings(); - } - - /** - * Returns the object with the settings used for calls to deleteHmacKey. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public UnaryCallSettings deleteHmacKeySettings() { - return ((StorageStubSettings) getStubSettings()).deleteHmacKeySettings(); - } - - /** - * Returns the object with the settings used for calls to getHmacKey. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public UnaryCallSettings getHmacKeySettings() { - return ((StorageStubSettings) getStubSettings()).getHmacKeySettings(); - } - - /** - * Returns the object with the settings used for calls to listHmacKeys. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public PagedCallSettings - listHmacKeysSettings() { - return ((StorageStubSettings) getStubSettings()).listHmacKeysSettings(); - } - - /** - * Returns the object with the settings used for calls to updateHmacKey. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public UnaryCallSettings updateHmacKeySettings() { - return ((StorageStubSettings) getStubSettings()).updateHmacKeySettings(); - } - - /** - * Returns the object with the settings used for calls to deleteNotificationConfig. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public UnaryCallSettings - deleteNotificationConfigSettings() { - return ((StorageStubSettings) getStubSettings()).deleteNotificationConfigSettings(); - } - - /** - * Returns the object with the settings used for calls to getNotificationConfig. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public UnaryCallSettings - getNotificationConfigSettings() { - return ((StorageStubSettings) getStubSettings()).getNotificationConfigSettings(); - } - - /** - * Returns the object with the settings used for calls to createNotificationConfig. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public UnaryCallSettings - createNotificationConfigSettings() { - return ((StorageStubSettings) getStubSettings()).createNotificationConfigSettings(); - } - - /** - * Returns the object with the settings used for calls to listNotificationConfigs. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public PagedCallSettings< - ListNotificationConfigsRequest, - ListNotificationConfigsResponse, - ListNotificationConfigsPagedResponse> - listNotificationConfigsSettings() { - return ((StorageStubSettings) getStubSettings()).listNotificationConfigsSettings(); - } - public static final StorageSettings create(StorageStubSettings stub) throws IOException { return new StorageSettings.Builder(stub.toBuilder()).build(); } @@ -540,118 +430,6 @@ public UnaryCallSettings.Builder updateObjectSettin return getStubSettingsBuilder().queryWriteStatusSettings(); } - /** - * Returns the builder for the settings used for calls to getServiceAccount. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public UnaryCallSettings.Builder - getServiceAccountSettings() { - return getStubSettingsBuilder().getServiceAccountSettings(); - } - - /** - * Returns the builder for the settings used for calls to createHmacKey. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public UnaryCallSettings.Builder - createHmacKeySettings() { - return getStubSettingsBuilder().createHmacKeySettings(); - } - - /** - * Returns the builder for the settings used for calls to deleteHmacKey. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public UnaryCallSettings.Builder deleteHmacKeySettings() { - return getStubSettingsBuilder().deleteHmacKeySettings(); - } - - /** - * Returns the builder for the settings used for calls to getHmacKey. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public UnaryCallSettings.Builder getHmacKeySettings() { - return getStubSettingsBuilder().getHmacKeySettings(); - } - - /** - * Returns the builder for the settings used for calls to listHmacKeys. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public PagedCallSettings.Builder< - ListHmacKeysRequest, ListHmacKeysResponse, ListHmacKeysPagedResponse> - listHmacKeysSettings() { - return getStubSettingsBuilder().listHmacKeysSettings(); - } - - /** - * Returns the builder for the settings used for calls to updateHmacKey. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public UnaryCallSettings.Builder - updateHmacKeySettings() { - return getStubSettingsBuilder().updateHmacKeySettings(); - } - - /** - * Returns the builder for the settings used for calls to deleteNotificationConfig. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public UnaryCallSettings.Builder - deleteNotificationConfigSettings() { - return getStubSettingsBuilder().deleteNotificationConfigSettings(); - } - - /** - * Returns the builder for the settings used for calls to getNotificationConfig. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public UnaryCallSettings.Builder - getNotificationConfigSettings() { - return getStubSettingsBuilder().getNotificationConfigSettings(); - } - - /** - * Returns the builder for the settings used for calls to createNotificationConfig. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public UnaryCallSettings.Builder - createNotificationConfigSettings() { - return getStubSettingsBuilder().createNotificationConfigSettings(); - } - - /** - * Returns the builder for the settings used for calls to listNotificationConfigs. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public PagedCallSettings.Builder< - ListNotificationConfigsRequest, - ListNotificationConfigsResponse, - ListNotificationConfigsPagedResponse> - listNotificationConfigsSettings() { - return getStubSettingsBuilder().listNotificationConfigsSettings(); - } - @Override public StorageSettings build() throws IOException { return new StorageSettings(this); diff --git a/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/stub/GrpcStorageStub.java b/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/stub/GrpcStorageStub.java index 397d152cc..adab458a4 100644 --- a/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/stub/GrpcStorageStub.java +++ b/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/stub/GrpcStorageStub.java @@ -17,8 +17,6 @@ package com.google.storage.v2.stub; import static com.google.storage.v2.StorageClient.ListBucketsPagedResponse; -import static com.google.storage.v2.StorageClient.ListHmacKeysPagedResponse; -import static com.google.storage.v2.StorageClient.ListNotificationConfigsPagedResponse; import static com.google.storage.v2.StorageClient.ListObjectsPagedResponse; import com.google.api.gax.core.BackgroundResource; @@ -46,29 +44,15 @@ import com.google.storage.v2.CancelResumableWriteResponse; import com.google.storage.v2.ComposeObjectRequest; import com.google.storage.v2.CreateBucketRequest; -import com.google.storage.v2.CreateHmacKeyRequest; -import com.google.storage.v2.CreateHmacKeyResponse; -import com.google.storage.v2.CreateNotificationConfigRequest; import com.google.storage.v2.DeleteBucketRequest; -import com.google.storage.v2.DeleteHmacKeyRequest; -import com.google.storage.v2.DeleteNotificationConfigRequest; import com.google.storage.v2.DeleteObjectRequest; import com.google.storage.v2.GetBucketRequest; -import com.google.storage.v2.GetHmacKeyRequest; -import com.google.storage.v2.GetNotificationConfigRequest; import com.google.storage.v2.GetObjectRequest; -import com.google.storage.v2.GetServiceAccountRequest; -import com.google.storage.v2.HmacKeyMetadata; import com.google.storage.v2.ListBucketsRequest; import com.google.storage.v2.ListBucketsResponse; -import com.google.storage.v2.ListHmacKeysRequest; -import com.google.storage.v2.ListHmacKeysResponse; -import com.google.storage.v2.ListNotificationConfigsRequest; -import com.google.storage.v2.ListNotificationConfigsResponse; import com.google.storage.v2.ListObjectsRequest; import com.google.storage.v2.ListObjectsResponse; import com.google.storage.v2.LockBucketRetentionPolicyRequest; -import com.google.storage.v2.NotificationConfig; import com.google.storage.v2.Object; import com.google.storage.v2.QueryWriteStatusRequest; import com.google.storage.v2.QueryWriteStatusResponse; @@ -77,11 +61,9 @@ import com.google.storage.v2.RestoreObjectRequest; import com.google.storage.v2.RewriteObjectRequest; import com.google.storage.v2.RewriteResponse; -import com.google.storage.v2.ServiceAccount; import com.google.storage.v2.StartResumableWriteRequest; import com.google.storage.v2.StartResumableWriteResponse; import com.google.storage.v2.UpdateBucketRequest; -import com.google.storage.v2.UpdateHmacKeyRequest; import com.google.storage.v2.UpdateObjectRequest; import com.google.storage.v2.WriteObjectRequest; import com.google.storage.v2.WriteObjectResponse; @@ -305,107 +287,6 @@ public class GrpcStorageStub extends StorageStub { ProtoUtils.marshaller(QueryWriteStatusResponse.getDefaultInstance())) .build(); - private static final MethodDescriptor - getServiceAccountMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.storage.v2.Storage/GetServiceAccount") - .setRequestMarshaller( - ProtoUtils.marshaller(GetServiceAccountRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(ServiceAccount.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - createHmacKeyMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.storage.v2.Storage/CreateHmacKey") - .setRequestMarshaller( - ProtoUtils.marshaller(CreateHmacKeyRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(CreateHmacKeyResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor deleteHmacKeyMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.storage.v2.Storage/DeleteHmacKey") - .setRequestMarshaller(ProtoUtils.marshaller(DeleteHmacKeyRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - getHmacKeyMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.storage.v2.Storage/GetHmacKey") - .setRequestMarshaller(ProtoUtils.marshaller(GetHmacKeyRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(HmacKeyMetadata.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - listHmacKeysMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.storage.v2.Storage/ListHmacKeys") - .setRequestMarshaller(ProtoUtils.marshaller(ListHmacKeysRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListHmacKeysResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - updateHmacKeyMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.storage.v2.Storage/UpdateHmacKey") - .setRequestMarshaller( - ProtoUtils.marshaller(UpdateHmacKeyRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(HmacKeyMetadata.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - deleteNotificationConfigMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.storage.v2.Storage/DeleteNotificationConfig") - .setRequestMarshaller( - ProtoUtils.marshaller(DeleteNotificationConfigRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - getNotificationConfigMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.storage.v2.Storage/GetNotificationConfig") - .setRequestMarshaller( - ProtoUtils.marshaller(GetNotificationConfigRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(NotificationConfig.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - createNotificationConfigMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.storage.v2.Storage/CreateNotificationConfig") - .setRequestMarshaller( - ProtoUtils.marshaller(CreateNotificationConfigRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(NotificationConfig.getDefaultInstance())) - .build(); - - private static final MethodDescriptor< - ListNotificationConfigsRequest, ListNotificationConfigsResponse> - listNotificationConfigsMethodDescriptor = - MethodDescriptor - .newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.storage.v2.Storage/ListNotificationConfigs") - .setRequestMarshaller( - ProtoUtils.marshaller(ListNotificationConfigsRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListNotificationConfigsResponse.getDefaultInstance())) - .build(); - private final UnaryCallable deleteBucketCallable; private final UnaryCallable getBucketCallable; private final UnaryCallable createBucketCallable; @@ -439,24 +320,6 @@ public class GrpcStorageStub extends StorageStub { startResumableWriteCallable; private final UnaryCallable queryWriteStatusCallable; - private final UnaryCallable getServiceAccountCallable; - private final UnaryCallable createHmacKeyCallable; - private final UnaryCallable deleteHmacKeyCallable; - private final UnaryCallable getHmacKeyCallable; - private final UnaryCallable listHmacKeysCallable; - private final UnaryCallable - listHmacKeysPagedCallable; - private final UnaryCallable updateHmacKeyCallable; - private final UnaryCallable - deleteNotificationConfigCallable; - private final UnaryCallable - getNotificationConfigCallable; - private final UnaryCallable - createNotificationConfigCallable; - private final UnaryCallable - listNotificationConfigsCallable; - private final UnaryCallable - listNotificationConfigsPagedCallable; private final BackgroundResource backgroundResources; private final GrpcOperationsStub operationsStub; @@ -508,26 +371,6 @@ public class GrpcStorageStub extends StorageStub { PathTemplate.create("{bucket=**}"); private static final PathTemplate QUERY_WRITE_STATUS_0_PATH_TEMPLATE = PathTemplate.create("{bucket=projects/*/buckets/*}/**"); - private static final PathTemplate GET_SERVICE_ACCOUNT_0_PATH_TEMPLATE = - PathTemplate.create("{project=**}"); - private static final PathTemplate CREATE_HMAC_KEY_0_PATH_TEMPLATE = - PathTemplate.create("{project=**}"); - private static final PathTemplate DELETE_HMAC_KEY_0_PATH_TEMPLATE = - PathTemplate.create("{project=**}"); - private static final PathTemplate GET_HMAC_KEY_0_PATH_TEMPLATE = - PathTemplate.create("{project=**}"); - private static final PathTemplate LIST_HMAC_KEYS_0_PATH_TEMPLATE = - PathTemplate.create("{project=**}"); - private static final PathTemplate UPDATE_HMAC_KEY_0_PATH_TEMPLATE = - PathTemplate.create("{project=**}"); - private static final PathTemplate DELETE_NOTIFICATION_CONFIG_0_PATH_TEMPLATE = - PathTemplate.create("{bucket=projects/*/buckets/*}/**"); - private static final PathTemplate GET_NOTIFICATION_CONFIG_0_PATH_TEMPLATE = - PathTemplate.create("{bucket=projects/*/buckets/*}/**"); - private static final PathTemplate CREATE_NOTIFICATION_CONFIG_0_PATH_TEMPLATE = - PathTemplate.create("{bucket=**}"); - private static final PathTemplate LIST_NOTIFICATION_CONFIGS_0_PATH_TEMPLATE = - PathTemplate.create("{bucket=**}"); public static final GrpcStorageStub create(StorageStubSettings settings) throws IOException { return new GrpcStorageStub(settings, ClientContext.create(settings)); @@ -812,122 +655,6 @@ protected GrpcStorageStub( return builder.build(); }) .build(); - GrpcCallSettings getServiceAccountTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getServiceAccountMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add(request.getProject(), "project", GET_SERVICE_ACCOUNT_0_PATH_TEMPLATE); - return builder.build(); - }) - .build(); - GrpcCallSettings createHmacKeyTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createHmacKeyMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add(request.getProject(), "project", CREATE_HMAC_KEY_0_PATH_TEMPLATE); - return builder.build(); - }) - .build(); - GrpcCallSettings deleteHmacKeyTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteHmacKeyMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add(request.getProject(), "project", DELETE_HMAC_KEY_0_PATH_TEMPLATE); - return builder.build(); - }) - .build(); - GrpcCallSettings getHmacKeyTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getHmacKeyMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add(request.getProject(), "project", GET_HMAC_KEY_0_PATH_TEMPLATE); - return builder.build(); - }) - .build(); - GrpcCallSettings listHmacKeysTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listHmacKeysMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add(request.getProject(), "project", LIST_HMAC_KEYS_0_PATH_TEMPLATE); - return builder.build(); - }) - .build(); - GrpcCallSettings updateHmacKeyTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateHmacKeyMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - if (request.getHmacKey() != null) { - builder.add( - request.getHmacKey().getProject(), - "project", - UPDATE_HMAC_KEY_0_PATH_TEMPLATE); - } - return builder.build(); - }) - .build(); - GrpcCallSettings - deleteNotificationConfigTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteNotificationConfigMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add( - request.getName(), "bucket", DELETE_NOTIFICATION_CONFIG_0_PATH_TEMPLATE); - return builder.build(); - }) - .build(); - GrpcCallSettings - getNotificationConfigTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getNotificationConfigMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add( - request.getName(), "bucket", GET_NOTIFICATION_CONFIG_0_PATH_TEMPLATE); - return builder.build(); - }) - .build(); - GrpcCallSettings - createNotificationConfigTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createNotificationConfigMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add( - request.getParent(), - "bucket", - CREATE_NOTIFICATION_CONFIG_0_PATH_TEMPLATE); - return builder.build(); - }) - .build(); - GrpcCallSettings - listNotificationConfigsTransportSettings = - GrpcCallSettings - .newBuilder() - .setMethodDescriptor(listNotificationConfigsMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add( - request.getParent(), "bucket", LIST_NOTIFICATION_CONFIGS_0_PATH_TEMPLATE); - return builder.build(); - }) - .build(); this.deleteBucketCallable = callableFactory.createUnaryCallable( @@ -1009,54 +736,6 @@ protected GrpcStorageStub( this.queryWriteStatusCallable = callableFactory.createUnaryCallable( queryWriteStatusTransportSettings, settings.queryWriteStatusSettings(), clientContext); - this.getServiceAccountCallable = - callableFactory.createUnaryCallable( - getServiceAccountTransportSettings, - settings.getServiceAccountSettings(), - clientContext); - this.createHmacKeyCallable = - callableFactory.createUnaryCallable( - createHmacKeyTransportSettings, settings.createHmacKeySettings(), clientContext); - this.deleteHmacKeyCallable = - callableFactory.createUnaryCallable( - deleteHmacKeyTransportSettings, settings.deleteHmacKeySettings(), clientContext); - this.getHmacKeyCallable = - callableFactory.createUnaryCallable( - getHmacKeyTransportSettings, settings.getHmacKeySettings(), clientContext); - this.listHmacKeysCallable = - callableFactory.createUnaryCallable( - listHmacKeysTransportSettings, settings.listHmacKeysSettings(), clientContext); - this.listHmacKeysPagedCallable = - callableFactory.createPagedCallable( - listHmacKeysTransportSettings, settings.listHmacKeysSettings(), clientContext); - this.updateHmacKeyCallable = - callableFactory.createUnaryCallable( - updateHmacKeyTransportSettings, settings.updateHmacKeySettings(), clientContext); - this.deleteNotificationConfigCallable = - callableFactory.createUnaryCallable( - deleteNotificationConfigTransportSettings, - settings.deleteNotificationConfigSettings(), - clientContext); - this.getNotificationConfigCallable = - callableFactory.createUnaryCallable( - getNotificationConfigTransportSettings, - settings.getNotificationConfigSettings(), - clientContext); - this.createNotificationConfigCallable = - callableFactory.createUnaryCallable( - createNotificationConfigTransportSettings, - settings.createNotificationConfigSettings(), - clientContext); - this.listNotificationConfigsCallable = - callableFactory.createUnaryCallable( - listNotificationConfigsTransportSettings, - settings.listNotificationConfigsSettings(), - clientContext); - this.listNotificationConfigsPagedCallable = - callableFactory.createPagedCallable( - listNotificationConfigsTransportSettings, - settings.listNotificationConfigsSettings(), - clientContext); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); @@ -1192,70 +871,6 @@ public UnaryCallable rewriteObjectCallabl return queryWriteStatusCallable; } - @Override - public UnaryCallable getServiceAccountCallable() { - return getServiceAccountCallable; - } - - @Override - public UnaryCallable createHmacKeyCallable() { - return createHmacKeyCallable; - } - - @Override - public UnaryCallable deleteHmacKeyCallable() { - return deleteHmacKeyCallable; - } - - @Override - public UnaryCallable getHmacKeyCallable() { - return getHmacKeyCallable; - } - - @Override - public UnaryCallable listHmacKeysCallable() { - return listHmacKeysCallable; - } - - @Override - public UnaryCallable listHmacKeysPagedCallable() { - return listHmacKeysPagedCallable; - } - - @Override - public UnaryCallable updateHmacKeyCallable() { - return updateHmacKeyCallable; - } - - @Override - public UnaryCallable deleteNotificationConfigCallable() { - return deleteNotificationConfigCallable; - } - - @Override - public UnaryCallable - getNotificationConfigCallable() { - return getNotificationConfigCallable; - } - - @Override - public UnaryCallable - createNotificationConfigCallable() { - return createNotificationConfigCallable; - } - - @Override - public UnaryCallable - listNotificationConfigsCallable() { - return listNotificationConfigsCallable; - } - - @Override - public UnaryCallable - listNotificationConfigsPagedCallable() { - return listNotificationConfigsPagedCallable; - } - @Override public final void close() { try { diff --git a/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/stub/StorageStub.java b/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/stub/StorageStub.java index d169d4b08..85c17399f 100644 --- a/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/stub/StorageStub.java +++ b/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/stub/StorageStub.java @@ -17,8 +17,6 @@ package com.google.storage.v2.stub; import static com.google.storage.v2.StorageClient.ListBucketsPagedResponse; -import static com.google.storage.v2.StorageClient.ListHmacKeysPagedResponse; -import static com.google.storage.v2.StorageClient.ListNotificationConfigsPagedResponse; import static com.google.storage.v2.StorageClient.ListObjectsPagedResponse; import com.google.api.gax.core.BackgroundResource; @@ -39,29 +37,15 @@ import com.google.storage.v2.CancelResumableWriteResponse; import com.google.storage.v2.ComposeObjectRequest; import com.google.storage.v2.CreateBucketRequest; -import com.google.storage.v2.CreateHmacKeyRequest; -import com.google.storage.v2.CreateHmacKeyResponse; -import com.google.storage.v2.CreateNotificationConfigRequest; import com.google.storage.v2.DeleteBucketRequest; -import com.google.storage.v2.DeleteHmacKeyRequest; -import com.google.storage.v2.DeleteNotificationConfigRequest; import com.google.storage.v2.DeleteObjectRequest; import com.google.storage.v2.GetBucketRequest; -import com.google.storage.v2.GetHmacKeyRequest; -import com.google.storage.v2.GetNotificationConfigRequest; import com.google.storage.v2.GetObjectRequest; -import com.google.storage.v2.GetServiceAccountRequest; -import com.google.storage.v2.HmacKeyMetadata; import com.google.storage.v2.ListBucketsRequest; import com.google.storage.v2.ListBucketsResponse; -import com.google.storage.v2.ListHmacKeysRequest; -import com.google.storage.v2.ListHmacKeysResponse; -import com.google.storage.v2.ListNotificationConfigsRequest; -import com.google.storage.v2.ListNotificationConfigsResponse; import com.google.storage.v2.ListObjectsRequest; import com.google.storage.v2.ListObjectsResponse; import com.google.storage.v2.LockBucketRetentionPolicyRequest; -import com.google.storage.v2.NotificationConfig; import com.google.storage.v2.Object; import com.google.storage.v2.QueryWriteStatusRequest; import com.google.storage.v2.QueryWriteStatusResponse; @@ -70,11 +54,9 @@ import com.google.storage.v2.RestoreObjectRequest; import com.google.storage.v2.RewriteObjectRequest; import com.google.storage.v2.RewriteResponse; -import com.google.storage.v2.ServiceAccount; import com.google.storage.v2.StartResumableWriteRequest; import com.google.storage.v2.StartResumableWriteResponse; import com.google.storage.v2.UpdateBucketRequest; -import com.google.storage.v2.UpdateHmacKeyRequest; import com.google.storage.v2.UpdateObjectRequest; import com.google.storage.v2.WriteObjectRequest; import com.google.storage.v2.WriteObjectResponse; @@ -191,71 +173,6 @@ public UnaryCallable rewriteObjectCallabl throw new UnsupportedOperationException("Not implemented: queryWriteStatusCallable()"); } - @Deprecated - public UnaryCallable getServiceAccountCallable() { - throw new UnsupportedOperationException("Not implemented: getServiceAccountCallable()"); - } - - @Deprecated - public UnaryCallable createHmacKeyCallable() { - throw new UnsupportedOperationException("Not implemented: createHmacKeyCallable()"); - } - - @Deprecated - public UnaryCallable deleteHmacKeyCallable() { - throw new UnsupportedOperationException("Not implemented: deleteHmacKeyCallable()"); - } - - @Deprecated - public UnaryCallable getHmacKeyCallable() { - throw new UnsupportedOperationException("Not implemented: getHmacKeyCallable()"); - } - - @Deprecated - public UnaryCallable listHmacKeysPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listHmacKeysPagedCallable()"); - } - - @Deprecated - public UnaryCallable listHmacKeysCallable() { - throw new UnsupportedOperationException("Not implemented: listHmacKeysCallable()"); - } - - @Deprecated - public UnaryCallable updateHmacKeyCallable() { - throw new UnsupportedOperationException("Not implemented: updateHmacKeyCallable()"); - } - - @Deprecated - public UnaryCallable deleteNotificationConfigCallable() { - throw new UnsupportedOperationException("Not implemented: deleteNotificationConfigCallable()"); - } - - @Deprecated - public UnaryCallable - getNotificationConfigCallable() { - throw new UnsupportedOperationException("Not implemented: getNotificationConfigCallable()"); - } - - @Deprecated - public UnaryCallable - createNotificationConfigCallable() { - throw new UnsupportedOperationException("Not implemented: createNotificationConfigCallable()"); - } - - @Deprecated - public UnaryCallable - listNotificationConfigsPagedCallable() { - throw new UnsupportedOperationException( - "Not implemented: listNotificationConfigsPagedCallable()"); - } - - @Deprecated - public UnaryCallable - listNotificationConfigsCallable() { - throw new UnsupportedOperationException("Not implemented: listNotificationConfigsCallable()"); - } - @Override public abstract void close(); } 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 f3109d93f..ebe363024 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 @@ -17,8 +17,6 @@ package com.google.storage.v2.stub; import static com.google.storage.v2.StorageClient.ListBucketsPagedResponse; -import static com.google.storage.v2.StorageClient.ListHmacKeysPagedResponse; -import static com.google.storage.v2.StorageClient.ListNotificationConfigsPagedResponse; import static com.google.storage.v2.StorageClient.ListObjectsPagedResponse; import com.google.api.core.ApiFunction; @@ -62,29 +60,15 @@ import com.google.storage.v2.CancelResumableWriteResponse; import com.google.storage.v2.ComposeObjectRequest; import com.google.storage.v2.CreateBucketRequest; -import com.google.storage.v2.CreateHmacKeyRequest; -import com.google.storage.v2.CreateHmacKeyResponse; -import com.google.storage.v2.CreateNotificationConfigRequest; import com.google.storage.v2.DeleteBucketRequest; -import com.google.storage.v2.DeleteHmacKeyRequest; -import com.google.storage.v2.DeleteNotificationConfigRequest; import com.google.storage.v2.DeleteObjectRequest; import com.google.storage.v2.GetBucketRequest; -import com.google.storage.v2.GetHmacKeyRequest; -import com.google.storage.v2.GetNotificationConfigRequest; import com.google.storage.v2.GetObjectRequest; -import com.google.storage.v2.GetServiceAccountRequest; -import com.google.storage.v2.HmacKeyMetadata; import com.google.storage.v2.ListBucketsRequest; import com.google.storage.v2.ListBucketsResponse; -import com.google.storage.v2.ListHmacKeysRequest; -import com.google.storage.v2.ListHmacKeysResponse; -import com.google.storage.v2.ListNotificationConfigsRequest; -import com.google.storage.v2.ListNotificationConfigsResponse; import com.google.storage.v2.ListObjectsRequest; import com.google.storage.v2.ListObjectsResponse; import com.google.storage.v2.LockBucketRetentionPolicyRequest; -import com.google.storage.v2.NotificationConfig; import com.google.storage.v2.Object; import com.google.storage.v2.QueryWriteStatusRequest; import com.google.storage.v2.QueryWriteStatusResponse; @@ -93,11 +77,9 @@ import com.google.storage.v2.RestoreObjectRequest; import com.google.storage.v2.RewriteObjectRequest; import com.google.storage.v2.RewriteResponse; -import com.google.storage.v2.ServiceAccount; import com.google.storage.v2.StartResumableWriteRequest; import com.google.storage.v2.StartResumableWriteResponse; import com.google.storage.v2.UpdateBucketRequest; -import com.google.storage.v2.UpdateHmacKeyRequest; import com.google.storage.v2.UpdateObjectRequest; import com.google.storage.v2.WriteObjectRequest; import com.google.storage.v2.WriteObjectResponse; @@ -198,27 +180,6 @@ public class StorageStubSettings extends StubSettings { startResumableWriteSettings; private final UnaryCallSettings queryWriteStatusSettings; - private final UnaryCallSettings - getServiceAccountSettings; - private final UnaryCallSettings - createHmacKeySettings; - private final UnaryCallSettings deleteHmacKeySettings; - private final UnaryCallSettings getHmacKeySettings; - private final PagedCallSettings< - ListHmacKeysRequest, ListHmacKeysResponse, ListHmacKeysPagedResponse> - listHmacKeysSettings; - private final UnaryCallSettings updateHmacKeySettings; - private final UnaryCallSettings - deleteNotificationConfigSettings; - private final UnaryCallSettings - getNotificationConfigSettings; - private final UnaryCallSettings - createNotificationConfigSettings; - private final PagedCallSettings< - ListNotificationConfigsRequest, - ListNotificationConfigsResponse, - ListNotificationConfigsPagedResponse> - listNotificationConfigsSettings; private static final PagedListDescriptor LIST_BUCKETS_PAGE_STR_DESC = @@ -288,84 +249,6 @@ public Iterable extractResources(ListObjectsResponse payload) { } }; - private static final PagedListDescriptor< - ListHmacKeysRequest, ListHmacKeysResponse, HmacKeyMetadata> - LIST_HMAC_KEYS_PAGE_STR_DESC = - new PagedListDescriptor() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListHmacKeysRequest injectToken(ListHmacKeysRequest payload, String token) { - return ListHmacKeysRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListHmacKeysRequest injectPageSize(ListHmacKeysRequest payload, int pageSize) { - return ListHmacKeysRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListHmacKeysRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListHmacKeysResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListHmacKeysResponse payload) { - return payload.getHmacKeysList(); - } - }; - - private static final PagedListDescriptor< - ListNotificationConfigsRequest, ListNotificationConfigsResponse, NotificationConfig> - LIST_NOTIFICATION_CONFIGS_PAGE_STR_DESC = - new PagedListDescriptor< - ListNotificationConfigsRequest, - ListNotificationConfigsResponse, - NotificationConfig>() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListNotificationConfigsRequest injectToken( - ListNotificationConfigsRequest payload, String token) { - return ListNotificationConfigsRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListNotificationConfigsRequest injectPageSize( - ListNotificationConfigsRequest payload, int pageSize) { - return ListNotificationConfigsRequest.newBuilder(payload) - .setPageSize(pageSize) - .build(); - } - - @Override - public Integer extractPageSize(ListNotificationConfigsRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListNotificationConfigsResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources( - ListNotificationConfigsResponse payload) { - return payload.getNotificationConfigsList(); - } - }; - private static final PagedListResponseFactory< ListBucketsRequest, ListBucketsResponse, ListBucketsPagedResponse> LIST_BUCKETS_PAGE_STR_FACT = @@ -400,50 +283,6 @@ public ApiFuture getFuturePagedResponse( } }; - private static final PagedListResponseFactory< - ListHmacKeysRequest, ListHmacKeysResponse, ListHmacKeysPagedResponse> - LIST_HMAC_KEYS_PAGE_STR_FACT = - new PagedListResponseFactory< - ListHmacKeysRequest, ListHmacKeysResponse, ListHmacKeysPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListHmacKeysRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext pageContext = - PageContext.create(callable, LIST_HMAC_KEYS_PAGE_STR_DESC, request, context); - return ListHmacKeysPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - private static final PagedListResponseFactory< - ListNotificationConfigsRequest, - ListNotificationConfigsResponse, - ListNotificationConfigsPagedResponse> - LIST_NOTIFICATION_CONFIGS_PAGE_STR_FACT = - new PagedListResponseFactory< - ListNotificationConfigsRequest, - ListNotificationConfigsResponse, - ListNotificationConfigsPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable - callable, - ListNotificationConfigsRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext< - ListNotificationConfigsRequest, - ListNotificationConfigsResponse, - NotificationConfig> - pageContext = - PageContext.create( - callable, LIST_NOTIFICATION_CONFIGS_PAGE_STR_DESC, request, context); - return ListNotificationConfigsPagedResponse.createAsync(pageContext, futureResponse); - } - }; - /** Returns the object with the settings used for calls to deleteBucket. */ public UnaryCallSettings deleteBucketSettings() { return deleteBucketSettings; @@ -562,114 +401,6 @@ public UnaryCallSettings rewriteObjectSet return queryWriteStatusSettings; } - /** - * Returns the object with the settings used for calls to getServiceAccount. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public UnaryCallSettings getServiceAccountSettings() { - return getServiceAccountSettings; - } - - /** - * Returns the object with the settings used for calls to createHmacKey. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public UnaryCallSettings createHmacKeySettings() { - return createHmacKeySettings; - } - - /** - * Returns the object with the settings used for calls to deleteHmacKey. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public UnaryCallSettings deleteHmacKeySettings() { - return deleteHmacKeySettings; - } - - /** - * Returns the object with the settings used for calls to getHmacKey. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public UnaryCallSettings getHmacKeySettings() { - return getHmacKeySettings; - } - - /** - * Returns the object with the settings used for calls to listHmacKeys. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public PagedCallSettings - listHmacKeysSettings() { - return listHmacKeysSettings; - } - - /** - * Returns the object with the settings used for calls to updateHmacKey. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public UnaryCallSettings updateHmacKeySettings() { - return updateHmacKeySettings; - } - - /** - * Returns the object with the settings used for calls to deleteNotificationConfig. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public UnaryCallSettings - deleteNotificationConfigSettings() { - return deleteNotificationConfigSettings; - } - - /** - * Returns the object with the settings used for calls to getNotificationConfig. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public UnaryCallSettings - getNotificationConfigSettings() { - return getNotificationConfigSettings; - } - - /** - * Returns the object with the settings used for calls to createNotificationConfig. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public UnaryCallSettings - createNotificationConfigSettings() { - return createNotificationConfigSettings; - } - - /** - * Returns the object with the settings used for calls to listNotificationConfigs. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public PagedCallSettings< - ListNotificationConfigsRequest, - ListNotificationConfigsResponse, - ListNotificationConfigsPagedResponse> - listNotificationConfigsSettings() { - return listNotificationConfigsSettings; - } - public StorageStub createStub() throws IOException { if (getTransportChannelProvider() .getTransportName() @@ -772,16 +503,6 @@ protected StorageStubSettings(Builder settingsBuilder) throws IOException { rewriteObjectSettings = settingsBuilder.rewriteObjectSettings().build(); startResumableWriteSettings = settingsBuilder.startResumableWriteSettings().build(); queryWriteStatusSettings = settingsBuilder.queryWriteStatusSettings().build(); - getServiceAccountSettings = settingsBuilder.getServiceAccountSettings().build(); - createHmacKeySettings = settingsBuilder.createHmacKeySettings().build(); - deleteHmacKeySettings = settingsBuilder.deleteHmacKeySettings().build(); - getHmacKeySettings = settingsBuilder.getHmacKeySettings().build(); - listHmacKeysSettings = settingsBuilder.listHmacKeysSettings().build(); - updateHmacKeySettings = settingsBuilder.updateHmacKeySettings().build(); - deleteNotificationConfigSettings = settingsBuilder.deleteNotificationConfigSettings().build(); - getNotificationConfigSettings = settingsBuilder.getNotificationConfigSettings().build(); - createNotificationConfigSettings = settingsBuilder.createNotificationConfigSettings().build(); - listNotificationConfigsSettings = settingsBuilder.listNotificationConfigsSettings().build(); } /** Builder for StorageStubSettings. */ @@ -823,28 +544,6 @@ public static class Builder extends StubSettings.Builder queryWriteStatusSettings; - private final UnaryCallSettings.Builder - getServiceAccountSettings; - private final UnaryCallSettings.Builder - createHmacKeySettings; - private final UnaryCallSettings.Builder deleteHmacKeySettings; - private final UnaryCallSettings.Builder getHmacKeySettings; - private final PagedCallSettings.Builder< - ListHmacKeysRequest, ListHmacKeysResponse, ListHmacKeysPagedResponse> - listHmacKeysSettings; - private final UnaryCallSettings.Builder - updateHmacKeySettings; - private final UnaryCallSettings.Builder - deleteNotificationConfigSettings; - private final UnaryCallSettings.Builder - getNotificationConfigSettings; - private final UnaryCallSettings.Builder - createNotificationConfigSettings; - private final PagedCallSettings.Builder< - ListNotificationConfigsRequest, - ListNotificationConfigsResponse, - ListNotificationConfigsPagedResponse> - listNotificationConfigsSettings; private static final ImmutableMap> RETRYABLE_CODE_DEFINITIONS; @@ -907,17 +606,6 @@ protected Builder(ClientContext clientContext) { rewriteObjectSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); startResumableWriteSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); queryWriteStatusSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - getServiceAccountSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createHmacKeySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deleteHmacKeySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - getHmacKeySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listHmacKeysSettings = PagedCallSettings.newBuilder(LIST_HMAC_KEYS_PAGE_STR_FACT); - updateHmacKeySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deleteNotificationConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - getNotificationConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createNotificationConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listNotificationConfigsSettings = - PagedCallSettings.newBuilder(LIST_NOTIFICATION_CONFIGS_PAGE_STR_FACT); unaryMethodSettingsBuilders = ImmutableList.>of( @@ -939,17 +627,7 @@ protected Builder(ClientContext clientContext) { listObjectsSettings, rewriteObjectSettings, startResumableWriteSettings, - queryWriteStatusSettings, - getServiceAccountSettings, - createHmacKeySettings, - deleteHmacKeySettings, - getHmacKeySettings, - listHmacKeysSettings, - updateHmacKeySettings, - deleteNotificationConfigSettings, - getNotificationConfigSettings, - createNotificationConfigSettings, - listNotificationConfigsSettings); + queryWriteStatusSettings); initDefaults(this); } @@ -978,16 +656,6 @@ protected Builder(StorageStubSettings settings) { rewriteObjectSettings = settings.rewriteObjectSettings.toBuilder(); startResumableWriteSettings = settings.startResumableWriteSettings.toBuilder(); queryWriteStatusSettings = settings.queryWriteStatusSettings.toBuilder(); - getServiceAccountSettings = settings.getServiceAccountSettings.toBuilder(); - createHmacKeySettings = settings.createHmacKeySettings.toBuilder(); - deleteHmacKeySettings = settings.deleteHmacKeySettings.toBuilder(); - getHmacKeySettings = settings.getHmacKeySettings.toBuilder(); - listHmacKeysSettings = settings.listHmacKeysSettings.toBuilder(); - updateHmacKeySettings = settings.updateHmacKeySettings.toBuilder(); - deleteNotificationConfigSettings = settings.deleteNotificationConfigSettings.toBuilder(); - getNotificationConfigSettings = settings.getNotificationConfigSettings.toBuilder(); - createNotificationConfigSettings = settings.createNotificationConfigSettings.toBuilder(); - listNotificationConfigsSettings = settings.listNotificationConfigsSettings.toBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( @@ -1009,17 +677,7 @@ protected Builder(StorageStubSettings settings) { listObjectsSettings, rewriteObjectSettings, startResumableWriteSettings, - queryWriteStatusSettings, - getServiceAccountSettings, - createHmacKeySettings, - deleteHmacKeySettings, - getHmacKeySettings, - listHmacKeysSettings, - updateHmacKeySettings, - deleteNotificationConfigSettings, - getNotificationConfigSettings, - createNotificationConfigSettings, - listNotificationConfigsSettings); + queryWriteStatusSettings); } private static Builder createDefault() { @@ -1135,56 +793,6 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - builder - .getServiceAccountSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .createHmacKeySettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .deleteHmacKeySettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .getHmacKeySettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .listHmacKeysSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .updateHmacKeySettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .deleteNotificationConfigSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .getNotificationConfigSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .createNotificationConfigSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .listNotificationConfigsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - return builder; } @@ -1326,118 +934,6 @@ public UnaryCallSettings.Builder updateObjectSettin return queryWriteStatusSettings; } - /** - * Returns the builder for the settings used for calls to getServiceAccount. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public UnaryCallSettings.Builder - getServiceAccountSettings() { - return getServiceAccountSettings; - } - - /** - * Returns the builder for the settings used for calls to createHmacKey. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public UnaryCallSettings.Builder - createHmacKeySettings() { - return createHmacKeySettings; - } - - /** - * Returns the builder for the settings used for calls to deleteHmacKey. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public UnaryCallSettings.Builder deleteHmacKeySettings() { - return deleteHmacKeySettings; - } - - /** - * Returns the builder for the settings used for calls to getHmacKey. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public UnaryCallSettings.Builder getHmacKeySettings() { - return getHmacKeySettings; - } - - /** - * Returns the builder for the settings used for calls to listHmacKeys. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public PagedCallSettings.Builder< - ListHmacKeysRequest, ListHmacKeysResponse, ListHmacKeysPagedResponse> - listHmacKeysSettings() { - return listHmacKeysSettings; - } - - /** - * Returns the builder for the settings used for calls to updateHmacKey. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public UnaryCallSettings.Builder - updateHmacKeySettings() { - return updateHmacKeySettings; - } - - /** - * Returns the builder for the settings used for calls to deleteNotificationConfig. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public UnaryCallSettings.Builder - deleteNotificationConfigSettings() { - return deleteNotificationConfigSettings; - } - - /** - * Returns the builder for the settings used for calls to getNotificationConfig. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public UnaryCallSettings.Builder - getNotificationConfigSettings() { - return getNotificationConfigSettings; - } - - /** - * Returns the builder for the settings used for calls to createNotificationConfig. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public UnaryCallSettings.Builder - createNotificationConfigSettings() { - return createNotificationConfigSettings; - } - - /** - * Returns the builder for the settings used for calls to listNotificationConfigs. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public PagedCallSettings.Builder< - ListNotificationConfigsRequest, - ListNotificationConfigsResponse, - ListNotificationConfigsPagedResponse> - listNotificationConfigsSettings() { - return listNotificationConfigsSettings; - } - @Override public StorageStubSettings build() throws IOException { return new StorageStubSettings(this); diff --git a/gapic-google-cloud-storage-v2/src/main/resources/META-INF/native-image/com.google.storage.v2/reflect-config.json b/gapic-google-cloud-storage-v2/src/main/resources/META-INF/native-image/com.google.storage.v2/reflect-config.json index f7e94466f..f63c1baef 100644 --- a/gapic-google-cloud-storage-v2/src/main/resources/META-INF/native-image/com.google.storage.v2/reflect-config.json +++ b/gapic-google-cloud-storage-v2/src/main/resources/META-INF/native-image/com.google.storage.v2/reflect-config.json @@ -2015,60 +2015,6 @@ "allDeclaredClasses": true, "allPublicClasses": true }, - { - "name": "com.google.storage.v2.CreateHmacKeyRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.storage.v2.CreateHmacKeyRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.storage.v2.CreateHmacKeyResponse", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.storage.v2.CreateHmacKeyResponse$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.storage.v2.CreateNotificationConfigRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.storage.v2.CreateNotificationConfigRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, { "name": "com.google.storage.v2.CustomerEncryption", "queryAllDeclaredConstructors": true, @@ -2105,42 +2051,6 @@ "allDeclaredClasses": true, "allPublicClasses": true }, - { - "name": "com.google.storage.v2.DeleteHmacKeyRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.storage.v2.DeleteHmacKeyRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.storage.v2.DeleteNotificationConfigRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.storage.v2.DeleteNotificationConfigRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, { "name": "com.google.storage.v2.DeleteObjectRequest", "queryAllDeclaredConstructors": true, @@ -2177,42 +2087,6 @@ "allDeclaredClasses": true, "allPublicClasses": true }, - { - "name": "com.google.storage.v2.GetHmacKeyRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.storage.v2.GetHmacKeyRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.storage.v2.GetNotificationConfigRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.storage.v2.GetNotificationConfigRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, { "name": "com.google.storage.v2.GetObjectRequest", "queryAllDeclaredConstructors": true, @@ -2231,42 +2105,6 @@ "allDeclaredClasses": true, "allPublicClasses": true }, - { - "name": "com.google.storage.v2.GetServiceAccountRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.storage.v2.GetServiceAccountRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.storage.v2.HmacKeyMetadata", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.storage.v2.HmacKeyMetadata$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, { "name": "com.google.storage.v2.ListBucketsRequest", "queryAllDeclaredConstructors": true, @@ -2303,78 +2141,6 @@ "allDeclaredClasses": true, "allPublicClasses": true }, - { - "name": "com.google.storage.v2.ListHmacKeysRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.storage.v2.ListHmacKeysRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.storage.v2.ListHmacKeysResponse", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.storage.v2.ListHmacKeysResponse$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.storage.v2.ListNotificationConfigsRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.storage.v2.ListNotificationConfigsRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.storage.v2.ListNotificationConfigsResponse", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.storage.v2.ListNotificationConfigsResponse$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, { "name": "com.google.storage.v2.ListObjectsRequest", "queryAllDeclaredConstructors": true, @@ -2429,24 +2195,6 @@ "allDeclaredClasses": true, "allPublicClasses": true }, - { - "name": "com.google.storage.v2.NotificationConfig", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.storage.v2.NotificationConfig$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, { "name": "com.google.storage.v2.Object", "queryAllDeclaredConstructors": true, @@ -2663,24 +2411,6 @@ "allDeclaredClasses": true, "allPublicClasses": true }, - { - "name": "com.google.storage.v2.ServiceAccount", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.storage.v2.ServiceAccount$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, { "name": "com.google.storage.v2.ServiceConstants", "queryAllDeclaredConstructors": true, @@ -2762,24 +2492,6 @@ "allDeclaredClasses": true, "allPublicClasses": true }, - { - "name": "com.google.storage.v2.UpdateHmacKeyRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.storage.v2.UpdateHmacKeyRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, { "name": "com.google.storage.v2.UpdateObjectRequest", "queryAllDeclaredConstructors": true, diff --git a/gapic-google-cloud-storage-v2/src/main/resources/com/google/storage/v2/gapic_metadata.json b/gapic-google-cloud-storage-v2/src/main/resources/com/google/storage/v2/gapic_metadata.json index f3a73a24b..3d0649494 100644 --- a/gapic-google-cloud-storage-v2/src/main/resources/com/google/storage/v2/gapic_metadata.json +++ b/gapic-google-cloud-storage-v2/src/main/resources/com/google/storage/v2/gapic_metadata.json @@ -22,51 +22,24 @@ "CreateBucket": { "methods": ["createBucket", "createBucket", "createBucket", "createBucketCallable"] }, - "CreateHmacKey": { - "methods": ["createHmacKey", "createHmacKey", "createHmacKey", "createHmacKeyCallable"] - }, - "CreateNotificationConfig": { - "methods": ["createNotificationConfig", "createNotificationConfig", "createNotificationConfig", "createNotificationConfigCallable"] - }, "DeleteBucket": { "methods": ["deleteBucket", "deleteBucket", "deleteBucket", "deleteBucketCallable"] }, - "DeleteHmacKey": { - "methods": ["deleteHmacKey", "deleteHmacKey", "deleteHmacKey", "deleteHmacKeyCallable"] - }, - "DeleteNotificationConfig": { - "methods": ["deleteNotificationConfig", "deleteNotificationConfig", "deleteNotificationConfig", "deleteNotificationConfigCallable"] - }, "DeleteObject": { "methods": ["deleteObject", "deleteObject", "deleteObject", "deleteObject", "deleteObject", "deleteObjectCallable"] }, "GetBucket": { "methods": ["getBucket", "getBucket", "getBucket", "getBucketCallable"] }, - "GetHmacKey": { - "methods": ["getHmacKey", "getHmacKey", "getHmacKey", "getHmacKeyCallable"] - }, "GetIamPolicy": { "methods": ["getIamPolicy", "getIamPolicy", "getIamPolicy", "getIamPolicyCallable"] }, - "GetNotificationConfig": { - "methods": ["getNotificationConfig", "getNotificationConfig", "getNotificationConfig", "getNotificationConfigCallable"] - }, "GetObject": { "methods": ["getObject", "getObject", "getObject", "getObject", "getObject", "getObjectCallable"] }, - "GetServiceAccount": { - "methods": ["getServiceAccount", "getServiceAccount", "getServiceAccount", "getServiceAccountCallable"] - }, "ListBuckets": { "methods": ["listBuckets", "listBuckets", "listBuckets", "listBucketsPagedCallable", "listBucketsCallable"] }, - "ListHmacKeys": { - "methods": ["listHmacKeys", "listHmacKeys", "listHmacKeys", "listHmacKeysPagedCallable", "listHmacKeysCallable"] - }, - "ListNotificationConfigs": { - "methods": ["listNotificationConfigs", "listNotificationConfigs", "listNotificationConfigs", "listNotificationConfigsPagedCallable", "listNotificationConfigsCallable"] - }, "ListObjects": { "methods": ["listObjects", "listObjects", "listObjects", "listObjectsPagedCallable", "listObjectsCallable"] }, @@ -97,9 +70,6 @@ "UpdateBucket": { "methods": ["updateBucket", "updateBucket", "updateBucketCallable"] }, - "UpdateHmacKey": { - "methods": ["updateHmacKey", "updateHmacKey", "updateHmacKeyCallable"] - }, "UpdateObject": { "methods": ["updateObject", "updateObject", "updateObjectCallable"] }, diff --git a/gapic-google-cloud-storage-v2/src/test/java/com/google/storage/v2/MockStorageImpl.java b/gapic-google-cloud-storage-v2/src/test/java/com/google/storage/v2/MockStorageImpl.java index 8612f38cb..e016a3007 100644 --- a/gapic-google-cloud-storage-v2/src/test/java/com/google/storage/v2/MockStorageImpl.java +++ b/gapic-google-cloud-storage-v2/src/test/java/com/google/storage/v2/MockStorageImpl.java @@ -549,215 +549,4 @@ public void queryWriteStatus( Exception.class.getName()))); } } - - @Override - public void getServiceAccount( - GetServiceAccountRequest request, StreamObserver responseObserver) { - java.lang.Object response = responses.poll(); - if (response instanceof ServiceAccount) { - requests.add(request); - responseObserver.onNext(((ServiceAccount) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method GetServiceAccount, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ServiceAccount.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void createHmacKey( - CreateHmacKeyRequest request, StreamObserver responseObserver) { - java.lang.Object response = responses.poll(); - if (response instanceof CreateHmacKeyResponse) { - requests.add(request); - responseObserver.onNext(((CreateHmacKeyResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method CreateHmacKey, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - CreateHmacKeyResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void deleteHmacKey(DeleteHmacKeyRequest request, StreamObserver responseObserver) { - java.lang.Object response = responses.poll(); - if (response instanceof Empty) { - requests.add(request); - responseObserver.onNext(((Empty) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method DeleteHmacKey, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Empty.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void getHmacKey( - GetHmacKeyRequest request, StreamObserver responseObserver) { - java.lang.Object response = responses.poll(); - if (response instanceof HmacKeyMetadata) { - requests.add(request); - responseObserver.onNext(((HmacKeyMetadata) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method GetHmacKey, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - HmacKeyMetadata.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void listHmacKeys( - ListHmacKeysRequest request, StreamObserver responseObserver) { - java.lang.Object response = responses.poll(); - if (response instanceof ListHmacKeysResponse) { - requests.add(request); - responseObserver.onNext(((ListHmacKeysResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method ListHmacKeys, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListHmacKeysResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void updateHmacKey( - UpdateHmacKeyRequest request, StreamObserver responseObserver) { - java.lang.Object response = responses.poll(); - if (response instanceof HmacKeyMetadata) { - requests.add(request); - responseObserver.onNext(((HmacKeyMetadata) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method UpdateHmacKey, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - HmacKeyMetadata.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void deleteNotificationConfig( - DeleteNotificationConfigRequest request, StreamObserver responseObserver) { - java.lang.Object response = responses.poll(); - if (response instanceof Empty) { - requests.add(request); - responseObserver.onNext(((Empty) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method DeleteNotificationConfig, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Empty.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void getNotificationConfig( - GetNotificationConfigRequest request, StreamObserver responseObserver) { - java.lang.Object response = responses.poll(); - if (response instanceof NotificationConfig) { - requests.add(request); - responseObserver.onNext(((NotificationConfig) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method GetNotificationConfig, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - NotificationConfig.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void createNotificationConfig( - CreateNotificationConfigRequest request, - StreamObserver responseObserver) { - java.lang.Object response = responses.poll(); - if (response instanceof NotificationConfig) { - requests.add(request); - responseObserver.onNext(((NotificationConfig) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method CreateNotificationConfig, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - NotificationConfig.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void listNotificationConfigs( - ListNotificationConfigsRequest request, - StreamObserver responseObserver) { - java.lang.Object response = responses.poll(); - if (response instanceof ListNotificationConfigsResponse) { - requests.add(request); - responseObserver.onNext(((ListNotificationConfigsResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method ListNotificationConfigs, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListNotificationConfigsResponse.class.getName(), - Exception.class.getName()))); - } - } } 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 632f50829..ab4fc0b15 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 @@ -17,8 +17,6 @@ package com.google.storage.v2; import static com.google.storage.v2.StorageClient.ListBucketsPagedResponse; -import static com.google.storage.v2.StorageClient.ListHmacKeysPagedResponse; -import static com.google.storage.v2.StorageClient.ListNotificationConfigsPagedResponse; import static com.google.storage.v2.StorageClient.ListObjectsPagedResponse; import com.google.api.gax.core.NoCredentialsProvider; @@ -2303,824 +2301,4 @@ public void queryWriteStatusExceptionTest() throws Exception { // Expected exception. } } - - @Test - public void getServiceAccountTest() throws Exception { - ServiceAccount expectedResponse = - ServiceAccount.newBuilder().setEmailAddress("emailAddress-1070931784").build(); - mockStorage.addResponse(expectedResponse); - - ProjectName project = ProjectName.of("[PROJECT]"); - - ServiceAccount actualResponse = client.getServiceAccount(project); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockStorage.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetServiceAccountRequest actualRequest = ((GetServiceAccountRequest) actualRequests.get(0)); - - Assert.assertEquals(project.toString(), actualRequest.getProject()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getServiceAccountExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockStorage.addException(exception); - - try { - ProjectName project = ProjectName.of("[PROJECT]"); - client.getServiceAccount(project); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getServiceAccountTest2() throws Exception { - ServiceAccount expectedResponse = - ServiceAccount.newBuilder().setEmailAddress("emailAddress-1070931784").build(); - mockStorage.addResponse(expectedResponse); - - String project = "project-309310695"; - - ServiceAccount actualResponse = client.getServiceAccount(project); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockStorage.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetServiceAccountRequest actualRequest = ((GetServiceAccountRequest) actualRequests.get(0)); - - Assert.assertEquals(project, actualRequest.getProject()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getServiceAccountExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockStorage.addException(exception); - - try { - String project = "project-309310695"; - client.getServiceAccount(project); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createHmacKeyTest() throws Exception { - CreateHmacKeyResponse expectedResponse = - CreateHmacKeyResponse.newBuilder() - .setMetadata(HmacKeyMetadata.newBuilder().build()) - .setSecretKeyBytes(ByteString.EMPTY) - .build(); - mockStorage.addResponse(expectedResponse); - - ProjectName project = ProjectName.of("[PROJECT]"); - String serviceAccountEmail = "serviceAccountEmail1825953988"; - - CreateHmacKeyResponse actualResponse = client.createHmacKey(project, serviceAccountEmail); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockStorage.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateHmacKeyRequest actualRequest = ((CreateHmacKeyRequest) actualRequests.get(0)); - - Assert.assertEquals(project.toString(), actualRequest.getProject()); - Assert.assertEquals(serviceAccountEmail, actualRequest.getServiceAccountEmail()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createHmacKeyExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockStorage.addException(exception); - - try { - ProjectName project = ProjectName.of("[PROJECT]"); - String serviceAccountEmail = "serviceAccountEmail1825953988"; - client.createHmacKey(project, serviceAccountEmail); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createHmacKeyTest2() throws Exception { - CreateHmacKeyResponse expectedResponse = - CreateHmacKeyResponse.newBuilder() - .setMetadata(HmacKeyMetadata.newBuilder().build()) - .setSecretKeyBytes(ByteString.EMPTY) - .build(); - mockStorage.addResponse(expectedResponse); - - String project = "project-309310695"; - String serviceAccountEmail = "serviceAccountEmail1825953988"; - - CreateHmacKeyResponse actualResponse = client.createHmacKey(project, serviceAccountEmail); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockStorage.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateHmacKeyRequest actualRequest = ((CreateHmacKeyRequest) actualRequests.get(0)); - - Assert.assertEquals(project, actualRequest.getProject()); - Assert.assertEquals(serviceAccountEmail, actualRequest.getServiceAccountEmail()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createHmacKeyExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockStorage.addException(exception); - - try { - String project = "project-309310695"; - String serviceAccountEmail = "serviceAccountEmail1825953988"; - client.createHmacKey(project, serviceAccountEmail); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteHmacKeyTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockStorage.addResponse(expectedResponse); - - String accessId = "accessId-2146437729"; - ProjectName project = ProjectName.of("[PROJECT]"); - - client.deleteHmacKey(accessId, project); - - List actualRequests = mockStorage.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteHmacKeyRequest actualRequest = ((DeleteHmacKeyRequest) actualRequests.get(0)); - - Assert.assertEquals(accessId, actualRequest.getAccessId()); - Assert.assertEquals(project.toString(), actualRequest.getProject()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteHmacKeyExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockStorage.addException(exception); - - try { - String accessId = "accessId-2146437729"; - ProjectName project = ProjectName.of("[PROJECT]"); - client.deleteHmacKey(accessId, project); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteHmacKeyTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockStorage.addResponse(expectedResponse); - - String accessId = "accessId-2146437729"; - String project = "project-309310695"; - - client.deleteHmacKey(accessId, project); - - List actualRequests = mockStorage.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteHmacKeyRequest actualRequest = ((DeleteHmacKeyRequest) actualRequests.get(0)); - - Assert.assertEquals(accessId, actualRequest.getAccessId()); - Assert.assertEquals(project, actualRequest.getProject()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteHmacKeyExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockStorage.addException(exception); - - try { - String accessId = "accessId-2146437729"; - String project = "project-309310695"; - client.deleteHmacKey(accessId, project); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getHmacKeyTest() throws Exception { - HmacKeyMetadata expectedResponse = - HmacKeyMetadata.newBuilder() - .setId("id3355") - .setAccessId("accessId-2146437729") - .setProject(ProjectName.of("[PROJECT]").toString()) - .setServiceAccountEmail("serviceAccountEmail1825953988") - .setState("state109757585") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEtag("etag3123477") - .build(); - mockStorage.addResponse(expectedResponse); - - String accessId = "accessId-2146437729"; - ProjectName project = ProjectName.of("[PROJECT]"); - - HmacKeyMetadata actualResponse = client.getHmacKey(accessId, project); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockStorage.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetHmacKeyRequest actualRequest = ((GetHmacKeyRequest) actualRequests.get(0)); - - Assert.assertEquals(accessId, actualRequest.getAccessId()); - Assert.assertEquals(project.toString(), actualRequest.getProject()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getHmacKeyExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockStorage.addException(exception); - - try { - String accessId = "accessId-2146437729"; - ProjectName project = ProjectName.of("[PROJECT]"); - client.getHmacKey(accessId, project); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getHmacKeyTest2() throws Exception { - HmacKeyMetadata expectedResponse = - HmacKeyMetadata.newBuilder() - .setId("id3355") - .setAccessId("accessId-2146437729") - .setProject(ProjectName.of("[PROJECT]").toString()) - .setServiceAccountEmail("serviceAccountEmail1825953988") - .setState("state109757585") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEtag("etag3123477") - .build(); - mockStorage.addResponse(expectedResponse); - - String accessId = "accessId-2146437729"; - String project = "project-309310695"; - - HmacKeyMetadata actualResponse = client.getHmacKey(accessId, project); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockStorage.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetHmacKeyRequest actualRequest = ((GetHmacKeyRequest) actualRequests.get(0)); - - Assert.assertEquals(accessId, actualRequest.getAccessId()); - Assert.assertEquals(project, actualRequest.getProject()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getHmacKeyExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockStorage.addException(exception); - - try { - String accessId = "accessId-2146437729"; - String project = "project-309310695"; - client.getHmacKey(accessId, project); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listHmacKeysTest() throws Exception { - HmacKeyMetadata responsesElement = HmacKeyMetadata.newBuilder().build(); - ListHmacKeysResponse expectedResponse = - ListHmacKeysResponse.newBuilder() - .setNextPageToken("") - .addAllHmacKeys(Arrays.asList(responsesElement)) - .build(); - mockStorage.addResponse(expectedResponse); - - ProjectName project = ProjectName.of("[PROJECT]"); - - ListHmacKeysPagedResponse pagedListResponse = client.listHmacKeys(project); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getHmacKeysList().get(0), resources.get(0)); - - List actualRequests = mockStorage.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListHmacKeysRequest actualRequest = ((ListHmacKeysRequest) actualRequests.get(0)); - - Assert.assertEquals(project.toString(), actualRequest.getProject()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listHmacKeysExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockStorage.addException(exception); - - try { - ProjectName project = ProjectName.of("[PROJECT]"); - client.listHmacKeys(project); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listHmacKeysTest2() throws Exception { - HmacKeyMetadata responsesElement = HmacKeyMetadata.newBuilder().build(); - ListHmacKeysResponse expectedResponse = - ListHmacKeysResponse.newBuilder() - .setNextPageToken("") - .addAllHmacKeys(Arrays.asList(responsesElement)) - .build(); - mockStorage.addResponse(expectedResponse); - - String project = "project-309310695"; - - ListHmacKeysPagedResponse pagedListResponse = client.listHmacKeys(project); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getHmacKeysList().get(0), resources.get(0)); - - List actualRequests = mockStorage.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListHmacKeysRequest actualRequest = ((ListHmacKeysRequest) actualRequests.get(0)); - - Assert.assertEquals(project, actualRequest.getProject()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listHmacKeysExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockStorage.addException(exception); - - try { - String project = "project-309310695"; - client.listHmacKeys(project); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateHmacKeyTest() throws Exception { - HmacKeyMetadata expectedResponse = - HmacKeyMetadata.newBuilder() - .setId("id3355") - .setAccessId("accessId-2146437729") - .setProject(ProjectName.of("[PROJECT]").toString()) - .setServiceAccountEmail("serviceAccountEmail1825953988") - .setState("state109757585") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEtag("etag3123477") - .build(); - mockStorage.addResponse(expectedResponse); - - HmacKeyMetadata hmacKey = HmacKeyMetadata.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - HmacKeyMetadata actualResponse = client.updateHmacKey(hmacKey, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockStorage.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateHmacKeyRequest actualRequest = ((UpdateHmacKeyRequest) actualRequests.get(0)); - - Assert.assertEquals(hmacKey, actualRequest.getHmacKey()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateHmacKeyExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockStorage.addException(exception); - - try { - HmacKeyMetadata hmacKey = HmacKeyMetadata.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateHmacKey(hmacKey, updateMask); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteNotificationConfigTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockStorage.addResponse(expectedResponse); - - NotificationConfigName name = - NotificationConfigName.of("[PROJECT]", "[BUCKET]", "[NOTIFICATION_CONFIG]"); - - client.deleteNotificationConfig(name); - - List actualRequests = mockStorage.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteNotificationConfigRequest actualRequest = - ((DeleteNotificationConfigRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteNotificationConfigExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockStorage.addException(exception); - - try { - NotificationConfigName name = - NotificationConfigName.of("[PROJECT]", "[BUCKET]", "[NOTIFICATION_CONFIG]"); - client.deleteNotificationConfig(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteNotificationConfigTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockStorage.addResponse(expectedResponse); - - String name = "name3373707"; - - client.deleteNotificationConfig(name); - - List actualRequests = mockStorage.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteNotificationConfigRequest actualRequest = - ((DeleteNotificationConfigRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteNotificationConfigExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockStorage.addException(exception); - - try { - String name = "name3373707"; - client.deleteNotificationConfig(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getNotificationConfigTest() throws Exception { - NotificationConfig expectedResponse = - NotificationConfig.newBuilder() - .setName( - NotificationConfigName.of("[PROJECT]", "[BUCKET]", "[NOTIFICATION_CONFIG]") - .toString()) - .setTopic("topic110546223") - .setEtag("etag3123477") - .addAllEventTypes(new ArrayList()) - .putAllCustomAttributes(new HashMap()) - .setObjectNamePrefix("objectNamePrefix-1978236516") - .setPayloadFormat("payloadFormat-2140609755") - .build(); - mockStorage.addResponse(expectedResponse); - - NotificationConfigName name = - NotificationConfigName.of("[PROJECT]", "[BUCKET]", "[NOTIFICATION_CONFIG]"); - - NotificationConfig actualResponse = client.getNotificationConfig(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockStorage.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetNotificationConfigRequest actualRequest = - ((GetNotificationConfigRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getNotificationConfigExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockStorage.addException(exception); - - try { - NotificationConfigName name = - NotificationConfigName.of("[PROJECT]", "[BUCKET]", "[NOTIFICATION_CONFIG]"); - client.getNotificationConfig(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getNotificationConfigTest2() throws Exception { - NotificationConfig expectedResponse = - NotificationConfig.newBuilder() - .setName( - NotificationConfigName.of("[PROJECT]", "[BUCKET]", "[NOTIFICATION_CONFIG]") - .toString()) - .setTopic("topic110546223") - .setEtag("etag3123477") - .addAllEventTypes(new ArrayList()) - .putAllCustomAttributes(new HashMap()) - .setObjectNamePrefix("objectNamePrefix-1978236516") - .setPayloadFormat("payloadFormat-2140609755") - .build(); - mockStorage.addResponse(expectedResponse); - - String name = "name3373707"; - - NotificationConfig actualResponse = client.getNotificationConfig(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockStorage.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetNotificationConfigRequest actualRequest = - ((GetNotificationConfigRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getNotificationConfigExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockStorage.addException(exception); - - try { - String name = "name3373707"; - client.getNotificationConfig(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createNotificationConfigTest() throws Exception { - NotificationConfig expectedResponse = - NotificationConfig.newBuilder() - .setName( - NotificationConfigName.of("[PROJECT]", "[BUCKET]", "[NOTIFICATION_CONFIG]") - .toString()) - .setTopic("topic110546223") - .setEtag("etag3123477") - .addAllEventTypes(new ArrayList()) - .putAllCustomAttributes(new HashMap()) - .setObjectNamePrefix("objectNamePrefix-1978236516") - .setPayloadFormat("payloadFormat-2140609755") - .build(); - mockStorage.addResponse(expectedResponse); - - BucketName parent = BucketName.of("[PROJECT]", "[BUCKET]"); - NotificationConfig notificationConfig = NotificationConfig.newBuilder().build(); - - NotificationConfig actualResponse = client.createNotificationConfig(parent, notificationConfig); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockStorage.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateNotificationConfigRequest actualRequest = - ((CreateNotificationConfigRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(notificationConfig, actualRequest.getNotificationConfig()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createNotificationConfigExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockStorage.addException(exception); - - try { - BucketName parent = BucketName.of("[PROJECT]", "[BUCKET]"); - NotificationConfig notificationConfig = NotificationConfig.newBuilder().build(); - client.createNotificationConfig(parent, notificationConfig); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createNotificationConfigTest2() throws Exception { - NotificationConfig expectedResponse = - NotificationConfig.newBuilder() - .setName( - NotificationConfigName.of("[PROJECT]", "[BUCKET]", "[NOTIFICATION_CONFIG]") - .toString()) - .setTopic("topic110546223") - .setEtag("etag3123477") - .addAllEventTypes(new ArrayList()) - .putAllCustomAttributes(new HashMap()) - .setObjectNamePrefix("objectNamePrefix-1978236516") - .setPayloadFormat("payloadFormat-2140609755") - .build(); - mockStorage.addResponse(expectedResponse); - - String parent = "parent-995424086"; - NotificationConfig notificationConfig = NotificationConfig.newBuilder().build(); - - NotificationConfig actualResponse = client.createNotificationConfig(parent, notificationConfig); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockStorage.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateNotificationConfigRequest actualRequest = - ((CreateNotificationConfigRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(notificationConfig, actualRequest.getNotificationConfig()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createNotificationConfigExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockStorage.addException(exception); - - try { - String parent = "parent-995424086"; - NotificationConfig notificationConfig = NotificationConfig.newBuilder().build(); - client.createNotificationConfig(parent, notificationConfig); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listNotificationConfigsTest() throws Exception { - NotificationConfig responsesElement = NotificationConfig.newBuilder().build(); - ListNotificationConfigsResponse expectedResponse = - ListNotificationConfigsResponse.newBuilder() - .setNextPageToken("") - .addAllNotificationConfigs(Arrays.asList(responsesElement)) - .build(); - mockStorage.addResponse(expectedResponse); - - BucketName parent = BucketName.of("[PROJECT]", "[BUCKET]"); - - ListNotificationConfigsPagedResponse pagedListResponse = client.listNotificationConfigs(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getNotificationConfigsList().get(0), resources.get(0)); - - List actualRequests = mockStorage.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListNotificationConfigsRequest actualRequest = - ((ListNotificationConfigsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listNotificationConfigsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockStorage.addException(exception); - - try { - BucketName parent = BucketName.of("[PROJECT]", "[BUCKET]"); - client.listNotificationConfigs(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listNotificationConfigsTest2() throws Exception { - NotificationConfig responsesElement = NotificationConfig.newBuilder().build(); - ListNotificationConfigsResponse expectedResponse = - ListNotificationConfigsResponse.newBuilder() - .setNextPageToken("") - .addAllNotificationConfigs(Arrays.asList(responsesElement)) - .build(); - mockStorage.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - ListNotificationConfigsPagedResponse pagedListResponse = client.listNotificationConfigs(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getNotificationConfigsList().get(0), resources.get(0)); - - List actualRequests = mockStorage.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListNotificationConfigsRequest actualRequest = - ((ListNotificationConfigsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listNotificationConfigsExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockStorage.addException(exception); - - try { - String parent = "parent-995424086"; - client.listNotificationConfigs(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } } 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 3e357db53..4db7e1274 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 @@ -962,441 +962,6 @@ private StorageGrpc() {} return getQueryWriteStatusMethod; } - private static volatile io.grpc.MethodDescriptor< - com.google.storage.v2.GetServiceAccountRequest, com.google.storage.v2.ServiceAccount> - getGetServiceAccountMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetServiceAccount", - requestType = com.google.storage.v2.GetServiceAccountRequest.class, - responseType = com.google.storage.v2.ServiceAccount.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.storage.v2.GetServiceAccountRequest, com.google.storage.v2.ServiceAccount> - getGetServiceAccountMethod() { - io.grpc.MethodDescriptor< - com.google.storage.v2.GetServiceAccountRequest, com.google.storage.v2.ServiceAccount> - getGetServiceAccountMethod; - if ((getGetServiceAccountMethod = StorageGrpc.getGetServiceAccountMethod) == null) { - synchronized (StorageGrpc.class) { - if ((getGetServiceAccountMethod = StorageGrpc.getGetServiceAccountMethod) == null) { - StorageGrpc.getGetServiceAccountMethod = - getGetServiceAccountMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetServiceAccount")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.storage.v2.GetServiceAccountRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.storage.v2.ServiceAccount.getDefaultInstance())) - .setSchemaDescriptor(new StorageMethodDescriptorSupplier("GetServiceAccount")) - .build(); - } - } - } - return getGetServiceAccountMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.storage.v2.CreateHmacKeyRequest, com.google.storage.v2.CreateHmacKeyResponse> - getCreateHmacKeyMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateHmacKey", - requestType = com.google.storage.v2.CreateHmacKeyRequest.class, - responseType = com.google.storage.v2.CreateHmacKeyResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.storage.v2.CreateHmacKeyRequest, com.google.storage.v2.CreateHmacKeyResponse> - getCreateHmacKeyMethod() { - io.grpc.MethodDescriptor< - com.google.storage.v2.CreateHmacKeyRequest, com.google.storage.v2.CreateHmacKeyResponse> - getCreateHmacKeyMethod; - if ((getCreateHmacKeyMethod = StorageGrpc.getCreateHmacKeyMethod) == null) { - synchronized (StorageGrpc.class) { - if ((getCreateHmacKeyMethod = StorageGrpc.getCreateHmacKeyMethod) == null) { - StorageGrpc.getCreateHmacKeyMethod = - getCreateHmacKeyMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateHmacKey")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.storage.v2.CreateHmacKeyRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.storage.v2.CreateHmacKeyResponse.getDefaultInstance())) - .setSchemaDescriptor(new StorageMethodDescriptorSupplier("CreateHmacKey")) - .build(); - } - } - } - return getCreateHmacKeyMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.storage.v2.DeleteHmacKeyRequest, com.google.protobuf.Empty> - getDeleteHmacKeyMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteHmacKey", - requestType = com.google.storage.v2.DeleteHmacKeyRequest.class, - responseType = com.google.protobuf.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.storage.v2.DeleteHmacKeyRequest, com.google.protobuf.Empty> - getDeleteHmacKeyMethod() { - io.grpc.MethodDescriptor - getDeleteHmacKeyMethod; - if ((getDeleteHmacKeyMethod = StorageGrpc.getDeleteHmacKeyMethod) == null) { - synchronized (StorageGrpc.class) { - if ((getDeleteHmacKeyMethod = StorageGrpc.getDeleteHmacKeyMethod) == null) { - StorageGrpc.getDeleteHmacKeyMethod = - getDeleteHmacKeyMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteHmacKey")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.storage.v2.DeleteHmacKeyRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protobuf.Empty.getDefaultInstance())) - .setSchemaDescriptor(new StorageMethodDescriptorSupplier("DeleteHmacKey")) - .build(); - } - } - } - return getDeleteHmacKeyMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.storage.v2.GetHmacKeyRequest, com.google.storage.v2.HmacKeyMetadata> - getGetHmacKeyMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetHmacKey", - requestType = com.google.storage.v2.GetHmacKeyRequest.class, - responseType = com.google.storage.v2.HmacKeyMetadata.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.storage.v2.GetHmacKeyRequest, com.google.storage.v2.HmacKeyMetadata> - getGetHmacKeyMethod() { - io.grpc.MethodDescriptor< - com.google.storage.v2.GetHmacKeyRequest, com.google.storage.v2.HmacKeyMetadata> - getGetHmacKeyMethod; - if ((getGetHmacKeyMethod = StorageGrpc.getGetHmacKeyMethod) == null) { - synchronized (StorageGrpc.class) { - if ((getGetHmacKeyMethod = StorageGrpc.getGetHmacKeyMethod) == null) { - StorageGrpc.getGetHmacKeyMethod = - getGetHmacKeyMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetHmacKey")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.storage.v2.GetHmacKeyRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.storage.v2.HmacKeyMetadata.getDefaultInstance())) - .setSchemaDescriptor(new StorageMethodDescriptorSupplier("GetHmacKey")) - .build(); - } - } - } - return getGetHmacKeyMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.storage.v2.ListHmacKeysRequest, com.google.storage.v2.ListHmacKeysResponse> - getListHmacKeysMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListHmacKeys", - requestType = com.google.storage.v2.ListHmacKeysRequest.class, - responseType = com.google.storage.v2.ListHmacKeysResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.storage.v2.ListHmacKeysRequest, com.google.storage.v2.ListHmacKeysResponse> - getListHmacKeysMethod() { - io.grpc.MethodDescriptor< - com.google.storage.v2.ListHmacKeysRequest, com.google.storage.v2.ListHmacKeysResponse> - getListHmacKeysMethod; - if ((getListHmacKeysMethod = StorageGrpc.getListHmacKeysMethod) == null) { - synchronized (StorageGrpc.class) { - if ((getListHmacKeysMethod = StorageGrpc.getListHmacKeysMethod) == null) { - StorageGrpc.getListHmacKeysMethod = - getListHmacKeysMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListHmacKeys")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.storage.v2.ListHmacKeysRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.storage.v2.ListHmacKeysResponse.getDefaultInstance())) - .setSchemaDescriptor(new StorageMethodDescriptorSupplier("ListHmacKeys")) - .build(); - } - } - } - return getListHmacKeysMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.storage.v2.UpdateHmacKeyRequest, com.google.storage.v2.HmacKeyMetadata> - getUpdateHmacKeyMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateHmacKey", - requestType = com.google.storage.v2.UpdateHmacKeyRequest.class, - responseType = com.google.storage.v2.HmacKeyMetadata.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.storage.v2.UpdateHmacKeyRequest, com.google.storage.v2.HmacKeyMetadata> - getUpdateHmacKeyMethod() { - io.grpc.MethodDescriptor< - com.google.storage.v2.UpdateHmacKeyRequest, com.google.storage.v2.HmacKeyMetadata> - getUpdateHmacKeyMethod; - if ((getUpdateHmacKeyMethod = StorageGrpc.getUpdateHmacKeyMethod) == null) { - synchronized (StorageGrpc.class) { - if ((getUpdateHmacKeyMethod = StorageGrpc.getUpdateHmacKeyMethod) == null) { - StorageGrpc.getUpdateHmacKeyMethod = - getUpdateHmacKeyMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateHmacKey")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.storage.v2.UpdateHmacKeyRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.storage.v2.HmacKeyMetadata.getDefaultInstance())) - .setSchemaDescriptor(new StorageMethodDescriptorSupplier("UpdateHmacKey")) - .build(); - } - } - } - return getUpdateHmacKeyMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.storage.v2.DeleteNotificationConfigRequest, com.google.protobuf.Empty> - getDeleteNotificationConfigMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteNotificationConfig", - requestType = com.google.storage.v2.DeleteNotificationConfigRequest.class, - responseType = com.google.protobuf.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.storage.v2.DeleteNotificationConfigRequest, com.google.protobuf.Empty> - getDeleteNotificationConfigMethod() { - io.grpc.MethodDescriptor< - com.google.storage.v2.DeleteNotificationConfigRequest, com.google.protobuf.Empty> - getDeleteNotificationConfigMethod; - if ((getDeleteNotificationConfigMethod = StorageGrpc.getDeleteNotificationConfigMethod) - == null) { - synchronized (StorageGrpc.class) { - if ((getDeleteNotificationConfigMethod = StorageGrpc.getDeleteNotificationConfigMethod) - == null) { - StorageGrpc.getDeleteNotificationConfigMethod = - getDeleteNotificationConfigMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "DeleteNotificationConfig")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.storage.v2.DeleteNotificationConfigRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protobuf.Empty.getDefaultInstance())) - .setSchemaDescriptor( - new StorageMethodDescriptorSupplier("DeleteNotificationConfig")) - .build(); - } - } - } - return getDeleteNotificationConfigMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.storage.v2.GetNotificationConfigRequest, - com.google.storage.v2.NotificationConfig> - getGetNotificationConfigMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetNotificationConfig", - requestType = com.google.storage.v2.GetNotificationConfigRequest.class, - responseType = com.google.storage.v2.NotificationConfig.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.storage.v2.GetNotificationConfigRequest, - com.google.storage.v2.NotificationConfig> - getGetNotificationConfigMethod() { - io.grpc.MethodDescriptor< - com.google.storage.v2.GetNotificationConfigRequest, - com.google.storage.v2.NotificationConfig> - getGetNotificationConfigMethod; - if ((getGetNotificationConfigMethod = StorageGrpc.getGetNotificationConfigMethod) == null) { - synchronized (StorageGrpc.class) { - if ((getGetNotificationConfigMethod = StorageGrpc.getGetNotificationConfigMethod) == null) { - StorageGrpc.getGetNotificationConfigMethod = - getGetNotificationConfigMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "GetNotificationConfig")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.storage.v2.GetNotificationConfigRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.storage.v2.NotificationConfig.getDefaultInstance())) - .setSchemaDescriptor( - new StorageMethodDescriptorSupplier("GetNotificationConfig")) - .build(); - } - } - } - return getGetNotificationConfigMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.storage.v2.CreateNotificationConfigRequest, - com.google.storage.v2.NotificationConfig> - getCreateNotificationConfigMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateNotificationConfig", - requestType = com.google.storage.v2.CreateNotificationConfigRequest.class, - responseType = com.google.storage.v2.NotificationConfig.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.storage.v2.CreateNotificationConfigRequest, - com.google.storage.v2.NotificationConfig> - getCreateNotificationConfigMethod() { - io.grpc.MethodDescriptor< - com.google.storage.v2.CreateNotificationConfigRequest, - com.google.storage.v2.NotificationConfig> - getCreateNotificationConfigMethod; - if ((getCreateNotificationConfigMethod = StorageGrpc.getCreateNotificationConfigMethod) - == null) { - synchronized (StorageGrpc.class) { - if ((getCreateNotificationConfigMethod = StorageGrpc.getCreateNotificationConfigMethod) - == null) { - StorageGrpc.getCreateNotificationConfigMethod = - getCreateNotificationConfigMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "CreateNotificationConfig")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.storage.v2.CreateNotificationConfigRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.storage.v2.NotificationConfig.getDefaultInstance())) - .setSchemaDescriptor( - new StorageMethodDescriptorSupplier("CreateNotificationConfig")) - .build(); - } - } - } - return getCreateNotificationConfigMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.storage.v2.ListNotificationConfigsRequest, - com.google.storage.v2.ListNotificationConfigsResponse> - getListNotificationConfigsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListNotificationConfigs", - requestType = com.google.storage.v2.ListNotificationConfigsRequest.class, - responseType = com.google.storage.v2.ListNotificationConfigsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.storage.v2.ListNotificationConfigsRequest, - com.google.storage.v2.ListNotificationConfigsResponse> - getListNotificationConfigsMethod() { - io.grpc.MethodDescriptor< - com.google.storage.v2.ListNotificationConfigsRequest, - com.google.storage.v2.ListNotificationConfigsResponse> - getListNotificationConfigsMethod; - if ((getListNotificationConfigsMethod = StorageGrpc.getListNotificationConfigsMethod) == null) { - synchronized (StorageGrpc.class) { - if ((getListNotificationConfigsMethod = StorageGrpc.getListNotificationConfigsMethod) - == null) { - StorageGrpc.getListNotificationConfigsMethod = - getListNotificationConfigsMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "ListNotificationConfigs")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.storage.v2.ListNotificationConfigsRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.storage.v2.ListNotificationConfigsResponse - .getDefaultInstance())) - .setSchemaDescriptor( - new StorageMethodDescriptorSupplier("ListNotificationConfigs")) - .build(); - } - } - } - return getListNotificationConfigsMethod; - } - /** Creates a new async stub that supports all call types for the service */ public static StorageStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = @@ -1870,159 +1435,6 @@ default void queryWriteStatus( io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getQueryWriteStatusMethod(), responseObserver); } - - /** - * - * - *
-     * Retrieves the name of a project's Google Cloud Storage service account.
-     * 
- */ - @java.lang.Deprecated - default void getServiceAccount( - com.google.storage.v2.GetServiceAccountRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getGetServiceAccountMethod(), responseObserver); - } - - /** - * - * - *
-     * Creates a new HMAC key for the given service account.
-     * 
- */ - @java.lang.Deprecated - default void createHmacKey( - com.google.storage.v2.CreateHmacKeyRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getCreateHmacKeyMethod(), responseObserver); - } - - /** - * - * - *
-     * Deletes a given HMAC key.  Key must be in an INACTIVE state.
-     * 
- */ - @java.lang.Deprecated - default void deleteHmacKey( - com.google.storage.v2.DeleteHmacKeyRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getDeleteHmacKeyMethod(), responseObserver); - } - - /** - * - * - *
-     * Gets an existing HMAC key metadata for the given id.
-     * 
- */ - @java.lang.Deprecated - default void getHmacKey( - com.google.storage.v2.GetHmacKeyRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetHmacKeyMethod(), responseObserver); - } - - /** - * - * - *
-     * Lists HMAC keys under a given project with the additional filters provided.
-     * 
- */ - @java.lang.Deprecated - default void listHmacKeys( - com.google.storage.v2.ListHmacKeysRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getListHmacKeysMethod(), responseObserver); - } - - /** - * - * - *
-     * Updates a given HMAC key state between ACTIVE and INACTIVE.
-     * 
- */ - @java.lang.Deprecated - default void updateHmacKey( - com.google.storage.v2.UpdateHmacKeyRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getUpdateHmacKeyMethod(), responseObserver); - } - - /** - * - * - *
-     * Permanently deletes a NotificationConfig.
-     * 
- */ - @java.lang.Deprecated - default void deleteNotificationConfig( - com.google.storage.v2.DeleteNotificationConfigRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getDeleteNotificationConfigMethod(), responseObserver); - } - - /** - * - * - *
-     * View a NotificationConfig.
-     * 
- */ - @java.lang.Deprecated - default void getNotificationConfig( - com.google.storage.v2.GetNotificationConfigRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getGetNotificationConfigMethod(), responseObserver); - } - - /** - * - * - *
-     * Creates a NotificationConfig for a given bucket.
-     * These NotificationConfigs, when triggered, publish messages to the
-     * specified Pub/Sub topics. See
-     * https://cloud.google.com/storage/docs/pubsub-notifications.
-     * 
- */ - @java.lang.Deprecated - default void createNotificationConfig( - com.google.storage.v2.CreateNotificationConfigRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getCreateNotificationConfigMethod(), responseObserver); - } - - /** - * - * - *
-     * Retrieves a list of NotificationConfigs for a given bucket.
-     * 
- */ - @java.lang.Deprecated - default void listNotificationConfigs( - com.google.storage.v2.ListNotificationConfigsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getListNotificationConfigsMethod(), responseObserver); - } } /** @@ -2499,193 +1911,12 @@ public void rewriteObject( * service-dependent. * */ - public void startResumableWrite( - com.google.storage.v2.StartResumableWriteRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getStartResumableWriteMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Determines the `persisted_size` for an object that is being written, which
-     * can then be used as the `write_offset` for the next `Write()` call.
-     * If the object does not exist (i.e., the object has been deleted, or the
-     * first `Write()` has not yet reached the service), this method returns the
-     * error `NOT_FOUND`.
-     * The client **may** call `QueryWriteStatus()` at any time to determine how
-     * much data has been processed for this object. This is useful if the
-     * client is buffering data and needs to know which data can be safely
-     * evicted. For any sequence of `QueryWriteStatus()` calls for a given
-     * object name, the sequence of returned `persisted_size` values will be
-     * non-decreasing.
-     * 
- */ - public void queryWriteStatus( - com.google.storage.v2.QueryWriteStatusRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getQueryWriteStatusMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Retrieves the name of a project's Google Cloud Storage service account.
-     * 
- */ - @java.lang.Deprecated - public void getServiceAccount( - com.google.storage.v2.GetServiceAccountRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetServiceAccountMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Creates a new HMAC key for the given service account.
-     * 
- */ - @java.lang.Deprecated - public void createHmacKey( - com.google.storage.v2.CreateHmacKeyRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateHmacKeyMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Deletes a given HMAC key.  Key must be in an INACTIVE state.
-     * 
- */ - @java.lang.Deprecated - public void deleteHmacKey( - com.google.storage.v2.DeleteHmacKeyRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteHmacKeyMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Gets an existing HMAC key metadata for the given id.
-     * 
- */ - @java.lang.Deprecated - public void getHmacKey( - com.google.storage.v2.GetHmacKeyRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetHmacKeyMethod(), getCallOptions()), request, responseObserver); - } - - /** - * - * - *
-     * Lists HMAC keys under a given project with the additional filters provided.
-     * 
- */ - @java.lang.Deprecated - public void listHmacKeys( - com.google.storage.v2.ListHmacKeysRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListHmacKeysMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Updates a given HMAC key state between ACTIVE and INACTIVE.
-     * 
- */ - @java.lang.Deprecated - public void updateHmacKey( - com.google.storage.v2.UpdateHmacKeyRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateHmacKeyMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Permanently deletes a NotificationConfig.
-     * 
- */ - @java.lang.Deprecated - public void deleteNotificationConfig( - com.google.storage.v2.DeleteNotificationConfigRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteNotificationConfigMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * View a NotificationConfig.
-     * 
- */ - @java.lang.Deprecated - public void getNotificationConfig( - com.google.storage.v2.GetNotificationConfigRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetNotificationConfigMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Creates a NotificationConfig for a given bucket.
-     * These NotificationConfigs, when triggered, publish messages to the
-     * specified Pub/Sub topics. See
-     * https://cloud.google.com/storage/docs/pubsub-notifications.
-     * 
- */ - @java.lang.Deprecated - public void createNotificationConfig( - com.google.storage.v2.CreateNotificationConfigRequest request, - io.grpc.stub.StreamObserver responseObserver) { + public void startResumableWrite( + com.google.storage.v2.StartResumableWriteRequest request, + io.grpc.stub.StreamObserver + responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateNotificationConfigMethod(), getCallOptions()), + getChannel().newCall(getStartResumableWriteMethod(), getCallOptions()), request, responseObserver); } @@ -2694,16 +1925,25 @@ public void createNotificationConfig( * * *
-     * Retrieves a list of NotificationConfigs for a given bucket.
+     * Determines the `persisted_size` for an object that is being written, which
+     * can then be used as the `write_offset` for the next `Write()` call.
+     * If the object does not exist (i.e., the object has been deleted, or the
+     * first `Write()` has not yet reached the service), this method returns the
+     * error `NOT_FOUND`.
+     * The client **may** call `QueryWriteStatus()` at any time to determine how
+     * much data has been processed for this object. This is useful if the
+     * client is buffering data and needs to know which data can be safely
+     * evicted. For any sequence of `QueryWriteStatus()` calls for a given
+     * object name, the sequence of returned `persisted_size` values will be
+     * non-decreasing.
      * 
*/ - @java.lang.Deprecated - public void listNotificationConfigs( - com.google.storage.v2.ListNotificationConfigsRequest request, - io.grpc.stub.StreamObserver + public void queryWriteStatus( + com.google.storage.v2.QueryWriteStatusRequest request, + io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListNotificationConfigsMethod(), getCallOptions()), + getChannel().newCall(getQueryWriteStatusMethod(), getCallOptions()), request, responseObserver); } @@ -3033,149 +2273,6 @@ public com.google.storage.v2.QueryWriteStatusResponse queryWriteStatus( return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getQueryWriteStatusMethod(), getCallOptions(), request); } - - /** - * - * - *
-     * Retrieves the name of a project's Google Cloud Storage service account.
-     * 
- */ - @java.lang.Deprecated - public com.google.storage.v2.ServiceAccount getServiceAccount( - com.google.storage.v2.GetServiceAccountRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetServiceAccountMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Creates a new HMAC key for the given service account.
-     * 
- */ - @java.lang.Deprecated - public com.google.storage.v2.CreateHmacKeyResponse createHmacKey( - com.google.storage.v2.CreateHmacKeyRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateHmacKeyMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Deletes a given HMAC key.  Key must be in an INACTIVE state.
-     * 
- */ - @java.lang.Deprecated - public com.google.protobuf.Empty deleteHmacKey( - com.google.storage.v2.DeleteHmacKeyRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteHmacKeyMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Gets an existing HMAC key metadata for the given id.
-     * 
- */ - @java.lang.Deprecated - public com.google.storage.v2.HmacKeyMetadata getHmacKey( - com.google.storage.v2.GetHmacKeyRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetHmacKeyMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Lists HMAC keys under a given project with the additional filters provided.
-     * 
- */ - @java.lang.Deprecated - public com.google.storage.v2.ListHmacKeysResponse listHmacKeys( - com.google.storage.v2.ListHmacKeysRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListHmacKeysMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Updates a given HMAC key state between ACTIVE and INACTIVE.
-     * 
- */ - @java.lang.Deprecated - public com.google.storage.v2.HmacKeyMetadata updateHmacKey( - com.google.storage.v2.UpdateHmacKeyRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateHmacKeyMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Permanently deletes a NotificationConfig.
-     * 
- */ - @java.lang.Deprecated - public com.google.protobuf.Empty deleteNotificationConfig( - com.google.storage.v2.DeleteNotificationConfigRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteNotificationConfigMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * View a NotificationConfig.
-     * 
- */ - @java.lang.Deprecated - public com.google.storage.v2.NotificationConfig getNotificationConfig( - com.google.storage.v2.GetNotificationConfigRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetNotificationConfigMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Creates a NotificationConfig for a given bucket.
-     * These NotificationConfigs, when triggered, publish messages to the
-     * specified Pub/Sub topics. See
-     * https://cloud.google.com/storage/docs/pubsub-notifications.
-     * 
- */ - @java.lang.Deprecated - public com.google.storage.v2.NotificationConfig createNotificationConfig( - com.google.storage.v2.CreateNotificationConfigRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateNotificationConfigMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Retrieves a list of NotificationConfigs for a given bucket.
-     * 
- */ - @java.lang.Deprecated - public com.google.storage.v2.ListNotificationConfigsResponse listNotificationConfigs( - com.google.storage.v2.ListNotificationConfigsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListNotificationConfigsMethod(), getCallOptions(), request); - } } /** @@ -3499,154 +2596,6 @@ protected StorageFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions c return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getQueryWriteStatusMethod(), getCallOptions()), request); } - - /** - * - * - *
-     * Retrieves the name of a project's Google Cloud Storage service account.
-     * 
- */ - @java.lang.Deprecated - public com.google.common.util.concurrent.ListenableFuture - getServiceAccount(com.google.storage.v2.GetServiceAccountRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetServiceAccountMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Creates a new HMAC key for the given service account.
-     * 
- */ - @java.lang.Deprecated - public com.google.common.util.concurrent.ListenableFuture< - com.google.storage.v2.CreateHmacKeyResponse> - createHmacKey(com.google.storage.v2.CreateHmacKeyRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateHmacKeyMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Deletes a given HMAC key.  Key must be in an INACTIVE state.
-     * 
- */ - @java.lang.Deprecated - public com.google.common.util.concurrent.ListenableFuture - deleteHmacKey(com.google.storage.v2.DeleteHmacKeyRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteHmacKeyMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Gets an existing HMAC key metadata for the given id.
-     * 
- */ - @java.lang.Deprecated - public com.google.common.util.concurrent.ListenableFuture - getHmacKey(com.google.storage.v2.GetHmacKeyRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetHmacKeyMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Lists HMAC keys under a given project with the additional filters provided.
-     * 
- */ - @java.lang.Deprecated - public com.google.common.util.concurrent.ListenableFuture< - com.google.storage.v2.ListHmacKeysResponse> - listHmacKeys(com.google.storage.v2.ListHmacKeysRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListHmacKeysMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Updates a given HMAC key state between ACTIVE and INACTIVE.
-     * 
- */ - @java.lang.Deprecated - public com.google.common.util.concurrent.ListenableFuture - updateHmacKey(com.google.storage.v2.UpdateHmacKeyRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateHmacKeyMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Permanently deletes a NotificationConfig.
-     * 
- */ - @java.lang.Deprecated - public com.google.common.util.concurrent.ListenableFuture - deleteNotificationConfig(com.google.storage.v2.DeleteNotificationConfigRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteNotificationConfigMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * View a NotificationConfig.
-     * 
- */ - @java.lang.Deprecated - public com.google.common.util.concurrent.ListenableFuture< - com.google.storage.v2.NotificationConfig> - getNotificationConfig(com.google.storage.v2.GetNotificationConfigRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetNotificationConfigMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Creates a NotificationConfig for a given bucket.
-     * These NotificationConfigs, when triggered, publish messages to the
-     * specified Pub/Sub topics. See
-     * https://cloud.google.com/storage/docs/pubsub-notifications.
-     * 
- */ - @java.lang.Deprecated - public com.google.common.util.concurrent.ListenableFuture< - com.google.storage.v2.NotificationConfig> - createNotificationConfig(com.google.storage.v2.CreateNotificationConfigRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateNotificationConfigMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Retrieves a list of NotificationConfigs for a given bucket.
-     * 
- */ - @java.lang.Deprecated - public com.google.common.util.concurrent.ListenableFuture< - com.google.storage.v2.ListNotificationConfigsResponse> - listNotificationConfigs(com.google.storage.v2.ListNotificationConfigsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListNotificationConfigsMethod(), getCallOptions()), request); - } } private static final int METHODID_DELETE_BUCKET = 0; @@ -3669,18 +2618,8 @@ protected StorageFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions c private static final int METHODID_REWRITE_OBJECT = 17; private static final int METHODID_START_RESUMABLE_WRITE = 18; private static final int METHODID_QUERY_WRITE_STATUS = 19; - private static final int METHODID_GET_SERVICE_ACCOUNT = 20; - private static final int METHODID_CREATE_HMAC_KEY = 21; - private static final int METHODID_DELETE_HMAC_KEY = 22; - private static final int METHODID_GET_HMAC_KEY = 23; - private static final int METHODID_LIST_HMAC_KEYS = 24; - private static final int METHODID_UPDATE_HMAC_KEY = 25; - private static final int METHODID_DELETE_NOTIFICATION_CONFIG = 26; - private static final int METHODID_GET_NOTIFICATION_CONFIG = 27; - private static final int METHODID_CREATE_NOTIFICATION_CONFIG = 28; - private static final int METHODID_LIST_NOTIFICATION_CONFIGS = 29; - private static final int METHODID_WRITE_OBJECT = 30; - private static final int METHODID_BIDI_WRITE_OBJECT = 31; + private static final int METHODID_WRITE_OBJECT = 20; + private static final int METHODID_BIDI_WRITE_OBJECT = 21; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -3807,63 +2746,6 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (io.grpc.stub.StreamObserver) responseObserver); break; - case METHODID_GET_SERVICE_ACCOUNT: - serviceImpl.getServiceAccount( - (com.google.storage.v2.GetServiceAccountRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_CREATE_HMAC_KEY: - serviceImpl.createHmacKey( - (com.google.storage.v2.CreateHmacKeyRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_DELETE_HMAC_KEY: - serviceImpl.deleteHmacKey( - (com.google.storage.v2.DeleteHmacKeyRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_HMAC_KEY: - serviceImpl.getHmacKey( - (com.google.storage.v2.GetHmacKeyRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_LIST_HMAC_KEYS: - serviceImpl.listHmacKeys( - (com.google.storage.v2.ListHmacKeysRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_UPDATE_HMAC_KEY: - serviceImpl.updateHmacKey( - (com.google.storage.v2.UpdateHmacKeyRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_DELETE_NOTIFICATION_CONFIG: - serviceImpl.deleteNotificationConfig( - (com.google.storage.v2.DeleteNotificationConfigRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_NOTIFICATION_CONFIG: - serviceImpl.getNotificationConfig( - (com.google.storage.v2.GetNotificationConfigRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_CREATE_NOTIFICATION_CONFIG: - serviceImpl.createNotificationConfig( - (com.google.storage.v2.CreateNotificationConfigRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_LIST_NOTIFICATION_CONFIGS: - serviceImpl.listNotificationConfigs( - (com.google.storage.v2.ListNotificationConfigsRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; default: throw new AssertionError(); } @@ -4027,70 +2909,6 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser com.google.storage.v2.QueryWriteStatusRequest, com.google.storage.v2.QueryWriteStatusResponse>( service, METHODID_QUERY_WRITE_STATUS))) - .addMethod( - getGetServiceAccountMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.storage.v2.GetServiceAccountRequest, - com.google.storage.v2.ServiceAccount>(service, METHODID_GET_SERVICE_ACCOUNT))) - .addMethod( - getCreateHmacKeyMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.storage.v2.CreateHmacKeyRequest, - com.google.storage.v2.CreateHmacKeyResponse>( - service, METHODID_CREATE_HMAC_KEY))) - .addMethod( - getDeleteHmacKeyMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.storage.v2.DeleteHmacKeyRequest, com.google.protobuf.Empty>( - service, METHODID_DELETE_HMAC_KEY))) - .addMethod( - getGetHmacKeyMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.storage.v2.GetHmacKeyRequest, com.google.storage.v2.HmacKeyMetadata>( - service, METHODID_GET_HMAC_KEY))) - .addMethod( - getListHmacKeysMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.storage.v2.ListHmacKeysRequest, - com.google.storage.v2.ListHmacKeysResponse>(service, METHODID_LIST_HMAC_KEYS))) - .addMethod( - getUpdateHmacKeyMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.storage.v2.UpdateHmacKeyRequest, - com.google.storage.v2.HmacKeyMetadata>(service, METHODID_UPDATE_HMAC_KEY))) - .addMethod( - getDeleteNotificationConfigMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.storage.v2.DeleteNotificationConfigRequest, - com.google.protobuf.Empty>(service, METHODID_DELETE_NOTIFICATION_CONFIG))) - .addMethod( - getGetNotificationConfigMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.storage.v2.GetNotificationConfigRequest, - com.google.storage.v2.NotificationConfig>( - service, METHODID_GET_NOTIFICATION_CONFIG))) - .addMethod( - getCreateNotificationConfigMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.storage.v2.CreateNotificationConfigRequest, - com.google.storage.v2.NotificationConfig>( - service, METHODID_CREATE_NOTIFICATION_CONFIG))) - .addMethod( - getListNotificationConfigsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.storage.v2.ListNotificationConfigsRequest, - com.google.storage.v2.ListNotificationConfigsResponse>( - service, METHODID_LIST_NOTIFICATION_CONFIGS))) .build(); } @@ -4162,16 +2980,6 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getRewriteObjectMethod()) .addMethod(getStartResumableWriteMethod()) .addMethod(getQueryWriteStatusMethod()) - .addMethod(getGetServiceAccountMethod()) - .addMethod(getCreateHmacKeyMethod()) - .addMethod(getDeleteHmacKeyMethod()) - .addMethod(getGetHmacKeyMethod()) - .addMethod(getListHmacKeysMethod()) - .addMethod(getUpdateHmacKeyMethod()) - .addMethod(getDeleteNotificationConfigMethod()) - .addMethod(getGetNotificationConfigMethod()) - .addMethod(getCreateNotificationConfigMethod()) - .addMethod(getListNotificationConfigsMethod()) .build(); } } diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CreateHmacKeyRequest.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CreateHmacKeyRequest.java deleted file mode 100644 index daf77ba16..000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CreateHmacKeyRequest.java +++ /dev/null @@ -1,834 +0,0 @@ -/* - * Copyright 2024 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/storage/v2/storage.proto - -// Protobuf Java Version: 3.25.5 -package com.google.storage.v2; - -/** - * - * - *
- * Request message for CreateHmacKey.
- * 
- * - * Protobuf type {@code google.storage.v2.CreateHmacKeyRequest} - */ -public final class CreateHmacKeyRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.storage.v2.CreateHmacKeyRequest) - CreateHmacKeyRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use CreateHmacKeyRequest.newBuilder() to construct. - private CreateHmacKeyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private CreateHmacKeyRequest() { - project_ = ""; - serviceAccountEmail_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CreateHmacKeyRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_CreateHmacKeyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_CreateHmacKeyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.CreateHmacKeyRequest.class, - com.google.storage.v2.CreateHmacKeyRequest.Builder.class); - } - - public static final int PROJECT_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object project_ = ""; - /** - * - * - *
-   * Required. The project that the HMAC-owning service account lives in, in the
-   * format of "projects/{projectIdentifier}". {projectIdentifier} can be the
-   * project ID or project number.
-   * 
- * - * - * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The project. - */ - @java.lang.Override - public java.lang.String getProject() { - java.lang.Object ref = project_; - 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(); - project_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The project that the HMAC-owning service account lives in, in the
-   * format of "projects/{projectIdentifier}". {projectIdentifier} can be the
-   * project ID or project number.
-   * 
- * - * - * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for project. - */ - @java.lang.Override - public com.google.protobuf.ByteString getProjectBytes() { - java.lang.Object ref = project_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - project_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SERVICE_ACCOUNT_EMAIL_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object serviceAccountEmail_ = ""; - /** - * - * - *
-   * Required. The service account to create the HMAC for.
-   * 
- * - * string service_account_email = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The serviceAccountEmail. - */ - @java.lang.Override - public java.lang.String getServiceAccountEmail() { - java.lang.Object ref = serviceAccountEmail_; - 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(); - serviceAccountEmail_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The service account to create the HMAC for.
-   * 
- * - * string service_account_email = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for serviceAccountEmail. - */ - @java.lang.Override - public com.google.protobuf.ByteString getServiceAccountEmailBytes() { - java.lang.Object ref = serviceAccountEmail_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - serviceAccountEmail_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, project_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccountEmail_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, serviceAccountEmail_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, project_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccountEmail_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, serviceAccountEmail_); - } - size += getUnknownFields().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.CreateHmacKeyRequest)) { - return super.equals(obj); - } - com.google.storage.v2.CreateHmacKeyRequest other = - (com.google.storage.v2.CreateHmacKeyRequest) obj; - - if (!getProject().equals(other.getProject())) return false; - if (!getServiceAccountEmail().equals(other.getServiceAccountEmail())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) 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) + PROJECT_FIELD_NUMBER; - hash = (53 * hash) + getProject().hashCode(); - hash = (37 * hash) + SERVICE_ACCOUNT_EMAIL_FIELD_NUMBER; - hash = (53 * hash) + getServiceAccountEmail().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.storage.v2.CreateHmacKeyRequest parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.CreateHmacKeyRequest 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.CreateHmacKeyRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.CreateHmacKeyRequest 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.CreateHmacKeyRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.CreateHmacKeyRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.storage.v2.CreateHmacKeyRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.storage.v2.CreateHmacKeyRequest 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.CreateHmacKeyRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.storage.v2.CreateHmacKeyRequest 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.CreateHmacKeyRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.storage.v2.CreateHmacKeyRequest 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.CreateHmacKeyRequest 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; - } - /** - * - * - *
-   * Request message for CreateHmacKey.
-   * 
- * - * Protobuf type {@code google.storage.v2.CreateHmacKeyRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.storage.v2.CreateHmacKeyRequest) - com.google.storage.v2.CreateHmacKeyRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_CreateHmacKeyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_CreateHmacKeyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.CreateHmacKeyRequest.class, - com.google.storage.v2.CreateHmacKeyRequest.Builder.class); - } - - // Construct using com.google.storage.v2.CreateHmacKeyRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - project_ = ""; - serviceAccountEmail_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_CreateHmacKeyRequest_descriptor; - } - - @java.lang.Override - public com.google.storage.v2.CreateHmacKeyRequest getDefaultInstanceForType() { - return com.google.storage.v2.CreateHmacKeyRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.storage.v2.CreateHmacKeyRequest build() { - com.google.storage.v2.CreateHmacKeyRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.storage.v2.CreateHmacKeyRequest buildPartial() { - com.google.storage.v2.CreateHmacKeyRequest result = - new com.google.storage.v2.CreateHmacKeyRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.storage.v2.CreateHmacKeyRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.project_ = project_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.serviceAccountEmail_ = serviceAccountEmail_; - } - } - - @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.CreateHmacKeyRequest) { - return mergeFrom((com.google.storage.v2.CreateHmacKeyRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.storage.v2.CreateHmacKeyRequest other) { - if (other == com.google.storage.v2.CreateHmacKeyRequest.getDefaultInstance()) return this; - if (!other.getProject().isEmpty()) { - project_ = other.project_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getServiceAccountEmail().isEmpty()) { - serviceAccountEmail_ = other.serviceAccountEmail_; - bitField0_ |= 0x00000002; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - 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 { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - project_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - serviceAccountEmail_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object project_ = ""; - /** - * - * - *
-     * Required. The project that the HMAC-owning service account lives in, in the
-     * format of "projects/{projectIdentifier}". {projectIdentifier} can be the
-     * project ID or project number.
-     * 
- * - * - * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The project. - */ - public java.lang.String getProject() { - java.lang.Object ref = project_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - project_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The project that the HMAC-owning service account lives in, in the
-     * format of "projects/{projectIdentifier}". {projectIdentifier} can be the
-     * project ID or project number.
-     * 
- * - * - * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for project. - */ - public com.google.protobuf.ByteString getProjectBytes() { - java.lang.Object ref = project_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - project_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The project that the HMAC-owning service account lives in, in the
-     * format of "projects/{projectIdentifier}". {projectIdentifier} can be the
-     * project ID or project number.
-     * 
- * - * - * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The project to set. - * @return This builder for chaining. - */ - public Builder setProject(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - project_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The project that the HMAC-owning service account lives in, in the
-     * format of "projects/{projectIdentifier}". {projectIdentifier} can be the
-     * project ID or project number.
-     * 
- * - * - * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearProject() { - project_ = getDefaultInstance().getProject(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The project that the HMAC-owning service account lives in, in the
-     * format of "projects/{projectIdentifier}". {projectIdentifier} can be the
-     * project ID or project number.
-     * 
- * - * - * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for project to set. - * @return This builder for chaining. - */ - public Builder setProjectBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - project_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object serviceAccountEmail_ = ""; - /** - * - * - *
-     * Required. The service account to create the HMAC for.
-     * 
- * - * string service_account_email = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The serviceAccountEmail. - */ - public java.lang.String getServiceAccountEmail() { - java.lang.Object ref = serviceAccountEmail_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - serviceAccountEmail_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The service account to create the HMAC for.
-     * 
- * - * string service_account_email = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for serviceAccountEmail. - */ - public com.google.protobuf.ByteString getServiceAccountEmailBytes() { - java.lang.Object ref = serviceAccountEmail_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - serviceAccountEmail_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The service account to create the HMAC for.
-     * 
- * - * string service_account_email = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The serviceAccountEmail to set. - * @return This builder for chaining. - */ - public Builder setServiceAccountEmail(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - serviceAccountEmail_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The service account to create the HMAC for.
-     * 
- * - * string service_account_email = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearServiceAccountEmail() { - serviceAccountEmail_ = getDefaultInstance().getServiceAccountEmail(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The service account to create the HMAC for.
-     * 
- * - * string service_account_email = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for serviceAccountEmail to set. - * @return This builder for chaining. - */ - public Builder setServiceAccountEmailBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - serviceAccountEmail_ = value; - bitField0_ |= 0x00000002; - 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.CreateHmacKeyRequest) - } - - // @@protoc_insertion_point(class_scope:google.storage.v2.CreateHmacKeyRequest) - private static final com.google.storage.v2.CreateHmacKeyRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.storage.v2.CreateHmacKeyRequest(); - } - - public static com.google.storage.v2.CreateHmacKeyRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateHmacKeyRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - 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.CreateHmacKeyRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CreateHmacKeyRequestOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CreateHmacKeyRequestOrBuilder.java deleted file mode 100644 index 9c9aae12d..000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CreateHmacKeyRequestOrBuilder.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright 2024 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/storage/v2/storage.proto - -// Protobuf Java Version: 3.25.5 -package com.google.storage.v2; - -public interface CreateHmacKeyRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.storage.v2.CreateHmacKeyRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The project that the HMAC-owning service account lives in, in the
-   * format of "projects/{projectIdentifier}". {projectIdentifier} can be the
-   * project ID or project number.
-   * 
- * - * - * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The project. - */ - java.lang.String getProject(); - /** - * - * - *
-   * Required. The project that the HMAC-owning service account lives in, in the
-   * format of "projects/{projectIdentifier}". {projectIdentifier} can be the
-   * project ID or project number.
-   * 
- * - * - * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for project. - */ - com.google.protobuf.ByteString getProjectBytes(); - - /** - * - * - *
-   * Required. The service account to create the HMAC for.
-   * 
- * - * string service_account_email = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The serviceAccountEmail. - */ - java.lang.String getServiceAccountEmail(); - /** - * - * - *
-   * Required. The service account to create the HMAC for.
-   * 
- * - * string service_account_email = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for serviceAccountEmail. - */ - com.google.protobuf.ByteString getServiceAccountEmailBytes(); -} diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CreateHmacKeyResponse.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CreateHmacKeyResponse.java deleted file mode 100644 index b0caffbf0..000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CreateHmacKeyResponse.java +++ /dev/null @@ -1,821 +0,0 @@ -/* - * Copyright 2024 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/storage/v2/storage.proto - -// Protobuf Java Version: 3.25.5 -package com.google.storage.v2; - -/** - * - * - *
- * Create hmac response.  The only time the secret for an HMAC will be returned.
- * 
- * - * Protobuf type {@code google.storage.v2.CreateHmacKeyResponse} - */ -public final class CreateHmacKeyResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.storage.v2.CreateHmacKeyResponse) - CreateHmacKeyResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use CreateHmacKeyResponse.newBuilder() to construct. - private CreateHmacKeyResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private CreateHmacKeyResponse() { - secretKeyBytes_ = com.google.protobuf.ByteString.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CreateHmacKeyResponse(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_CreateHmacKeyResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_CreateHmacKeyResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.CreateHmacKeyResponse.class, - com.google.storage.v2.CreateHmacKeyResponse.Builder.class); - } - - private int bitField0_; - public static final int METADATA_FIELD_NUMBER = 1; - private com.google.storage.v2.HmacKeyMetadata metadata_; - /** - * - * - *
-   * Key metadata.
-   * 
- * - * .google.storage.v2.HmacKeyMetadata metadata = 1; - * - * @return Whether the metadata field is set. - */ - @java.lang.Override - public boolean hasMetadata() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
-   * Key metadata.
-   * 
- * - * .google.storage.v2.HmacKeyMetadata metadata = 1; - * - * @return The metadata. - */ - @java.lang.Override - public com.google.storage.v2.HmacKeyMetadata getMetadata() { - return metadata_ == null - ? com.google.storage.v2.HmacKeyMetadata.getDefaultInstance() - : metadata_; - } - /** - * - * - *
-   * Key metadata.
-   * 
- * - * .google.storage.v2.HmacKeyMetadata metadata = 1; - */ - @java.lang.Override - public com.google.storage.v2.HmacKeyMetadataOrBuilder getMetadataOrBuilder() { - return metadata_ == null - ? com.google.storage.v2.HmacKeyMetadata.getDefaultInstance() - : metadata_; - } - - public static final int SECRET_KEY_BYTES_FIELD_NUMBER = 3; - private com.google.protobuf.ByteString secretKeyBytes_ = com.google.protobuf.ByteString.EMPTY; - /** - * - * - *
-   * HMAC key secret material.
-   * In raw bytes format (not base64-encoded).
-   * 
- * - * bytes secret_key_bytes = 3; - * - * @return The secretKeyBytes. - */ - @java.lang.Override - public com.google.protobuf.ByteString getSecretKeyBytes() { - return secretKeyBytes_; - } - - 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 (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getMetadata()); - } - if (!secretKeyBytes_.isEmpty()) { - output.writeBytes(3, secretKeyBytes_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getMetadata()); - } - if (!secretKeyBytes_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream.computeBytesSize(3, secretKeyBytes_); - } - size += getUnknownFields().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.CreateHmacKeyResponse)) { - return super.equals(obj); - } - com.google.storage.v2.CreateHmacKeyResponse other = - (com.google.storage.v2.CreateHmacKeyResponse) obj; - - if (hasMetadata() != other.hasMetadata()) return false; - if (hasMetadata()) { - if (!getMetadata().equals(other.getMetadata())) return false; - } - if (!getSecretKeyBytes().equals(other.getSecretKeyBytes())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasMetadata()) { - hash = (37 * hash) + METADATA_FIELD_NUMBER; - hash = (53 * hash) + getMetadata().hashCode(); - } - hash = (37 * hash) + SECRET_KEY_BYTES_FIELD_NUMBER; - hash = (53 * hash) + getSecretKeyBytes().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.storage.v2.CreateHmacKeyResponse parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.CreateHmacKeyResponse 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.CreateHmacKeyResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.CreateHmacKeyResponse 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.CreateHmacKeyResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.CreateHmacKeyResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.storage.v2.CreateHmacKeyResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.storage.v2.CreateHmacKeyResponse 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.CreateHmacKeyResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.storage.v2.CreateHmacKeyResponse 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.CreateHmacKeyResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.storage.v2.CreateHmacKeyResponse 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.CreateHmacKeyResponse 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; - } - /** - * - * - *
-   * Create hmac response.  The only time the secret for an HMAC will be returned.
-   * 
- * - * Protobuf type {@code google.storage.v2.CreateHmacKeyResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.storage.v2.CreateHmacKeyResponse) - com.google.storage.v2.CreateHmacKeyResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_CreateHmacKeyResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_CreateHmacKeyResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.CreateHmacKeyResponse.class, - com.google.storage.v2.CreateHmacKeyResponse.Builder.class); - } - - // Construct using com.google.storage.v2.CreateHmacKeyResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getMetadataFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - secretKeyBytes_ = com.google.protobuf.ByteString.EMPTY; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_CreateHmacKeyResponse_descriptor; - } - - @java.lang.Override - public com.google.storage.v2.CreateHmacKeyResponse getDefaultInstanceForType() { - return com.google.storage.v2.CreateHmacKeyResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.storage.v2.CreateHmacKeyResponse build() { - com.google.storage.v2.CreateHmacKeyResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.storage.v2.CreateHmacKeyResponse buildPartial() { - com.google.storage.v2.CreateHmacKeyResponse result = - new com.google.storage.v2.CreateHmacKeyResponse(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.storage.v2.CreateHmacKeyResponse result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.metadata_ = metadataBuilder_ == null ? metadata_ : metadataBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.secretKeyBytes_ = secretKeyBytes_; - } - result.bitField0_ |= to_bitField0_; - } - - @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.CreateHmacKeyResponse) { - return mergeFrom((com.google.storage.v2.CreateHmacKeyResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.storage.v2.CreateHmacKeyResponse other) { - if (other == com.google.storage.v2.CreateHmacKeyResponse.getDefaultInstance()) return this; - if (other.hasMetadata()) { - mergeMetadata(other.getMetadata()); - } - if (other.getSecretKeyBytes() != com.google.protobuf.ByteString.EMPTY) { - setSecretKeyBytes(other.getSecretKeyBytes()); - } - this.mergeUnknownFields(other.getUnknownFields()); - 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 { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage(getMetadataFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 26: - { - secretKeyBytes_ = input.readBytes(); - bitField0_ |= 0x00000002; - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private com.google.storage.v2.HmacKeyMetadata metadata_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.storage.v2.HmacKeyMetadata, - com.google.storage.v2.HmacKeyMetadata.Builder, - com.google.storage.v2.HmacKeyMetadataOrBuilder> - metadataBuilder_; - /** - * - * - *
-     * Key metadata.
-     * 
- * - * .google.storage.v2.HmacKeyMetadata metadata = 1; - * - * @return Whether the metadata field is set. - */ - public boolean hasMetadata() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
-     * Key metadata.
-     * 
- * - * .google.storage.v2.HmacKeyMetadata metadata = 1; - * - * @return The metadata. - */ - public com.google.storage.v2.HmacKeyMetadata getMetadata() { - if (metadataBuilder_ == null) { - return metadata_ == null - ? com.google.storage.v2.HmacKeyMetadata.getDefaultInstance() - : metadata_; - } else { - return metadataBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Key metadata.
-     * 
- * - * .google.storage.v2.HmacKeyMetadata metadata = 1; - */ - public Builder setMetadata(com.google.storage.v2.HmacKeyMetadata value) { - if (metadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metadata_ = value; - } else { - metadataBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Key metadata.
-     * 
- * - * .google.storage.v2.HmacKeyMetadata metadata = 1; - */ - public Builder setMetadata(com.google.storage.v2.HmacKeyMetadata.Builder builderForValue) { - if (metadataBuilder_ == null) { - metadata_ = builderForValue.build(); - } else { - metadataBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Key metadata.
-     * 
- * - * .google.storage.v2.HmacKeyMetadata metadata = 1; - */ - public Builder mergeMetadata(com.google.storage.v2.HmacKeyMetadata value) { - if (metadataBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && metadata_ != null - && metadata_ != com.google.storage.v2.HmacKeyMetadata.getDefaultInstance()) { - getMetadataBuilder().mergeFrom(value); - } else { - metadata_ = value; - } - } else { - metadataBuilder_.mergeFrom(value); - } - if (metadata_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * - * - *
-     * Key metadata.
-     * 
- * - * .google.storage.v2.HmacKeyMetadata metadata = 1; - */ - public Builder clearMetadata() { - bitField0_ = (bitField0_ & ~0x00000001); - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Key metadata.
-     * 
- * - * .google.storage.v2.HmacKeyMetadata metadata = 1; - */ - public com.google.storage.v2.HmacKeyMetadata.Builder getMetadataBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getMetadataFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Key metadata.
-     * 
- * - * .google.storage.v2.HmacKeyMetadata metadata = 1; - */ - public com.google.storage.v2.HmacKeyMetadataOrBuilder getMetadataOrBuilder() { - if (metadataBuilder_ != null) { - return metadataBuilder_.getMessageOrBuilder(); - } else { - return metadata_ == null - ? com.google.storage.v2.HmacKeyMetadata.getDefaultInstance() - : metadata_; - } - } - /** - * - * - *
-     * Key metadata.
-     * 
- * - * .google.storage.v2.HmacKeyMetadata metadata = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.storage.v2.HmacKeyMetadata, - com.google.storage.v2.HmacKeyMetadata.Builder, - com.google.storage.v2.HmacKeyMetadataOrBuilder> - getMetadataFieldBuilder() { - if (metadataBuilder_ == null) { - metadataBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.storage.v2.HmacKeyMetadata, - com.google.storage.v2.HmacKeyMetadata.Builder, - com.google.storage.v2.HmacKeyMetadataOrBuilder>( - getMetadata(), getParentForChildren(), isClean()); - metadata_ = null; - } - return metadataBuilder_; - } - - private com.google.protobuf.ByteString secretKeyBytes_ = com.google.protobuf.ByteString.EMPTY; - /** - * - * - *
-     * HMAC key secret material.
-     * In raw bytes format (not base64-encoded).
-     * 
- * - * bytes secret_key_bytes = 3; - * - * @return The secretKeyBytes. - */ - @java.lang.Override - public com.google.protobuf.ByteString getSecretKeyBytes() { - return secretKeyBytes_; - } - /** - * - * - *
-     * HMAC key secret material.
-     * In raw bytes format (not base64-encoded).
-     * 
- * - * bytes secret_key_bytes = 3; - * - * @param value The secretKeyBytes to set. - * @return This builder for chaining. - */ - public Builder setSecretKeyBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - secretKeyBytes_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * HMAC key secret material.
-     * In raw bytes format (not base64-encoded).
-     * 
- * - * bytes secret_key_bytes = 3; - * - * @return This builder for chaining. - */ - public Builder clearSecretKeyBytes() { - bitField0_ = (bitField0_ & ~0x00000002); - secretKeyBytes_ = getDefaultInstance().getSecretKeyBytes(); - 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.CreateHmacKeyResponse) - } - - // @@protoc_insertion_point(class_scope:google.storage.v2.CreateHmacKeyResponse) - private static final com.google.storage.v2.CreateHmacKeyResponse DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.storage.v2.CreateHmacKeyResponse(); - } - - public static com.google.storage.v2.CreateHmacKeyResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateHmacKeyResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - 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.CreateHmacKeyResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CreateHmacKeyResponseOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CreateHmacKeyResponseOrBuilder.java deleted file mode 100644 index 0a405a14b..000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CreateHmacKeyResponseOrBuilder.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright 2024 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/storage/v2/storage.proto - -// Protobuf Java Version: 3.25.5 -package com.google.storage.v2; - -public interface CreateHmacKeyResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.storage.v2.CreateHmacKeyResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Key metadata.
-   * 
- * - * .google.storage.v2.HmacKeyMetadata metadata = 1; - * - * @return Whether the metadata field is set. - */ - boolean hasMetadata(); - /** - * - * - *
-   * Key metadata.
-   * 
- * - * .google.storage.v2.HmacKeyMetadata metadata = 1; - * - * @return The metadata. - */ - com.google.storage.v2.HmacKeyMetadata getMetadata(); - /** - * - * - *
-   * Key metadata.
-   * 
- * - * .google.storage.v2.HmacKeyMetadata metadata = 1; - */ - com.google.storage.v2.HmacKeyMetadataOrBuilder getMetadataOrBuilder(); - - /** - * - * - *
-   * HMAC key secret material.
-   * In raw bytes format (not base64-encoded).
-   * 
- * - * bytes secret_key_bytes = 3; - * - * @return The secretKeyBytes. - */ - com.google.protobuf.ByteString getSecretKeyBytes(); -} diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CreateNotificationConfigRequest.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CreateNotificationConfigRequest.java deleted file mode 100644 index 71e77efcf..000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CreateNotificationConfigRequest.java +++ /dev/null @@ -1,950 +0,0 @@ -/* - * Copyright 2024 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/storage/v2/storage.proto - -// Protobuf Java Version: 3.25.5 -package com.google.storage.v2; - -/** - * - * - *
- * Request message for CreateNotificationConfig.
- * 
- * - * Protobuf type {@code google.storage.v2.CreateNotificationConfigRequest} - */ -public final class CreateNotificationConfigRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.storage.v2.CreateNotificationConfigRequest) - CreateNotificationConfigRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use CreateNotificationConfigRequest.newBuilder() to construct. - private CreateNotificationConfigRequest( - com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private CreateNotificationConfigRequest() { - parent_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CreateNotificationConfigRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_CreateNotificationConfigRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_CreateNotificationConfigRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.CreateNotificationConfigRequest.class, - com.google.storage.v2.CreateNotificationConfigRequest.Builder.class); - } - - private int bitField0_; - public static final int PARENT_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object parent_ = ""; - /** - * - * - *
-   * Required. The bucket to which this NotificationConfig belongs.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - 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(); - parent_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The bucket to which this NotificationConfig belongs.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int NOTIFICATION_CONFIG_FIELD_NUMBER = 2; - private com.google.storage.v2.NotificationConfig notificationConfig_; - /** - * - * - *
-   * Required. Properties of the NotificationConfig to be inserted.
-   * 
- * - * - * .google.storage.v2.NotificationConfig notification_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the notificationConfig field is set. - */ - @java.lang.Override - public boolean hasNotificationConfig() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
-   * Required. Properties of the NotificationConfig to be inserted.
-   * 
- * - * - * .google.storage.v2.NotificationConfig notification_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The notificationConfig. - */ - @java.lang.Override - public com.google.storage.v2.NotificationConfig getNotificationConfig() { - return notificationConfig_ == null - ? com.google.storage.v2.NotificationConfig.getDefaultInstance() - : notificationConfig_; - } - /** - * - * - *
-   * Required. Properties of the NotificationConfig to be inserted.
-   * 
- * - * - * .google.storage.v2.NotificationConfig notification_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.storage.v2.NotificationConfigOrBuilder getNotificationConfigOrBuilder() { - return notificationConfig_ == null - ? com.google.storage.v2.NotificationConfig.getDefaultInstance() - : notificationConfig_; - } - - 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(2, getNotificationConfig()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getNotificationConfig()); - } - size += getUnknownFields().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.CreateNotificationConfigRequest)) { - return super.equals(obj); - } - com.google.storage.v2.CreateNotificationConfigRequest other = - (com.google.storage.v2.CreateNotificationConfigRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (hasNotificationConfig() != other.hasNotificationConfig()) return false; - if (hasNotificationConfig()) { - if (!getNotificationConfig().equals(other.getNotificationConfig())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) 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) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - if (hasNotificationConfig()) { - hash = (37 * hash) + NOTIFICATION_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getNotificationConfig().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.storage.v2.CreateNotificationConfigRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.CreateNotificationConfigRequest 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.CreateNotificationConfigRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.CreateNotificationConfigRequest 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.CreateNotificationConfigRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.CreateNotificationConfigRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.storage.v2.CreateNotificationConfigRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.storage.v2.CreateNotificationConfigRequest 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.CreateNotificationConfigRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.storage.v2.CreateNotificationConfigRequest 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.CreateNotificationConfigRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.storage.v2.CreateNotificationConfigRequest 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.CreateNotificationConfigRequest 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; - } - /** - * - * - *
-   * Request message for CreateNotificationConfig.
-   * 
- * - * Protobuf type {@code google.storage.v2.CreateNotificationConfigRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.storage.v2.CreateNotificationConfigRequest) - com.google.storage.v2.CreateNotificationConfigRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_CreateNotificationConfigRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_CreateNotificationConfigRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.CreateNotificationConfigRequest.class, - com.google.storage.v2.CreateNotificationConfigRequest.Builder.class); - } - - // Construct using com.google.storage.v2.CreateNotificationConfigRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getNotificationConfigFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - parent_ = ""; - notificationConfig_ = null; - if (notificationConfigBuilder_ != null) { - notificationConfigBuilder_.dispose(); - notificationConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_CreateNotificationConfigRequest_descriptor; - } - - @java.lang.Override - public com.google.storage.v2.CreateNotificationConfigRequest getDefaultInstanceForType() { - return com.google.storage.v2.CreateNotificationConfigRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.storage.v2.CreateNotificationConfigRequest build() { - com.google.storage.v2.CreateNotificationConfigRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.storage.v2.CreateNotificationConfigRequest buildPartial() { - com.google.storage.v2.CreateNotificationConfigRequest result = - new com.google.storage.v2.CreateNotificationConfigRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.storage.v2.CreateNotificationConfigRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.parent_ = parent_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.notificationConfig_ = - notificationConfigBuilder_ == null - ? notificationConfig_ - : notificationConfigBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @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.CreateNotificationConfigRequest) { - return mergeFrom((com.google.storage.v2.CreateNotificationConfigRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.storage.v2.CreateNotificationConfigRequest other) { - if (other == com.google.storage.v2.CreateNotificationConfigRequest.getDefaultInstance()) - return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasNotificationConfig()) { - mergeNotificationConfig(other.getNotificationConfig()); - } - this.mergeUnknownFields(other.getUnknownFields()); - 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 { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - parent_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - input.readMessage( - getNotificationConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object parent_ = ""; - /** - * - * - *
-     * Required. The bucket to which this NotificationConfig belongs.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The bucket to which this NotificationConfig belongs.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The bucket to which this NotificationConfig belongs.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The bucket to which this NotificationConfig belongs.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearParent() { - parent_ = getDefaultInstance().getParent(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The bucket to which this NotificationConfig belongs.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.storage.v2.NotificationConfig notificationConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.storage.v2.NotificationConfig, - com.google.storage.v2.NotificationConfig.Builder, - com.google.storage.v2.NotificationConfigOrBuilder> - notificationConfigBuilder_; - /** - * - * - *
-     * Required. Properties of the NotificationConfig to be inserted.
-     * 
- * - * - * .google.storage.v2.NotificationConfig notification_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the notificationConfig field is set. - */ - public boolean hasNotificationConfig() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * - * - *
-     * Required. Properties of the NotificationConfig to be inserted.
-     * 
- * - * - * .google.storage.v2.NotificationConfig notification_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The notificationConfig. - */ - public com.google.storage.v2.NotificationConfig getNotificationConfig() { - if (notificationConfigBuilder_ == null) { - return notificationConfig_ == null - ? com.google.storage.v2.NotificationConfig.getDefaultInstance() - : notificationConfig_; - } else { - return notificationConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. Properties of the NotificationConfig to be inserted.
-     * 
- * - * - * .google.storage.v2.NotificationConfig notification_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setNotificationConfig(com.google.storage.v2.NotificationConfig value) { - if (notificationConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - notificationConfig_ = value; - } else { - notificationConfigBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Properties of the NotificationConfig to be inserted.
-     * 
- * - * - * .google.storage.v2.NotificationConfig notification_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setNotificationConfig( - com.google.storage.v2.NotificationConfig.Builder builderForValue) { - if (notificationConfigBuilder_ == null) { - notificationConfig_ = builderForValue.build(); - } else { - notificationConfigBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Properties of the NotificationConfig to be inserted.
-     * 
- * - * - * .google.storage.v2.NotificationConfig notification_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeNotificationConfig(com.google.storage.v2.NotificationConfig value) { - if (notificationConfigBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && notificationConfig_ != null - && notificationConfig_ - != com.google.storage.v2.NotificationConfig.getDefaultInstance()) { - getNotificationConfigBuilder().mergeFrom(value); - } else { - notificationConfig_ = value; - } - } else { - notificationConfigBuilder_.mergeFrom(value); - } - if (notificationConfig_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - /** - * - * - *
-     * Required. Properties of the NotificationConfig to be inserted.
-     * 
- * - * - * .google.storage.v2.NotificationConfig notification_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearNotificationConfig() { - bitField0_ = (bitField0_ & ~0x00000002); - notificationConfig_ = null; - if (notificationConfigBuilder_ != null) { - notificationConfigBuilder_.dispose(); - notificationConfigBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Properties of the NotificationConfig to be inserted.
-     * 
- * - * - * .google.storage.v2.NotificationConfig notification_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.storage.v2.NotificationConfig.Builder getNotificationConfigBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getNotificationConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. Properties of the NotificationConfig to be inserted.
-     * 
- * - * - * .google.storage.v2.NotificationConfig notification_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.storage.v2.NotificationConfigOrBuilder getNotificationConfigOrBuilder() { - if (notificationConfigBuilder_ != null) { - return notificationConfigBuilder_.getMessageOrBuilder(); - } else { - return notificationConfig_ == null - ? com.google.storage.v2.NotificationConfig.getDefaultInstance() - : notificationConfig_; - } - } - /** - * - * - *
-     * Required. Properties of the NotificationConfig to be inserted.
-     * 
- * - * - * .google.storage.v2.NotificationConfig notification_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.storage.v2.NotificationConfig, - com.google.storage.v2.NotificationConfig.Builder, - com.google.storage.v2.NotificationConfigOrBuilder> - getNotificationConfigFieldBuilder() { - if (notificationConfigBuilder_ == null) { - notificationConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.storage.v2.NotificationConfig, - com.google.storage.v2.NotificationConfig.Builder, - com.google.storage.v2.NotificationConfigOrBuilder>( - getNotificationConfig(), getParentForChildren(), isClean()); - notificationConfig_ = null; - } - return notificationConfigBuilder_; - } - - @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.CreateNotificationConfigRequest) - } - - // @@protoc_insertion_point(class_scope:google.storage.v2.CreateNotificationConfigRequest) - private static final com.google.storage.v2.CreateNotificationConfigRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.storage.v2.CreateNotificationConfigRequest(); - } - - public static com.google.storage.v2.CreateNotificationConfigRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateNotificationConfigRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - 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.CreateNotificationConfigRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CreateNotificationConfigRequestOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CreateNotificationConfigRequestOrBuilder.java deleted file mode 100644 index 3d88929eb..000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CreateNotificationConfigRequestOrBuilder.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright 2024 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/storage/v2/storage.proto - -// Protobuf Java Version: 3.25.5 -package com.google.storage.v2; - -public interface CreateNotificationConfigRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.storage.v2.CreateNotificationConfigRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The bucket to which this NotificationConfig belongs.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-   * Required. The bucket to which this NotificationConfig belongs.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - com.google.protobuf.ByteString getParentBytes(); - - /** - * - * - *
-   * Required. Properties of the NotificationConfig to be inserted.
-   * 
- * - * - * .google.storage.v2.NotificationConfig notification_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the notificationConfig field is set. - */ - boolean hasNotificationConfig(); - /** - * - * - *
-   * Required. Properties of the NotificationConfig to be inserted.
-   * 
- * - * - * .google.storage.v2.NotificationConfig notification_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The notificationConfig. - */ - com.google.storage.v2.NotificationConfig getNotificationConfig(); - /** - * - * - *
-   * Required. Properties of the NotificationConfig to be inserted.
-   * 
- * - * - * .google.storage.v2.NotificationConfig notification_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.storage.v2.NotificationConfigOrBuilder getNotificationConfigOrBuilder(); -} diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/DeleteHmacKeyRequest.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/DeleteHmacKeyRequest.java deleted file mode 100644 index 8c870a8d6..000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/DeleteHmacKeyRequest.java +++ /dev/null @@ -1,834 +0,0 @@ -/* - * Copyright 2024 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/storage/v2/storage.proto - -// Protobuf Java Version: 3.25.5 -package com.google.storage.v2; - -/** - * - * - *
- * Request object to delete a given HMAC key.
- * 
- * - * Protobuf type {@code google.storage.v2.DeleteHmacKeyRequest} - */ -public final class DeleteHmacKeyRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.storage.v2.DeleteHmacKeyRequest) - DeleteHmacKeyRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use DeleteHmacKeyRequest.newBuilder() to construct. - private DeleteHmacKeyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private DeleteHmacKeyRequest() { - accessId_ = ""; - project_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DeleteHmacKeyRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_DeleteHmacKeyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_DeleteHmacKeyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.DeleteHmacKeyRequest.class, - com.google.storage.v2.DeleteHmacKeyRequest.Builder.class); - } - - public static final int ACCESS_ID_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object accessId_ = ""; - /** - * - * - *
-   * Required. The identifying key for the HMAC to delete.
-   * 
- * - * string access_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The accessId. - */ - @java.lang.Override - public java.lang.String getAccessId() { - java.lang.Object ref = accessId_; - 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(); - accessId_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The identifying key for the HMAC to delete.
-   * 
- * - * string access_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for accessId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getAccessIdBytes() { - java.lang.Object ref = accessId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - accessId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PROJECT_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object project_ = ""; - /** - * - * - *
-   * Required. The project that owns the HMAC key, in the format of
-   * "projects/{projectIdentifier}".
-   * {projectIdentifier} can be the project ID or project number.
-   * 
- * - * - * string project = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The project. - */ - @java.lang.Override - public java.lang.String getProject() { - java.lang.Object ref = project_; - 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(); - project_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The project that owns the HMAC key, in the format of
-   * "projects/{projectIdentifier}".
-   * {projectIdentifier} can be the project ID or project number.
-   * 
- * - * - * string project = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for project. - */ - @java.lang.Override - public com.google.protobuf.ByteString getProjectBytes() { - java.lang.Object ref = project_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - project_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(accessId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, accessId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, project_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(accessId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, accessId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, project_); - } - size += getUnknownFields().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.DeleteHmacKeyRequest)) { - return super.equals(obj); - } - com.google.storage.v2.DeleteHmacKeyRequest other = - (com.google.storage.v2.DeleteHmacKeyRequest) obj; - - if (!getAccessId().equals(other.getAccessId())) return false; - if (!getProject().equals(other.getProject())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) 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) + ACCESS_ID_FIELD_NUMBER; - hash = (53 * hash) + getAccessId().hashCode(); - hash = (37 * hash) + PROJECT_FIELD_NUMBER; - hash = (53 * hash) + getProject().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.storage.v2.DeleteHmacKeyRequest parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.DeleteHmacKeyRequest 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.DeleteHmacKeyRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.DeleteHmacKeyRequest 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.DeleteHmacKeyRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.DeleteHmacKeyRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.storage.v2.DeleteHmacKeyRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.storage.v2.DeleteHmacKeyRequest 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.DeleteHmacKeyRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.storage.v2.DeleteHmacKeyRequest 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.DeleteHmacKeyRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.storage.v2.DeleteHmacKeyRequest 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.DeleteHmacKeyRequest 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; - } - /** - * - * - *
-   * Request object to delete a given HMAC key.
-   * 
- * - * Protobuf type {@code google.storage.v2.DeleteHmacKeyRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.storage.v2.DeleteHmacKeyRequest) - com.google.storage.v2.DeleteHmacKeyRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_DeleteHmacKeyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_DeleteHmacKeyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.DeleteHmacKeyRequest.class, - com.google.storage.v2.DeleteHmacKeyRequest.Builder.class); - } - - // Construct using com.google.storage.v2.DeleteHmacKeyRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - accessId_ = ""; - project_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_DeleteHmacKeyRequest_descriptor; - } - - @java.lang.Override - public com.google.storage.v2.DeleteHmacKeyRequest getDefaultInstanceForType() { - return com.google.storage.v2.DeleteHmacKeyRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.storage.v2.DeleteHmacKeyRequest build() { - com.google.storage.v2.DeleteHmacKeyRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.storage.v2.DeleteHmacKeyRequest buildPartial() { - com.google.storage.v2.DeleteHmacKeyRequest result = - new com.google.storage.v2.DeleteHmacKeyRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.storage.v2.DeleteHmacKeyRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.accessId_ = accessId_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.project_ = project_; - } - } - - @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.DeleteHmacKeyRequest) { - return mergeFrom((com.google.storage.v2.DeleteHmacKeyRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.storage.v2.DeleteHmacKeyRequest other) { - if (other == com.google.storage.v2.DeleteHmacKeyRequest.getDefaultInstance()) return this; - if (!other.getAccessId().isEmpty()) { - accessId_ = other.accessId_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getProject().isEmpty()) { - project_ = other.project_; - bitField0_ |= 0x00000002; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - 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 { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - accessId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - project_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object accessId_ = ""; - /** - * - * - *
-     * Required. The identifying key for the HMAC to delete.
-     * 
- * - * string access_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The accessId. - */ - public java.lang.String getAccessId() { - java.lang.Object ref = accessId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - accessId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The identifying key for the HMAC to delete.
-     * 
- * - * string access_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for accessId. - */ - public com.google.protobuf.ByteString getAccessIdBytes() { - java.lang.Object ref = accessId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - accessId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The identifying key for the HMAC to delete.
-     * 
- * - * string access_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The accessId to set. - * @return This builder for chaining. - */ - public Builder setAccessId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - accessId_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The identifying key for the HMAC to delete.
-     * 
- * - * string access_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearAccessId() { - accessId_ = getDefaultInstance().getAccessId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The identifying key for the HMAC to delete.
-     * 
- * - * string access_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for accessId to set. - * @return This builder for chaining. - */ - public Builder setAccessIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - accessId_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object project_ = ""; - /** - * - * - *
-     * Required. The project that owns the HMAC key, in the format of
-     * "projects/{projectIdentifier}".
-     * {projectIdentifier} can be the project ID or project number.
-     * 
- * - * - * string project = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The project. - */ - public java.lang.String getProject() { - java.lang.Object ref = project_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - project_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The project that owns the HMAC key, in the format of
-     * "projects/{projectIdentifier}".
-     * {projectIdentifier} can be the project ID or project number.
-     * 
- * - * - * string project = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for project. - */ - public com.google.protobuf.ByteString getProjectBytes() { - java.lang.Object ref = project_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - project_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The project that owns the HMAC key, in the format of
-     * "projects/{projectIdentifier}".
-     * {projectIdentifier} can be the project ID or project number.
-     * 
- * - * - * string project = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The project to set. - * @return This builder for chaining. - */ - public Builder setProject(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - project_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The project that owns the HMAC key, in the format of
-     * "projects/{projectIdentifier}".
-     * {projectIdentifier} can be the project ID or project number.
-     * 
- * - * - * string project = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearProject() { - project_ = getDefaultInstance().getProject(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The project that owns the HMAC key, in the format of
-     * "projects/{projectIdentifier}".
-     * {projectIdentifier} can be the project ID or project number.
-     * 
- * - * - * string project = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for project to set. - * @return This builder for chaining. - */ - public Builder setProjectBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - project_ = value; - bitField0_ |= 0x00000002; - 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.DeleteHmacKeyRequest) - } - - // @@protoc_insertion_point(class_scope:google.storage.v2.DeleteHmacKeyRequest) - private static final com.google.storage.v2.DeleteHmacKeyRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.storage.v2.DeleteHmacKeyRequest(); - } - - public static com.google.storage.v2.DeleteHmacKeyRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteHmacKeyRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - 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.DeleteHmacKeyRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/DeleteHmacKeyRequestOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/DeleteHmacKeyRequestOrBuilder.java deleted file mode 100644 index 4c742441e..000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/DeleteHmacKeyRequestOrBuilder.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright 2024 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/storage/v2/storage.proto - -// Protobuf Java Version: 3.25.5 -package com.google.storage.v2; - -public interface DeleteHmacKeyRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.storage.v2.DeleteHmacKeyRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The identifying key for the HMAC to delete.
-   * 
- * - * string access_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The accessId. - */ - java.lang.String getAccessId(); - /** - * - * - *
-   * Required. The identifying key for the HMAC to delete.
-   * 
- * - * string access_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for accessId. - */ - com.google.protobuf.ByteString getAccessIdBytes(); - - /** - * - * - *
-   * Required. The project that owns the HMAC key, in the format of
-   * "projects/{projectIdentifier}".
-   * {projectIdentifier} can be the project ID or project number.
-   * 
- * - * - * string project = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The project. - */ - java.lang.String getProject(); - /** - * - * - *
-   * Required. The project that owns the HMAC key, in the format of
-   * "projects/{projectIdentifier}".
-   * {projectIdentifier} can be the project ID or project number.
-   * 
- * - * - * string project = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for project. - */ - com.google.protobuf.ByteString getProjectBytes(); -} diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/DeleteNotificationConfigRequest.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/DeleteNotificationConfigRequest.java deleted file mode 100644 index fe8197a5a..000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/DeleteNotificationConfigRequest.java +++ /dev/null @@ -1,641 +0,0 @@ -/* - * Copyright 2024 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/storage/v2/storage.proto - -// Protobuf Java Version: 3.25.5 -package com.google.storage.v2; - -/** - * - * - *
- * Request message for DeleteNotificationConfig.
- * 
- * - * Protobuf type {@code google.storage.v2.DeleteNotificationConfigRequest} - */ -public final class DeleteNotificationConfigRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.storage.v2.DeleteNotificationConfigRequest) - DeleteNotificationConfigRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use DeleteNotificationConfigRequest.newBuilder() to construct. - private DeleteNotificationConfigRequest( - com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private DeleteNotificationConfigRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DeleteNotificationConfigRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_DeleteNotificationConfigRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_DeleteNotificationConfigRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.DeleteNotificationConfigRequest.class, - com.google.storage.v2.DeleteNotificationConfigRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - * - * - *
-   * Required. The parent bucket of the NotificationConfig.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - 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(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The parent bucket of the NotificationConfig.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += getUnknownFields().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.DeleteNotificationConfigRequest)) { - return super.equals(obj); - } - com.google.storage.v2.DeleteNotificationConfigRequest other = - (com.google.storage.v2.DeleteNotificationConfigRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) 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) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.storage.v2.DeleteNotificationConfigRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.DeleteNotificationConfigRequest 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.DeleteNotificationConfigRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.DeleteNotificationConfigRequest 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.DeleteNotificationConfigRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.DeleteNotificationConfigRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.storage.v2.DeleteNotificationConfigRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.storage.v2.DeleteNotificationConfigRequest 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.DeleteNotificationConfigRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.storage.v2.DeleteNotificationConfigRequest 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.DeleteNotificationConfigRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.storage.v2.DeleteNotificationConfigRequest 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.DeleteNotificationConfigRequest 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; - } - /** - * - * - *
-   * Request message for DeleteNotificationConfig.
-   * 
- * - * Protobuf type {@code google.storage.v2.DeleteNotificationConfigRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.storage.v2.DeleteNotificationConfigRequest) - com.google.storage.v2.DeleteNotificationConfigRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_DeleteNotificationConfigRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_DeleteNotificationConfigRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.DeleteNotificationConfigRequest.class, - com.google.storage.v2.DeleteNotificationConfigRequest.Builder.class); - } - - // Construct using com.google.storage.v2.DeleteNotificationConfigRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_DeleteNotificationConfigRequest_descriptor; - } - - @java.lang.Override - public com.google.storage.v2.DeleteNotificationConfigRequest getDefaultInstanceForType() { - return com.google.storage.v2.DeleteNotificationConfigRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.storage.v2.DeleteNotificationConfigRequest build() { - com.google.storage.v2.DeleteNotificationConfigRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.storage.v2.DeleteNotificationConfigRequest buildPartial() { - com.google.storage.v2.DeleteNotificationConfigRequest result = - new com.google.storage.v2.DeleteNotificationConfigRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.storage.v2.DeleteNotificationConfigRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - } - - @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.DeleteNotificationConfigRequest) { - return mergeFrom((com.google.storage.v2.DeleteNotificationConfigRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.storage.v2.DeleteNotificationConfigRequest other) { - if (other == com.google.storage.v2.DeleteNotificationConfigRequest.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - 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 { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. The parent bucket of the NotificationConfig.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The parent bucket of the NotificationConfig.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The parent bucket of the NotificationConfig.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The parent bucket of the NotificationConfig.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The parent bucket of the NotificationConfig.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - 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.DeleteNotificationConfigRequest) - } - - // @@protoc_insertion_point(class_scope:google.storage.v2.DeleteNotificationConfigRequest) - private static final com.google.storage.v2.DeleteNotificationConfigRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.storage.v2.DeleteNotificationConfigRequest(); - } - - public static com.google.storage.v2.DeleteNotificationConfigRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteNotificationConfigRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - 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.DeleteNotificationConfigRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/DeleteNotificationConfigRequestOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/DeleteNotificationConfigRequestOrBuilder.java deleted file mode 100644 index f122b0b58..000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/DeleteNotificationConfigRequestOrBuilder.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2024 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/storage/v2/storage.proto - -// Protobuf Java Version: 3.25.5 -package com.google.storage.v2; - -public interface DeleteNotificationConfigRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.storage.v2.DeleteNotificationConfigRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The parent bucket of the NotificationConfig.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. The parent bucket of the NotificationConfig.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); -} diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetHmacKeyRequest.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetHmacKeyRequest.java deleted file mode 100644 index e617f5266..000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetHmacKeyRequest.java +++ /dev/null @@ -1,833 +0,0 @@ -/* - * Copyright 2024 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/storage/v2/storage.proto - -// Protobuf Java Version: 3.25.5 -package com.google.storage.v2; - -/** - * - * - *
- * Request object to get metadata on a given HMAC key.
- * 
- * - * Protobuf type {@code google.storage.v2.GetHmacKeyRequest} - */ -public final class GetHmacKeyRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.storage.v2.GetHmacKeyRequest) - GetHmacKeyRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetHmacKeyRequest.newBuilder() to construct. - private GetHmacKeyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private GetHmacKeyRequest() { - accessId_ = ""; - project_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GetHmacKeyRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_GetHmacKeyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_GetHmacKeyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.GetHmacKeyRequest.class, - com.google.storage.v2.GetHmacKeyRequest.Builder.class); - } - - public static final int ACCESS_ID_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object accessId_ = ""; - /** - * - * - *
-   * Required. The identifying key for the HMAC to delete.
-   * 
- * - * string access_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The accessId. - */ - @java.lang.Override - public java.lang.String getAccessId() { - java.lang.Object ref = accessId_; - 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(); - accessId_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The identifying key for the HMAC to delete.
-   * 
- * - * string access_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for accessId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getAccessIdBytes() { - java.lang.Object ref = accessId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - accessId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PROJECT_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object project_ = ""; - /** - * - * - *
-   * Required. The project the HMAC key lies in, in the format of
-   * "projects/{projectIdentifier}".
-   * {projectIdentifier} can be the project ID or project number.
-   * 
- * - * - * string project = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The project. - */ - @java.lang.Override - public java.lang.String getProject() { - java.lang.Object ref = project_; - 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(); - project_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The project the HMAC key lies in, in the format of
-   * "projects/{projectIdentifier}".
-   * {projectIdentifier} can be the project ID or project number.
-   * 
- * - * - * string project = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for project. - */ - @java.lang.Override - public com.google.protobuf.ByteString getProjectBytes() { - java.lang.Object ref = project_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - project_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(accessId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, accessId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, project_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(accessId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, accessId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, project_); - } - size += getUnknownFields().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.GetHmacKeyRequest)) { - return super.equals(obj); - } - com.google.storage.v2.GetHmacKeyRequest other = (com.google.storage.v2.GetHmacKeyRequest) obj; - - if (!getAccessId().equals(other.getAccessId())) return false; - if (!getProject().equals(other.getProject())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) 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) + ACCESS_ID_FIELD_NUMBER; - hash = (53 * hash) + getAccessId().hashCode(); - hash = (37 * hash) + PROJECT_FIELD_NUMBER; - hash = (53 * hash) + getProject().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.storage.v2.GetHmacKeyRequest parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.GetHmacKeyRequest 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.GetHmacKeyRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.GetHmacKeyRequest 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.GetHmacKeyRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.GetHmacKeyRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.storage.v2.GetHmacKeyRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.storage.v2.GetHmacKeyRequest 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.GetHmacKeyRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.storage.v2.GetHmacKeyRequest 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.GetHmacKeyRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.storage.v2.GetHmacKeyRequest 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.GetHmacKeyRequest 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; - } - /** - * - * - *
-   * Request object to get metadata on a given HMAC key.
-   * 
- * - * Protobuf type {@code google.storage.v2.GetHmacKeyRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.storage.v2.GetHmacKeyRequest) - com.google.storage.v2.GetHmacKeyRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_GetHmacKeyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_GetHmacKeyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.GetHmacKeyRequest.class, - com.google.storage.v2.GetHmacKeyRequest.Builder.class); - } - - // Construct using com.google.storage.v2.GetHmacKeyRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - accessId_ = ""; - project_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_GetHmacKeyRequest_descriptor; - } - - @java.lang.Override - public com.google.storage.v2.GetHmacKeyRequest getDefaultInstanceForType() { - return com.google.storage.v2.GetHmacKeyRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.storage.v2.GetHmacKeyRequest build() { - com.google.storage.v2.GetHmacKeyRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.storage.v2.GetHmacKeyRequest buildPartial() { - com.google.storage.v2.GetHmacKeyRequest result = - new com.google.storage.v2.GetHmacKeyRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.storage.v2.GetHmacKeyRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.accessId_ = accessId_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.project_ = project_; - } - } - - @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.GetHmacKeyRequest) { - return mergeFrom((com.google.storage.v2.GetHmacKeyRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.storage.v2.GetHmacKeyRequest other) { - if (other == com.google.storage.v2.GetHmacKeyRequest.getDefaultInstance()) return this; - if (!other.getAccessId().isEmpty()) { - accessId_ = other.accessId_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getProject().isEmpty()) { - project_ = other.project_; - bitField0_ |= 0x00000002; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - 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 { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - accessId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - project_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object accessId_ = ""; - /** - * - * - *
-     * Required. The identifying key for the HMAC to delete.
-     * 
- * - * string access_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The accessId. - */ - public java.lang.String getAccessId() { - java.lang.Object ref = accessId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - accessId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The identifying key for the HMAC to delete.
-     * 
- * - * string access_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for accessId. - */ - public com.google.protobuf.ByteString getAccessIdBytes() { - java.lang.Object ref = accessId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - accessId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The identifying key for the HMAC to delete.
-     * 
- * - * string access_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The accessId to set. - * @return This builder for chaining. - */ - public Builder setAccessId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - accessId_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The identifying key for the HMAC to delete.
-     * 
- * - * string access_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearAccessId() { - accessId_ = getDefaultInstance().getAccessId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The identifying key for the HMAC to delete.
-     * 
- * - * string access_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for accessId to set. - * @return This builder for chaining. - */ - public Builder setAccessIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - accessId_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object project_ = ""; - /** - * - * - *
-     * Required. The project the HMAC key lies in, in the format of
-     * "projects/{projectIdentifier}".
-     * {projectIdentifier} can be the project ID or project number.
-     * 
- * - * - * string project = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The project. - */ - public java.lang.String getProject() { - java.lang.Object ref = project_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - project_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The project the HMAC key lies in, in the format of
-     * "projects/{projectIdentifier}".
-     * {projectIdentifier} can be the project ID or project number.
-     * 
- * - * - * string project = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for project. - */ - public com.google.protobuf.ByteString getProjectBytes() { - java.lang.Object ref = project_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - project_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The project the HMAC key lies in, in the format of
-     * "projects/{projectIdentifier}".
-     * {projectIdentifier} can be the project ID or project number.
-     * 
- * - * - * string project = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The project to set. - * @return This builder for chaining. - */ - public Builder setProject(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - project_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The project the HMAC key lies in, in the format of
-     * "projects/{projectIdentifier}".
-     * {projectIdentifier} can be the project ID or project number.
-     * 
- * - * - * string project = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearProject() { - project_ = getDefaultInstance().getProject(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The project the HMAC key lies in, in the format of
-     * "projects/{projectIdentifier}".
-     * {projectIdentifier} can be the project ID or project number.
-     * 
- * - * - * string project = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for project to set. - * @return This builder for chaining. - */ - public Builder setProjectBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - project_ = value; - bitField0_ |= 0x00000002; - 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.GetHmacKeyRequest) - } - - // @@protoc_insertion_point(class_scope:google.storage.v2.GetHmacKeyRequest) - private static final com.google.storage.v2.GetHmacKeyRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.storage.v2.GetHmacKeyRequest(); - } - - public static com.google.storage.v2.GetHmacKeyRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetHmacKeyRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - 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.GetHmacKeyRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetHmacKeyRequestOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetHmacKeyRequestOrBuilder.java deleted file mode 100644 index 7c3c6cb76..000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetHmacKeyRequestOrBuilder.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright 2024 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/storage/v2/storage.proto - -// Protobuf Java Version: 3.25.5 -package com.google.storage.v2; - -public interface GetHmacKeyRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.storage.v2.GetHmacKeyRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The identifying key for the HMAC to delete.
-   * 
- * - * string access_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The accessId. - */ - java.lang.String getAccessId(); - /** - * - * - *
-   * Required. The identifying key for the HMAC to delete.
-   * 
- * - * string access_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for accessId. - */ - com.google.protobuf.ByteString getAccessIdBytes(); - - /** - * - * - *
-   * Required. The project the HMAC key lies in, in the format of
-   * "projects/{projectIdentifier}".
-   * {projectIdentifier} can be the project ID or project number.
-   * 
- * - * - * string project = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The project. - */ - java.lang.String getProject(); - /** - * - * - *
-   * Required. The project the HMAC key lies in, in the format of
-   * "projects/{projectIdentifier}".
-   * {projectIdentifier} can be the project ID or project number.
-   * 
- * - * - * string project = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for project. - */ - com.google.protobuf.ByteString getProjectBytes(); -} diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetNotificationConfigRequest.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetNotificationConfigRequest.java deleted file mode 100644 index da1612303..000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetNotificationConfigRequest.java +++ /dev/null @@ -1,653 +0,0 @@ -/* - * Copyright 2024 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/storage/v2/storage.proto - -// Protobuf Java Version: 3.25.5 -package com.google.storage.v2; - -/** - * - * - *
- * Request message for GetNotificationConfig.
- * 
- * - * Protobuf type {@code google.storage.v2.GetNotificationConfigRequest} - */ -public final class GetNotificationConfigRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.storage.v2.GetNotificationConfigRequest) - GetNotificationConfigRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetNotificationConfigRequest.newBuilder() to construct. - private GetNotificationConfigRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private GetNotificationConfigRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GetNotificationConfigRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_GetNotificationConfigRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_GetNotificationConfigRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.GetNotificationConfigRequest.class, - com.google.storage.v2.GetNotificationConfigRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - * - * - *
-   * Required. The parent bucket of the NotificationConfig.
-   * Format:
-   * `projects/{project}/buckets/{bucket}/notificationConfigs/{notificationConfig}`
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - 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(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The parent bucket of the NotificationConfig.
-   * Format:
-   * `projects/{project}/buckets/{bucket}/notificationConfigs/{notificationConfig}`
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += getUnknownFields().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.GetNotificationConfigRequest)) { - return super.equals(obj); - } - com.google.storage.v2.GetNotificationConfigRequest other = - (com.google.storage.v2.GetNotificationConfigRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) 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) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.storage.v2.GetNotificationConfigRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.GetNotificationConfigRequest 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.GetNotificationConfigRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.GetNotificationConfigRequest 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.GetNotificationConfigRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.GetNotificationConfigRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.storage.v2.GetNotificationConfigRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.storage.v2.GetNotificationConfigRequest 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.GetNotificationConfigRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.storage.v2.GetNotificationConfigRequest 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.GetNotificationConfigRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.storage.v2.GetNotificationConfigRequest 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.GetNotificationConfigRequest 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; - } - /** - * - * - *
-   * Request message for GetNotificationConfig.
-   * 
- * - * Protobuf type {@code google.storage.v2.GetNotificationConfigRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.storage.v2.GetNotificationConfigRequest) - com.google.storage.v2.GetNotificationConfigRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_GetNotificationConfigRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_GetNotificationConfigRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.GetNotificationConfigRequest.class, - com.google.storage.v2.GetNotificationConfigRequest.Builder.class); - } - - // Construct using com.google.storage.v2.GetNotificationConfigRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_GetNotificationConfigRequest_descriptor; - } - - @java.lang.Override - public com.google.storage.v2.GetNotificationConfigRequest getDefaultInstanceForType() { - return com.google.storage.v2.GetNotificationConfigRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.storage.v2.GetNotificationConfigRequest build() { - com.google.storage.v2.GetNotificationConfigRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.storage.v2.GetNotificationConfigRequest buildPartial() { - com.google.storage.v2.GetNotificationConfigRequest result = - new com.google.storage.v2.GetNotificationConfigRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.storage.v2.GetNotificationConfigRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - } - - @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.GetNotificationConfigRequest) { - return mergeFrom((com.google.storage.v2.GetNotificationConfigRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.storage.v2.GetNotificationConfigRequest other) { - if (other == com.google.storage.v2.GetNotificationConfigRequest.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - 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 { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. The parent bucket of the NotificationConfig.
-     * Format:
-     * `projects/{project}/buckets/{bucket}/notificationConfigs/{notificationConfig}`
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The parent bucket of the NotificationConfig.
-     * Format:
-     * `projects/{project}/buckets/{bucket}/notificationConfigs/{notificationConfig}`
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The parent bucket of the NotificationConfig.
-     * Format:
-     * `projects/{project}/buckets/{bucket}/notificationConfigs/{notificationConfig}`
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The parent bucket of the NotificationConfig.
-     * Format:
-     * `projects/{project}/buckets/{bucket}/notificationConfigs/{notificationConfig}`
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The parent bucket of the NotificationConfig.
-     * Format:
-     * `projects/{project}/buckets/{bucket}/notificationConfigs/{notificationConfig}`
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - 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.GetNotificationConfigRequest) - } - - // @@protoc_insertion_point(class_scope:google.storage.v2.GetNotificationConfigRequest) - private static final com.google.storage.v2.GetNotificationConfigRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.storage.v2.GetNotificationConfigRequest(); - } - - public static com.google.storage.v2.GetNotificationConfigRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetNotificationConfigRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - 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.GetNotificationConfigRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetNotificationConfigRequestOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetNotificationConfigRequestOrBuilder.java deleted file mode 100644 index 9039ecc6f..000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetNotificationConfigRequestOrBuilder.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2024 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/storage/v2/storage.proto - -// Protobuf Java Version: 3.25.5 -package com.google.storage.v2; - -public interface GetNotificationConfigRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.storage.v2.GetNotificationConfigRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The parent bucket of the NotificationConfig.
-   * Format:
-   * `projects/{project}/buckets/{bucket}/notificationConfigs/{notificationConfig}`
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. The parent bucket of the NotificationConfig.
-   * Format:
-   * `projects/{project}/buckets/{bucket}/notificationConfigs/{notificationConfig}`
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); -} diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetServiceAccountRequest.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetServiceAccountRequest.java deleted file mode 100644 index d4292f958..000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetServiceAccountRequest.java +++ /dev/null @@ -1,645 +0,0 @@ -/* - * Copyright 2024 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/storage/v2/storage.proto - -// Protobuf Java Version: 3.25.5 -package com.google.storage.v2; - -/** - * - * - *
- * Request message for GetServiceAccount.
- * 
- * - * Protobuf type {@code google.storage.v2.GetServiceAccountRequest} - */ -public final class GetServiceAccountRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.storage.v2.GetServiceAccountRequest) - GetServiceAccountRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetServiceAccountRequest.newBuilder() to construct. - private GetServiceAccountRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private GetServiceAccountRequest() { - project_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GetServiceAccountRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_GetServiceAccountRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_GetServiceAccountRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.GetServiceAccountRequest.class, - com.google.storage.v2.GetServiceAccountRequest.Builder.class); - } - - public static final int PROJECT_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object project_ = ""; - /** - * - * - *
-   * Required. Project ID, in the format of "projects/{projectIdentifier}".
-   * {projectIdentifier} can be the project ID or project number.
-   * 
- * - * - * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The project. - */ - @java.lang.Override - public java.lang.String getProject() { - java.lang.Object ref = project_; - 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(); - project_ = s; - return s; - } - } - /** - * - * - *
-   * Required. Project ID, in the format of "projects/{projectIdentifier}".
-   * {projectIdentifier} can be the project ID or project number.
-   * 
- * - * - * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for project. - */ - @java.lang.Override - public com.google.protobuf.ByteString getProjectBytes() { - java.lang.Object ref = project_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - project_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, project_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, project_); - } - size += getUnknownFields().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.GetServiceAccountRequest)) { - return super.equals(obj); - } - com.google.storage.v2.GetServiceAccountRequest other = - (com.google.storage.v2.GetServiceAccountRequest) obj; - - if (!getProject().equals(other.getProject())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) 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) + PROJECT_FIELD_NUMBER; - hash = (53 * hash) + getProject().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.storage.v2.GetServiceAccountRequest parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.GetServiceAccountRequest 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.GetServiceAccountRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.GetServiceAccountRequest 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.GetServiceAccountRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.GetServiceAccountRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.storage.v2.GetServiceAccountRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.storage.v2.GetServiceAccountRequest 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.GetServiceAccountRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.storage.v2.GetServiceAccountRequest 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.GetServiceAccountRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.storage.v2.GetServiceAccountRequest 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.GetServiceAccountRequest 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; - } - /** - * - * - *
-   * Request message for GetServiceAccount.
-   * 
- * - * Protobuf type {@code google.storage.v2.GetServiceAccountRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.storage.v2.GetServiceAccountRequest) - com.google.storage.v2.GetServiceAccountRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_GetServiceAccountRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_GetServiceAccountRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.GetServiceAccountRequest.class, - com.google.storage.v2.GetServiceAccountRequest.Builder.class); - } - - // Construct using com.google.storage.v2.GetServiceAccountRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - project_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_GetServiceAccountRequest_descriptor; - } - - @java.lang.Override - public com.google.storage.v2.GetServiceAccountRequest getDefaultInstanceForType() { - return com.google.storage.v2.GetServiceAccountRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.storage.v2.GetServiceAccountRequest build() { - com.google.storage.v2.GetServiceAccountRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.storage.v2.GetServiceAccountRequest buildPartial() { - com.google.storage.v2.GetServiceAccountRequest result = - new com.google.storage.v2.GetServiceAccountRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.storage.v2.GetServiceAccountRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.project_ = project_; - } - } - - @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.GetServiceAccountRequest) { - return mergeFrom((com.google.storage.v2.GetServiceAccountRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.storage.v2.GetServiceAccountRequest other) { - if (other == com.google.storage.v2.GetServiceAccountRequest.getDefaultInstance()) return this; - if (!other.getProject().isEmpty()) { - project_ = other.project_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - 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 { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - project_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object project_ = ""; - /** - * - * - *
-     * Required. Project ID, in the format of "projects/{projectIdentifier}".
-     * {projectIdentifier} can be the project ID or project number.
-     * 
- * - * - * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The project. - */ - public java.lang.String getProject() { - java.lang.Object ref = project_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - project_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. Project ID, in the format of "projects/{projectIdentifier}".
-     * {projectIdentifier} can be the project ID or project number.
-     * 
- * - * - * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for project. - */ - public com.google.protobuf.ByteString getProjectBytes() { - java.lang.Object ref = project_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - project_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. Project ID, in the format of "projects/{projectIdentifier}".
-     * {projectIdentifier} can be the project ID or project number.
-     * 
- * - * - * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The project to set. - * @return This builder for chaining. - */ - public Builder setProject(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - project_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Project ID, in the format of "projects/{projectIdentifier}".
-     * {projectIdentifier} can be the project ID or project number.
-     * 
- * - * - * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearProject() { - project_ = getDefaultInstance().getProject(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Project ID, in the format of "projects/{projectIdentifier}".
-     * {projectIdentifier} can be the project ID or project number.
-     * 
- * - * - * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for project to set. - * @return This builder for chaining. - */ - public Builder setProjectBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - project_ = value; - bitField0_ |= 0x00000001; - 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.GetServiceAccountRequest) - } - - // @@protoc_insertion_point(class_scope:google.storage.v2.GetServiceAccountRequest) - private static final com.google.storage.v2.GetServiceAccountRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.storage.v2.GetServiceAccountRequest(); - } - - public static com.google.storage.v2.GetServiceAccountRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetServiceAccountRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - 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.GetServiceAccountRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetServiceAccountRequestOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetServiceAccountRequestOrBuilder.java deleted file mode 100644 index 13a1c0934..000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetServiceAccountRequestOrBuilder.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2024 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/storage/v2/storage.proto - -// Protobuf Java Version: 3.25.5 -package com.google.storage.v2; - -public interface GetServiceAccountRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.storage.v2.GetServiceAccountRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Project ID, in the format of "projects/{projectIdentifier}".
-   * {projectIdentifier} can be the project ID or project number.
-   * 
- * - * - * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The project. - */ - java.lang.String getProject(); - /** - * - * - *
-   * Required. Project ID, in the format of "projects/{projectIdentifier}".
-   * {projectIdentifier} can be the project ID or project number.
-   * 
- * - * - * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for project. - */ - com.google.protobuf.ByteString getProjectBytes(); -} 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 deleted file mode 100644 index 362361e85..000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/HmacKeyMetadata.java +++ /dev/null @@ -1,2162 +0,0 @@ -/* - * Copyright 2024 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/storage/v2/storage.proto - -// Protobuf Java Version: 3.25.5 -package com.google.storage.v2; - -/** - * - * - *
- * Hmac Key Metadata, which includes all information other than the secret.
- * 
- * - * Protobuf type {@code google.storage.v2.HmacKeyMetadata} - */ -public final class HmacKeyMetadata extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.storage.v2.HmacKeyMetadata) - HmacKeyMetadataOrBuilder { - private static final long serialVersionUID = 0L; - // Use HmacKeyMetadata.newBuilder() to construct. - private HmacKeyMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private HmacKeyMetadata() { - id_ = ""; - accessId_ = ""; - project_ = ""; - serviceAccountEmail_ = ""; - state_ = ""; - etag_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new HmacKeyMetadata(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_HmacKeyMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_HmacKeyMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.HmacKeyMetadata.class, - com.google.storage.v2.HmacKeyMetadata.Builder.class); - } - - private int bitField0_; - public static final int ID_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object id_ = ""; - /** - * - * - *
-   * Immutable. Resource name ID of the key in the format
-   * {projectIdentifier}/{accessId}.
-   * {projectIdentifier} can be the project ID or project number.
-   * 
- * - * string id = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The id. - */ - @java.lang.Override - public java.lang.String getId() { - java.lang.Object ref = id_; - 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(); - id_ = s; - return s; - } - } - /** - * - * - *
-   * Immutable. Resource name ID of the key in the format
-   * {projectIdentifier}/{accessId}.
-   * {projectIdentifier} can be the project ID or project number.
-   * 
- * - * string id = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for id. - */ - @java.lang.Override - public com.google.protobuf.ByteString getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ACCESS_ID_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object accessId_ = ""; - /** - * - * - *
-   * Immutable. Globally unique id for keys.
-   * 
- * - * string access_id = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The accessId. - */ - @java.lang.Override - public java.lang.String getAccessId() { - java.lang.Object ref = accessId_; - 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(); - accessId_ = s; - return s; - } - } - /** - * - * - *
-   * Immutable. Globally unique id for keys.
-   * 
- * - * string access_id = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for accessId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getAccessIdBytes() { - java.lang.Object ref = accessId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - accessId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PROJECT_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object project_ = ""; - /** - * - * - *
-   * Immutable. Identifies the project that owns the service account of the
-   * specified HMAC key, in the format "projects/{projectIdentifier}".
-   * {projectIdentifier} can be the project ID or project number.
-   * 
- * - * - * string project = 3 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return The project. - */ - @java.lang.Override - public java.lang.String getProject() { - java.lang.Object ref = project_; - 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(); - project_ = s; - return s; - } - } - /** - * - * - *
-   * Immutable. Identifies the project that owns the service account of the
-   * specified HMAC key, in the format "projects/{projectIdentifier}".
-   * {projectIdentifier} can be the project ID or project number.
-   * 
- * - * - * string project = 3 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for project. - */ - @java.lang.Override - public com.google.protobuf.ByteString getProjectBytes() { - java.lang.Object ref = project_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - project_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SERVICE_ACCOUNT_EMAIL_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private volatile java.lang.Object serviceAccountEmail_ = ""; - /** - * - * - *
-   * Output only. Email of the service account the key authenticates as.
-   * 
- * - * string service_account_email = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The serviceAccountEmail. - */ - @java.lang.Override - public java.lang.String getServiceAccountEmail() { - java.lang.Object ref = serviceAccountEmail_; - 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(); - serviceAccountEmail_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. Email of the service account the key authenticates as.
-   * 
- * - * string service_account_email = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for serviceAccountEmail. - */ - @java.lang.Override - public com.google.protobuf.ByteString getServiceAccountEmailBytes() { - java.lang.Object ref = serviceAccountEmail_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - serviceAccountEmail_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int STATE_FIELD_NUMBER = 5; - - @SuppressWarnings("serial") - private volatile java.lang.Object state_ = ""; - /** - * - * - *
-   * Optional. State of the key. One of ACTIVE, INACTIVE, or DELETED.
-   * Writable, can be updated by UpdateHmacKey operation.
-   * 
- * - * string state = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The state. - */ - @java.lang.Override - public java.lang.String getState() { - java.lang.Object ref = state_; - 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(); - state_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. State of the key. One of ACTIVE, INACTIVE, or DELETED.
-   * Writable, can be updated by UpdateHmacKey operation.
-   * 
- * - * string state = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for state. - */ - @java.lang.Override - public com.google.protobuf.ByteString getStateBytes() { - java.lang.Object ref = state_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - state_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CREATE_TIME_FIELD_NUMBER = 6; - private com.google.protobuf.Timestamp createTime_; - /** - * - * - *
-   * Output only. The creation time of the HMAC key.
-   * 
- * - * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
-   * Output only. The creation time of the HMAC key.
-   * 
- * - * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - * - * - *
-   * Output only. The creation time of the HMAC key.
-   * 
- * - * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - - public static final int UPDATE_TIME_FIELD_NUMBER = 7; - private com.google.protobuf.Timestamp updateTime_; - /** - * - * - *
-   * Output only. The last modification time of the HMAC key metadata.
-   * 
- * - * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - @java.lang.Override - public boolean hasUpdateTime() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * - * - *
-   * Output only. The last modification time of the HMAC key metadata.
-   * 
- * - * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getUpdateTime() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - /** - * - * - *
-   * Output only. The last modification time of the HMAC key metadata.
-   * 
- * - * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - - public static final int ETAG_FIELD_NUMBER = 8; - - @SuppressWarnings("serial") - private volatile java.lang.Object etag_ = ""; - /** - * - * - *
-   * Optional. The etag of the HMAC key.
-   * 
- * - * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - } - /** - * - * - *
-   * Optional. The etag of the HMAC key.
-   * 
- * - * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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 - 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(accessId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, accessId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, project_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccountEmail_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, serviceAccountEmail_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(state_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, state_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(6, getCreateTime()); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(7, getUpdateTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 8, etag_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(accessId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, accessId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, project_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccountEmail_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, serviceAccountEmail_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(state_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, state_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getCreateTime()); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getUpdateTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, etag_); - } - size += getUnknownFields().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.HmacKeyMetadata)) { - return super.equals(obj); - } - com.google.storage.v2.HmacKeyMetadata other = (com.google.storage.v2.HmacKeyMetadata) obj; - - if (!getId().equals(other.getId())) return false; - if (!getAccessId().equals(other.getAccessId())) return false; - if (!getProject().equals(other.getProject())) return false; - if (!getServiceAccountEmail().equals(other.getServiceAccountEmail())) return false; - if (!getState().equals(other.getState())) return false; - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime().equals(other.getCreateTime())) return false; - } - if (hasUpdateTime() != other.hasUpdateTime()) return false; - if (hasUpdateTime()) { - if (!getUpdateTime().equals(other.getUpdateTime())) return false; - } - if (!getEtag().equals(other.getEtag())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) 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) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); - hash = (37 * hash) + ACCESS_ID_FIELD_NUMBER; - hash = (53 * hash) + getAccessId().hashCode(); - hash = (37 * hash) + PROJECT_FIELD_NUMBER; - hash = (53 * hash) + getProject().hashCode(); - hash = (37 * hash) + SERVICE_ACCOUNT_EMAIL_FIELD_NUMBER; - hash = (53 * hash) + getServiceAccountEmail().hashCode(); - hash = (37 * hash) + STATE_FIELD_NUMBER; - hash = (53 * hash) + getState().hashCode(); - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - if (hasUpdateTime()) { - 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) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.storage.v2.HmacKeyMetadata parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.HmacKeyMetadata 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.HmacKeyMetadata parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.HmacKeyMetadata 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.HmacKeyMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.HmacKeyMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.storage.v2.HmacKeyMetadata parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.storage.v2.HmacKeyMetadata 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.HmacKeyMetadata parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.storage.v2.HmacKeyMetadata 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.HmacKeyMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.storage.v2.HmacKeyMetadata 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.HmacKeyMetadata 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; - } - /** - * - * - *
-   * Hmac Key Metadata, which includes all information other than the secret.
-   * 
- * - * Protobuf type {@code google.storage.v2.HmacKeyMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.storage.v2.HmacKeyMetadata) - com.google.storage.v2.HmacKeyMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_HmacKeyMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_HmacKeyMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.HmacKeyMetadata.class, - com.google.storage.v2.HmacKeyMetadata.Builder.class); - } - - // Construct using com.google.storage.v2.HmacKeyMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getCreateTimeFieldBuilder(); - getUpdateTimeFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - id_ = ""; - accessId_ = ""; - project_ = ""; - serviceAccountEmail_ = ""; - state_ = ""; - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; - } - updateTime_ = null; - if (updateTimeBuilder_ != null) { - updateTimeBuilder_.dispose(); - updateTimeBuilder_ = null; - } - etag_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_HmacKeyMetadata_descriptor; - } - - @java.lang.Override - public com.google.storage.v2.HmacKeyMetadata getDefaultInstanceForType() { - return com.google.storage.v2.HmacKeyMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.storage.v2.HmacKeyMetadata build() { - com.google.storage.v2.HmacKeyMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.storage.v2.HmacKeyMetadata buildPartial() { - com.google.storage.v2.HmacKeyMetadata result = - new com.google.storage.v2.HmacKeyMetadata(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.storage.v2.HmacKeyMetadata result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.id_ = id_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.accessId_ = accessId_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.project_ = project_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.serviceAccountEmail_ = serviceAccountEmail_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.state_ = state_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000020) != 0)) { - result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000080) != 0)) { - result.etag_ = etag_; - } - result.bitField0_ |= to_bitField0_; - } - - @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.HmacKeyMetadata) { - return mergeFrom((com.google.storage.v2.HmacKeyMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.storage.v2.HmacKeyMetadata other) { - if (other == com.google.storage.v2.HmacKeyMetadata.getDefaultInstance()) return this; - if (!other.getId().isEmpty()) { - id_ = other.id_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getAccessId().isEmpty()) { - accessId_ = other.accessId_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getProject().isEmpty()) { - project_ = other.project_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (!other.getServiceAccountEmail().isEmpty()) { - serviceAccountEmail_ = other.serviceAccountEmail_; - bitField0_ |= 0x00000008; - onChanged(); - } - if (!other.getState().isEmpty()) { - state_ = other.state_; - bitField0_ |= 0x00000010; - onChanged(); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasUpdateTime()) { - mergeUpdateTime(other.getUpdateTime()); - } - if (!other.getEtag().isEmpty()) { - etag_ = other.etag_; - bitField0_ |= 0x00000080; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - 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 { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - id_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - accessId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - project_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - serviceAccountEmail_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 42: - { - state_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - break; - } // case 42 - case 50: - { - input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000020; - break; - } // case 50 - case 58: - { - input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000040; - break; - } // case 58 - case 66: - { - etag_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - break; - } // case 66 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object id_ = ""; - /** - * - * - *
-     * Immutable. Resource name ID of the key in the format
-     * {projectIdentifier}/{accessId}.
-     * {projectIdentifier} can be the project ID or project number.
-     * 
- * - * string id = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The id. - */ - public java.lang.String getId() { - java.lang.Object ref = id_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Immutable. Resource name ID of the key in the format
-     * {projectIdentifier}/{accessId}.
-     * {projectIdentifier} can be the project ID or project number.
-     * 
- * - * string id = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for id. - */ - public com.google.protobuf.ByteString getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Immutable. Resource name ID of the key in the format
-     * {projectIdentifier}/{accessId}.
-     * {projectIdentifier} can be the project ID or project number.
-     * 
- * - * string id = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. Resource name ID of the key in the format
-     * {projectIdentifier}/{accessId}.
-     * {projectIdentifier} can be the project ID or project number.
-     * 
- * - * string id = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return This builder for chaining. - */ - public Builder clearId() { - id_ = getDefaultInstance().getId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. Resource name ID of the key in the format
-     * {projectIdentifier}/{accessId}.
-     * {projectIdentifier} can be the project ID or project number.
-     * 
- * - * string id = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The bytes for id to set. - * @return This builder for chaining. - */ - public Builder setIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object accessId_ = ""; - /** - * - * - *
-     * Immutable. Globally unique id for keys.
-     * 
- * - * string access_id = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The accessId. - */ - public java.lang.String getAccessId() { - java.lang.Object ref = accessId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - accessId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Immutable. Globally unique id for keys.
-     * 
- * - * string access_id = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for accessId. - */ - public com.google.protobuf.ByteString getAccessIdBytes() { - java.lang.Object ref = accessId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - accessId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Immutable. Globally unique id for keys.
-     * 
- * - * string access_id = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The accessId to set. - * @return This builder for chaining. - */ - public Builder setAccessId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - accessId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. Globally unique id for keys.
-     * 
- * - * string access_id = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return This builder for chaining. - */ - public Builder clearAccessId() { - accessId_ = getDefaultInstance().getAccessId(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. Globally unique id for keys.
-     * 
- * - * string access_id = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The bytes for accessId to set. - * @return This builder for chaining. - */ - public Builder setAccessIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - accessId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.lang.Object project_ = ""; - /** - * - * - *
-     * Immutable. Identifies the project that owns the service account of the
-     * specified HMAC key, in the format "projects/{projectIdentifier}".
-     * {projectIdentifier} can be the project ID or project number.
-     * 
- * - * - * string project = 3 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return The project. - */ - public java.lang.String getProject() { - java.lang.Object ref = project_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - project_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Immutable. Identifies the project that owns the service account of the
-     * specified HMAC key, in the format "projects/{projectIdentifier}".
-     * {projectIdentifier} can be the project ID or project number.
-     * 
- * - * - * string project = 3 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for project. - */ - public com.google.protobuf.ByteString getProjectBytes() { - java.lang.Object ref = project_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - project_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Immutable. Identifies the project that owns the service account of the
-     * specified HMAC key, in the format "projects/{projectIdentifier}".
-     * {projectIdentifier} can be the project ID or project number.
-     * 
- * - * - * string project = 3 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @param value The project to set. - * @return This builder for chaining. - */ - public Builder setProject(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - project_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. Identifies the project that owns the service account of the
-     * specified HMAC key, in the format "projects/{projectIdentifier}".
-     * {projectIdentifier} can be the project ID or project number.
-     * 
- * - * - * string project = 3 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearProject() { - project_ = getDefaultInstance().getProject(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. Identifies the project that owns the service account of the
-     * specified HMAC key, in the format "projects/{projectIdentifier}".
-     * {projectIdentifier} can be the project ID or project number.
-     * 
- * - * - * string project = 3 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for project to set. - * @return This builder for chaining. - */ - public Builder setProjectBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - project_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private java.lang.Object serviceAccountEmail_ = ""; - /** - * - * - *
-     * Output only. Email of the service account the key authenticates as.
-     * 
- * - * string service_account_email = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The serviceAccountEmail. - */ - public java.lang.String getServiceAccountEmail() { - java.lang.Object ref = serviceAccountEmail_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - serviceAccountEmail_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. Email of the service account the key authenticates as.
-     * 
- * - * string service_account_email = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for serviceAccountEmail. - */ - public com.google.protobuf.ByteString getServiceAccountEmailBytes() { - java.lang.Object ref = serviceAccountEmail_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - serviceAccountEmail_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. Email of the service account the key authenticates as.
-     * 
- * - * string service_account_email = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The serviceAccountEmail to set. - * @return This builder for chaining. - */ - public Builder setServiceAccountEmail(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - serviceAccountEmail_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Email of the service account the key authenticates as.
-     * 
- * - * string service_account_email = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearServiceAccountEmail() { - serviceAccountEmail_ = getDefaultInstance().getServiceAccountEmail(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Email of the service account the key authenticates as.
-     * 
- * - * string service_account_email = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for serviceAccountEmail to set. - * @return This builder for chaining. - */ - public Builder setServiceAccountEmailBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - serviceAccountEmail_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - private java.lang.Object state_ = ""; - /** - * - * - *
-     * Optional. State of the key. One of ACTIVE, INACTIVE, or DELETED.
-     * Writable, can be updated by UpdateHmacKey operation.
-     * 
- * - * string state = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The state. - */ - public java.lang.String getState() { - java.lang.Object ref = state_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - state_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. State of the key. One of ACTIVE, INACTIVE, or DELETED.
-     * Writable, can be updated by UpdateHmacKey operation.
-     * 
- * - * string state = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for state. - */ - public com.google.protobuf.ByteString getStateBytes() { - java.lang.Object ref = state_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - state_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. State of the key. One of ACTIVE, INACTIVE, or DELETED.
-     * Writable, can be updated by UpdateHmacKey operation.
-     * 
- * - * string state = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The state to set. - * @return This builder for chaining. - */ - public Builder setState(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - state_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. State of the key. One of ACTIVE, INACTIVE, or DELETED.
-     * Writable, can be updated by UpdateHmacKey operation.
-     * 
- * - * string state = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearState() { - state_ = getDefaultInstance().getState(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. State of the key. One of ACTIVE, INACTIVE, or DELETED.
-     * Writable, can be updated by UpdateHmacKey operation.
-     * 
- * - * string state = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for state to set. - * @return This builder for chaining. - */ - public Builder setStateBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - state_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - createTimeBuilder_; - /** - * - * - *
-     * Output only. The creation time of the HMAC key.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return ((bitField0_ & 0x00000020) != 0); - } - /** - * - * - *
-     * Output only. The creation time of the HMAC key.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - public com.google.protobuf.Timestamp getCreateTime() { - if (createTimeBuilder_ == null) { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; - } else { - return createTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The creation time of the HMAC key.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createTime_ = value; - } else { - createTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The creation time of the HMAC key.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The creation time of the HMAC key.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0) - && createTime_ != null - && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getCreateTimeBuilder().mergeFrom(value); - } else { - createTime_ = value; - } - } else { - createTimeBuilder_.mergeFrom(value); - } - if (createTime_ != null) { - bitField0_ |= 0x00000020; - onChanged(); - } - return this; - } - /** - * - * - *
-     * Output only. The creation time of the HMAC key.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearCreateTime() { - bitField0_ = (bitField0_ & ~0x00000020); - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The creation time of the HMAC key.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - bitField0_ |= 0x00000020; - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The creation time of the HMAC key.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; - } - } - /** - * - * - *
-     * Output only. The creation time of the HMAC key.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), getParentForChildren(), isClean()); - createTime_ = null; - } - return createTimeBuilder_; - } - - private com.google.protobuf.Timestamp updateTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - updateTimeBuilder_; - /** - * - * - *
-     * Output only. The last modification time of the HMAC key metadata.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - public boolean hasUpdateTime() { - return ((bitField0_ & 0x00000040) != 0); - } - /** - * - * - *
-     * Output only. The last modification time of the HMAC key metadata.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. - */ - public com.google.protobuf.Timestamp getUpdateTime() { - if (updateTimeBuilder_ == null) { - return updateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : updateTime_; - } else { - return updateTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The last modification time of the HMAC key metadata.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateTime_ = value; - } else { - updateTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The last modification time of the HMAC key metadata.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (updateTimeBuilder_ == null) { - updateTime_ = builderForValue.build(); - } else { - updateTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The last modification time of the HMAC key metadata.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (((bitField0_ & 0x00000040) != 0) - && updateTime_ != null - && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getUpdateTimeBuilder().mergeFrom(value); - } else { - updateTime_ = value; - } - } else { - updateTimeBuilder_.mergeFrom(value); - } - if (updateTime_ != null) { - bitField0_ |= 0x00000040; - onChanged(); - } - return this; - } - /** - * - * - *
-     * Output only. The last modification time of the HMAC key metadata.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearUpdateTime() { - bitField0_ = (bitField0_ & ~0x00000040); - updateTime_ = null; - if (updateTimeBuilder_ != null) { - updateTimeBuilder_.dispose(); - updateTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The last modification time of the HMAC key metadata.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { - bitField0_ |= 0x00000040; - onChanged(); - return getUpdateTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The last modification time of the HMAC key metadata.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - if (updateTimeBuilder_ != null) { - return updateTimeBuilder_.getMessageOrBuilder(); - } else { - return updateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : updateTime_; - } - } - /** - * - * - *
-     * Output only. The last modification time of the HMAC key metadata.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getUpdateTimeFieldBuilder() { - if (updateTimeBuilder_ == null) { - updateTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getUpdateTime(), getParentForChildren(), isClean()); - updateTime_ = null; - } - return updateTimeBuilder_; - } - - private java.lang.Object etag_ = ""; - /** - * - * - *
-     * Optional. The etag of the HMAC key.
-     * 
- * - * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - } - /** - * - * - *
-     * Optional. The etag of the HMAC key.
-     * 
- * - * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - } - /** - * - * - *
-     * Optional. The etag of the HMAC key.
-     * 
- * - * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The etag of the HMAC key.
-     * 
- * - * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearEtag() { - etag_ = getDefaultInstance().getEtag(); - bitField0_ = (bitField0_ & ~0x00000080); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The etag of the HMAC key.
-     * 
- * - * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - bitField0_ |= 0x00000080; - 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.HmacKeyMetadata) - } - - // @@protoc_insertion_point(class_scope:google.storage.v2.HmacKeyMetadata) - private static final com.google.storage.v2.HmacKeyMetadata DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.storage.v2.HmacKeyMetadata(); - } - - public static com.google.storage.v2.HmacKeyMetadata getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public HmacKeyMetadata parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - 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.HmacKeyMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} 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 deleted file mode 100644 index 817312e9f..000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/HmacKeyMetadataOrBuilder.java +++ /dev/null @@ -1,266 +0,0 @@ -/* - * Copyright 2024 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/storage/v2/storage.proto - -// Protobuf Java Version: 3.25.5 -package com.google.storage.v2; - -public interface HmacKeyMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.storage.v2.HmacKeyMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Immutable. Resource name ID of the key in the format
-   * {projectIdentifier}/{accessId}.
-   * {projectIdentifier} can be the project ID or project number.
-   * 
- * - * string id = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The id. - */ - java.lang.String getId(); - /** - * - * - *
-   * Immutable. Resource name ID of the key in the format
-   * {projectIdentifier}/{accessId}.
-   * {projectIdentifier} can be the project ID or project number.
-   * 
- * - * string id = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for id. - */ - com.google.protobuf.ByteString getIdBytes(); - - /** - * - * - *
-   * Immutable. Globally unique id for keys.
-   * 
- * - * string access_id = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The accessId. - */ - java.lang.String getAccessId(); - /** - * - * - *
-   * Immutable. Globally unique id for keys.
-   * 
- * - * string access_id = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for accessId. - */ - com.google.protobuf.ByteString getAccessIdBytes(); - - /** - * - * - *
-   * Immutable. Identifies the project that owns the service account of the
-   * specified HMAC key, in the format "projects/{projectIdentifier}".
-   * {projectIdentifier} can be the project ID or project number.
-   * 
- * - * - * string project = 3 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return The project. - */ - java.lang.String getProject(); - /** - * - * - *
-   * Immutable. Identifies the project that owns the service account of the
-   * specified HMAC key, in the format "projects/{projectIdentifier}".
-   * {projectIdentifier} can be the project ID or project number.
-   * 
- * - * - * string project = 3 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for project. - */ - com.google.protobuf.ByteString getProjectBytes(); - - /** - * - * - *
-   * Output only. Email of the service account the key authenticates as.
-   * 
- * - * string service_account_email = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The serviceAccountEmail. - */ - java.lang.String getServiceAccountEmail(); - /** - * - * - *
-   * Output only. Email of the service account the key authenticates as.
-   * 
- * - * string service_account_email = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for serviceAccountEmail. - */ - com.google.protobuf.ByteString getServiceAccountEmailBytes(); - - /** - * - * - *
-   * Optional. State of the key. One of ACTIVE, INACTIVE, or DELETED.
-   * Writable, can be updated by UpdateHmacKey operation.
-   * 
- * - * string state = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The state. - */ - java.lang.String getState(); - /** - * - * - *
-   * Optional. State of the key. One of ACTIVE, INACTIVE, or DELETED.
-   * Writable, can be updated by UpdateHmacKey operation.
-   * 
- * - * string state = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for state. - */ - com.google.protobuf.ByteString getStateBytes(); - - /** - * - * - *
-   * Output only. The creation time of the HMAC key.
-   * 
- * - * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - * - * - *
-   * Output only. The creation time of the HMAC key.
-   * 
- * - * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - * - * - *
-   * Output only. The creation time of the HMAC key.
-   * 
- * - * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - * - * - *
-   * Output only. The last modification time of the HMAC key metadata.
-   * 
- * - * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - boolean hasUpdateTime(); - /** - * - * - *
-   * Output only. The last modification time of the HMAC key metadata.
-   * 
- * - * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. - */ - com.google.protobuf.Timestamp getUpdateTime(); - /** - * - * - *
-   * Output only. The last modification time of the HMAC key metadata.
-   * 
- * - * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); - - /** - * - * - *
-   * Optional. The etag of the HMAC key.
-   * 
- * - * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The etag. - */ - java.lang.String getEtag(); - /** - * - * - *
-   * Optional. The etag of the HMAC key.
-   * 
- * - * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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/ListHmacKeysRequest.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListHmacKeysRequest.java deleted file mode 100644 index 729af7ce4..000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListHmacKeysRequest.java +++ /dev/null @@ -1,1202 +0,0 @@ -/* - * Copyright 2024 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/storage/v2/storage.proto - -// Protobuf Java Version: 3.25.5 -package com.google.storage.v2; - -/** - * - * - *
- * Request to fetch a list of HMAC keys under a given project.
- * 
- * - * Protobuf type {@code google.storage.v2.ListHmacKeysRequest} - */ -public final class ListHmacKeysRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.storage.v2.ListHmacKeysRequest) - ListHmacKeysRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListHmacKeysRequest.newBuilder() to construct. - private ListHmacKeysRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListHmacKeysRequest() { - project_ = ""; - pageToken_ = ""; - serviceAccountEmail_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListHmacKeysRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_ListHmacKeysRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_ListHmacKeysRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.ListHmacKeysRequest.class, - com.google.storage.v2.ListHmacKeysRequest.Builder.class); - } - - public static final int PROJECT_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object project_ = ""; - /** - * - * - *
-   * Required. The project to list HMAC keys for, in the format of
-   * "projects/{projectIdentifier}".
-   * {projectIdentifier} can be the project ID or project number.
-   * 
- * - * - * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The project. - */ - @java.lang.Override - public java.lang.String getProject() { - java.lang.Object ref = project_; - 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(); - project_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The project to list HMAC keys for, in the format of
-   * "projects/{projectIdentifier}".
-   * {projectIdentifier} can be the project ID or project number.
-   * 
- * - * - * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for project. - */ - @java.lang.Override - public com.google.protobuf.ByteString getProjectBytes() { - java.lang.Object ref = project_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - project_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 2; - private int pageSize_ = 0; - /** - * - * - *
-   * The maximum number of keys to return.
-   * 
- * - * int32 page_size = 2; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object pageToken_ = ""; - /** - * - * - *
-   * A previously returned token from ListHmacKeysResponse to get the next page.
-   * 
- * - * string page_token = 3; - * - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - 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(); - pageToken_ = s; - return s; - } - } - /** - * - * - *
-   * A previously returned token from ListHmacKeysResponse to get the next page.
-   * 
- * - * string page_token = 3; - * - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SERVICE_ACCOUNT_EMAIL_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private volatile java.lang.Object serviceAccountEmail_ = ""; - /** - * - * - *
-   * If set, filters to only return HMAC keys for specified service account.
-   * 
- * - * string service_account_email = 4; - * - * @return The serviceAccountEmail. - */ - @java.lang.Override - public java.lang.String getServiceAccountEmail() { - java.lang.Object ref = serviceAccountEmail_; - 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(); - serviceAccountEmail_ = s; - return s; - } - } - /** - * - * - *
-   * If set, filters to only return HMAC keys for specified service account.
-   * 
- * - * string service_account_email = 4; - * - * @return The bytes for serviceAccountEmail. - */ - @java.lang.Override - public com.google.protobuf.ByteString getServiceAccountEmailBytes() { - java.lang.Object ref = serviceAccountEmail_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - serviceAccountEmail_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SHOW_DELETED_KEYS_FIELD_NUMBER = 5; - private boolean showDeletedKeys_ = false; - /** - * - * - *
-   * If set, return deleted keys that have not yet been wiped out.
-   * 
- * - * bool show_deleted_keys = 5; - * - * @return The showDeletedKeys. - */ - @java.lang.Override - public boolean getShowDeletedKeys() { - return showDeletedKeys_; - } - - 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, project_); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccountEmail_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, serviceAccountEmail_); - } - if (showDeletedKeys_ != false) { - output.writeBool(5, showDeletedKeys_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, project_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccountEmail_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, serviceAccountEmail_); - } - if (showDeletedKeys_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, showDeletedKeys_); - } - size += getUnknownFields().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.ListHmacKeysRequest)) { - return super.equals(obj); - } - com.google.storage.v2.ListHmacKeysRequest other = - (com.google.storage.v2.ListHmacKeysRequest) obj; - - if (!getProject().equals(other.getProject())) return false; - if (getPageSize() != other.getPageSize()) return false; - if (!getPageToken().equals(other.getPageToken())) return false; - if (!getServiceAccountEmail().equals(other.getServiceAccountEmail())) return false; - if (getShowDeletedKeys() != other.getShowDeletedKeys()) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) 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) + PROJECT_FIELD_NUMBER; - hash = (53 * hash) + getProject().hashCode(); - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); - hash = (37 * hash) + SERVICE_ACCOUNT_EMAIL_FIELD_NUMBER; - hash = (53 * hash) + getServiceAccountEmail().hashCode(); - hash = (37 * hash) + SHOW_DELETED_KEYS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getShowDeletedKeys()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.storage.v2.ListHmacKeysRequest parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.ListHmacKeysRequest 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.ListHmacKeysRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.ListHmacKeysRequest 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.ListHmacKeysRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.ListHmacKeysRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.storage.v2.ListHmacKeysRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.storage.v2.ListHmacKeysRequest 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.ListHmacKeysRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.storage.v2.ListHmacKeysRequest 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.ListHmacKeysRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.storage.v2.ListHmacKeysRequest 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.ListHmacKeysRequest 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; - } - /** - * - * - *
-   * Request to fetch a list of HMAC keys under a given project.
-   * 
- * - * Protobuf type {@code google.storage.v2.ListHmacKeysRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.storage.v2.ListHmacKeysRequest) - com.google.storage.v2.ListHmacKeysRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_ListHmacKeysRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_ListHmacKeysRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.ListHmacKeysRequest.class, - com.google.storage.v2.ListHmacKeysRequest.Builder.class); - } - - // Construct using com.google.storage.v2.ListHmacKeysRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - project_ = ""; - pageSize_ = 0; - pageToken_ = ""; - serviceAccountEmail_ = ""; - showDeletedKeys_ = false; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_ListHmacKeysRequest_descriptor; - } - - @java.lang.Override - public com.google.storage.v2.ListHmacKeysRequest getDefaultInstanceForType() { - return com.google.storage.v2.ListHmacKeysRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.storage.v2.ListHmacKeysRequest build() { - com.google.storage.v2.ListHmacKeysRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.storage.v2.ListHmacKeysRequest buildPartial() { - com.google.storage.v2.ListHmacKeysRequest result = - new com.google.storage.v2.ListHmacKeysRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.storage.v2.ListHmacKeysRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.project_ = project_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.pageSize_ = pageSize_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.pageToken_ = pageToken_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.serviceAccountEmail_ = serviceAccountEmail_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.showDeletedKeys_ = showDeletedKeys_; - } - } - - @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.ListHmacKeysRequest) { - return mergeFrom((com.google.storage.v2.ListHmacKeysRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.storage.v2.ListHmacKeysRequest other) { - if (other == com.google.storage.v2.ListHmacKeysRequest.getDefaultInstance()) return this; - if (!other.getProject().isEmpty()) { - project_ = other.project_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (!other.getServiceAccountEmail().isEmpty()) { - serviceAccountEmail_ = other.serviceAccountEmail_; - bitField0_ |= 0x00000008; - onChanged(); - } - if (other.getShowDeletedKeys() != false) { - setShowDeletedKeys(other.getShowDeletedKeys()); - } - this.mergeUnknownFields(other.getUnknownFields()); - 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 { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - project_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 16: - { - pageSize_ = input.readInt32(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 26: - { - pageToken_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - serviceAccountEmail_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 40: - { - showDeletedKeys_ = input.readBool(); - bitField0_ |= 0x00000010; - break; - } // case 40 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object project_ = ""; - /** - * - * - *
-     * Required. The project to list HMAC keys for, in the format of
-     * "projects/{projectIdentifier}".
-     * {projectIdentifier} can be the project ID or project number.
-     * 
- * - * - * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The project. - */ - public java.lang.String getProject() { - java.lang.Object ref = project_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - project_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The project to list HMAC keys for, in the format of
-     * "projects/{projectIdentifier}".
-     * {projectIdentifier} can be the project ID or project number.
-     * 
- * - * - * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for project. - */ - public com.google.protobuf.ByteString getProjectBytes() { - java.lang.Object ref = project_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - project_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The project to list HMAC keys for, in the format of
-     * "projects/{projectIdentifier}".
-     * {projectIdentifier} can be the project ID or project number.
-     * 
- * - * - * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The project to set. - * @return This builder for chaining. - */ - public Builder setProject(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - project_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The project to list HMAC keys for, in the format of
-     * "projects/{projectIdentifier}".
-     * {projectIdentifier} can be the project ID or project number.
-     * 
- * - * - * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearProject() { - project_ = getDefaultInstance().getProject(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The project to list HMAC keys for, in the format of
-     * "projects/{projectIdentifier}".
-     * {projectIdentifier} can be the project ID or project number.
-     * 
- * - * - * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for project to set. - * @return This builder for chaining. - */ - public Builder setProjectBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - project_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private int pageSize_; - /** - * - * - *
-     * The maximum number of keys to return.
-     * 
- * - * int32 page_size = 2; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - * - * - *
-     * The maximum number of keys to return.
-     * 
- * - * int32 page_size = 2; - * - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * The maximum number of keys to return.
-     * 
- * - * int32 page_size = 2; - * - * @return This builder for chaining. - */ - public Builder clearPageSize() { - bitField0_ = (bitField0_ & ~0x00000002); - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - * - * - *
-     * A previously returned token from ListHmacKeysResponse to get the next page.
-     * 
- * - * string page_token = 3; - * - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * A previously returned token from ListHmacKeysResponse to get the next page.
-     * 
- * - * string page_token = 3; - * - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * A previously returned token from ListHmacKeysResponse to get the next page.
-     * 
- * - * string page_token = 3; - * - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - pageToken_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * A previously returned token from ListHmacKeysResponse to get the next page.
-     * 
- * - * string page_token = 3; - * - * @return This builder for chaining. - */ - public Builder clearPageToken() { - pageToken_ = getDefaultInstance().getPageToken(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * A previously returned token from ListHmacKeysResponse to get the next page.
-     * 
- * - * string page_token = 3; - * - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - pageToken_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private java.lang.Object serviceAccountEmail_ = ""; - /** - * - * - *
-     * If set, filters to only return HMAC keys for specified service account.
-     * 
- * - * string service_account_email = 4; - * - * @return The serviceAccountEmail. - */ - public java.lang.String getServiceAccountEmail() { - java.lang.Object ref = serviceAccountEmail_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - serviceAccountEmail_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * If set, filters to only return HMAC keys for specified service account.
-     * 
- * - * string service_account_email = 4; - * - * @return The bytes for serviceAccountEmail. - */ - public com.google.protobuf.ByteString getServiceAccountEmailBytes() { - java.lang.Object ref = serviceAccountEmail_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - serviceAccountEmail_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * If set, filters to only return HMAC keys for specified service account.
-     * 
- * - * string service_account_email = 4; - * - * @param value The serviceAccountEmail to set. - * @return This builder for chaining. - */ - public Builder setServiceAccountEmail(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - serviceAccountEmail_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * If set, filters to only return HMAC keys for specified service account.
-     * 
- * - * string service_account_email = 4; - * - * @return This builder for chaining. - */ - public Builder clearServiceAccountEmail() { - serviceAccountEmail_ = getDefaultInstance().getServiceAccountEmail(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - * - * - *
-     * If set, filters to only return HMAC keys for specified service account.
-     * 
- * - * string service_account_email = 4; - * - * @param value The bytes for serviceAccountEmail to set. - * @return This builder for chaining. - */ - public Builder setServiceAccountEmailBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - serviceAccountEmail_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - private boolean showDeletedKeys_; - /** - * - * - *
-     * If set, return deleted keys that have not yet been wiped out.
-     * 
- * - * bool show_deleted_keys = 5; - * - * @return The showDeletedKeys. - */ - @java.lang.Override - public boolean getShowDeletedKeys() { - return showDeletedKeys_; - } - /** - * - * - *
-     * If set, return deleted keys that have not yet been wiped out.
-     * 
- * - * bool show_deleted_keys = 5; - * - * @param value The showDeletedKeys to set. - * @return This builder for chaining. - */ - public Builder setShowDeletedKeys(boolean value) { - - showDeletedKeys_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * - * - *
-     * If set, return deleted keys that have not yet been wiped out.
-     * 
- * - * bool show_deleted_keys = 5; - * - * @return This builder for chaining. - */ - public Builder clearShowDeletedKeys() { - bitField0_ = (bitField0_ & ~0x00000010); - showDeletedKeys_ = false; - 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.ListHmacKeysRequest) - } - - // @@protoc_insertion_point(class_scope:google.storage.v2.ListHmacKeysRequest) - private static final com.google.storage.v2.ListHmacKeysRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.storage.v2.ListHmacKeysRequest(); - } - - public static com.google.storage.v2.ListHmacKeysRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListHmacKeysRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - 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.ListHmacKeysRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListHmacKeysRequestOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListHmacKeysRequestOrBuilder.java deleted file mode 100644 index bae89afe1..000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListHmacKeysRequestOrBuilder.java +++ /dev/null @@ -1,135 +0,0 @@ -/* - * Copyright 2024 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/storage/v2/storage.proto - -// Protobuf Java Version: 3.25.5 -package com.google.storage.v2; - -public interface ListHmacKeysRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.storage.v2.ListHmacKeysRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The project to list HMAC keys for, in the format of
-   * "projects/{projectIdentifier}".
-   * {projectIdentifier} can be the project ID or project number.
-   * 
- * - * - * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The project. - */ - java.lang.String getProject(); - /** - * - * - *
-   * Required. The project to list HMAC keys for, in the format of
-   * "projects/{projectIdentifier}".
-   * {projectIdentifier} can be the project ID or project number.
-   * 
- * - * - * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for project. - */ - com.google.protobuf.ByteString getProjectBytes(); - - /** - * - * - *
-   * The maximum number of keys to return.
-   * 
- * - * int32 page_size = 2; - * - * @return The pageSize. - */ - int getPageSize(); - - /** - * - * - *
-   * A previously returned token from ListHmacKeysResponse to get the next page.
-   * 
- * - * string page_token = 3; - * - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - * - * - *
-   * A previously returned token from ListHmacKeysResponse to get the next page.
-   * 
- * - * string page_token = 3; - * - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString getPageTokenBytes(); - - /** - * - * - *
-   * If set, filters to only return HMAC keys for specified service account.
-   * 
- * - * string service_account_email = 4; - * - * @return The serviceAccountEmail. - */ - java.lang.String getServiceAccountEmail(); - /** - * - * - *
-   * If set, filters to only return HMAC keys for specified service account.
-   * 
- * - * string service_account_email = 4; - * - * @return The bytes for serviceAccountEmail. - */ - com.google.protobuf.ByteString getServiceAccountEmailBytes(); - - /** - * - * - *
-   * If set, return deleted keys that have not yet been wiped out.
-   * 
- * - * bool show_deleted_keys = 5; - * - * @return The showDeletedKeys. - */ - boolean getShowDeletedKeys(); -} diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListHmacKeysResponse.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListHmacKeysResponse.java deleted file mode 100644 index 67eb5162c..000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListHmacKeysResponse.java +++ /dev/null @@ -1,1122 +0,0 @@ -/* - * Copyright 2024 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/storage/v2/storage.proto - -// Protobuf Java Version: 3.25.5 -package com.google.storage.v2; - -/** - * - * - *
- * Hmac key list response with next page information.
- * 
- * - * Protobuf type {@code google.storage.v2.ListHmacKeysResponse} - */ -public final class ListHmacKeysResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.storage.v2.ListHmacKeysResponse) - ListHmacKeysResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListHmacKeysResponse.newBuilder() to construct. - private ListHmacKeysResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListHmacKeysResponse() { - hmacKeys_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListHmacKeysResponse(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_ListHmacKeysResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_ListHmacKeysResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.ListHmacKeysResponse.class, - com.google.storage.v2.ListHmacKeysResponse.Builder.class); - } - - public static final int HMAC_KEYS_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private java.util.List hmacKeys_; - /** - * - * - *
-   * The list of items.
-   * 
- * - * repeated .google.storage.v2.HmacKeyMetadata hmac_keys = 1; - */ - @java.lang.Override - public java.util.List getHmacKeysList() { - return hmacKeys_; - } - /** - * - * - *
-   * The list of items.
-   * 
- * - * repeated .google.storage.v2.HmacKeyMetadata hmac_keys = 1; - */ - @java.lang.Override - public java.util.List - getHmacKeysOrBuilderList() { - return hmacKeys_; - } - /** - * - * - *
-   * The list of items.
-   * 
- * - * repeated .google.storage.v2.HmacKeyMetadata hmac_keys = 1; - */ - @java.lang.Override - public int getHmacKeysCount() { - return hmacKeys_.size(); - } - /** - * - * - *
-   * The list of items.
-   * 
- * - * repeated .google.storage.v2.HmacKeyMetadata hmac_keys = 1; - */ - @java.lang.Override - public com.google.storage.v2.HmacKeyMetadata getHmacKeys(int index) { - return hmacKeys_.get(index); - } - /** - * - * - *
-   * The list of items.
-   * 
- * - * repeated .google.storage.v2.HmacKeyMetadata hmac_keys = 1; - */ - @java.lang.Override - public com.google.storage.v2.HmacKeyMetadataOrBuilder getHmacKeysOrBuilder(int index) { - return hmacKeys_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object nextPageToken_ = ""; - /** - * - * - *
-   * The continuation token, used to page through large result sets. Provide
-   * this value in a subsequent request to return the next page of results.
-   * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - @java.lang.Override - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - 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(); - nextPageToken_ = s; - return s; - } - } - /** - * - * - *
-   * The continuation token, used to page through large result sets. Provide
-   * this value in a subsequent request to return the next page of results.
-   * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 { - for (int i = 0; i < hmacKeys_.size(); i++) { - output.writeMessage(1, hmacKeys_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < hmacKeys_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, hmacKeys_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - size += getUnknownFields().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.ListHmacKeysResponse)) { - return super.equals(obj); - } - com.google.storage.v2.ListHmacKeysResponse other = - (com.google.storage.v2.ListHmacKeysResponse) obj; - - if (!getHmacKeysList().equals(other.getHmacKeysList())) return false; - if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getHmacKeysCount() > 0) { - hash = (37 * hash) + HMAC_KEYS_FIELD_NUMBER; - hash = (53 * hash) + getHmacKeysList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.storage.v2.ListHmacKeysResponse parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.ListHmacKeysResponse 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.ListHmacKeysResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.ListHmacKeysResponse 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.ListHmacKeysResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.ListHmacKeysResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.storage.v2.ListHmacKeysResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.storage.v2.ListHmacKeysResponse 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.ListHmacKeysResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.storage.v2.ListHmacKeysResponse 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.ListHmacKeysResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.storage.v2.ListHmacKeysResponse 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.ListHmacKeysResponse 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; - } - /** - * - * - *
-   * Hmac key list response with next page information.
-   * 
- * - * Protobuf type {@code google.storage.v2.ListHmacKeysResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.storage.v2.ListHmacKeysResponse) - com.google.storage.v2.ListHmacKeysResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_ListHmacKeysResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_ListHmacKeysResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.ListHmacKeysResponse.class, - com.google.storage.v2.ListHmacKeysResponse.Builder.class); - } - - // Construct using com.google.storage.v2.ListHmacKeysResponse.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (hmacKeysBuilder_ == null) { - hmacKeys_ = java.util.Collections.emptyList(); - } else { - hmacKeys_ = null; - hmacKeysBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - nextPageToken_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_ListHmacKeysResponse_descriptor; - } - - @java.lang.Override - public com.google.storage.v2.ListHmacKeysResponse getDefaultInstanceForType() { - return com.google.storage.v2.ListHmacKeysResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.storage.v2.ListHmacKeysResponse build() { - com.google.storage.v2.ListHmacKeysResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.storage.v2.ListHmacKeysResponse buildPartial() { - com.google.storage.v2.ListHmacKeysResponse result = - new com.google.storage.v2.ListHmacKeysResponse(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(com.google.storage.v2.ListHmacKeysResponse result) { - if (hmacKeysBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - hmacKeys_ = java.util.Collections.unmodifiableList(hmacKeys_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.hmacKeys_ = hmacKeys_; - } else { - result.hmacKeys_ = hmacKeysBuilder_.build(); - } - } - - private void buildPartial0(com.google.storage.v2.ListHmacKeysResponse result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.nextPageToken_ = nextPageToken_; - } - } - - @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.ListHmacKeysResponse) { - return mergeFrom((com.google.storage.v2.ListHmacKeysResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.storage.v2.ListHmacKeysResponse other) { - if (other == com.google.storage.v2.ListHmacKeysResponse.getDefaultInstance()) return this; - if (hmacKeysBuilder_ == null) { - if (!other.hmacKeys_.isEmpty()) { - if (hmacKeys_.isEmpty()) { - hmacKeys_ = other.hmacKeys_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureHmacKeysIsMutable(); - hmacKeys_.addAll(other.hmacKeys_); - } - onChanged(); - } - } else { - if (!other.hmacKeys_.isEmpty()) { - if (hmacKeysBuilder_.isEmpty()) { - hmacKeysBuilder_.dispose(); - hmacKeysBuilder_ = null; - hmacKeys_ = other.hmacKeys_; - bitField0_ = (bitField0_ & ~0x00000001); - hmacKeysBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getHmacKeysFieldBuilder() - : null; - } else { - hmacKeysBuilder_.addAllMessages(other.hmacKeys_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - bitField0_ |= 0x00000002; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - 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 { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.storage.v2.HmacKeyMetadata m = - input.readMessage( - com.google.storage.v2.HmacKeyMetadata.parser(), extensionRegistry); - if (hmacKeysBuilder_ == null) { - ensureHmacKeysIsMutable(); - hmacKeys_.add(m); - } else { - hmacKeysBuilder_.addMessage(m); - } - break; - } // case 10 - case 18: - { - nextPageToken_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.util.List hmacKeys_ = - java.util.Collections.emptyList(); - - private void ensureHmacKeysIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - hmacKeys_ = new java.util.ArrayList(hmacKeys_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.storage.v2.HmacKeyMetadata, - com.google.storage.v2.HmacKeyMetadata.Builder, - com.google.storage.v2.HmacKeyMetadataOrBuilder> - hmacKeysBuilder_; - - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.HmacKeyMetadata hmac_keys = 1; - */ - public java.util.List getHmacKeysList() { - if (hmacKeysBuilder_ == null) { - return java.util.Collections.unmodifiableList(hmacKeys_); - } else { - return hmacKeysBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.HmacKeyMetadata hmac_keys = 1; - */ - public int getHmacKeysCount() { - if (hmacKeysBuilder_ == null) { - return hmacKeys_.size(); - } else { - return hmacKeysBuilder_.getCount(); - } - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.HmacKeyMetadata hmac_keys = 1; - */ - public com.google.storage.v2.HmacKeyMetadata getHmacKeys(int index) { - if (hmacKeysBuilder_ == null) { - return hmacKeys_.get(index); - } else { - return hmacKeysBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.HmacKeyMetadata hmac_keys = 1; - */ - public Builder setHmacKeys(int index, com.google.storage.v2.HmacKeyMetadata value) { - if (hmacKeysBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureHmacKeysIsMutable(); - hmacKeys_.set(index, value); - onChanged(); - } else { - hmacKeysBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.HmacKeyMetadata hmac_keys = 1; - */ - public Builder setHmacKeys( - int index, com.google.storage.v2.HmacKeyMetadata.Builder builderForValue) { - if (hmacKeysBuilder_ == null) { - ensureHmacKeysIsMutable(); - hmacKeys_.set(index, builderForValue.build()); - onChanged(); - } else { - hmacKeysBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.HmacKeyMetadata hmac_keys = 1; - */ - public Builder addHmacKeys(com.google.storage.v2.HmacKeyMetadata value) { - if (hmacKeysBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureHmacKeysIsMutable(); - hmacKeys_.add(value); - onChanged(); - } else { - hmacKeysBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.HmacKeyMetadata hmac_keys = 1; - */ - public Builder addHmacKeys(int index, com.google.storage.v2.HmacKeyMetadata value) { - if (hmacKeysBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureHmacKeysIsMutable(); - hmacKeys_.add(index, value); - onChanged(); - } else { - hmacKeysBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.HmacKeyMetadata hmac_keys = 1; - */ - public Builder addHmacKeys(com.google.storage.v2.HmacKeyMetadata.Builder builderForValue) { - if (hmacKeysBuilder_ == null) { - ensureHmacKeysIsMutable(); - hmacKeys_.add(builderForValue.build()); - onChanged(); - } else { - hmacKeysBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.HmacKeyMetadata hmac_keys = 1; - */ - public Builder addHmacKeys( - int index, com.google.storage.v2.HmacKeyMetadata.Builder builderForValue) { - if (hmacKeysBuilder_ == null) { - ensureHmacKeysIsMutable(); - hmacKeys_.add(index, builderForValue.build()); - onChanged(); - } else { - hmacKeysBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.HmacKeyMetadata hmac_keys = 1; - */ - public Builder addAllHmacKeys( - java.lang.Iterable values) { - if (hmacKeysBuilder_ == null) { - ensureHmacKeysIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, hmacKeys_); - onChanged(); - } else { - hmacKeysBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.HmacKeyMetadata hmac_keys = 1; - */ - public Builder clearHmacKeys() { - if (hmacKeysBuilder_ == null) { - hmacKeys_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - hmacKeysBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.HmacKeyMetadata hmac_keys = 1; - */ - public Builder removeHmacKeys(int index) { - if (hmacKeysBuilder_ == null) { - ensureHmacKeysIsMutable(); - hmacKeys_.remove(index); - onChanged(); - } else { - hmacKeysBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.HmacKeyMetadata hmac_keys = 1; - */ - public com.google.storage.v2.HmacKeyMetadata.Builder getHmacKeysBuilder(int index) { - return getHmacKeysFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.HmacKeyMetadata hmac_keys = 1; - */ - public com.google.storage.v2.HmacKeyMetadataOrBuilder getHmacKeysOrBuilder(int index) { - if (hmacKeysBuilder_ == null) { - return hmacKeys_.get(index); - } else { - return hmacKeysBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.HmacKeyMetadata hmac_keys = 1; - */ - public java.util.List - getHmacKeysOrBuilderList() { - if (hmacKeysBuilder_ != null) { - return hmacKeysBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(hmacKeys_); - } - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.HmacKeyMetadata hmac_keys = 1; - */ - public com.google.storage.v2.HmacKeyMetadata.Builder addHmacKeysBuilder() { - return getHmacKeysFieldBuilder() - .addBuilder(com.google.storage.v2.HmacKeyMetadata.getDefaultInstance()); - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.HmacKeyMetadata hmac_keys = 1; - */ - public com.google.storage.v2.HmacKeyMetadata.Builder addHmacKeysBuilder(int index) { - return getHmacKeysFieldBuilder() - .addBuilder(index, com.google.storage.v2.HmacKeyMetadata.getDefaultInstance()); - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.HmacKeyMetadata hmac_keys = 1; - */ - public java.util.List getHmacKeysBuilderList() { - return getHmacKeysFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.storage.v2.HmacKeyMetadata, - com.google.storage.v2.HmacKeyMetadata.Builder, - com.google.storage.v2.HmacKeyMetadataOrBuilder> - getHmacKeysFieldBuilder() { - if (hmacKeysBuilder_ == null) { - hmacKeysBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.storage.v2.HmacKeyMetadata, - com.google.storage.v2.HmacKeyMetadata.Builder, - com.google.storage.v2.HmacKeyMetadataOrBuilder>( - hmacKeys_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - hmacKeys_ = null; - } - return hmacKeysBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - * - * - *
-     * The continuation token, used to page through large result sets. Provide
-     * this value in a subsequent request to return the next page of results.
-     * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * The continuation token, used to page through large result sets. Provide
-     * this value in a subsequent request to return the next page of results.
-     * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - public com.google.protobuf.ByteString getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * The continuation token, used to page through large result sets. Provide
-     * this value in a subsequent request to return the next page of results.
-     * 
- * - * string next_page_token = 2; - * - * @param value The nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageToken(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - nextPageToken_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * The continuation token, used to page through large result sets. Provide
-     * this value in a subsequent request to return the next page of results.
-     * 
- * - * string next_page_token = 2; - * - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - nextPageToken_ = getDefaultInstance().getNextPageToken(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * The continuation token, used to page through large result sets. Provide
-     * this value in a subsequent request to return the next page of results.
-     * 
- * - * string next_page_token = 2; - * - * @param value The bytes for nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - nextPageToken_ = value; - bitField0_ |= 0x00000002; - 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.ListHmacKeysResponse) - } - - // @@protoc_insertion_point(class_scope:google.storage.v2.ListHmacKeysResponse) - private static final com.google.storage.v2.ListHmacKeysResponse DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.storage.v2.ListHmacKeysResponse(); - } - - public static com.google.storage.v2.ListHmacKeysResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListHmacKeysResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - 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.ListHmacKeysResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListHmacKeysResponseOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListHmacKeysResponseOrBuilder.java deleted file mode 100644 index 67b9061ee..000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListHmacKeysResponseOrBuilder.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright 2024 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/storage/v2/storage.proto - -// Protobuf Java Version: 3.25.5 -package com.google.storage.v2; - -public interface ListHmacKeysResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.storage.v2.ListHmacKeysResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The list of items.
-   * 
- * - * repeated .google.storage.v2.HmacKeyMetadata hmac_keys = 1; - */ - java.util.List getHmacKeysList(); - /** - * - * - *
-   * The list of items.
-   * 
- * - * repeated .google.storage.v2.HmacKeyMetadata hmac_keys = 1; - */ - com.google.storage.v2.HmacKeyMetadata getHmacKeys(int index); - /** - * - * - *
-   * The list of items.
-   * 
- * - * repeated .google.storage.v2.HmacKeyMetadata hmac_keys = 1; - */ - int getHmacKeysCount(); - /** - * - * - *
-   * The list of items.
-   * 
- * - * repeated .google.storage.v2.HmacKeyMetadata hmac_keys = 1; - */ - java.util.List - getHmacKeysOrBuilderList(); - /** - * - * - *
-   * The list of items.
-   * 
- * - * repeated .google.storage.v2.HmacKeyMetadata hmac_keys = 1; - */ - com.google.storage.v2.HmacKeyMetadataOrBuilder getHmacKeysOrBuilder(int index); - - /** - * - * - *
-   * The continuation token, used to page through large result sets. Provide
-   * this value in a subsequent request to return the next page of results.
-   * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - * - * - *
-   * The continuation token, used to page through large result sets. Provide
-   * this value in a subsequent request to return the next page of results.
-   * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString getNextPageTokenBytes(); -} diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListNotificationConfigsRequest.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListNotificationConfigsRequest.java deleted file mode 100644 index 3d208d8c2..000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListNotificationConfigsRequest.java +++ /dev/null @@ -1,951 +0,0 @@ -/* - * Copyright 2024 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/storage/v2/storage.proto - -// Protobuf Java Version: 3.25.5 -package com.google.storage.v2; - -/** - * - * - *
- * Request message for ListNotifications.
- * 
- * - * Protobuf type {@code google.storage.v2.ListNotificationConfigsRequest} - */ -public final class ListNotificationConfigsRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.storage.v2.ListNotificationConfigsRequest) - ListNotificationConfigsRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListNotificationConfigsRequest.newBuilder() to construct. - private ListNotificationConfigsRequest( - com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListNotificationConfigsRequest() { - parent_ = ""; - pageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListNotificationConfigsRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_ListNotificationConfigsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_ListNotificationConfigsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.ListNotificationConfigsRequest.class, - com.google.storage.v2.ListNotificationConfigsRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object parent_ = ""; - /** - * - * - *
-   * Required. Name of a Google Cloud Storage bucket.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - 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(); - parent_ = s; - return s; - } - } - /** - * - * - *
-   * Required. Name of a Google Cloud Storage bucket.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 2; - private int pageSize_ = 0; - /** - * - * - *
-   * Optional. The maximum number of NotificationConfigs to return. The service
-   * may return fewer than this value. The default value is 100. Specifying a
-   * value above 100 will result in a page_size of 100.
-   * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object pageToken_ = ""; - /** - * - * - *
-   * Optional. A page token, received from a previous `ListNotificationConfigs`
-   * call. Provide this to retrieve the subsequent page.
-   *
-   * When paginating, all other parameters provided to `ListNotificationConfigs`
-   * must match the call that provided the page token.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - 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(); - pageToken_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A page token, received from a previous `ListNotificationConfigs`
-   * call. Provide this to retrieve the subsequent page.
-   *
-   * When paginating, all other parameters provided to `ListNotificationConfigs`
-   * must match the call that provided the page token.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); - } - size += getUnknownFields().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.ListNotificationConfigsRequest)) { - return super.equals(obj); - } - com.google.storage.v2.ListNotificationConfigsRequest other = - (com.google.storage.v2.ListNotificationConfigsRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (getPageSize() != other.getPageSize()) return false; - if (!getPageToken().equals(other.getPageToken())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) 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) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.storage.v2.ListNotificationConfigsRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.ListNotificationConfigsRequest 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.ListNotificationConfigsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.ListNotificationConfigsRequest 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.ListNotificationConfigsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.ListNotificationConfigsRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.storage.v2.ListNotificationConfigsRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.storage.v2.ListNotificationConfigsRequest 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.ListNotificationConfigsRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.storage.v2.ListNotificationConfigsRequest 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.ListNotificationConfigsRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.storage.v2.ListNotificationConfigsRequest 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.ListNotificationConfigsRequest 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; - } - /** - * - * - *
-   * Request message for ListNotifications.
-   * 
- * - * Protobuf type {@code google.storage.v2.ListNotificationConfigsRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.storage.v2.ListNotificationConfigsRequest) - com.google.storage.v2.ListNotificationConfigsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_ListNotificationConfigsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_ListNotificationConfigsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.ListNotificationConfigsRequest.class, - com.google.storage.v2.ListNotificationConfigsRequest.Builder.class); - } - - // Construct using com.google.storage.v2.ListNotificationConfigsRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - parent_ = ""; - pageSize_ = 0; - pageToken_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_ListNotificationConfigsRequest_descriptor; - } - - @java.lang.Override - public com.google.storage.v2.ListNotificationConfigsRequest getDefaultInstanceForType() { - return com.google.storage.v2.ListNotificationConfigsRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.storage.v2.ListNotificationConfigsRequest build() { - com.google.storage.v2.ListNotificationConfigsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.storage.v2.ListNotificationConfigsRequest buildPartial() { - com.google.storage.v2.ListNotificationConfigsRequest result = - new com.google.storage.v2.ListNotificationConfigsRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.storage.v2.ListNotificationConfigsRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.parent_ = parent_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.pageSize_ = pageSize_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.pageToken_ = pageToken_; - } - } - - @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.ListNotificationConfigsRequest) { - return mergeFrom((com.google.storage.v2.ListNotificationConfigsRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.storage.v2.ListNotificationConfigsRequest other) { - if (other == com.google.storage.v2.ListNotificationConfigsRequest.getDefaultInstance()) - return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - bitField0_ |= 0x00000004; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - 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 { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - parent_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 16: - { - pageSize_ = input.readInt32(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 26: - { - pageToken_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object parent_ = ""; - /** - * - * - *
-     * Required. Name of a Google Cloud Storage bucket.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. Name of a Google Cloud Storage bucket.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. Name of a Google Cloud Storage bucket.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Name of a Google Cloud Storage bucket.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearParent() { - parent_ = getDefaultInstance().getParent(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Name of a Google Cloud Storage bucket.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private int pageSize_; - /** - * - * - *
-     * Optional. The maximum number of NotificationConfigs to return. The service
-     * may return fewer than this value. The default value is 100. Specifying a
-     * value above 100 will result in a page_size of 100.
-     * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - * - * - *
-     * Optional. The maximum number of NotificationConfigs to return. The service
-     * may return fewer than this value. The default value is 100. Specifying a
-     * value above 100 will result in a page_size of 100.
-     * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The maximum number of NotificationConfigs to return. The service
-     * may return fewer than this value. The default value is 100. Specifying a
-     * value above 100 will result in a page_size of 100.
-     * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearPageSize() { - bitField0_ = (bitField0_ & ~0x00000002); - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - * - * - *
-     * Optional. A page token, received from a previous `ListNotificationConfigs`
-     * call. Provide this to retrieve the subsequent page.
-     *
-     * When paginating, all other parameters provided to `ListNotificationConfigs`
-     * must match the call that provided the page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A page token, received from a previous `ListNotificationConfigs`
-     * call. Provide this to retrieve the subsequent page.
-     *
-     * When paginating, all other parameters provided to `ListNotificationConfigs`
-     * must match the call that provided the page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A page token, received from a previous `ListNotificationConfigs`
-     * call. Provide this to retrieve the subsequent page.
-     *
-     * When paginating, all other parameters provided to `ListNotificationConfigs`
-     * must match the call that provided the page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - pageToken_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A page token, received from a previous `ListNotificationConfigs`
-     * call. Provide this to retrieve the subsequent page.
-     *
-     * When paginating, all other parameters provided to `ListNotificationConfigs`
-     * must match the call that provided the page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearPageToken() { - pageToken_ = getDefaultInstance().getPageToken(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A page token, received from a previous `ListNotificationConfigs`
-     * call. Provide this to retrieve the subsequent page.
-     *
-     * When paginating, all other parameters provided to `ListNotificationConfigs`
-     * must match the call that provided the page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - pageToken_ = value; - bitField0_ |= 0x00000004; - 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.ListNotificationConfigsRequest) - } - - // @@protoc_insertion_point(class_scope:google.storage.v2.ListNotificationConfigsRequest) - private static final com.google.storage.v2.ListNotificationConfigsRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.storage.v2.ListNotificationConfigsRequest(); - } - - public static com.google.storage.v2.ListNotificationConfigsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListNotificationConfigsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - 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.ListNotificationConfigsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListNotificationConfigsRequestOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListNotificationConfigsRequestOrBuilder.java deleted file mode 100644 index 05fd43cf4..000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListNotificationConfigsRequestOrBuilder.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright 2024 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/storage/v2/storage.proto - -// Protobuf Java Version: 3.25.5 -package com.google.storage.v2; - -public interface ListNotificationConfigsRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.storage.v2.ListNotificationConfigsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Name of a Google Cloud Storage bucket.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-   * Required. Name of a Google Cloud Storage bucket.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - com.google.protobuf.ByteString getParentBytes(); - - /** - * - * - *
-   * Optional. The maximum number of NotificationConfigs to return. The service
-   * may return fewer than this value. The default value is 100. Specifying a
-   * value above 100 will result in a page_size of 100.
-   * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageSize. - */ - int getPageSize(); - - /** - * - * - *
-   * Optional. A page token, received from a previous `ListNotificationConfigs`
-   * call. Provide this to retrieve the subsequent page.
-   *
-   * When paginating, all other parameters provided to `ListNotificationConfigs`
-   * must match the call that provided the page token.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - * - * - *
-   * Optional. A page token, received from a previous `ListNotificationConfigs`
-   * call. Provide this to retrieve the subsequent page.
-   *
-   * When paginating, all other parameters provided to `ListNotificationConfigs`
-   * must match the call that provided the page token.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString getPageTokenBytes(); -} diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListNotificationConfigsResponse.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListNotificationConfigsResponse.java deleted file mode 100644 index aadd41361..000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListNotificationConfigsResponse.java +++ /dev/null @@ -1,1139 +0,0 @@ -/* - * Copyright 2024 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/storage/v2/storage.proto - -// Protobuf Java Version: 3.25.5 -package com.google.storage.v2; - -/** - * - * - *
- * The result of a call to ListNotificationConfigs
- * 
- * - * Protobuf type {@code google.storage.v2.ListNotificationConfigsResponse} - */ -public final class ListNotificationConfigsResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.storage.v2.ListNotificationConfigsResponse) - ListNotificationConfigsResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListNotificationConfigsResponse.newBuilder() to construct. - private ListNotificationConfigsResponse( - com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListNotificationConfigsResponse() { - notificationConfigs_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListNotificationConfigsResponse(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_ListNotificationConfigsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_ListNotificationConfigsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.ListNotificationConfigsResponse.class, - com.google.storage.v2.ListNotificationConfigsResponse.Builder.class); - } - - public static final int NOTIFICATION_CONFIGS_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private java.util.List notificationConfigs_; - /** - * - * - *
-   * The list of items.
-   * 
- * - * repeated .google.storage.v2.NotificationConfig notification_configs = 1; - */ - @java.lang.Override - public java.util.List getNotificationConfigsList() { - return notificationConfigs_; - } - /** - * - * - *
-   * The list of items.
-   * 
- * - * repeated .google.storage.v2.NotificationConfig notification_configs = 1; - */ - @java.lang.Override - public java.util.List - getNotificationConfigsOrBuilderList() { - return notificationConfigs_; - } - /** - * - * - *
-   * The list of items.
-   * 
- * - * repeated .google.storage.v2.NotificationConfig notification_configs = 1; - */ - @java.lang.Override - public int getNotificationConfigsCount() { - return notificationConfigs_.size(); - } - /** - * - * - *
-   * The list of items.
-   * 
- * - * repeated .google.storage.v2.NotificationConfig notification_configs = 1; - */ - @java.lang.Override - public com.google.storage.v2.NotificationConfig getNotificationConfigs(int index) { - return notificationConfigs_.get(index); - } - /** - * - * - *
-   * The list of items.
-   * 
- * - * repeated .google.storage.v2.NotificationConfig notification_configs = 1; - */ - @java.lang.Override - public com.google.storage.v2.NotificationConfigOrBuilder getNotificationConfigsOrBuilder( - int index) { - return notificationConfigs_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object nextPageToken_ = ""; - /** - * - * - *
-   * A token, which can be sent as `page_token` to retrieve the next page.
-   * If this field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - @java.lang.Override - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - 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(); - nextPageToken_ = s; - return s; - } - } - /** - * - * - *
-   * A token, which can be sent as `page_token` to retrieve the next page.
-   * If this field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 { - for (int i = 0; i < notificationConfigs_.size(); i++) { - output.writeMessage(1, notificationConfigs_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < notificationConfigs_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(1, notificationConfigs_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - size += getUnknownFields().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.ListNotificationConfigsResponse)) { - return super.equals(obj); - } - com.google.storage.v2.ListNotificationConfigsResponse other = - (com.google.storage.v2.ListNotificationConfigsResponse) obj; - - if (!getNotificationConfigsList().equals(other.getNotificationConfigsList())) return false; - if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getNotificationConfigsCount() > 0) { - hash = (37 * hash) + NOTIFICATION_CONFIGS_FIELD_NUMBER; - hash = (53 * hash) + getNotificationConfigsList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.storage.v2.ListNotificationConfigsResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.ListNotificationConfigsResponse 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.ListNotificationConfigsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.ListNotificationConfigsResponse 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.ListNotificationConfigsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.ListNotificationConfigsResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.storage.v2.ListNotificationConfigsResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.storage.v2.ListNotificationConfigsResponse 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.ListNotificationConfigsResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.storage.v2.ListNotificationConfigsResponse 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.ListNotificationConfigsResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.storage.v2.ListNotificationConfigsResponse 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.ListNotificationConfigsResponse 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; - } - /** - * - * - *
-   * The result of a call to ListNotificationConfigs
-   * 
- * - * Protobuf type {@code google.storage.v2.ListNotificationConfigsResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.storage.v2.ListNotificationConfigsResponse) - com.google.storage.v2.ListNotificationConfigsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_ListNotificationConfigsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_ListNotificationConfigsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.ListNotificationConfigsResponse.class, - com.google.storage.v2.ListNotificationConfigsResponse.Builder.class); - } - - // Construct using com.google.storage.v2.ListNotificationConfigsResponse.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (notificationConfigsBuilder_ == null) { - notificationConfigs_ = java.util.Collections.emptyList(); - } else { - notificationConfigs_ = null; - notificationConfigsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - nextPageToken_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_ListNotificationConfigsResponse_descriptor; - } - - @java.lang.Override - public com.google.storage.v2.ListNotificationConfigsResponse getDefaultInstanceForType() { - return com.google.storage.v2.ListNotificationConfigsResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.storage.v2.ListNotificationConfigsResponse build() { - com.google.storage.v2.ListNotificationConfigsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.storage.v2.ListNotificationConfigsResponse buildPartial() { - com.google.storage.v2.ListNotificationConfigsResponse result = - new com.google.storage.v2.ListNotificationConfigsResponse(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields( - com.google.storage.v2.ListNotificationConfigsResponse result) { - if (notificationConfigsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - notificationConfigs_ = java.util.Collections.unmodifiableList(notificationConfigs_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.notificationConfigs_ = notificationConfigs_; - } else { - result.notificationConfigs_ = notificationConfigsBuilder_.build(); - } - } - - private void buildPartial0(com.google.storage.v2.ListNotificationConfigsResponse result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.nextPageToken_ = nextPageToken_; - } - } - - @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.ListNotificationConfigsResponse) { - return mergeFrom((com.google.storage.v2.ListNotificationConfigsResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.storage.v2.ListNotificationConfigsResponse other) { - if (other == com.google.storage.v2.ListNotificationConfigsResponse.getDefaultInstance()) - return this; - if (notificationConfigsBuilder_ == null) { - if (!other.notificationConfigs_.isEmpty()) { - if (notificationConfigs_.isEmpty()) { - notificationConfigs_ = other.notificationConfigs_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureNotificationConfigsIsMutable(); - notificationConfigs_.addAll(other.notificationConfigs_); - } - onChanged(); - } - } else { - if (!other.notificationConfigs_.isEmpty()) { - if (notificationConfigsBuilder_.isEmpty()) { - notificationConfigsBuilder_.dispose(); - notificationConfigsBuilder_ = null; - notificationConfigs_ = other.notificationConfigs_; - bitField0_ = (bitField0_ & ~0x00000001); - notificationConfigsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getNotificationConfigsFieldBuilder() - : null; - } else { - notificationConfigsBuilder_.addAllMessages(other.notificationConfigs_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - bitField0_ |= 0x00000002; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - 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 { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.storage.v2.NotificationConfig m = - input.readMessage( - com.google.storage.v2.NotificationConfig.parser(), extensionRegistry); - if (notificationConfigsBuilder_ == null) { - ensureNotificationConfigsIsMutable(); - notificationConfigs_.add(m); - } else { - notificationConfigsBuilder_.addMessage(m); - } - break; - } // case 10 - case 18: - { - nextPageToken_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.util.List notificationConfigs_ = - java.util.Collections.emptyList(); - - private void ensureNotificationConfigsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - notificationConfigs_ = - new java.util.ArrayList(notificationConfigs_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.storage.v2.NotificationConfig, - com.google.storage.v2.NotificationConfig.Builder, - com.google.storage.v2.NotificationConfigOrBuilder> - notificationConfigsBuilder_; - - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.NotificationConfig notification_configs = 1; - */ - public java.util.List getNotificationConfigsList() { - if (notificationConfigsBuilder_ == null) { - return java.util.Collections.unmodifiableList(notificationConfigs_); - } else { - return notificationConfigsBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.NotificationConfig notification_configs = 1; - */ - public int getNotificationConfigsCount() { - if (notificationConfigsBuilder_ == null) { - return notificationConfigs_.size(); - } else { - return notificationConfigsBuilder_.getCount(); - } - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.NotificationConfig notification_configs = 1; - */ - public com.google.storage.v2.NotificationConfig getNotificationConfigs(int index) { - if (notificationConfigsBuilder_ == null) { - return notificationConfigs_.get(index); - } else { - return notificationConfigsBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.NotificationConfig notification_configs = 1; - */ - public Builder setNotificationConfigs( - int index, com.google.storage.v2.NotificationConfig value) { - if (notificationConfigsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNotificationConfigsIsMutable(); - notificationConfigs_.set(index, value); - onChanged(); - } else { - notificationConfigsBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.NotificationConfig notification_configs = 1; - */ - public Builder setNotificationConfigs( - int index, com.google.storage.v2.NotificationConfig.Builder builderForValue) { - if (notificationConfigsBuilder_ == null) { - ensureNotificationConfigsIsMutable(); - notificationConfigs_.set(index, builderForValue.build()); - onChanged(); - } else { - notificationConfigsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.NotificationConfig notification_configs = 1; - */ - public Builder addNotificationConfigs(com.google.storage.v2.NotificationConfig value) { - if (notificationConfigsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNotificationConfigsIsMutable(); - notificationConfigs_.add(value); - onChanged(); - } else { - notificationConfigsBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.NotificationConfig notification_configs = 1; - */ - public Builder addNotificationConfigs( - int index, com.google.storage.v2.NotificationConfig value) { - if (notificationConfigsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNotificationConfigsIsMutable(); - notificationConfigs_.add(index, value); - onChanged(); - } else { - notificationConfigsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.NotificationConfig notification_configs = 1; - */ - public Builder addNotificationConfigs( - com.google.storage.v2.NotificationConfig.Builder builderForValue) { - if (notificationConfigsBuilder_ == null) { - ensureNotificationConfigsIsMutable(); - notificationConfigs_.add(builderForValue.build()); - onChanged(); - } else { - notificationConfigsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.NotificationConfig notification_configs = 1; - */ - public Builder addNotificationConfigs( - int index, com.google.storage.v2.NotificationConfig.Builder builderForValue) { - if (notificationConfigsBuilder_ == null) { - ensureNotificationConfigsIsMutable(); - notificationConfigs_.add(index, builderForValue.build()); - onChanged(); - } else { - notificationConfigsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.NotificationConfig notification_configs = 1; - */ - public Builder addAllNotificationConfigs( - java.lang.Iterable values) { - if (notificationConfigsBuilder_ == null) { - ensureNotificationConfigsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, notificationConfigs_); - onChanged(); - } else { - notificationConfigsBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.NotificationConfig notification_configs = 1; - */ - public Builder clearNotificationConfigs() { - if (notificationConfigsBuilder_ == null) { - notificationConfigs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - notificationConfigsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.NotificationConfig notification_configs = 1; - */ - public Builder removeNotificationConfigs(int index) { - if (notificationConfigsBuilder_ == null) { - ensureNotificationConfigsIsMutable(); - notificationConfigs_.remove(index); - onChanged(); - } else { - notificationConfigsBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.NotificationConfig notification_configs = 1; - */ - public com.google.storage.v2.NotificationConfig.Builder getNotificationConfigsBuilder( - int index) { - return getNotificationConfigsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.NotificationConfig notification_configs = 1; - */ - public com.google.storage.v2.NotificationConfigOrBuilder getNotificationConfigsOrBuilder( - int index) { - if (notificationConfigsBuilder_ == null) { - return notificationConfigs_.get(index); - } else { - return notificationConfigsBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.NotificationConfig notification_configs = 1; - */ - public java.util.List - getNotificationConfigsOrBuilderList() { - if (notificationConfigsBuilder_ != null) { - return notificationConfigsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(notificationConfigs_); - } - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.NotificationConfig notification_configs = 1; - */ - public com.google.storage.v2.NotificationConfig.Builder addNotificationConfigsBuilder() { - return getNotificationConfigsFieldBuilder() - .addBuilder(com.google.storage.v2.NotificationConfig.getDefaultInstance()); - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.NotificationConfig notification_configs = 1; - */ - public com.google.storage.v2.NotificationConfig.Builder addNotificationConfigsBuilder( - int index) { - return getNotificationConfigsFieldBuilder() - .addBuilder(index, com.google.storage.v2.NotificationConfig.getDefaultInstance()); - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.NotificationConfig notification_configs = 1; - */ - public java.util.List - getNotificationConfigsBuilderList() { - return getNotificationConfigsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.storage.v2.NotificationConfig, - com.google.storage.v2.NotificationConfig.Builder, - com.google.storage.v2.NotificationConfigOrBuilder> - getNotificationConfigsFieldBuilder() { - if (notificationConfigsBuilder_ == null) { - notificationConfigsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.storage.v2.NotificationConfig, - com.google.storage.v2.NotificationConfig.Builder, - com.google.storage.v2.NotificationConfigOrBuilder>( - notificationConfigs_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - notificationConfigs_ = null; - } - return notificationConfigsBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - * - * - *
-     * A token, which can be sent as `page_token` to retrieve the next page.
-     * If this field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * A token, which can be sent as `page_token` to retrieve the next page.
-     * If this field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - public com.google.protobuf.ByteString getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * A token, which can be sent as `page_token` to retrieve the next page.
-     * If this field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @param value The nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageToken(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - nextPageToken_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * A token, which can be sent as `page_token` to retrieve the next page.
-     * If this field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - nextPageToken_ = getDefaultInstance().getNextPageToken(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * A token, which can be sent as `page_token` to retrieve the next page.
-     * If this field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @param value The bytes for nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - nextPageToken_ = value; - bitField0_ |= 0x00000002; - 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.ListNotificationConfigsResponse) - } - - // @@protoc_insertion_point(class_scope:google.storage.v2.ListNotificationConfigsResponse) - private static final com.google.storage.v2.ListNotificationConfigsResponse DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.storage.v2.ListNotificationConfigsResponse(); - } - - public static com.google.storage.v2.ListNotificationConfigsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListNotificationConfigsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - 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.ListNotificationConfigsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListNotificationConfigsResponseOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListNotificationConfigsResponseOrBuilder.java deleted file mode 100644 index 54075ea69..000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListNotificationConfigsResponseOrBuilder.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright 2024 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/storage/v2/storage.proto - -// Protobuf Java Version: 3.25.5 -package com.google.storage.v2; - -public interface ListNotificationConfigsResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.storage.v2.ListNotificationConfigsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The list of items.
-   * 
- * - * repeated .google.storage.v2.NotificationConfig notification_configs = 1; - */ - java.util.List getNotificationConfigsList(); - /** - * - * - *
-   * The list of items.
-   * 
- * - * repeated .google.storage.v2.NotificationConfig notification_configs = 1; - */ - com.google.storage.v2.NotificationConfig getNotificationConfigs(int index); - /** - * - * - *
-   * The list of items.
-   * 
- * - * repeated .google.storage.v2.NotificationConfig notification_configs = 1; - */ - int getNotificationConfigsCount(); - /** - * - * - *
-   * The list of items.
-   * 
- * - * repeated .google.storage.v2.NotificationConfig notification_configs = 1; - */ - java.util.List - getNotificationConfigsOrBuilderList(); - /** - * - * - *
-   * The list of items.
-   * 
- * - * repeated .google.storage.v2.NotificationConfig notification_configs = 1; - */ - com.google.storage.v2.NotificationConfigOrBuilder getNotificationConfigsOrBuilder(int index); - - /** - * - * - *
-   * A token, which can be sent as `page_token` to retrieve the next page.
-   * If this field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - * - * - *
-   * A token, which can be sent as `page_token` to retrieve the next page.
-   * If this field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString getNextPageTokenBytes(); -} diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/NotificationConfig.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/NotificationConfig.java deleted file mode 100644 index 3b22eef1b..000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/NotificationConfig.java +++ /dev/null @@ -1,2075 +0,0 @@ -/* - * Copyright 2024 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/storage/v2/storage.proto - -// Protobuf Java Version: 3.25.5 -package com.google.storage.v2; - -/** - * - * - *
- * A directive to publish Pub/Sub notifications upon changes to a bucket.
- * 
- * - * Protobuf type {@code google.storage.v2.NotificationConfig} - */ -public final class NotificationConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.storage.v2.NotificationConfig) - NotificationConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use NotificationConfig.newBuilder() to construct. - private NotificationConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private NotificationConfig() { - name_ = ""; - topic_ = ""; - etag_ = ""; - eventTypes_ = com.google.protobuf.LazyStringArrayList.emptyList(); - objectNamePrefix_ = ""; - payloadFormat_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new NotificationConfig(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_NotificationConfig_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 4: - return internalGetCustomAttributes(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_NotificationConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.NotificationConfig.class, - com.google.storage.v2.NotificationConfig.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - * - * - *
-   * Required. The resource name of this NotificationConfig.
-   * Format:
-   * `projects/{project}/buckets/{bucket}/notificationConfigs/{notificationConfig}`
-   * The `{project}` portion may be `_` for globally unique buckets.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - 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(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The resource name of this NotificationConfig.
-   * Format:
-   * `projects/{project}/buckets/{bucket}/notificationConfigs/{notificationConfig}`
-   * The `{project}` portion may be `_` for globally unique buckets.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TOPIC_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object topic_ = ""; - /** - * - * - *
-   * Required. The Pub/Sub topic to which this subscription publishes. Formatted
-   * as:
-   * '//pubsub.googleapis.com/projects/{project-identifier}/topics/{my-topic}'
-   * 
- * - * string topic = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The topic. - */ - @java.lang.Override - public java.lang.String getTopic() { - java.lang.Object ref = topic_; - 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(); - topic_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The Pub/Sub topic to which this subscription publishes. Formatted
-   * as:
-   * '//pubsub.googleapis.com/projects/{project-identifier}/topics/{my-topic}'
-   * 
- * - * string topic = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for topic. - */ - @java.lang.Override - public com.google.protobuf.ByteString getTopicBytes() { - java.lang.Object ref = topic_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - topic_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ETAG_FIELD_NUMBER = 7; - - @SuppressWarnings("serial") - private volatile java.lang.Object etag_ = ""; - /** - * - * - *
-   * Optional. The etag of the NotificationConfig.
-   * If included in the metadata of GetNotificationConfigRequest, the operation
-   * will only be performed if the etag matches that of the NotificationConfig.
-   * 
- * - * string etag = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - } - /** - * - * - *
-   * Optional. The etag of the NotificationConfig.
-   * If included in the metadata of GetNotificationConfigRequest, the operation
-   * will only be performed if the etag matches that of the NotificationConfig.
-   * 
- * - * string etag = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList eventTypes_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - /** - * - * - *
-   * 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]; - * - * @return A list containing the eventTypes. - */ - public com.google.protobuf.ProtocolStringList getEventTypesList() { - return eventTypes_; - } - /** - * - * - *
-   * 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]; - * - * @return The count of eventTypes. - */ - public int getEventTypesCount() { - return eventTypes_.size(); - } - /** - * - * - *
-   * 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]; - * - * @param index The index of the element to return. - * @return The eventTypes at the given index. - */ - public java.lang.String getEventTypes(int index) { - return eventTypes_.get(index); - } - /** - * - * - *
-   * 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]; - * - * @param index The index of the value to return. - * @return The bytes of the eventTypes at the given index. - */ - public com.google.protobuf.ByteString getEventTypesBytes(int index) { - return eventTypes_.getByteString(index); - } - - public static final int CUSTOM_ATTRIBUTES_FIELD_NUMBER = 4; - - private static final class CustomAttributesDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_NotificationConfig_CustomAttributesEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - - @SuppressWarnings("serial") - private com.google.protobuf.MapField customAttributes_; - - private com.google.protobuf.MapField - internalGetCustomAttributes() { - if (customAttributes_ == null) { - return com.google.protobuf.MapField.emptyMapField( - CustomAttributesDefaultEntryHolder.defaultEntry); - } - return customAttributes_; - } - - public int getCustomAttributesCount() { - return internalGetCustomAttributes().getMap().size(); - } - /** - * - * - *
-   * Optional. A list of additional attributes to attach to each Pub/Sub
-   * message published for this NotificationConfig.
-   * 
- * - * - * map<string, string> custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public boolean containsCustomAttributes(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetCustomAttributes().getMap().containsKey(key); - } - /** Use {@link #getCustomAttributesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getCustomAttributes() { - return getCustomAttributesMap(); - } - /** - * - * - *
-   * Optional. A list of additional attributes to attach to each Pub/Sub
-   * message published for this NotificationConfig.
-   * 
- * - * - * map<string, string> custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.Map getCustomAttributesMap() { - return internalGetCustomAttributes().getMap(); - } - /** - * - * - *
-   * Optional. A list of additional attributes to attach to each Pub/Sub
-   * message published for this NotificationConfig.
-   * 
- * - * - * map<string, string> custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public /* nullable */ java.lang.String getCustomAttributesOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetCustomAttributes().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * Optional. A list of additional attributes to attach to each Pub/Sub
-   * message published for this NotificationConfig.
-   * 
- * - * - * map<string, string> custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getCustomAttributesOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetCustomAttributes().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int OBJECT_NAME_PREFIX_FIELD_NUMBER = 5; - - @SuppressWarnings("serial") - private volatile java.lang.Object objectNamePrefix_ = ""; - /** - * - * - *
-   * Optional. If present, only apply this NotificationConfig to object names
-   * that begin with this prefix.
-   * 
- * - * string object_name_prefix = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The objectNamePrefix. - */ - @java.lang.Override - public java.lang.String getObjectNamePrefix() { - java.lang.Object ref = objectNamePrefix_; - 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(); - objectNamePrefix_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. If present, only apply this NotificationConfig to object names
-   * that begin with this prefix.
-   * 
- * - * string object_name_prefix = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for objectNamePrefix. - */ - @java.lang.Override - public com.google.protobuf.ByteString getObjectNamePrefixBytes() { - java.lang.Object ref = objectNamePrefix_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - objectNamePrefix_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAYLOAD_FORMAT_FIELD_NUMBER = 6; - - @SuppressWarnings("serial") - private volatile java.lang.Object payloadFormat_ = ""; - /** - * - * - *
-   * Required. The desired content of the Payload.
-   * 
- * - * string payload_format = 6 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The payloadFormat. - */ - @java.lang.Override - public java.lang.String getPayloadFormat() { - java.lang.Object ref = payloadFormat_; - 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(); - payloadFormat_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The desired content of the Payload.
-   * 
- * - * string payload_format = 6 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for payloadFormat. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPayloadFormatBytes() { - java.lang.Object ref = payloadFormat_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - payloadFormat_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topic_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, topic_); - } - for (int i = 0; i < eventTypes_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, eventTypes_.getRaw(i)); - } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetCustomAttributes(), CustomAttributesDefaultEntryHolder.defaultEntry, 4); - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(objectNamePrefix_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, objectNamePrefix_); - } - 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_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topic_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, topic_); - } - { - int dataSize = 0; - for (int i = 0; i < eventTypes_.size(); i++) { - dataSize += computeStringSizeNoTag(eventTypes_.getRaw(i)); - } - size += dataSize; - size += 1 * getEventTypesList().size(); - } - for (java.util.Map.Entry entry : - internalGetCustomAttributes().getMap().entrySet()) { - com.google.protobuf.MapEntry customAttributes__ = - CustomAttributesDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, customAttributes__); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(objectNamePrefix_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, objectNamePrefix_); - } - 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 += getUnknownFields().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.NotificationConfig)) { - return super.equals(obj); - } - com.google.storage.v2.NotificationConfig other = (com.google.storage.v2.NotificationConfig) 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; - if (!getPayloadFormat().equals(other.getPayloadFormat())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) 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) + NAME_FIELD_NUMBER; - 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(); - } - if (!internalGetCustomAttributes().getMap().isEmpty()) { - hash = (37 * hash) + CUSTOM_ATTRIBUTES_FIELD_NUMBER; - hash = (53 * hash) + internalGetCustomAttributes().hashCode(); - } - hash = (37 * hash) + OBJECT_NAME_PREFIX_FIELD_NUMBER; - hash = (53 * hash) + getObjectNamePrefix().hashCode(); - hash = (37 * hash) + PAYLOAD_FORMAT_FIELD_NUMBER; - hash = (53 * hash) + getPayloadFormat().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.storage.v2.NotificationConfig parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.NotificationConfig 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.NotificationConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.NotificationConfig 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.NotificationConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.NotificationConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.storage.v2.NotificationConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.storage.v2.NotificationConfig 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.NotificationConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.storage.v2.NotificationConfig 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.NotificationConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.storage.v2.NotificationConfig 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.NotificationConfig 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; - } - /** - * - * - *
-   * A directive to publish Pub/Sub notifications upon changes to a bucket.
-   * 
- * - * Protobuf type {@code google.storage.v2.NotificationConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.storage.v2.NotificationConfig) - com.google.storage.v2.NotificationConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_NotificationConfig_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 4: - return internalGetCustomAttributes(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 4: - return internalGetMutableCustomAttributes(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_NotificationConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.NotificationConfig.class, - com.google.storage.v2.NotificationConfig.Builder.class); - } - - // Construct using com.google.storage.v2.NotificationConfig.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - topic_ = ""; - etag_ = ""; - eventTypes_ = com.google.protobuf.LazyStringArrayList.emptyList(); - internalGetMutableCustomAttributes().clear(); - objectNamePrefix_ = ""; - payloadFormat_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_NotificationConfig_descriptor; - } - - @java.lang.Override - public com.google.storage.v2.NotificationConfig getDefaultInstanceForType() { - return com.google.storage.v2.NotificationConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.storage.v2.NotificationConfig build() { - com.google.storage.v2.NotificationConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.storage.v2.NotificationConfig buildPartial() { - com.google.storage.v2.NotificationConfig result = - new com.google.storage.v2.NotificationConfig(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.storage.v2.NotificationConfig result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.topic_ = topic_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.etag_ = etag_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - eventTypes_.makeImmutable(); - result.eventTypes_ = eventTypes_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.customAttributes_ = internalGetCustomAttributes(); - result.customAttributes_.makeImmutable(); - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.objectNamePrefix_ = objectNamePrefix_; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.payloadFormat_ = payloadFormat_; - } - } - - @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.NotificationConfig) { - return mergeFrom((com.google.storage.v2.NotificationConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.storage.v2.NotificationConfig other) { - if (other == com.google.storage.v2.NotificationConfig.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getTopic().isEmpty()) { - topic_ = other.topic_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getEtag().isEmpty()) { - etag_ = other.etag_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (!other.eventTypes_.isEmpty()) { - if (eventTypes_.isEmpty()) { - eventTypes_ = other.eventTypes_; - bitField0_ |= 0x00000008; - } else { - ensureEventTypesIsMutable(); - eventTypes_.addAll(other.eventTypes_); - } - onChanged(); - } - internalGetMutableCustomAttributes().mergeFrom(other.internalGetCustomAttributes()); - bitField0_ |= 0x00000010; - if (!other.getObjectNamePrefix().isEmpty()) { - objectNamePrefix_ = other.objectNamePrefix_; - bitField0_ |= 0x00000020; - onChanged(); - } - if (!other.getPayloadFormat().isEmpty()) { - payloadFormat_ = other.payloadFormat_; - bitField0_ |= 0x00000040; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - 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 { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - topic_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureEventTypesIsMutable(); - eventTypes_.add(s); - break; - } // case 26 - case 34: - { - com.google.protobuf.MapEntry - customAttributes__ = - input.readMessage( - CustomAttributesDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - internalGetMutableCustomAttributes() - .getMutableMap() - .put(customAttributes__.getKey(), customAttributes__.getValue()); - bitField0_ |= 0x00000010; - break; - } // case 34 - case 42: - { - objectNamePrefix_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - break; - } // case 42 - case 50: - { - payloadFormat_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - break; - } // case 50 - case 58: - { - etag_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 58 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. The resource name of this NotificationConfig.
-     * Format:
-     * `projects/{project}/buckets/{bucket}/notificationConfigs/{notificationConfig}`
-     * The `{project}` portion may be `_` for globally unique buckets.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The resource name of this NotificationConfig.
-     * Format:
-     * `projects/{project}/buckets/{bucket}/notificationConfigs/{notificationConfig}`
-     * The `{project}` portion may be `_` for globally unique buckets.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The resource name of this NotificationConfig.
-     * Format:
-     * `projects/{project}/buckets/{bucket}/notificationConfigs/{notificationConfig}`
-     * The `{project}` portion may be `_` for globally unique buckets.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The resource name of this NotificationConfig.
-     * Format:
-     * `projects/{project}/buckets/{bucket}/notificationConfigs/{notificationConfig}`
-     * The `{project}` portion may be `_` for globally unique buckets.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The resource name of this NotificationConfig.
-     * Format:
-     * `projects/{project}/buckets/{bucket}/notificationConfigs/{notificationConfig}`
-     * The `{project}` portion may be `_` for globally unique buckets.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object topic_ = ""; - /** - * - * - *
-     * Required. The Pub/Sub topic to which this subscription publishes. Formatted
-     * as:
-     * '//pubsub.googleapis.com/projects/{project-identifier}/topics/{my-topic}'
-     * 
- * - * string topic = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The topic. - */ - public java.lang.String getTopic() { - java.lang.Object ref = topic_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - topic_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The Pub/Sub topic to which this subscription publishes. Formatted
-     * as:
-     * '//pubsub.googleapis.com/projects/{project-identifier}/topics/{my-topic}'
-     * 
- * - * string topic = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for topic. - */ - public com.google.protobuf.ByteString getTopicBytes() { - java.lang.Object ref = topic_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - topic_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The Pub/Sub topic to which this subscription publishes. Formatted
-     * as:
-     * '//pubsub.googleapis.com/projects/{project-identifier}/topics/{my-topic}'
-     * 
- * - * string topic = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The topic to set. - * @return This builder for chaining. - */ - public Builder setTopic(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - topic_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The Pub/Sub topic to which this subscription publishes. Formatted
-     * as:
-     * '//pubsub.googleapis.com/projects/{project-identifier}/topics/{my-topic}'
-     * 
- * - * string topic = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearTopic() { - topic_ = getDefaultInstance().getTopic(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The Pub/Sub topic to which this subscription publishes. Formatted
-     * as:
-     * '//pubsub.googleapis.com/projects/{project-identifier}/topics/{my-topic}'
-     * 
- * - * string topic = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for topic to set. - * @return This builder for chaining. - */ - public Builder setTopicBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - topic_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.lang.Object etag_ = ""; - /** - * - * - *
-     * Optional. The etag of the NotificationConfig.
-     * If included in the metadata of GetNotificationConfigRequest, the operation
-     * will only be performed if the etag matches that of the NotificationConfig.
-     * 
- * - * string etag = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - } - /** - * - * - *
-     * Optional. The etag of the NotificationConfig.
-     * If included in the metadata of GetNotificationConfigRequest, the operation
-     * will only be performed if the etag matches that of the NotificationConfig.
-     * 
- * - * string etag = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - } - /** - * - * - *
-     * Optional. The etag of the NotificationConfig.
-     * If included in the metadata of GetNotificationConfigRequest, the operation
-     * will only be performed if the etag matches that of the NotificationConfig.
-     * 
- * - * string etag = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The etag of the NotificationConfig.
-     * If included in the metadata of GetNotificationConfigRequest, the operation
-     * will only be performed if the etag matches that of the NotificationConfig.
-     * 
- * - * string etag = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearEtag() { - etag_ = getDefaultInstance().getEtag(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The etag of the NotificationConfig.
-     * If included in the metadata of GetNotificationConfigRequest, the operation
-     * will only be performed if the etag matches that of the NotificationConfig.
-     * 
- * - * string etag = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringArrayList eventTypes_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - - private void ensureEventTypesIsMutable() { - if (!eventTypes_.isModifiable()) { - eventTypes_ = new com.google.protobuf.LazyStringArrayList(eventTypes_); - } - bitField0_ |= 0x00000008; - } - /** - * - * - *
-     * 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]; - * - * @return A list containing the eventTypes. - */ - public com.google.protobuf.ProtocolStringList getEventTypesList() { - eventTypes_.makeImmutable(); - return eventTypes_; - } - /** - * - * - *
-     * 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]; - * - * @return The count of eventTypes. - */ - public int getEventTypesCount() { - return eventTypes_.size(); - } - /** - * - * - *
-     * 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]; - * - * @param index The index of the element to return. - * @return The eventTypes at the given index. - */ - public java.lang.String getEventTypes(int index) { - return eventTypes_.get(index); - } - /** - * - * - *
-     * 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]; - * - * @param index The index of the value to return. - * @return The bytes of the eventTypes at the given index. - */ - public com.google.protobuf.ByteString getEventTypesBytes(int index) { - return eventTypes_.getByteString(index); - } - /** - * - * - *
-     * 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]; - * - * @param index The index to set the value at. - * @param value The eventTypes to set. - * @return This builder for chaining. - */ - public Builder setEventTypes(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureEventTypesIsMutable(); - eventTypes_.set(index, value); - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * 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]; - * - * @param value The eventTypes to add. - * @return This builder for chaining. - */ - public Builder addEventTypes(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureEventTypesIsMutable(); - eventTypes_.add(value); - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * 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]; - * - * @param values The eventTypes to add. - * @return This builder for chaining. - */ - public Builder addAllEventTypes(java.lang.Iterable values) { - ensureEventTypesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, eventTypes_); - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * 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]; - * - * @return This builder for chaining. - */ - public Builder clearEventTypes() { - eventTypes_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - ; - onChanged(); - return this; - } - /** - * - * - *
-     * 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]; - * - * @param value The bytes of the eventTypes to add. - * @return This builder for chaining. - */ - public Builder addEventTypesBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureEventTypesIsMutable(); - eventTypes_.add(value); - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - private com.google.protobuf.MapField customAttributes_; - - private com.google.protobuf.MapField - internalGetCustomAttributes() { - if (customAttributes_ == null) { - return com.google.protobuf.MapField.emptyMapField( - CustomAttributesDefaultEntryHolder.defaultEntry); - } - return customAttributes_; - } - - private com.google.protobuf.MapField - internalGetMutableCustomAttributes() { - if (customAttributes_ == null) { - customAttributes_ = - com.google.protobuf.MapField.newMapField( - CustomAttributesDefaultEntryHolder.defaultEntry); - } - if (!customAttributes_.isMutable()) { - customAttributes_ = customAttributes_.copy(); - } - bitField0_ |= 0x00000010; - onChanged(); - return customAttributes_; - } - - public int getCustomAttributesCount() { - return internalGetCustomAttributes().getMap().size(); - } - /** - * - * - *
-     * Optional. A list of additional attributes to attach to each Pub/Sub
-     * message published for this NotificationConfig.
-     * 
- * - * - * map<string, string> custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public boolean containsCustomAttributes(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetCustomAttributes().getMap().containsKey(key); - } - /** Use {@link #getCustomAttributesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getCustomAttributes() { - return getCustomAttributesMap(); - } - /** - * - * - *
-     * Optional. A list of additional attributes to attach to each Pub/Sub
-     * message published for this NotificationConfig.
-     * 
- * - * - * map<string, string> custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.Map getCustomAttributesMap() { - return internalGetCustomAttributes().getMap(); - } - /** - * - * - *
-     * Optional. A list of additional attributes to attach to each Pub/Sub
-     * message published for this NotificationConfig.
-     * 
- * - * - * map<string, string> custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public /* nullable */ java.lang.String getCustomAttributesOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = - internalGetCustomAttributes().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * Optional. A list of additional attributes to attach to each Pub/Sub
-     * message published for this NotificationConfig.
-     * 
- * - * - * map<string, string> custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getCustomAttributesOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = - internalGetCustomAttributes().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearCustomAttributes() { - bitField0_ = (bitField0_ & ~0x00000010); - internalGetMutableCustomAttributes().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * Optional. A list of additional attributes to attach to each Pub/Sub
-     * message published for this NotificationConfig.
-     * 
- * - * - * map<string, string> custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder removeCustomAttributes(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - internalGetMutableCustomAttributes().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableCustomAttributes() { - bitField0_ |= 0x00000010; - return internalGetMutableCustomAttributes().getMutableMap(); - } - /** - * - * - *
-     * Optional. A list of additional attributes to attach to each Pub/Sub
-     * message published for this NotificationConfig.
-     * 
- * - * - * map<string, string> custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder putCustomAttributes(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new NullPointerException("map key"); - } - if (value == null) { - throw new NullPointerException("map value"); - } - internalGetMutableCustomAttributes().getMutableMap().put(key, value); - bitField0_ |= 0x00000010; - return this; - } - /** - * - * - *
-     * Optional. A list of additional attributes to attach to each Pub/Sub
-     * message published for this NotificationConfig.
-     * 
- * - * - * map<string, string> custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder putAllCustomAttributes( - java.util.Map values) { - internalGetMutableCustomAttributes().getMutableMap().putAll(values); - bitField0_ |= 0x00000010; - return this; - } - - private java.lang.Object objectNamePrefix_ = ""; - /** - * - * - *
-     * Optional. If present, only apply this NotificationConfig to object names
-     * that begin with this prefix.
-     * 
- * - * string object_name_prefix = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The objectNamePrefix. - */ - public java.lang.String getObjectNamePrefix() { - java.lang.Object ref = objectNamePrefix_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - objectNamePrefix_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. If present, only apply this NotificationConfig to object names
-     * that begin with this prefix.
-     * 
- * - * string object_name_prefix = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for objectNamePrefix. - */ - public com.google.protobuf.ByteString getObjectNamePrefixBytes() { - java.lang.Object ref = objectNamePrefix_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - objectNamePrefix_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. If present, only apply this NotificationConfig to object names
-     * that begin with this prefix.
-     * 
- * - * string object_name_prefix = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The objectNamePrefix to set. - * @return This builder for chaining. - */ - public Builder setObjectNamePrefix(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - objectNamePrefix_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. If present, only apply this NotificationConfig to object names
-     * that begin with this prefix.
-     * 
- * - * string object_name_prefix = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearObjectNamePrefix() { - objectNamePrefix_ = getDefaultInstance().getObjectNamePrefix(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. If present, only apply this NotificationConfig to object names
-     * that begin with this prefix.
-     * 
- * - * string object_name_prefix = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for objectNamePrefix to set. - * @return This builder for chaining. - */ - public Builder setObjectNamePrefixBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - objectNamePrefix_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - private java.lang.Object payloadFormat_ = ""; - /** - * - * - *
-     * Required. The desired content of the Payload.
-     * 
- * - * string payload_format = 6 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The payloadFormat. - */ - public java.lang.String getPayloadFormat() { - java.lang.Object ref = payloadFormat_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - payloadFormat_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The desired content of the Payload.
-     * 
- * - * string payload_format = 6 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for payloadFormat. - */ - public com.google.protobuf.ByteString getPayloadFormatBytes() { - java.lang.Object ref = payloadFormat_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - payloadFormat_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The desired content of the Payload.
-     * 
- * - * string payload_format = 6 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The payloadFormat to set. - * @return This builder for chaining. - */ - public Builder setPayloadFormat(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - payloadFormat_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The desired content of the Payload.
-     * 
- * - * string payload_format = 6 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearPayloadFormat() { - payloadFormat_ = getDefaultInstance().getPayloadFormat(); - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The desired content of the Payload.
-     * 
- * - * string payload_format = 6 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for payloadFormat to set. - * @return This builder for chaining. - */ - public Builder setPayloadFormatBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - payloadFormat_ = value; - bitField0_ |= 0x00000040; - 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.NotificationConfig) - } - - // @@protoc_insertion_point(class_scope:google.storage.v2.NotificationConfig) - private static final com.google.storage.v2.NotificationConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.storage.v2.NotificationConfig(); - } - - public static com.google.storage.v2.NotificationConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public NotificationConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - 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.NotificationConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/NotificationConfigName.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/NotificationConfigName.java deleted file mode 100644 index 9d1091b7b..000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/NotificationConfigName.java +++ /dev/null @@ -1,228 +0,0 @@ -/* - * Copyright 2024 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.pathtemplate.PathTemplate; -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -@Generated("by gapic-generator-java") -public class NotificationConfigName implements ResourceName { - private static final PathTemplate PROJECT_BUCKET_NOTIFICATION_CONFIG = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/buckets/{bucket}/notificationConfigs/{notification_config}"); - private volatile Map fieldValuesMap; - private final String project; - private final String bucket; - private final String notificationConfig; - - @Deprecated - protected NotificationConfigName() { - project = null; - bucket = null; - notificationConfig = null; - } - - private NotificationConfigName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - bucket = Preconditions.checkNotNull(builder.getBucket()); - notificationConfig = Preconditions.checkNotNull(builder.getNotificationConfig()); - } - - public String getProject() { - return project; - } - - public String getBucket() { - return bucket; - } - - public String getNotificationConfig() { - return notificationConfig; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static NotificationConfigName of( - String project, String bucket, String notificationConfig) { - return newBuilder() - .setProject(project) - .setBucket(bucket) - .setNotificationConfig(notificationConfig) - .build(); - } - - public static String format(String project, String bucket, String notificationConfig) { - return newBuilder() - .setProject(project) - .setBucket(bucket) - .setNotificationConfig(notificationConfig) - .build() - .toString(); - } - - public static NotificationConfigName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PROJECT_BUCKET_NOTIFICATION_CONFIG.validatedMatch( - formattedString, "NotificationConfigName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("bucket"), matchMap.get("notification_config")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList<>(values.size()); - for (NotificationConfigName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PROJECT_BUCKET_NOTIFICATION_CONFIG.matches(formattedString); - } - - @Override - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - if (project != null) { - fieldMapBuilder.put("project", project); - } - if (bucket != null) { - fieldMapBuilder.put("bucket", bucket); - } - if (notificationConfig != null) { - fieldMapBuilder.put("notification_config", notificationConfig); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PROJECT_BUCKET_NOTIFICATION_CONFIG.instantiate( - "project", project, "bucket", bucket, "notification_config", notificationConfig); - } - - @Override - public boolean equals(java.lang.Object o) { - if (o == this) { - return true; - } - if (o != null && getClass() == o.getClass()) { - NotificationConfigName that = ((NotificationConfigName) o); - return Objects.equals(this.project, that.project) - && Objects.equals(this.bucket, that.bucket) - && Objects.equals(this.notificationConfig, that.notificationConfig); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= Objects.hashCode(project); - h *= 1000003; - h ^= Objects.hashCode(bucket); - h *= 1000003; - h ^= Objects.hashCode(notificationConfig); - return h; - } - - /** Builder for projects/{project}/buckets/{bucket}/notificationConfigs/{notification_config}. */ - public static class Builder { - private String project; - private String bucket; - private String notificationConfig; - - protected Builder() {} - - public String getProject() { - return project; - } - - public String getBucket() { - return bucket; - } - - public String getNotificationConfig() { - return notificationConfig; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setBucket(String bucket) { - this.bucket = bucket; - return this; - } - - public Builder setNotificationConfig(String notificationConfig) { - this.notificationConfig = notificationConfig; - return this; - } - - private Builder(NotificationConfigName notificationConfigName) { - this.project = notificationConfigName.project; - this.bucket = notificationConfigName.bucket; - this.notificationConfig = notificationConfigName.notificationConfig; - } - - public NotificationConfigName build() { - return new NotificationConfigName(this); - } - } -} diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/NotificationConfigOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/NotificationConfigOrBuilder.java deleted file mode 100644 index f18754a19..000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/NotificationConfigOrBuilder.java +++ /dev/null @@ -1,295 +0,0 @@ -/* - * Copyright 2024 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/storage/v2/storage.proto - -// Protobuf Java Version: 3.25.5 -package com.google.storage.v2; - -public interface NotificationConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.storage.v2.NotificationConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The resource name of this NotificationConfig.
-   * Format:
-   * `projects/{project}/buckets/{bucket}/notificationConfigs/{notificationConfig}`
-   * The `{project}` portion may be `_` for globally unique buckets.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. The resource name of this NotificationConfig.
-   * Format:
-   * `projects/{project}/buckets/{bucket}/notificationConfigs/{notificationConfig}`
-   * The `{project}` portion may be `_` for globally unique buckets.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Required. The Pub/Sub topic to which this subscription publishes. Formatted
-   * as:
-   * '//pubsub.googleapis.com/projects/{project-identifier}/topics/{my-topic}'
-   * 
- * - * string topic = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The topic. - */ - java.lang.String getTopic(); - /** - * - * - *
-   * Required. The Pub/Sub topic to which this subscription publishes. Formatted
-   * as:
-   * '//pubsub.googleapis.com/projects/{project-identifier}/topics/{my-topic}'
-   * 
- * - * string topic = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for topic. - */ - com.google.protobuf.ByteString getTopicBytes(); - - /** - * - * - *
-   * Optional. The etag of the NotificationConfig.
-   * If included in the metadata of GetNotificationConfigRequest, the operation
-   * will only be performed if the etag matches that of the NotificationConfig.
-   * 
- * - * string etag = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The etag. - */ - java.lang.String getEtag(); - /** - * - * - *
-   * Optional. The etag of the NotificationConfig.
-   * If included in the metadata of GetNotificationConfigRequest, the operation
-   * will only be performed if the etag matches that of the NotificationConfig.
-   * 
- * - * string etag = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for etag. - */ - com.google.protobuf.ByteString getEtagBytes(); - - /** - * - * - *
-   * 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]; - * - * @return A list containing the eventTypes. - */ - java.util.List getEventTypesList(); - /** - * - * - *
-   * 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]; - * - * @return The count of eventTypes. - */ - int getEventTypesCount(); - /** - * - * - *
-   * 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]; - * - * @param index The index of the element to return. - * @return The eventTypes at the given index. - */ - java.lang.String getEventTypes(int index); - /** - * - * - *
-   * 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]; - * - * @param index The index of the value to return. - * @return The bytes of the eventTypes at the given index. - */ - com.google.protobuf.ByteString getEventTypesBytes(int index); - - /** - * - * - *
-   * Optional. A list of additional attributes to attach to each Pub/Sub
-   * message published for this NotificationConfig.
-   * 
- * - * - * map<string, string> custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - int getCustomAttributesCount(); - /** - * - * - *
-   * Optional. A list of additional attributes to attach to each Pub/Sub
-   * message published for this NotificationConfig.
-   * 
- * - * - * map<string, string> custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - boolean containsCustomAttributes(java.lang.String key); - /** Use {@link #getCustomAttributesMap()} instead. */ - @java.lang.Deprecated - java.util.Map getCustomAttributes(); - /** - * - * - *
-   * Optional. A list of additional attributes to attach to each Pub/Sub
-   * message published for this NotificationConfig.
-   * 
- * - * - * map<string, string> custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.Map getCustomAttributesMap(); - /** - * - * - *
-   * Optional. A list of additional attributes to attach to each Pub/Sub
-   * message published for this NotificationConfig.
-   * 
- * - * - * map<string, string> custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - /* nullable */ - java.lang.String getCustomAttributesOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue); - /** - * - * - *
-   * Optional. A list of additional attributes to attach to each Pub/Sub
-   * message published for this NotificationConfig.
-   * 
- * - * - * map<string, string> custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.lang.String getCustomAttributesOrThrow(java.lang.String key); - - /** - * - * - *
-   * Optional. If present, only apply this NotificationConfig to object names
-   * that begin with this prefix.
-   * 
- * - * string object_name_prefix = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The objectNamePrefix. - */ - java.lang.String getObjectNamePrefix(); - /** - * - * - *
-   * Optional. If present, only apply this NotificationConfig to object names
-   * that begin with this prefix.
-   * 
- * - * string object_name_prefix = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for objectNamePrefix. - */ - com.google.protobuf.ByteString getObjectNamePrefixBytes(); - - /** - * - * - *
-   * Required. The desired content of the Payload.
-   * 
- * - * string payload_format = 6 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The payloadFormat. - */ - java.lang.String getPayloadFormat(); - /** - * - * - *
-   * Required. The desired content of the Payload.
-   * 
- * - * string payload_format = 6 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for payloadFormat. - */ - com.google.protobuf.ByteString getPayloadFormatBytes(); -} diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ServiceAccount.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ServiceAccount.java deleted file mode 100644 index ba2035168..000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ServiceAccount.java +++ /dev/null @@ -1,625 +0,0 @@ -/* - * Copyright 2024 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/storage/v2/storage.proto - -// Protobuf Java Version: 3.25.5 -package com.google.storage.v2; - -/** - * - * - *
- * A service account, owned by Cloud Storage, which may be used when taking
- * action on behalf of a given project, for example to publish Pub/Sub
- * notifications or to retrieve security keys.
- * 
- * - * Protobuf type {@code google.storage.v2.ServiceAccount} - */ -public final class ServiceAccount extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.storage.v2.ServiceAccount) - ServiceAccountOrBuilder { - private static final long serialVersionUID = 0L; - // Use ServiceAccount.newBuilder() to construct. - private ServiceAccount(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ServiceAccount() { - emailAddress_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ServiceAccount(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_ServiceAccount_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_ServiceAccount_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.ServiceAccount.class, - com.google.storage.v2.ServiceAccount.Builder.class); - } - - public static final int EMAIL_ADDRESS_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object emailAddress_ = ""; - /** - * - * - *
-   * The ID of the notification.
-   * 
- * - * string email_address = 1; - * - * @return The emailAddress. - */ - @java.lang.Override - public java.lang.String getEmailAddress() { - java.lang.Object ref = emailAddress_; - 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(); - emailAddress_ = s; - return s; - } - } - /** - * - * - *
-   * The ID of the notification.
-   * 
- * - * string email_address = 1; - * - * @return The bytes for emailAddress. - */ - @java.lang.Override - public com.google.protobuf.ByteString getEmailAddressBytes() { - java.lang.Object ref = emailAddress_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - emailAddress_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(emailAddress_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, emailAddress_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(emailAddress_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, emailAddress_); - } - size += getUnknownFields().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.ServiceAccount)) { - return super.equals(obj); - } - com.google.storage.v2.ServiceAccount other = (com.google.storage.v2.ServiceAccount) obj; - - if (!getEmailAddress().equals(other.getEmailAddress())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) 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) + EMAIL_ADDRESS_FIELD_NUMBER; - hash = (53 * hash) + getEmailAddress().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.storage.v2.ServiceAccount parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.ServiceAccount 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.ServiceAccount parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.ServiceAccount 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.ServiceAccount parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.ServiceAccount parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.storage.v2.ServiceAccount parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.storage.v2.ServiceAccount 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.ServiceAccount parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.storage.v2.ServiceAccount 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.ServiceAccount parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.storage.v2.ServiceAccount 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.ServiceAccount 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; - } - /** - * - * - *
-   * A service account, owned by Cloud Storage, which may be used when taking
-   * action on behalf of a given project, for example to publish Pub/Sub
-   * notifications or to retrieve security keys.
-   * 
- * - * Protobuf type {@code google.storage.v2.ServiceAccount} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.storage.v2.ServiceAccount) - com.google.storage.v2.ServiceAccountOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_ServiceAccount_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_ServiceAccount_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.ServiceAccount.class, - com.google.storage.v2.ServiceAccount.Builder.class); - } - - // Construct using com.google.storage.v2.ServiceAccount.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - emailAddress_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_ServiceAccount_descriptor; - } - - @java.lang.Override - public com.google.storage.v2.ServiceAccount getDefaultInstanceForType() { - return com.google.storage.v2.ServiceAccount.getDefaultInstance(); - } - - @java.lang.Override - public com.google.storage.v2.ServiceAccount build() { - com.google.storage.v2.ServiceAccount result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.storage.v2.ServiceAccount buildPartial() { - com.google.storage.v2.ServiceAccount result = new com.google.storage.v2.ServiceAccount(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.storage.v2.ServiceAccount result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.emailAddress_ = emailAddress_; - } - } - - @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.ServiceAccount) { - return mergeFrom((com.google.storage.v2.ServiceAccount) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.storage.v2.ServiceAccount other) { - if (other == com.google.storage.v2.ServiceAccount.getDefaultInstance()) return this; - if (!other.getEmailAddress().isEmpty()) { - emailAddress_ = other.emailAddress_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - 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 { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - emailAddress_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object emailAddress_ = ""; - /** - * - * - *
-     * The ID of the notification.
-     * 
- * - * string email_address = 1; - * - * @return The emailAddress. - */ - public java.lang.String getEmailAddress() { - java.lang.Object ref = emailAddress_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - emailAddress_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * The ID of the notification.
-     * 
- * - * string email_address = 1; - * - * @return The bytes for emailAddress. - */ - public com.google.protobuf.ByteString getEmailAddressBytes() { - java.lang.Object ref = emailAddress_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - emailAddress_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * The ID of the notification.
-     * 
- * - * string email_address = 1; - * - * @param value The emailAddress to set. - * @return This builder for chaining. - */ - public Builder setEmailAddress(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - emailAddress_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * The ID of the notification.
-     * 
- * - * string email_address = 1; - * - * @return This builder for chaining. - */ - public Builder clearEmailAddress() { - emailAddress_ = getDefaultInstance().getEmailAddress(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * The ID of the notification.
-     * 
- * - * string email_address = 1; - * - * @param value The bytes for emailAddress to set. - * @return This builder for chaining. - */ - public Builder setEmailAddressBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - emailAddress_ = value; - bitField0_ |= 0x00000001; - 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.ServiceAccount) - } - - // @@protoc_insertion_point(class_scope:google.storage.v2.ServiceAccount) - private static final com.google.storage.v2.ServiceAccount DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.storage.v2.ServiceAccount(); - } - - public static com.google.storage.v2.ServiceAccount getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ServiceAccount parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - 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.ServiceAccount getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ServiceAccountOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ServiceAccountOrBuilder.java deleted file mode 100644 index 3a6153f20..000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ServiceAccountOrBuilder.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2024 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/storage/v2/storage.proto - -// Protobuf Java Version: 3.25.5 -package com.google.storage.v2; - -public interface ServiceAccountOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.storage.v2.ServiceAccount) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The ID of the notification.
-   * 
- * - * string email_address = 1; - * - * @return The emailAddress. - */ - java.lang.String getEmailAddress(); - /** - * - * - *
-   * The ID of the notification.
-   * 
- * - * string email_address = 1; - * - * @return The bytes for emailAddress. - */ - com.google.protobuf.ByteString getEmailAddressBytes(); -} 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 0a1640875..d037495f9 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 @@ -148,46 +148,6 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_storage_v2_UpdateObjectRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_storage_v2_UpdateObjectRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_storage_v2_GetServiceAccountRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_storage_v2_GetServiceAccountRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_storage_v2_ServiceAccount_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_storage_v2_ServiceAccount_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_storage_v2_CreateHmacKeyRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_storage_v2_CreateHmacKeyRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_storage_v2_CreateHmacKeyResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_storage_v2_CreateHmacKeyResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_storage_v2_DeleteHmacKeyRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_storage_v2_DeleteHmacKeyRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_storage_v2_GetHmacKeyRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_storage_v2_GetHmacKeyRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_storage_v2_ListHmacKeysRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_storage_v2_ListHmacKeysRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_storage_v2_ListHmacKeysResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_storage_v2_ListHmacKeysResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_storage_v2_UpdateHmacKeyRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_storage_v2_UpdateHmacKeyRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_storage_v2_HmacKeyMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_storage_v2_HmacKeyMetadata_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_storage_v2_CommonObjectRequestParams_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -316,34 +276,6 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_storage_v2_ContentRange_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_storage_v2_ContentRange_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_storage_v2_DeleteNotificationConfigRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_storage_v2_DeleteNotificationConfigRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_storage_v2_GetNotificationConfigRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_storage_v2_GetNotificationConfigRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_storage_v2_CreateNotificationConfigRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_storage_v2_CreateNotificationConfigRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_storage_v2_ListNotificationConfigsRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_storage_v2_ListNotificationConfigsRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_storage_v2_ListNotificationConfigsResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_storage_v2_ListNotificationConfigsResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_storage_v2_NotificationConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_storage_v2_NotificationConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_storage_v2_NotificationConfig_CustomAttributesEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_storage_v2_NotificationConfig_CustomAttributesEntry_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -591,371 +523,272 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ObjectRequestParamsB\026\n\024_if_generation_ma" + "tchB\032\n\030_if_generation_not_matchB\032\n\030_if_m" + "etageneration_matchB\036\n\034_if_metageneratio" - + "n_not_match\"`\n\030GetServiceAccountRequest\022" - + "D\n\007project\030\001 \001(\tB3\340A\002\372A-\n+cloudresourcem" - + "anager.googleapis.com/Project\"\'\n\016Service" - + "Account\022\025\n\remail_address\030\001 \001(\t\"\200\001\n\024Creat" - + "eHmacKeyRequest\022D\n\007project\030\001 \001(\tB3\340A\002\372A-" - + "\n+cloudresourcemanager.googleapis.com/Pr" - + "oject\022\"\n\025service_account_email\030\002 \001(\tB\003\340A" - + "\002\"g\n\025CreateHmacKeyResponse\0224\n\010metadata\030\001" - + " \001(\0132\".google.storage.v2.HmacKeyMetadata" - + "\022\030\n\020secret_key_bytes\030\003 \001(\014\"t\n\024DeleteHmac" - + "KeyRequest\022\026\n\taccess_id\030\001 \001(\tB\003\340A\002\022D\n\007pr" - + "oject\030\002 \001(\tB3\340A\002\372A-\n+cloudresourcemanage" - + "r.googleapis.com/Project\"q\n\021GetHmacKeyRe" - + "quest\022\026\n\taccess_id\030\001 \001(\tB\003\340A\002\022D\n\007project" - + "\030\002 \001(\tB3\340A\002\372A-\n+cloudresourcemanager.goo" - + "gleapis.com/Project\"\274\001\n\023ListHmacKeysRequ" - + "est\022D\n\007project\030\001 \001(\tB3\340A\002\372A-\n+cloudresou" - + "rcemanager.googleapis.com/Project\022\021\n\tpag" - + "e_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022\035\n\025serv" - + "ice_account_email\030\004 \001(\t\022\031\n\021show_deleted_" - + "keys\030\005 \001(\010\"f\n\024ListHmacKeysResponse\0225\n\thm" - + "ac_keys\030\001 \003(\0132\".google.storage.v2.HmacKe" - + "yMetadata\022\027\n\017next_page_token\030\002 \001(\t\"\202\001\n\024U" - + "pdateHmacKeyRequest\0229\n\010hmac_key\030\001 \001(\0132\"." - + "google.storage.v2.HmacKeyMetadataB\003\340A\002\022/" - + "\n\013update_mask\030\003 \001(\0132\032.google.protobuf.Fi" - + "eldMask\"\267\002\n\017HmacKeyMetadata\022\017\n\002id\030\001 \001(\tB" - + "\003\340A\005\022\026\n\taccess_id\030\002 \001(\tB\003\340A\005\022D\n\007project\030" - + "\003 \001(\tB3\340A\005\372A-\n+cloudresourcemanager.goog" - + "leapis.com/Project\022\"\n\025service_account_em" - + "ail\030\004 \001(\tB\003\340A\003\022\022\n\005state\030\005 \001(\tB\003\340A\001\0224\n\013cr" - + "eate_time\030\006 \001(\0132\032.google.protobuf.Timest" - + "ampB\003\340A\003\0224\n\013update_time\030\007 \001(\0132\032.google.p" - + "rotobuf.TimestampB\003\340A\003\022\021\n\004etag\030\010 \001(\tB\003\340A" - + "\001\"|\n\031CommonObjectRequestParams\022\034\n\024encryp" - + "tion_algorithm\030\001 \001(\t\022\034\n\024encryption_key_b" - + "ytes\030\004 \001(\014\022#\n\033encryption_key_sha256_byte" - + "s\030\005 \001(\014\"\312\005\n\020ServiceConstants\"\265\005\n\006Values\022" - + "\026\n\022VALUES_UNSPECIFIED\020\000\022\033\n\024MAX_READ_CHUN" - + "K_BYTES\020\200\200\200\001\022\034\n\025MAX_WRITE_CHUNK_BYTES\020\200\200" - + "\200\001\022\031\n\022MAX_OBJECT_SIZE_MB\020\200\200\300\002\022)\n$MAX_CUS" - + "TOM_METADATA_FIELD_NAME_BYTES\020\200\010\022*\n%MAX_" - + "CUSTOM_METADATA_FIELD_VALUE_BYTES\020\200 \022)\n$" - + "MAX_CUSTOM_METADATA_TOTAL_SIZE_BYTES\020\200@\022" - + "*\n$MAX_BUCKET_METADATA_TOTAL_SIZE_BYTES\020" - + "\200\240\001\022\'\n#MAX_NOTIFICATION_CONFIGS_PER_BUCK" - + "ET\020d\022\"\n\036MAX_LIFECYCLE_RULES_PER_BUCKET\020d" - + "\022&\n\"MAX_NOTIFICATION_CUSTOM_ATTRIBUTES\020\005" - + "\0221\n,MAX_NOTIFICATION_CUSTOM_ATTRIBUTE_KE" - + "Y_LENGTH\020\200\002\0223\n.MAX_NOTIFICATION_CUSTOM_A" - + "TTRIBUTE_VALUE_LENGTH\020\200\010\022\034\n\030MAX_LABELS_E" - + "NTRIES_COUNT\020@\022\037\n\033MAX_LABELS_KEY_VALUE_L" - + "ENGTH\020?\022\037\n\032MAX_LABELS_KEY_VALUE_BYTES\020\200\001" - + "\022.\n)MAX_OBJECT_IDS_PER_DELETE_OBJECTS_RE" - + "QUEST\020\350\007\022\036\n\032SPLIT_TOKEN_MAX_VALID_DAYS\020\016" - + "\032\002\020\001\"\243\034\n\006Bucket\022\021\n\004name\030\001 \001(\tB\003\340A\005\022\026\n\tbu" - + "cket_id\030\002 \001(\tB\003\340A\003\022\014\n\004etag\030\035 \001(\t\022D\n\007proj" - + "ect\030\003 \001(\tB3\340A\005\372A-\n+cloudresourcemanager." - + "googleapis.com/Project\022\033\n\016metageneration" - + "\030\004 \001(\003B\003\340A\003\022\025\n\010location\030\005 \001(\tB\003\340A\005\022\032\n\rlo" - + "cation_type\030\006 \001(\tB\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.BucketAccessControl\022B\n\022defau" - + "lt_object_acl\030\t \003(\0132&.google.storage.v2." - + "ObjectAccessControl\0226\n\tlifecycle\030\n \001(\0132#" - + ".google.storage.v2.Bucket.Lifecycle\0224\n\013c" - + "reate_time\030\013 \001(\0132\032.google.protobuf.Times" - + "tampB\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.g" - + "oogle.protobuf.TimestampB\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.Buck" - + "et.Website\0228\n\nversioning\030\021 \001(\0132$.google." - + "storage.v2.Bucket.Versioning\0222\n\007logging\030" - + "\022 \001(\0132!.google.storage.v2.Bucket.Logging" - + "\022,\n\005owner\030\023 \001(\0132\030.google.storage.v2.Owne" - + "rB\003\340A\003\0228\n\nencryption\030\024 \001(\0132$.google.stor" - + "age.v2.Bucket.Encryption\0222\n\007billing\030\025 \001(" - + "\0132!.google.storage.v2.Bucket.Billing\022C\n\020" - + "retention_policy\030\026 \001(\0132).google.storage." - + "v2.Bucket.RetentionPolicy\0227\n\niam_config\030" - + "\027 \001(\0132#.google.storage.v2.Bucket.IamConf" - + "ig\022\025\n\rsatisfies_pzs\030\031 \001(\010\022P\n\027custom_plac" - + "ement_config\030\032 \001(\0132/.google.storage.v2.B" - + "ucket.CustomPlacementConfig\0226\n\tautoclass" - + "\030\034 \001(\0132#.google.storage.v2.Bucket.Autocl" - + "ass\022T\n\026hierarchical_namespace\030 \001(\0132/.go" - + "ogle.storage.v2.Bucket.HierarchicalNames" - + "paceB\003\340A\001\022K\n\022soft_delete_policy\030\037 \001(\0132*." - + "google.storage.v2.Bucket.SoftDeletePolic" - + "yB\003\340A\001\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_se" - + "conds\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_buck" - + "et_level_access\030\001 \001(\0132<.google.storage.v" - + "2.Bucket.IamConfig.UniformBucketLevelAcc" - + "ess\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.protobuf." - + "Timestamp\032\363\005\n\tLifecycle\0226\n\004rule\030\001 \003(\0132(." - + "google.storage.v2.Bucket.Lifecycle.Rule\032" - + "\255\005\n\004Rule\022?\n\006action\030\001 \001(\0132/.google.storag" - + "e.v2.Bucket.Lifecycle.Rule.Action\022E\n\tcon" - + "dition\030\002 \001(\01322.google.storage.v2.Bucket." - + "Lifecycle.Rule.Condition\032-\n\006Action\022\014\n\004ty" - + "pe\030\001 \001(\t\022\025\n\rstorage_class\030\002 \001(\t\032\355\003\n\tCond" - + "ition\022\025\n\010age_days\030\001 \001(\005H\000\210\001\001\022)\n\016created_" - + "before\030\002 \001(\0132\021.google.type.Date\022\024\n\007is_li" - + "ve\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\022cu" - + "stom_time_before\030\010 \001(\0132\021.google.type.Dat" - + "e\022\'\n\032days_since_noncurrent_time\030\t \001(\005H\004\210" - + "\001\001\0221\n\026noncurrent_time_before\030\n \001(\0132\021.goo" - + "gle.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_i" - + "s_liveB\025\n\023_num_newer_versionsB\031\n\027_days_s" - + "ince_custom_timeB\035\n\033_days_since_noncurre" - + "nt_time\0328\n\007Logging\022\022\n\nlog_bucket\030\001 \001(\t\022\031" - + "\n\021log_object_prefix\030\002 \001(\t\032\217\001\n\017RetentionP" - + "olicy\0222\n\016effective_time\030\001 \001(\0132\032.google.p" - + "rotobuf.Timestamp\022\021\n\tis_locked\030\002 \001(\010\0225\n\022" - + "retention_duration\030\004 \001(\0132\031.google.protob" - + "uf.Duration\032\261\001\n\020SoftDeletePolicy\022:\n\022rete" - + "ntion_duration\030\001 \001(\0132\031.google.protobuf.D" - + "urationH\000\210\001\001\0227\n\016effective_time\030\002 \001(\0132\032.g" - + "oogle.protobuf.TimestampH\001\210\001\001B\025\n\023_retent" - + "ion_durationB\021\n\017_effective_time\032\035\n\nVersi" - + "oning\022\017\n\007enabled\030\001 \001(\010\032;\n\007Website\022\030\n\020mai" - + "n_page_suffix\030\001 \001(\t\022\026\n\016not_found_page\030\002 " - + "\001(\t\032/\n\025CustomPlacementConfig\022\026\n\016data_loc" - + "ations\030\001 \003(\t\032\213\002\n\tAutoclass\022\017\n\007enabled\030\001 " - + "\001(\010\0224\n\013toggle_time\030\002 \001(\0132\032.google.protob" - + "uf.TimestampB\003\340A\003\022#\n\026terminal_storage_cl" - + "ass\030\003 \001(\tH\000\210\001\001\022P\n\"terminal_storage_class" - + "_update_time\030\004 \001(\0132\032.google.protobuf.Tim" - + "estampB\003\340A\003H\001\210\001\001B\031\n\027_terminal_storage_cl" - + "assB%\n#_terminal_storage_class_update_ti" - + "me\032-\n\025HierarchicalNamespace\022\024\n\007enabled\030\001" - + " \001(\010B\003\340A\001\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n" - + "\005value\030\002 \001(\t:\0028\001:X\352AU\n\035storage.googleapi" - + "s.com/Bucket\022#projects/{project}/buckets" - + "/{bucket}*\007buckets2\006bucket\"\316\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\027\n\nentity_alt\030\t \001(\tB\003\340A\003\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.storage.v2.ProjectTeam\"I\n\017C" - + "hecksummedData\022\026\n\007content\030\001 \001(\014B\005\010\001\340A\001\022\023" - + "\n\006crc32c\030\002 \001(\007H\000\210\001\001B\t\n\007_crc32c\"C\n\017Object" - + "Checksums\022\023\n\006crc32c\030\001 \001(\007H\000\210\001\001\022\020\n\010md5_ha" - + "sh\030\002 \001(\014B\t\n\007_crc32c\"L\n\022CustomerEncryptio" - + "n\022\034\n\024encryption_algorithm\030\001 \001(\t\022\030\n\020key_s" - + "ha256_bytes\030\003 \001(\014\"\337\n\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/Bucket\022\014\n\004etag\030\033 \001(\t\022\027\n\n" - + "generation\030\003 \001(\003B\003\340A\005\022\037\n\rrestore_token\030#" - + " \001(\tB\003\340A\003H\000\210\001\001\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(\003", - "B\003\340A\003\022\030\n\020content_encoding\030\007 \001(\t\022\033\n\023conte" - + "nt_disposition\030\010 \001(\t\022\025\n\rcache_control\030\t " - + "\001(\t\0223\n\003acl\030\n \003(\0132&.google.storage.v2.Obj" - + "ectAccessControl\022\030\n\020content_language\030\013 \001" - + "(\t\0224\n\013delete_time\030\014 \001(\0132\032.google.protobu" - + "f.TimestampB\003\340A\003\022\024\n\014content_type\030\r \001(\t\0224" - + "\n\013create_time\030\016 \001(\0132\032.google.protobuf.Ti" - + "mestampB\003\340A\003\022\034\n\017component_count\030\017 \001(\005B\003\340" - + "A\003\022:\n\tchecksums\030\020 \001(\0132\".google.storage.v" - + "2.ObjectChecksumsB\003\340A\003\0224\n\013update_time\030\021 " - + "\001(\0132\032.google.protobuf.TimestampB\003\340A\003\0227\n\007" - + "kms_key\030\022 \001(\tB&\372A#\n!cloudkms.googleapis." - + "com/CryptoKey\022B\n\031update_storage_class_ti" - + "me\030\023 \001(\0132\032.google.protobuf.TimestampB\003\340A" - + "\003\022\026\n\016temporary_hold\030\024 \001(\010\0229\n\025retention_e" - + "xpire_time\030\025 \001(\0132\032.google.protobuf.Times" - + "tamp\0229\n\010metadata\030\026 \003(\0132\'.google.storage." - + "v2.Object.MetadataEntry\022\035\n\020event_based_h" - + "old\030\027 \001(\010H\001\210\001\001\022,\n\005owner\030\030 \001(\0132\030.google.s" - + "torage.v2.OwnerB\003\340A\003\022B\n\023customer_encrypt" - + "ion\030\031 \001(\0132%.google.storage.v2.CustomerEn" - + "cryption\022/\n\013custom_time\030\032 \001(\0132\032.google.p" - + "rotobuf.Timestamp\022>\n\020soft_delete_time\030\034 " - + "\001(\0132\032.google.protobuf.TimestampB\003\340A\003H\002\210\001" - + "\001\022>\n\020hard_delete_time\030\035 \001(\0132\032.google.pro" - + "tobuf.TimestampB\003\340A\003H\003\210\001\001\032/\n\rMetadataEnt" - + "ry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\020\n\016_r" - + "estore_tokenB\023\n\021_event_based_holdB\023\n\021_so" - + "ft_delete_timeB\023\n\021_hard_delete_time\"\316\001\n\023" - + "ObjectAccessControl\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\027\n\nentity_alt\030\t \001(" - + "\tB\003\340A\003\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\014projec" - + "t_team\030\007 \001(\0132\036.google.storage.v2.Project" - + "Team\"l\n\023ListObjectsResponse\022*\n\007objects\030\001" - + " \003(\0132\031.google.storage.v2.Object\022\020\n\010prefi" - + "xes\030\002 \003(\t\022\027\n\017next_page_token\030\003 \001(\t\"3\n\013Pr" - + "ojectTeam\022\026\n\016project_number\030\001 \001(\t\022\014\n\004tea" - + "m\030\002 \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" - + "\"b\n\037DeleteNotificationConfigRequest\022?\n\004n" - + "ame\030\001 \001(\tB1\340A\002\372A+\n)storage.googleapis.co" - + "m/NotificationConfig\"_\n\034GetNotificationC" - + "onfigRequest\022?\n\004name\030\001 \001(\tB1\340A\002\372A+\n)stor" - + "age.googleapis.com/NotificationConfig\"\255\001" - + "\n\037CreateNotificationConfigRequest\022A\n\006par" - + "ent\030\001 \001(\tB1\340A\002\372A+\022)storage.googleapis.co" - + "m/NotificationConfig\022G\n\023notification_con" - + "fig\030\002 \001(\0132%.google.storage.v2.Notificati" - + "onConfigB\003\340A\002\"\224\001\n\036ListNotificationConfig" - + "sRequest\022A\n\006parent\030\001 \001(\tB1\340A\002\372A+\022)storag" - + "e.googleapis.com/NotificationConfig\022\026\n\tp" - + "age_size\030\002 \001(\005B\003\340A\001\022\027\n\npage_token\030\003 \001(\tB" - + "\003\340A\001\"\177\n\037ListNotificationConfigsResponse\022" - + "C\n\024notification_configs\030\001 \003(\0132%.google.s" - + "torage.v2.NotificationConfig\022\027\n\017next_pag" - + "e_token\030\002 \001(\t\"\273\003\n\022NotificationConfig\022\021\n\004" - + "name\030\001 \001(\tB\003\340A\002\022\022\n\005topic\030\002 \001(\tB\003\340A\002\022\021\n\004e" - + "tag\030\007 \001(\tB\003\340A\001\022\030\n\013event_types\030\003 \003(\tB\003\340A\001" - + "\022[\n\021custom_attributes\030\004 \003(\0132;.google.sto" - + "rage.v2.NotificationConfig.CustomAttribu" - + "tesEntryB\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\025C" - + "ustomAttributesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005val" - + "ue\030\002 \001(\t:\0028\001:}\352Az\n)storage.googleapis.co" - + "m/NotificationConfig\022Mprojects/{project}" - + "/buckets/{bucket}/notificationConfigs/{n" - + "otification_config}2\210(\n\007Storage\022r\n\014Delet" - + "eBucket\022&.google.storage.v2.DeleteBucket" - + "Request\032\026.google.protobuf.Empty\"\"\332A\004name" - + "\212\323\344\223\002\025\022\023\n\004name\022\013{bucket=**}\022o\n\tGetBucket" - + "\022#.google.storage.v2.GetBucketRequest\032\031." - + "google.storage.v2.Bucket\"\"\332A\004name\212\323\344\223\002\025\022" - + "\023\n\004name\022\013{bucket=**}\022\253\001\n\014CreateBucket\022&." - + "google.storage.v2.CreateBucketRequest\032\031." - + "google.storage.v2.Bucket\"X\332A\027parent,buck" - + "et,bucket_id\212\323\344\223\0028\022\026\n\006parent\022\014{project=*" - + "*}\022\036\n\016bucket.project\022\014{project=**}\022\205\001\n\013L" - + "istBuckets\022%.google.storage.v2.ListBucke" - + "tsRequest\032&.google.storage.v2.ListBucket" - + "sResponse\"\'\332A\006parent\212\323\344\223\002\030\022\026\n\006parent\022\014{p" - + "roject=**}\022\223\001\n\031LockBucketRetentionPolicy" - + "\0223.google.storage.v2.LockBucketRetention" - + "PolicyRequest\032\031.google.storage.v2.Bucket" - + "\"&\332A\006bucket\212\323\344\223\002\027\022\025\n\006bucket\022\013{bucket=**}" - + "\022u\n\014GetIamPolicy\022\".google.iam.v1.GetIamP" - + "olicyRequest\032\025.google.iam.v1.Policy\"*\332A\010" - + "resource\212\323\344\223\002\031\022\027\n\010resource\022\013{bucket=**}\022" - + "|\n\014SetIamPolicy\022\".google.iam.v1.SetIamPo" - + "licyRequest\032\025.google.iam.v1.Policy\"1\332A\017r" - + "esource,policy\212\323\344\223\002\031\022\027\n\010resource\022\013{bucke" - + "t=**}\022\226\002\n\022TestIamPermissions\022(.google.ia" - + "m.v1.TestIamPermissionsRequest\032).google." - + "iam.v1.TestIamPermissionsResponse\"\252\001\332A\024r" - + "esource,permissions\212\323\344\223\002\214\001\022\027\n\010resource\022\013" - + "{bucket=**}\0224\n\010resource\022({bucket=project" - + "s/*/buckets/*}/objects/**\022;\n\010resource\022/{" - + "bucket=projects/*/buckets/*}/managedFold" - + "ers/**\022\212\001\n\014UpdateBucket\022&.google.storage" - + ".v2.UpdateBucketRequest\032\031.google.storage" - + ".v2.Bucket\"7\332A\022bucket,update_mask\212\323\344\223\002\034\022" - + "\032\n\013bucket.name\022\013{bucket=**}\022~\n\rComposeOb" - + "ject\022\'.google.storage.v2.ComposeObjectRe" - + "quest\032\031.google.storage.v2.Object\")\212\323\344\223\002#" - + "\022!\n\022destination.bucket\022\013{bucket=**}\022\230\001\n\014" - + "DeleteObject\022&.google.storage.v2.DeleteO" - + "bjectRequest\032\026.google.protobuf.Empty\"H\332A" - + "\rbucket,object\332A\030bucket,object,generatio" - + "n\212\323\344\223\002\027\022\025\n\006bucket\022\013{bucket=**}\022\215\001\n\rResto" - + "reObject\022\'.google.storage.v2.RestoreObje" - + "ctRequest\032\031.google.storage.v2.Object\"8\332A" - + "\030bucket,object,generation\212\323\344\223\002\027\022\025\n\006bucke" - + "t\022\013{bucket=**}\022\272\001\n\024CancelResumableWrite\022" - + "..google.storage.v2.CancelResumableWrite" - + "Request\032/.google.storage.v2.CancelResuma" - + "bleWriteResponse\"A\332A\tupload_id\212\323\344\223\002/\022-\n\t" - + "upload_id\022 {bucket=projects/*/buckets/*}" - + "/**\022\225\001\n\tGetObject\022#.google.storage.v2.Ge" - + "tObjectRequest\032\031.google.storage.v2.Objec" - + "t\"H\332A\rbucket,object\332A\030bucket,object,gene" - + "ration\212\323\344\223\002\027\022\025\n\006bucket\022\013{bucket=**}\022\245\001\n\n" - + "ReadObject\022$.google.storage.v2.ReadObjec" - + "tRequest\032%.google.storage.v2.ReadObjectR" - + "esponse\"H\332A\rbucket,object\332A\030bucket,objec" - + "t,generation\212\323\344\223\002\027\022\025\n\006bucket\022\013{bucket=**" - + "}0\001\022\214\001\n\014UpdateObject\022&.google.storage.v2" - + ".UpdateObjectRequest\032\031.google.storage.v2" - + ".Object\"9\332A\022object,update_mask\212\323\344\223\002\036\022\034\n\r" - + "object.bucket\022\013{bucket=**}\022`\n\013WriteObjec" - + "t\022%.google.storage.v2.WriteObjectRequest" - + "\032&.google.storage.v2.WriteObjectResponse" - + "\"\000(\001\022n\n\017BidiWriteObject\022).google.storage" - + ".v2.BidiWriteObjectRequest\032*.google.stor" - + "age.v2.BidiWriteObjectResponse\"\000(\0010\001\022\204\001\n" - + "\013ListObjects\022%.google.storage.v2.ListObj" - + "ectsRequest\032&.google.storage.v2.ListObje" - + "ctsResponse\"&\332A\006parent\212\323\344\223\002\027\022\025\n\006parent\022\013" - + "{bucket=**}\022\230\001\n\rRewriteObject\022\'.google.s" - + "torage.v2.RewriteObjectRequest\032\".google." - + "storage.v2.RewriteResponse\":\212\323\344\223\0024\022\017\n\rso" - + "urce_bucket\022!\n\022destination_bucket\022\013{buck" - + "et=**}\022\256\001\n\023StartResumableWrite\022-.google." - + "storage.v2.StartResumableWriteRequest\032.." - + "google.storage.v2.StartResumableWriteRes" - + "ponse\"8\212\323\344\223\0022\0220\n!write_object_spec.resou" - + "rce.bucket\022\013{bucket=**}\022\256\001\n\020QueryWriteSt" - + "atus\022*.google.storage.v2.QueryWriteStatu" - + "sRequest\032+.google.storage.v2.QueryWriteS" - + "tatusResponse\"A\332A\tupload_id\212\323\344\223\002/\022-\n\tupl" - + "oad_id\022 {bucket=projects/*/buckets/*}/**" - + "\022\203\001\n\021GetServiceAccount\022+.google.storage." - + "v2.GetServiceAccountRequest\032!.google.sto" - + "rage.v2.ServiceAccount\"\036\210\002\001\332A\007project\212\323\344" - + "\223\002\013\022\t\n\007project\022\230\001\n\rCreateHmacKey\022\'.googl" - + "e.storage.v2.CreateHmacKeyRequest\032(.goog" - + "le.storage.v2.CreateHmacKeyResponse\"4\210\002\001" - + "\332A\035project,service_account_email\212\323\344\223\002\013\022\t" - + "\n\007project\022z\n\rDeleteHmacKey\022\'.google.stor" - + "age.v2.DeleteHmacKeyRequest\032\026.google.pro" - + "tobuf.Empty\"(\210\002\001\332A\021access_id,project\212\323\344\223" - + "\002\013\022\t\n\007project\022\200\001\n\nGetHmacKey\022$.google.st" - + "orage.v2.GetHmacKeyRequest\032\".google.stor" - + "age.v2.HmacKeyMetadata\"(\210\002\001\332A\021access_id," - + "project\212\323\344\223\002\013\022\t\n\007project\022\177\n\014ListHmacKeys" - + "\022&.google.storage.v2.ListHmacKeysRequest" - + "\032\'.google.storage.v2.ListHmacKeysRespons" - + "e\"\036\210\002\001\332A\007project\212\323\344\223\002\013\022\t\n\007project\022\240\001\n\rUp" - + "dateHmacKey\022\'.google.storage.v2.UpdateHm" - + "acKeyRequest\032\".google.storage.v2.HmacKey" - + "Metadata\"B\210\002\001\332A\024hmac_key,update_mask\212\323\344\223" - + "\002\"\022 \n\020hmac_key.project\022\014{project=**}\022\242\001\n" - + "\030DeleteNotificationConfig\0222.google.stora" - + "ge.v2.DeleteNotificationConfigRequest\032\026." - + "google.protobuf.Empty\":\210\002\001\332A\004name\212\323\344\223\002*\022" - + "(\n\004name\022 {bucket=projects/*/buckets/*}/*" - + "*\022\253\001\n\025GetNotificationConfig\022/.google.sto" - + "rage.v2.GetNotificationConfigRequest\032%.g" - + "oogle.storage.v2.NotificationConfig\":\210\002\001" - + "\332A\004name\212\323\344\223\002*\022(\n\004name\022 {bucket=projects/" - + "*/buckets/*}/**\022\264\001\n\030CreateNotificationCo" - + "nfig\0222.google.storage.v2.CreateNotificat" - + "ionConfigRequest\032%.google.storage.v2.Not" - + "ificationConfig\"=\210\002\001\332A\032parent,notificati" - + "on_config\212\323\344\223\002\027\022\025\n\006parent\022\013{bucket=**}\022\253" - + "\001\n\027ListNotificationConfigs\0221.google.stor" - + "age.v2.ListNotificationConfigsRequest\0322." - + "google.storage.v2.ListNotificationConfig" - + "sResponse\")\210\002\001\332A\006parent\212\323\344\223\002\027\022\025\n\006parent\022" - + "\013{bucket=**}\032\247\002\312A\026storage.googleapis.com" - + "\322A\212\002https://www.googleapis.com/auth/clou" - + "d-platform,https://www.googleapis.com/au" - + "th/cloud-platform.read-only,https://www." - + "googleapis.com/auth/devstorage.full_cont" - + "rol,https://www.googleapis.com/auth/devs" - + "torage.read_only,https://www.googleapis." - + "com/auth/devstorage.read_writeB\342\001\n\025com.g" - + "oogle.storage.v2B\014StorageProtoP\001Z>cloud." - + "google.com/go/storage/internal/apiv2/sto" - + "ragepb;storagepb\352Ax\n!cloudkms.googleapis" - + ".com/CryptoKey\022Sprojects/{project}/locat" - + "ions/{location}/keyRings/{key_ring}/cryp" - + "toKeys/{crypto_key}b\006proto3" + + "n_not_match\"|\n\031CommonObjectRequestParams" + + "\022\034\n\024encryption_algorithm\030\001 \001(\t\022\034\n\024encryp" + + "tion_key_bytes\030\004 \001(\014\022#\n\033encryption_key_s" + + "ha256_bytes\030\005 \001(\014\"\312\005\n\020ServiceConstants\"\265" + + "\005\n\006Values\022\026\n\022VALUES_UNSPECIFIED\020\000\022\033\n\024MAX" + + "_READ_CHUNK_BYTES\020\200\200\200\001\022\034\n\025MAX_WRITE_CHUN" + + "K_BYTES\020\200\200\200\001\022\031\n\022MAX_OBJECT_SIZE_MB\020\200\200\300\002\022" + + ")\n$MAX_CUSTOM_METADATA_FIELD_NAME_BYTES\020" + + "\200\010\022*\n%MAX_CUSTOM_METADATA_FIELD_VALUE_BY" + + "TES\020\200 \022)\n$MAX_CUSTOM_METADATA_TOTAL_SIZE" + + "_BYTES\020\200@\022*\n$MAX_BUCKET_METADATA_TOTAL_S" + + "IZE_BYTES\020\200\240\001\022\'\n#MAX_NOTIFICATION_CONFIG" + + "S_PER_BUCKET\020d\022\"\n\036MAX_LIFECYCLE_RULES_PE" + + "R_BUCKET\020d\022&\n\"MAX_NOTIFICATION_CUSTOM_AT" + + "TRIBUTES\020\005\0221\n,MAX_NOTIFICATION_CUSTOM_AT" + + "TRIBUTE_KEY_LENGTH\020\200\002\0223\n.MAX_NOTIFICATIO" + + "N_CUSTOM_ATTRIBUTE_VALUE_LENGTH\020\200\010\022\034\n\030MA" + + "X_LABELS_ENTRIES_COUNT\020@\022\037\n\033MAX_LABELS_K" + + "EY_VALUE_LENGTH\020?\022\037\n\032MAX_LABELS_KEY_VALU" + + "E_BYTES\020\200\001\022.\n)MAX_OBJECT_IDS_PER_DELETE_" + + "OBJECTS_REQUEST\020\350\007\022\036\n\032SPLIT_TOKEN_MAX_VA" + + "LID_DAYS\020\016\032\002\020\001\"\243\034\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\022\014\n\004etag\030\035 \001" + + "(\t\022D\n\007project\030\003 \001(\tB3\340A\005\372A-\n+cloudresour" + + "cemanager.googleapis.com/Project\022\033\n\016meta" + + "generation\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\rstor" + + "age_class\030\007 \001(\t\022\013\n\003rpo\030\033 \001(\t\0223\n\003acl\030\010 \003(" + + "\0132&.google.storage.v2.BucketAccessContro" + + "l\022B\n\022default_object_acl\030\t \003(\0132&.google.s" + + "torage.v2.ObjectAccessControl\0226\n\tlifecyc" + + "le\030\n \001(\0132#.google.storage.v2.Bucket.Life" + + "cycle\0224\n\013create_time\030\013 \001(\0132\032.google.prot" + + "obuf.TimestampB\003\340A\003\022,\n\004cors\030\014 \003(\0132\036.goog" + + "le.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\006lab" + + "els\030\017 \003(\0132%.google.storage.v2.Bucket.Lab" + + "elsEntry\0222\n\007website\030\020 \001(\0132!.google.stora" + + "ge.v2.Bucket.Website\0228\n\nversioning\030\021 \001(\013" + + "2$.google.storage.v2.Bucket.Versioning\0222" + + "\n\007logging\030\022 \001(\0132!.google.storage.v2.Buck" + + "et.Logging\022,\n\005owner\030\023 \001(\0132\030.google.stora" + + "ge.v2.OwnerB\003\340A\003\0228\n\nencryption\030\024 \001(\0132$.g" + + "oogle.storage.v2.Bucket.Encryption\0222\n\007bi" + + "lling\030\025 \001(\0132!.google.storage.v2.Bucket.B" + + "illing\022C\n\020retention_policy\030\026 \001(\0132).googl" + + "e.storage.v2.Bucket.RetentionPolicy\0227\n\ni" + + "am_config\030\027 \001(\0132#.google.storage.v2.Buck" + + "et.IamConfig\022\025\n\rsatisfies_pzs\030\031 \001(\010\022P\n\027c" + + "ustom_placement_config\030\032 \001(\0132/.google.st" + + "orage.v2.Bucket.CustomPlacementConfig\0226\n" + + "\tautoclass\030\034 \001(\0132#.google.storage.v2.Buc" + + "ket.Autoclass\022T\n\026hierarchical_namespace\030" + + " \001(\0132/.google.storage.v2.Bucket.Hierarc" + + "hicalNamespaceB\003\340A\001\022K\n\022soft_delete_polic" + + "y\030\037 \001(\0132*.google.storage.v2.Bucket.SoftD" + + "eletePolicyB\003\340A\001\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\006m" + + "ethod\030\002 \003(\t\022\027\n\017response_header\030\003 \003(\t\022\027\n\017" + + "max_age_seconds\030\004 \001(\005\032M\n\nEncryption\022?\n\017d" + + "efault_kms_key\030\001 \001(\tB&\372A#\n!cloudkms.goog" + + "leapis.com/CryptoKey\032\354\001\n\tIamConfig\022a\n\033un" + + "iform_bucket_level_access\030\001 \001(\0132<.google" + + ".storage.v2.Bucket.IamConfig.UniformBuck" + + "etLevelAccess\022 \n\030public_access_preventio" + + "n\030\003 \001(\t\032Z\n\030UniformBucketLevelAccess\022\017\n\007e" + + "nabled\030\001 \001(\010\022-\n\tlock_time\030\002 \001(\0132\032.google" + + ".protobuf.Timestamp\032\363\005\n\tLifecycle\0226\n\004rul" + + "e\030\001 \003(\0132(.google.storage.v2.Bucket.Lifec" + + "ycle.Rule\032\255\005\n\004Rule\022?\n\006action\030\001 \001(\0132/.goo" + + "gle.storage.v2.Bucket.Lifecycle.Rule.Act" + + "ion\022E\n\tcondition\030\002 \001(\01322.google.storage." + + "v2.Bucket.Lifecycle.Rule.Condition\032-\n\006Ac" + + "tion\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.google.type.Dat" + + "e\022\024\n\007is_live\030\003 \001(\010H\001\210\001\001\022\037\n\022num_newer_ver" + + "sions\030\004 \001(\005H\002\210\001\001\022\035\n\025matches_storage_clas" + + "s\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.googl" + + "e.type.Date\022\'\n\032days_since_noncurrent_tim" + + "e\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_prefi" + + "x\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_sinc" + + "e_noncurrent_time\0328\n\007Logging\022\022\n\nlog_buck" + + "et\030\001 \001(\t\022\031\n\021log_object_prefix\030\002 \001(\t\032\217\001\n\017" + + "RetentionPolicy\0222\n\016effective_time\030\001 \001(\0132" + + "\032.google.protobuf.Timestamp\022\021\n\tis_locked" + + "\030\002 \001(\010\0225\n\022retention_duration\030\004 \001(\0132\031.goo" + + "gle.protobuf.Duration\032\261\001\n\020SoftDeletePoli" + + "cy\022:\n\022retention_duration\030\001 \001(\0132\031.google." + + "protobuf.DurationH\000\210\001\001\0227\n\016effective_time" + + "\030\002 \001(\0132\032.google.protobuf.TimestampH\001\210\001\001B" + + "\025\n\023_retention_durationB\021\n\017_effective_tim" + + "e\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\032\213\002\n\tAutoclass\022\017\n\007" + + "enabled\030\001 \001(\010\0224\n\013toggle_time\030\002 \001(\0132\032.goo" + + "gle.protobuf.TimestampB\003\340A\003\022#\n\026terminal_" + + "storage_class\030\003 \001(\tH\000\210\001\001\022P\n\"terminal_sto" + + "rage_class_update_time\030\004 \001(\0132\032.google.pr" + + "otobuf.TimestampB\003\340A\003H\001\210\001\001B\031\n\027_terminal_" + + "storage_classB%\n#_terminal_storage_class" + + "_update_time\032-\n\025HierarchicalNamespace\022\024\n" + + "\007enabled\030\001 \001(\010B\003\340A\001\032-\n\013LabelsEntry\022\013\n\003ke" + + "y\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:X\352AU\n\035storage" + + ".googleapis.com/Bucket\022#projects/{projec" + + "t}/buckets/{bucket}*\007buckets2\006bucket\"\316\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\027\n\nentity_alt\030\t \001" + + "(\tB\003\340A\003\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\014proje" + + "ct_team\030\007 \001(\0132\036.google.storage.v2.Projec" + + "tTeam\"I\n\017ChecksummedData\022\026\n\007content\030\001 \001(" + + "\014B\005\010\001\340A\001\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\"L\n\022Custome" + + "rEncryption\022\034\n\024encryption_algorithm\030\001 \001(" + + "\t\022\030\n\020key_sha256_bytes\030\003 \001(\014\"\337\n\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/Bucket\022\014\n\004etag" + + "\030\033 \001(\t\022\027\n\ngeneration\030\003 \001(\003B\003\340A\005\022\037\n\rresto" + + "re_token\030# \001(\tB\003\340A\003H\000\210\001\001\022\033\n\016metagenerati" + + "on\030\004 \001(\003B\003\340A\003\022\025\n\rstorage_class\030\005 \001(\t\022\021\n\004" + + "size\030\006 \001(\003B\003\340A\003\022\030\n\020content_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(\0132&.google.stor" + + "age.v2.ObjectAccessControl\022\030\n\020content_la" + + "nguage\030\013 \001(\t\0224\n\013delete_time\030\014 \001(\0132\032.goog" + + "le.protobuf.TimestampB\003\340A\003\022\024\n\014content_ty" + + "pe\030\r \001(\t\0224\n\013create_time\030\016 \001(\0132\032.google.p" + + "rotobuf.TimestampB\003\340A\003\022\034\n\017component_coun" + + "t\030\017 \001(\005B\003\340A\003\022:\n\tchecksums\030\020 \001(\0132\".google" + + ".storage.v2.ObjectChecksumsB\003\340A\003\0224\n\013upda" + + "te_time\030\021 \001(\0132\032.google.protobuf.Timestam" + + "pB\003\340A\003\0227\n\007kms_key\030\022 \001(\tB&\372A#\n!cloudkms.g" + + "oogleapis.com/CryptoKey\022B\n\031update_storag" + + "e_class_time\030\023 \001(\0132\032.google.protobuf.Tim" + + "estampB\003\340A\003\022\026\n\016temporary_hold\030\024 \001(\010\0229\n\025r" + + "etention_expire_time\030\025 \001(\0132\032.google.prot" + + "obuf.Timestamp\0229\n\010metadata\030\026 \003(\0132\'.googl" + + "e.storage.v2.Object.MetadataEntry\022\035\n\020eve" + + "nt_based_hold\030\027 \001(\010H\001\210\001\001\022,\n\005owner\030\030 \001(\0132" + + "\030.google.storage.v2.OwnerB\003\340A\003\022B\n\023custom" + + "er_encryption\030\031 \001(\0132%.google.storage.v2." + + "CustomerEncryption\022/\n\013custom_time\030\032 \001(\0132" + + "\032.google.protobuf.Timestamp\022>\n\020soft_dele" + + "te_time\030\034 \001(\0132\032.google.protobuf.Timestam" + + "pB\003\340A\003H\002\210\001\001\022>\n\020hard_delete_time\030\035 \001(\0132\032." + + "google.protobuf.TimestampB\003\340A\003H\003\210\001\001\032/\n\rM" + + "etadataEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t" + + ":\0028\001B\020\n\016_restore_tokenB\023\n\021_event_based_h" + + "oldB\023\n\021_soft_delete_timeB\023\n\021_hard_delete" + + "_time\"\316\001\n\023ObjectAccessControl\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\027\n\nentit" + + "y_alt\030\t \001(\tB\003\340A\003\022\021\n\tentity_id\030\004 \001(\t\022\014\n\004e" + + "tag\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.storage.", + "v2.ProjectTeam\"l\n\023ListObjectsResponse\022*\n" + + "\007objects\030\001 \003(\0132\031.google.storage.v2.Objec" + + "t\022\020\n\010prefixes\030\002 \003(\t\022\027\n\017next_page_token\030\003" + + " \001(\t\"3\n\013ProjectTeam\022\026\n\016project_number\030\001 " + + "\001(\t\022\014\n\004team\030\002 \001(\t\"*\n\005Owner\022\016\n\006entity\030\001 \001" + + "(\t\022\021\n\tentity_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_le" + + "ngth\030\003 \001(\0032\214\034\n\007Storage\022r\n\014DeleteBucket\022&" + + ".google.storage.v2.DeleteBucketRequest\032\026" + + ".google.protobuf.Empty\"\"\332A\004name\212\323\344\223\002\025\022\023\n" + + "\004name\022\013{bucket=**}\022o\n\tGetBucket\022#.google" + + ".storage.v2.GetBucketRequest\032\031.google.st" + + "orage.v2.Bucket\"\"\332A\004name\212\323\344\223\002\025\022\023\n\004name\022\013" + + "{bucket=**}\022\253\001\n\014CreateBucket\022&.google.st" + + "orage.v2.CreateBucketRequest\032\031.google.st" + + "orage.v2.Bucket\"X\332A\027parent,bucket,bucket" + + "_id\212\323\344\223\0028\022\026\n\006parent\022\014{project=**}\022\036\n\016buc" + + "ket.project\022\014{project=**}\022\205\001\n\013ListBucket" + + "s\022%.google.storage.v2.ListBucketsRequest" + + "\032&.google.storage.v2.ListBucketsResponse" + + "\"\'\332A\006parent\212\323\344\223\002\030\022\026\n\006parent\022\014{project=**" + + "}\022\223\001\n\031LockBucketRetentionPolicy\0223.google" + + ".storage.v2.LockBucketRetentionPolicyReq" + + "uest\032\031.google.storage.v2.Bucket\"&\332A\006buck" + + "et\212\323\344\223\002\027\022\025\n\006bucket\022\013{bucket=**}\022u\n\014GetIa" + + "mPolicy\022\".google.iam.v1.GetIamPolicyRequ" + + "est\032\025.google.iam.v1.Policy\"*\332A\010resource\212" + + "\323\344\223\002\031\022\027\n\010resource\022\013{bucket=**}\022|\n\014SetIam" + + "Policy\022\".google.iam.v1.SetIamPolicyReque" + + "st\032\025.google.iam.v1.Policy\"1\332A\017resource,p" + + "olicy\212\323\344\223\002\031\022\027\n\010resource\022\013{bucket=**}\022\226\002\n" + + "\022TestIamPermissions\022(.google.iam.v1.Test" + + "IamPermissionsRequest\032).google.iam.v1.Te" + + "stIamPermissionsResponse\"\252\001\332A\024resource,p" + + "ermissions\212\323\344\223\002\214\001\022\027\n\010resource\022\013{bucket=*" + + "*}\0224\n\010resource\022({bucket=projects/*/bucke" + + "ts/*}/objects/**\022;\n\010resource\022/{bucket=pr" + + "ojects/*/buckets/*}/managedFolders/**\022\212\001" + + "\n\014UpdateBucket\022&.google.storage.v2.Updat" + + "eBucketRequest\032\031.google.storage.v2.Bucke" + + "t\"7\332A\022bucket,update_mask\212\323\344\223\002\034\022\032\n\013bucket" + + ".name\022\013{bucket=**}\022~\n\rComposeObject\022\'.go" + + "ogle.storage.v2.ComposeObjectRequest\032\031.g" + + "oogle.storage.v2.Object\")\212\323\344\223\002#\022!\n\022desti" + + "nation.bucket\022\013{bucket=**}\022\230\001\n\014DeleteObj" + + "ect\022&.google.storage.v2.DeleteObjectRequ" + + "est\032\026.google.protobuf.Empty\"H\332A\rbucket,o" + + "bject\332A\030bucket,object,generation\212\323\344\223\002\027\022\025" + + "\n\006bucket\022\013{bucket=**}\022\215\001\n\rRestoreObject\022" + + "\'.google.storage.v2.RestoreObjectRequest" + + "\032\031.google.storage.v2.Object\"8\332A\030bucket,o" + + "bject,generation\212\323\344\223\002\027\022\025\n\006bucket\022\013{bucke" + + "t=**}\022\272\001\n\024CancelResumableWrite\022..google." + + "storage.v2.CancelResumableWriteRequest\032/" + + ".google.storage.v2.CancelResumableWriteR" + + "esponse\"A\332A\tupload_id\212\323\344\223\002/\022-\n\tupload_id" + + "\022 {bucket=projects/*/buckets/*}/**\022\225\001\n\tG" + + "etObject\022#.google.storage.v2.GetObjectRe" + + "quest\032\031.google.storage.v2.Object\"H\332A\rbuc" + + "ket,object\332A\030bucket,object,generation\212\323\344" + + "\223\002\027\022\025\n\006bucket\022\013{bucket=**}\022\245\001\n\nReadObjec" + + "t\022$.google.storage.v2.ReadObjectRequest\032" + + "%.google.storage.v2.ReadObjectResponse\"H" + + "\332A\rbucket,object\332A\030bucket,object,generat" + + "ion\212\323\344\223\002\027\022\025\n\006bucket\022\013{bucket=**}0\001\022\214\001\n\014U" + + "pdateObject\022&.google.storage.v2.UpdateOb" + + "jectRequest\032\031.google.storage.v2.Object\"9" + + "\332A\022object,update_mask\212\323\344\223\002\036\022\034\n\robject.bu" + + "cket\022\013{bucket=**}\022`\n\013WriteObject\022%.googl" + + "e.storage.v2.WriteObjectRequest\032&.google" + + ".storage.v2.WriteObjectResponse\"\000(\001\022n\n\017B" + + "idiWriteObject\022).google.storage.v2.BidiW" + + "riteObjectRequest\032*.google.storage.v2.Bi" + + "diWriteObjectResponse\"\000(\0010\001\022\204\001\n\013ListObje" + + "cts\022%.google.storage.v2.ListObjectsReque" + + "st\032&.google.storage.v2.ListObjectsRespon" + + "se\"&\332A\006parent\212\323\344\223\002\027\022\025\n\006parent\022\013{bucket=*" + + "*}\022\230\001\n\rRewriteObject\022\'.google.storage.v2" + + ".RewriteObjectRequest\032\".google.storage.v" + + "2.RewriteResponse\":\212\323\344\223\0024\022\017\n\rsource_buck" + + "et\022!\n\022destination_bucket\022\013{bucket=**}\022\256\001" + + "\n\023StartResumableWrite\022-.google.storage.v" + + "2.StartResumableWriteRequest\032..google.st" + + "orage.v2.StartResumableWriteResponse\"8\212\323" + + "\344\223\0022\0220\n!write_object_spec.resource.bucke" + + "t\022\013{bucket=**}\022\256\001\n\020QueryWriteStatus\022*.go" + + "ogle.storage.v2.QueryWriteStatusRequest\032" + + "+.google.storage.v2.QueryWriteStatusResp" + + "onse\"A\332A\tupload_id\212\323\344\223\002/\022-\n\tupload_id\022 {" + + "bucket=projects/*/buckets/*}/**\032\247\002\312A\026sto" + + "rage.googleapis.com\322A\212\002https://www.googl" + + "eapis.com/auth/cloud-platform,https://ww" + + "w.googleapis.com/auth/cloud-platform.rea" + + "d-only,https://www.googleapis.com/auth/d" + + "evstorage.full_control,https://www.googl" + + "eapis.com/auth/devstorage.read_only,http" + + "s://www.googleapis.com/auth/devstorage.r" + + "ead_writeB\342\001\n\025com.google.storage.v2B\014Sto" + + "rageProtoP\001Z>cloud.google.com/go/storage" + + "/internal/apiv2/storagepb;storagepb\352Ax\n!" + + "cloudkms.googleapis.com/CryptoKey\022Sproje" + + "cts/{project}/locations/{location}/keyRi" + + "ngs/{key_ring}/cryptoKeys/{crypto_key}b\006" + + "proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -1326,95 +1159,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "UpdateMask", "CommonObjectRequestParams", }); - internal_static_google_storage_v2_GetServiceAccountRequest_descriptor = - getDescriptor().getMessageTypes().get(28); - internal_static_google_storage_v2_GetServiceAccountRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_storage_v2_GetServiceAccountRequest_descriptor, - new java.lang.String[] { - "Project", - }); - internal_static_google_storage_v2_ServiceAccount_descriptor = - getDescriptor().getMessageTypes().get(29); - internal_static_google_storage_v2_ServiceAccount_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_storage_v2_ServiceAccount_descriptor, - new java.lang.String[] { - "EmailAddress", - }); - internal_static_google_storage_v2_CreateHmacKeyRequest_descriptor = - getDescriptor().getMessageTypes().get(30); - internal_static_google_storage_v2_CreateHmacKeyRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_storage_v2_CreateHmacKeyRequest_descriptor, - new java.lang.String[] { - "Project", "ServiceAccountEmail", - }); - internal_static_google_storage_v2_CreateHmacKeyResponse_descriptor = - getDescriptor().getMessageTypes().get(31); - internal_static_google_storage_v2_CreateHmacKeyResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_storage_v2_CreateHmacKeyResponse_descriptor, - new java.lang.String[] { - "Metadata", "SecretKeyBytes", - }); - internal_static_google_storage_v2_DeleteHmacKeyRequest_descriptor = - getDescriptor().getMessageTypes().get(32); - internal_static_google_storage_v2_DeleteHmacKeyRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_storage_v2_DeleteHmacKeyRequest_descriptor, - new java.lang.String[] { - "AccessId", "Project", - }); - internal_static_google_storage_v2_GetHmacKeyRequest_descriptor = - getDescriptor().getMessageTypes().get(33); - internal_static_google_storage_v2_GetHmacKeyRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_storage_v2_GetHmacKeyRequest_descriptor, - new java.lang.String[] { - "AccessId", "Project", - }); - internal_static_google_storage_v2_ListHmacKeysRequest_descriptor = - getDescriptor().getMessageTypes().get(34); - internal_static_google_storage_v2_ListHmacKeysRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_storage_v2_ListHmacKeysRequest_descriptor, - new java.lang.String[] { - "Project", "PageSize", "PageToken", "ServiceAccountEmail", "ShowDeletedKeys", - }); - internal_static_google_storage_v2_ListHmacKeysResponse_descriptor = - getDescriptor().getMessageTypes().get(35); - internal_static_google_storage_v2_ListHmacKeysResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_storage_v2_ListHmacKeysResponse_descriptor, - new java.lang.String[] { - "HmacKeys", "NextPageToken", - }); - internal_static_google_storage_v2_UpdateHmacKeyRequest_descriptor = - getDescriptor().getMessageTypes().get(36); - internal_static_google_storage_v2_UpdateHmacKeyRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_storage_v2_UpdateHmacKeyRequest_descriptor, - new java.lang.String[] { - "HmacKey", "UpdateMask", - }); - internal_static_google_storage_v2_HmacKeyMetadata_descriptor = - getDescriptor().getMessageTypes().get(37); - internal_static_google_storage_v2_HmacKeyMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_storage_v2_HmacKeyMetadata_descriptor, - new java.lang.String[] { - "Id", - "AccessId", - "Project", - "ServiceAccountEmail", - "State", - "CreateTime", - "UpdateTime", - "Etag", - }); internal_static_google_storage_v2_CommonObjectRequestParams_descriptor = - getDescriptor().getMessageTypes().get(38); + getDescriptor().getMessageTypes().get(28); internal_static_google_storage_v2_CommonObjectRequestParams_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_storage_v2_CommonObjectRequestParams_descriptor, @@ -1422,12 +1168,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "EncryptionAlgorithm", "EncryptionKeyBytes", "EncryptionKeySha256Bytes", }); internal_static_google_storage_v2_ServiceConstants_descriptor = - getDescriptor().getMessageTypes().get(39); + getDescriptor().getMessageTypes().get(29); internal_static_google_storage_v2_ServiceConstants_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_storage_v2_ServiceConstants_descriptor, new java.lang.String[] {}); - internal_static_google_storage_v2_Bucket_descriptor = getDescriptor().getMessageTypes().get(40); + internal_static_google_storage_v2_Bucket_descriptor = getDescriptor().getMessageTypes().get(30); internal_static_google_storage_v2_Bucket_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_storage_v2_Bucket_descriptor, @@ -1618,7 +1364,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_storage_v2_BucketAccessControl_descriptor = - getDescriptor().getMessageTypes().get(41); + getDescriptor().getMessageTypes().get(31); internal_static_google_storage_v2_BucketAccessControl_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_storage_v2_BucketAccessControl_descriptor, @@ -1634,7 +1380,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ProjectTeam", }); internal_static_google_storage_v2_ChecksummedData_descriptor = - getDescriptor().getMessageTypes().get(42); + getDescriptor().getMessageTypes().get(32); internal_static_google_storage_v2_ChecksummedData_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_storage_v2_ChecksummedData_descriptor, @@ -1642,7 +1388,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Content", "Crc32C", }); internal_static_google_storage_v2_ObjectChecksums_descriptor = - getDescriptor().getMessageTypes().get(43); + getDescriptor().getMessageTypes().get(33); internal_static_google_storage_v2_ObjectChecksums_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_storage_v2_ObjectChecksums_descriptor, @@ -1650,14 +1396,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Crc32C", "Md5Hash", }); internal_static_google_storage_v2_CustomerEncryption_descriptor = - getDescriptor().getMessageTypes().get(44); + getDescriptor().getMessageTypes().get(34); internal_static_google_storage_v2_CustomerEncryption_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_storage_v2_CustomerEncryption_descriptor, new java.lang.String[] { "EncryptionAlgorithm", "KeySha256Bytes", }); - internal_static_google_storage_v2_Object_descriptor = getDescriptor().getMessageTypes().get(45); + internal_static_google_storage_v2_Object_descriptor = getDescriptor().getMessageTypes().get(35); internal_static_google_storage_v2_Object_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_storage_v2_Object_descriptor, @@ -1702,7 +1448,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_storage_v2_ObjectAccessControl_descriptor = - getDescriptor().getMessageTypes().get(46); + getDescriptor().getMessageTypes().get(36); internal_static_google_storage_v2_ObjectAccessControl_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_storage_v2_ObjectAccessControl_descriptor, @@ -1718,7 +1464,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ProjectTeam", }); internal_static_google_storage_v2_ListObjectsResponse_descriptor = - getDescriptor().getMessageTypes().get(47); + getDescriptor().getMessageTypes().get(37); internal_static_google_storage_v2_ListObjectsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_storage_v2_ListObjectsResponse_descriptor, @@ -1726,14 +1472,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Objects", "Prefixes", "NextPageToken", }); internal_static_google_storage_v2_ProjectTeam_descriptor = - getDescriptor().getMessageTypes().get(48); + getDescriptor().getMessageTypes().get(38); internal_static_google_storage_v2_ProjectTeam_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_storage_v2_ProjectTeam_descriptor, new java.lang.String[] { "ProjectNumber", "Team", }); - internal_static_google_storage_v2_Owner_descriptor = getDescriptor().getMessageTypes().get(49); + internal_static_google_storage_v2_Owner_descriptor = getDescriptor().getMessageTypes().get(39); internal_static_google_storage_v2_Owner_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_storage_v2_Owner_descriptor, @@ -1741,75 +1487,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Entity", "EntityId", }); internal_static_google_storage_v2_ContentRange_descriptor = - getDescriptor().getMessageTypes().get(50); + getDescriptor().getMessageTypes().get(40); internal_static_google_storage_v2_ContentRange_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_storage_v2_ContentRange_descriptor, new java.lang.String[] { "Start", "End", "CompleteLength", }); - internal_static_google_storage_v2_DeleteNotificationConfigRequest_descriptor = - getDescriptor().getMessageTypes().get(51); - internal_static_google_storage_v2_DeleteNotificationConfigRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_storage_v2_DeleteNotificationConfigRequest_descriptor, - new java.lang.String[] { - "Name", - }); - internal_static_google_storage_v2_GetNotificationConfigRequest_descriptor = - getDescriptor().getMessageTypes().get(52); - internal_static_google_storage_v2_GetNotificationConfigRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_storage_v2_GetNotificationConfigRequest_descriptor, - new java.lang.String[] { - "Name", - }); - internal_static_google_storage_v2_CreateNotificationConfigRequest_descriptor = - getDescriptor().getMessageTypes().get(53); - internal_static_google_storage_v2_CreateNotificationConfigRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_storage_v2_CreateNotificationConfigRequest_descriptor, - new java.lang.String[] { - "Parent", "NotificationConfig", - }); - internal_static_google_storage_v2_ListNotificationConfigsRequest_descriptor = - getDescriptor().getMessageTypes().get(54); - internal_static_google_storage_v2_ListNotificationConfigsRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_storage_v2_ListNotificationConfigsRequest_descriptor, - new java.lang.String[] { - "Parent", "PageSize", "PageToken", - }); - internal_static_google_storage_v2_ListNotificationConfigsResponse_descriptor = - getDescriptor().getMessageTypes().get(55); - internal_static_google_storage_v2_ListNotificationConfigsResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_storage_v2_ListNotificationConfigsResponse_descriptor, - new java.lang.String[] { - "NotificationConfigs", "NextPageToken", - }); - internal_static_google_storage_v2_NotificationConfig_descriptor = - getDescriptor().getMessageTypes().get(56); - internal_static_google_storage_v2_NotificationConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_storage_v2_NotificationConfig_descriptor, - new java.lang.String[] { - "Name", - "Topic", - "Etag", - "EventTypes", - "CustomAttributes", - "ObjectNamePrefix", - "PayloadFormat", - }); - internal_static_google_storage_v2_NotificationConfig_CustomAttributesEntry_descriptor = - internal_static_google_storage_v2_NotificationConfig_descriptor.getNestedTypes().get(0); - internal_static_google_storage_v2_NotificationConfig_CustomAttributesEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_storage_v2_NotificationConfig_CustomAttributesEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.ClientProto.defaultHost); diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/UpdateHmacKeyRequest.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/UpdateHmacKeyRequest.java deleted file mode 100644 index 0786c72c4..000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/UpdateHmacKeyRequest.java +++ /dev/null @@ -1,1070 +0,0 @@ -/* - * Copyright 2024 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/storage/v2/storage.proto - -// Protobuf Java Version: 3.25.5 -package com.google.storage.v2; - -/** - * - * - *
- * Request object to update an HMAC key state.
- * HmacKeyMetadata.state is required and the only writable field in
- * UpdateHmacKey operation. Specifying fields other than state will result in an
- * error.
- * 
- * - * Protobuf type {@code google.storage.v2.UpdateHmacKeyRequest} - */ -public final class UpdateHmacKeyRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.storage.v2.UpdateHmacKeyRequest) - UpdateHmacKeyRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use UpdateHmacKeyRequest.newBuilder() to construct. - private UpdateHmacKeyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private UpdateHmacKeyRequest() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new UpdateHmacKeyRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_UpdateHmacKeyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_UpdateHmacKeyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.UpdateHmacKeyRequest.class, - com.google.storage.v2.UpdateHmacKeyRequest.Builder.class); - } - - private int bitField0_; - public static final int HMAC_KEY_FIELD_NUMBER = 1; - private com.google.storage.v2.HmacKeyMetadata hmacKey_; - /** - * - * - *
-   * Required. The HMAC key to update.
-   * If present, the hmac_key's `id` field will be used to identify the key.
-   * Otherwise, the hmac_key's access_id and project fields will be used to
-   * identify the key.
-   * 
- * - * - * .google.storage.v2.HmacKeyMetadata hmac_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the hmacKey field is set. - */ - @java.lang.Override - public boolean hasHmacKey() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
-   * Required. The HMAC key to update.
-   * If present, the hmac_key's `id` field will be used to identify the key.
-   * Otherwise, the hmac_key's access_id and project fields will be used to
-   * identify the key.
-   * 
- * - * - * .google.storage.v2.HmacKeyMetadata hmac_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The hmacKey. - */ - @java.lang.Override - public com.google.storage.v2.HmacKeyMetadata getHmacKey() { - return hmacKey_ == null ? com.google.storage.v2.HmacKeyMetadata.getDefaultInstance() : hmacKey_; - } - /** - * - * - *
-   * Required. The HMAC key to update.
-   * If present, the hmac_key's `id` field will be used to identify the key.
-   * Otherwise, the hmac_key's access_id and project fields will be used to
-   * identify the key.
-   * 
- * - * - * .google.storage.v2.HmacKeyMetadata hmac_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.storage.v2.HmacKeyMetadataOrBuilder getHmacKeyOrBuilder() { - return hmacKey_ == null ? com.google.storage.v2.HmacKeyMetadata.getDefaultInstance() : hmacKey_; - } - - public static final int UPDATE_MASK_FIELD_NUMBER = 3; - private com.google.protobuf.FieldMask updateMask_; - /** - * - * - *
-   * Update mask for hmac_key.
-   * Not specifying any fields will mean only the `state` field is updated to
-   * the value specified in `hmac_key`.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * - * @return Whether the updateMask field is set. - */ - @java.lang.Override - public boolean hasUpdateMask() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * - * - *
-   * Update mask for hmac_key.
-   * Not specifying any fields will mean only the `state` field is updated to
-   * the value specified in `hmac_key`.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * - * @return The updateMask. - */ - @java.lang.Override - public com.google.protobuf.FieldMask getUpdateMask() { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - /** - * - * - *
-   * Update mask for hmac_key.
-   * Not specifying any fields will mean only the `state` field is updated to
-   * the value specified in `hmac_key`.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - @java.lang.Override - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - - 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 (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getHmacKey()); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(3, getUpdateMask()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getHmacKey()); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateMask()); - } - size += getUnknownFields().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.UpdateHmacKeyRequest)) { - return super.equals(obj); - } - com.google.storage.v2.UpdateHmacKeyRequest other = - (com.google.storage.v2.UpdateHmacKeyRequest) obj; - - if (hasHmacKey() != other.hasHmacKey()) return false; - if (hasHmacKey()) { - if (!getHmacKey().equals(other.getHmacKey())) return false; - } - if (hasUpdateMask() != other.hasUpdateMask()) return false; - if (hasUpdateMask()) { - if (!getUpdateMask().equals(other.getUpdateMask())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasHmacKey()) { - hash = (37 * hash) + HMAC_KEY_FIELD_NUMBER; - hash = (53 * hash) + getHmacKey().hashCode(); - } - if (hasUpdateMask()) { - hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; - hash = (53 * hash) + getUpdateMask().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.storage.v2.UpdateHmacKeyRequest parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.UpdateHmacKeyRequest 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.UpdateHmacKeyRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.UpdateHmacKeyRequest 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.UpdateHmacKeyRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.UpdateHmacKeyRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.storage.v2.UpdateHmacKeyRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.storage.v2.UpdateHmacKeyRequest 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.UpdateHmacKeyRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.storage.v2.UpdateHmacKeyRequest 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.UpdateHmacKeyRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.storage.v2.UpdateHmacKeyRequest 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.UpdateHmacKeyRequest 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; - } - /** - * - * - *
-   * Request object to update an HMAC key state.
-   * HmacKeyMetadata.state is required and the only writable field in
-   * UpdateHmacKey operation. Specifying fields other than state will result in an
-   * error.
-   * 
- * - * Protobuf type {@code google.storage.v2.UpdateHmacKeyRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.storage.v2.UpdateHmacKeyRequest) - com.google.storage.v2.UpdateHmacKeyRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_UpdateHmacKeyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_UpdateHmacKeyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.UpdateHmacKeyRequest.class, - com.google.storage.v2.UpdateHmacKeyRequest.Builder.class); - } - - // Construct using com.google.storage.v2.UpdateHmacKeyRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getHmacKeyFieldBuilder(); - getUpdateMaskFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - hmacKey_ = null; - if (hmacKeyBuilder_ != null) { - hmacKeyBuilder_.dispose(); - hmacKeyBuilder_ = null; - } - updateMask_ = null; - if (updateMaskBuilder_ != null) { - updateMaskBuilder_.dispose(); - updateMaskBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_UpdateHmacKeyRequest_descriptor; - } - - @java.lang.Override - public com.google.storage.v2.UpdateHmacKeyRequest getDefaultInstanceForType() { - return com.google.storage.v2.UpdateHmacKeyRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.storage.v2.UpdateHmacKeyRequest build() { - com.google.storage.v2.UpdateHmacKeyRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.storage.v2.UpdateHmacKeyRequest buildPartial() { - com.google.storage.v2.UpdateHmacKeyRequest result = - new com.google.storage.v2.UpdateHmacKeyRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.storage.v2.UpdateHmacKeyRequest result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.hmacKey_ = hmacKeyBuilder_ == null ? hmacKey_ : hmacKeyBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - result.bitField0_ |= to_bitField0_; - } - - @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.UpdateHmacKeyRequest) { - return mergeFrom((com.google.storage.v2.UpdateHmacKeyRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.storage.v2.UpdateHmacKeyRequest other) { - if (other == com.google.storage.v2.UpdateHmacKeyRequest.getDefaultInstance()) return this; - if (other.hasHmacKey()) { - mergeHmacKey(other.getHmacKey()); - } - if (other.hasUpdateMask()) { - mergeUpdateMask(other.getUpdateMask()); - } - this.mergeUnknownFields(other.getUnknownFields()); - 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 { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage(getHmacKeyFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 26: - { - input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private com.google.storage.v2.HmacKeyMetadata hmacKey_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.storage.v2.HmacKeyMetadata, - com.google.storage.v2.HmacKeyMetadata.Builder, - com.google.storage.v2.HmacKeyMetadataOrBuilder> - hmacKeyBuilder_; - /** - * - * - *
-     * Required. The HMAC key to update.
-     * If present, the hmac_key's `id` field will be used to identify the key.
-     * Otherwise, the hmac_key's access_id and project fields will be used to
-     * identify the key.
-     * 
- * - * - * .google.storage.v2.HmacKeyMetadata hmac_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the hmacKey field is set. - */ - public boolean hasHmacKey() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
-     * Required. The HMAC key to update.
-     * If present, the hmac_key's `id` field will be used to identify the key.
-     * Otherwise, the hmac_key's access_id and project fields will be used to
-     * identify the key.
-     * 
- * - * - * .google.storage.v2.HmacKeyMetadata hmac_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The hmacKey. - */ - public com.google.storage.v2.HmacKeyMetadata getHmacKey() { - if (hmacKeyBuilder_ == null) { - return hmacKey_ == null - ? com.google.storage.v2.HmacKeyMetadata.getDefaultInstance() - : hmacKey_; - } else { - return hmacKeyBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. The HMAC key to update.
-     * If present, the hmac_key's `id` field will be used to identify the key.
-     * Otherwise, the hmac_key's access_id and project fields will be used to
-     * identify the key.
-     * 
- * - * - * .google.storage.v2.HmacKeyMetadata hmac_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setHmacKey(com.google.storage.v2.HmacKeyMetadata value) { - if (hmacKeyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - hmacKey_ = value; - } else { - hmacKeyBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The HMAC key to update.
-     * If present, the hmac_key's `id` field will be used to identify the key.
-     * Otherwise, the hmac_key's access_id and project fields will be used to
-     * identify the key.
-     * 
- * - * - * .google.storage.v2.HmacKeyMetadata hmac_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setHmacKey(com.google.storage.v2.HmacKeyMetadata.Builder builderForValue) { - if (hmacKeyBuilder_ == null) { - hmacKey_ = builderForValue.build(); - } else { - hmacKeyBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The HMAC key to update.
-     * If present, the hmac_key's `id` field will be used to identify the key.
-     * Otherwise, the hmac_key's access_id and project fields will be used to
-     * identify the key.
-     * 
- * - * - * .google.storage.v2.HmacKeyMetadata hmac_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeHmacKey(com.google.storage.v2.HmacKeyMetadata value) { - if (hmacKeyBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && hmacKey_ != null - && hmacKey_ != com.google.storage.v2.HmacKeyMetadata.getDefaultInstance()) { - getHmacKeyBuilder().mergeFrom(value); - } else { - hmacKey_ = value; - } - } else { - hmacKeyBuilder_.mergeFrom(value); - } - if (hmacKey_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * - * - *
-     * Required. The HMAC key to update.
-     * If present, the hmac_key's `id` field will be used to identify the key.
-     * Otherwise, the hmac_key's access_id and project fields will be used to
-     * identify the key.
-     * 
- * - * - * .google.storage.v2.HmacKeyMetadata hmac_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearHmacKey() { - bitField0_ = (bitField0_ & ~0x00000001); - hmacKey_ = null; - if (hmacKeyBuilder_ != null) { - hmacKeyBuilder_.dispose(); - hmacKeyBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The HMAC key to update.
-     * If present, the hmac_key's `id` field will be used to identify the key.
-     * Otherwise, the hmac_key's access_id and project fields will be used to
-     * identify the key.
-     * 
- * - * - * .google.storage.v2.HmacKeyMetadata hmac_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.storage.v2.HmacKeyMetadata.Builder getHmacKeyBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getHmacKeyFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. The HMAC key to update.
-     * If present, the hmac_key's `id` field will be used to identify the key.
-     * Otherwise, the hmac_key's access_id and project fields will be used to
-     * identify the key.
-     * 
- * - * - * .google.storage.v2.HmacKeyMetadata hmac_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.storage.v2.HmacKeyMetadataOrBuilder getHmacKeyOrBuilder() { - if (hmacKeyBuilder_ != null) { - return hmacKeyBuilder_.getMessageOrBuilder(); - } else { - return hmacKey_ == null - ? com.google.storage.v2.HmacKeyMetadata.getDefaultInstance() - : hmacKey_; - } - } - /** - * - * - *
-     * Required. The HMAC key to update.
-     * If present, the hmac_key's `id` field will be used to identify the key.
-     * Otherwise, the hmac_key's access_id and project fields will be used to
-     * identify the key.
-     * 
- * - * - * .google.storage.v2.HmacKeyMetadata hmac_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.storage.v2.HmacKeyMetadata, - com.google.storage.v2.HmacKeyMetadata.Builder, - com.google.storage.v2.HmacKeyMetadataOrBuilder> - getHmacKeyFieldBuilder() { - if (hmacKeyBuilder_ == null) { - hmacKeyBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.storage.v2.HmacKeyMetadata, - com.google.storage.v2.HmacKeyMetadata.Builder, - com.google.storage.v2.HmacKeyMetadataOrBuilder>( - getHmacKey(), getParentForChildren(), isClean()); - hmacKey_ = null; - } - return hmacKeyBuilder_; - } - - private com.google.protobuf.FieldMask updateMask_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder> - updateMaskBuilder_; - /** - * - * - *
-     * Update mask for hmac_key.
-     * Not specifying any fields will mean only the `state` field is updated to
-     * the value specified in `hmac_key`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * - * @return Whether the updateMask field is set. - */ - public boolean hasUpdateMask() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * - * - *
-     * Update mask for hmac_key.
-     * Not specifying any fields will mean only the `state` field is updated to
-     * the value specified in `hmac_key`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * - * @return The updateMask. - */ - public com.google.protobuf.FieldMask getUpdateMask() { - if (updateMaskBuilder_ == null) { - return updateMask_ == null - ? com.google.protobuf.FieldMask.getDefaultInstance() - : updateMask_; - } else { - return updateMaskBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Update mask for hmac_key.
-     * Not specifying any fields will mean only the `state` field is updated to
-     * the value specified in `hmac_key`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public Builder setUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateMask_ = value; - } else { - updateMaskBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Update mask for hmac_key.
-     * Not specifying any fields will mean only the `state` field is updated to
-     * the value specified in `hmac_key`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { - if (updateMaskBuilder_ == null) { - updateMask_ = builderForValue.build(); - } else { - updateMaskBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Update mask for hmac_key.
-     * Not specifying any fields will mean only the `state` field is updated to
-     * the value specified in `hmac_key`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && updateMask_ != null - && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { - getUpdateMaskBuilder().mergeFrom(value); - } else { - updateMask_ = value; - } - } else { - updateMaskBuilder_.mergeFrom(value); - } - if (updateMask_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - /** - * - * - *
-     * Update mask for hmac_key.
-     * Not specifying any fields will mean only the `state` field is updated to
-     * the value specified in `hmac_key`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public Builder clearUpdateMask() { - bitField0_ = (bitField0_ & ~0x00000002); - updateMask_ = null; - if (updateMaskBuilder_ != null) { - updateMaskBuilder_.dispose(); - updateMaskBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Update mask for hmac_key.
-     * Not specifying any fields will mean only the `state` field is updated to
-     * the value specified in `hmac_key`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getUpdateMaskFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Update mask for hmac_key.
-     * Not specifying any fields will mean only the `state` field is updated to
-     * the value specified in `hmac_key`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - if (updateMaskBuilder_ != null) { - return updateMaskBuilder_.getMessageOrBuilder(); - } else { - return updateMask_ == null - ? com.google.protobuf.FieldMask.getDefaultInstance() - : updateMask_; - } - } - /** - * - * - *
-     * Update mask for hmac_key.
-     * Not specifying any fields will mean only the `state` field is updated to
-     * the value specified in `hmac_key`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder> - getUpdateMaskFieldBuilder() { - if (updateMaskBuilder_ == null) { - updateMaskBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder>( - getUpdateMask(), getParentForChildren(), isClean()); - updateMask_ = null; - } - return updateMaskBuilder_; - } - - @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.UpdateHmacKeyRequest) - } - - // @@protoc_insertion_point(class_scope:google.storage.v2.UpdateHmacKeyRequest) - private static final com.google.storage.v2.UpdateHmacKeyRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.storage.v2.UpdateHmacKeyRequest(); - } - - public static com.google.storage.v2.UpdateHmacKeyRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateHmacKeyRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - 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.UpdateHmacKeyRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/UpdateHmacKeyRequestOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/UpdateHmacKeyRequestOrBuilder.java deleted file mode 100644 index a754f0fc2..000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/UpdateHmacKeyRequestOrBuilder.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright 2024 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/storage/v2/storage.proto - -// Protobuf Java Version: 3.25.5 -package com.google.storage.v2; - -public interface UpdateHmacKeyRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.storage.v2.UpdateHmacKeyRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The HMAC key to update.
-   * If present, the hmac_key's `id` field will be used to identify the key.
-   * Otherwise, the hmac_key's access_id and project fields will be used to
-   * identify the key.
-   * 
- * - * - * .google.storage.v2.HmacKeyMetadata hmac_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the hmacKey field is set. - */ - boolean hasHmacKey(); - /** - * - * - *
-   * Required. The HMAC key to update.
-   * If present, the hmac_key's `id` field will be used to identify the key.
-   * Otherwise, the hmac_key's access_id and project fields will be used to
-   * identify the key.
-   * 
- * - * - * .google.storage.v2.HmacKeyMetadata hmac_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The hmacKey. - */ - com.google.storage.v2.HmacKeyMetadata getHmacKey(); - /** - * - * - *
-   * Required. The HMAC key to update.
-   * If present, the hmac_key's `id` field will be used to identify the key.
-   * Otherwise, the hmac_key's access_id and project fields will be used to
-   * identify the key.
-   * 
- * - * - * .google.storage.v2.HmacKeyMetadata hmac_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.storage.v2.HmacKeyMetadataOrBuilder getHmacKeyOrBuilder(); - - /** - * - * - *
-   * Update mask for hmac_key.
-   * Not specifying any fields will mean only the `state` field is updated to
-   * the value specified in `hmac_key`.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * - * @return Whether the updateMask field is set. - */ - boolean hasUpdateMask(); - /** - * - * - *
-   * Update mask for hmac_key.
-   * Not specifying any fields will mean only the `state` field is updated to
-   * the value specified in `hmac_key`.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * - * @return The updateMask. - */ - com.google.protobuf.FieldMask getUpdateMask(); - /** - * - * - *
-   * Update mask for hmac_key.
-   * Not specifying any fields will mean only the `state` field is updated to
-   * the value specified in `hmac_key`.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); -} 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 31a716438..c7229d4e9 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 @@ -379,112 +379,6 @@ service Storage { }; option (google.api.method_signature) = "upload_id"; } - - // Retrieves the name of a project's Google Cloud Storage service account. - rpc GetServiceAccount(GetServiceAccountRequest) returns (ServiceAccount) { - option deprecated = true; - option (google.api.routing) = { - routing_parameters { field: "project" } - }; - option (google.api.method_signature) = "project"; - } - - // Creates a new HMAC key for the given service account. - rpc CreateHmacKey(CreateHmacKeyRequest) returns (CreateHmacKeyResponse) { - option deprecated = true; - option (google.api.routing) = { - routing_parameters { field: "project" } - }; - option (google.api.method_signature) = "project,service_account_email"; - } - - // Deletes a given HMAC key. Key must be in an INACTIVE state. - rpc DeleteHmacKey(DeleteHmacKeyRequest) returns (google.protobuf.Empty) { - option deprecated = true; - option (google.api.routing) = { - routing_parameters { field: "project" } - }; - option (google.api.method_signature) = "access_id,project"; - } - - // Gets an existing HMAC key metadata for the given id. - rpc GetHmacKey(GetHmacKeyRequest) returns (HmacKeyMetadata) { - option deprecated = true; - option (google.api.routing) = { - routing_parameters { field: "project" } - }; - option (google.api.method_signature) = "access_id,project"; - } - - // Lists HMAC keys under a given project with the additional filters provided. - rpc ListHmacKeys(ListHmacKeysRequest) returns (ListHmacKeysResponse) { - option deprecated = true; - option (google.api.routing) = { - routing_parameters { field: "project" } - }; - option (google.api.method_signature) = "project"; - } - - // Updates a given HMAC key state between ACTIVE and INACTIVE. - rpc UpdateHmacKey(UpdateHmacKeyRequest) returns (HmacKeyMetadata) { - option deprecated = true; - option (google.api.routing) = { - routing_parameters { - field: "hmac_key.project" - path_template: "{project=**}" - } - }; - option (google.api.method_signature) = "hmac_key,update_mask"; - } - - // Permanently deletes a NotificationConfig. - rpc DeleteNotificationConfig(DeleteNotificationConfigRequest) - returns (google.protobuf.Empty) { - option deprecated = true; - option (google.api.routing) = { - routing_parameters { - field: "name" - path_template: "{bucket=projects/*/buckets/*}/**" - } - }; - option (google.api.method_signature) = "name"; - } - - // View a NotificationConfig. - rpc GetNotificationConfig(GetNotificationConfigRequest) - returns (NotificationConfig) { - option deprecated = true; - option (google.api.routing) = { - routing_parameters { - field: "name" - path_template: "{bucket=projects/*/buckets/*}/**" - } - }; - option (google.api.method_signature) = "name"; - } - - // Creates a NotificationConfig for a given bucket. - // These NotificationConfigs, when triggered, publish messages to the - // specified Pub/Sub topics. See - // https://cloud.google.com/storage/docs/pubsub-notifications. - rpc CreateNotificationConfig(CreateNotificationConfigRequest) - returns (NotificationConfig) { - option deprecated = true; - option (google.api.routing) = { - routing_parameters { field: "parent" path_template: "{bucket=**}" } - }; - option (google.api.method_signature) = "parent,notification_config"; - } - - // Retrieves a list of NotificationConfigs for a given bucket. - rpc ListNotificationConfigs(ListNotificationConfigsRequest) - returns (ListNotificationConfigsResponse) { - option deprecated = true; - option (google.api.routing) = { - routing_parameters { field: "parent" path_template: "{bucket=**}" } - }; - option (google.api.method_signature) = "parent"; - } } // Request message for DeleteBucket. @@ -1477,175 +1371,6 @@ message UpdateObjectRequest { CommonObjectRequestParams common_object_request_params = 8; } -// Request message for GetServiceAccount. -message GetServiceAccountRequest { - // Required. Project ID, in the format of "projects/{projectIdentifier}". - // {projectIdentifier} can be the project ID or project number. - string project = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "cloudresourcemanager.googleapis.com/Project" - } - ]; -} - -// A service account, owned by Cloud Storage, which may be used when taking -// action on behalf of a given project, for example to publish Pub/Sub -// notifications or to retrieve security keys. -message ServiceAccount { - // The ID of the notification. - string email_address = 1; -} - -// Request message for CreateHmacKey. -message CreateHmacKeyRequest { - // Required. The project that the HMAC-owning service account lives in, in the - // format of "projects/{projectIdentifier}". {projectIdentifier} can be the - // project ID or project number. - string project = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "cloudresourcemanager.googleapis.com/Project" - } - ]; - - // Required. The service account to create the HMAC for. - string service_account_email = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Create hmac response. The only time the secret for an HMAC will be returned. -message CreateHmacKeyResponse { - // Key metadata. - HmacKeyMetadata metadata = 1; - - // HMAC key secret material. - // In raw bytes format (not base64-encoded). - bytes secret_key_bytes = 3; -} - -// Request object to delete a given HMAC key. -message DeleteHmacKeyRequest { - // Required. The identifying key for the HMAC to delete. - string access_id = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The project that owns the HMAC key, in the format of - // "projects/{projectIdentifier}". - // {projectIdentifier} can be the project ID or project number. - string project = 2 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "cloudresourcemanager.googleapis.com/Project" - } - ]; -} - -// Request object to get metadata on a given HMAC key. -message GetHmacKeyRequest { - // Required. The identifying key for the HMAC to delete. - string access_id = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The project the HMAC key lies in, in the format of - // "projects/{projectIdentifier}". - // {projectIdentifier} can be the project ID or project number. - string project = 2 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "cloudresourcemanager.googleapis.com/Project" - } - ]; -} - -// Request to fetch a list of HMAC keys under a given project. -message ListHmacKeysRequest { - // Required. The project to list HMAC keys for, in the format of - // "projects/{projectIdentifier}". - // {projectIdentifier} can be the project ID or project number. - string project = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "cloudresourcemanager.googleapis.com/Project" - } - ]; - - // The maximum number of keys to return. - int32 page_size = 2; - - // A previously returned token from ListHmacKeysResponse to get the next page. - string page_token = 3; - - // If set, filters to only return HMAC keys for specified service account. - string service_account_email = 4; - - // If set, return deleted keys that have not yet been wiped out. - bool show_deleted_keys = 5; -} - -// Hmac key list response with next page information. -message ListHmacKeysResponse { - // The list of items. - repeated HmacKeyMetadata hmac_keys = 1; - - // The continuation token, used to page through large result sets. Provide - // this value in a subsequent request to return the next page of results. - string next_page_token = 2; -} - -// Request object to update an HMAC key state. -// HmacKeyMetadata.state is required and the only writable field in -// UpdateHmacKey operation. Specifying fields other than state will result in an -// error. -message UpdateHmacKeyRequest { - // Required. The HMAC key to update. - // If present, the hmac_key's `id` field will be used to identify the key. - // Otherwise, the hmac_key's access_id and project fields will be used to - // identify the key. - HmacKeyMetadata hmac_key = 1 [(google.api.field_behavior) = REQUIRED]; - - // Update mask for hmac_key. - // Not specifying any fields will mean only the `state` field is updated to - // the value specified in `hmac_key`. - google.protobuf.FieldMask update_mask = 3; -} - -// Hmac Key Metadata, which includes all information other than the secret. -message HmacKeyMetadata { - // Immutable. Resource name ID of the key in the format - // {projectIdentifier}/{accessId}. - // {projectIdentifier} can be the project ID or project number. - string id = 1 [(google.api.field_behavior) = IMMUTABLE]; - - // Immutable. Globally unique id for keys. - string access_id = 2 [(google.api.field_behavior) = IMMUTABLE]; - - // Immutable. Identifies the project that owns the service account of the - // specified HMAC key, in the format "projects/{projectIdentifier}". - // {projectIdentifier} can be the project ID or project number. - string project = 3 [ - (google.api.field_behavior) = IMMUTABLE, - (google.api.resource_reference) = { - type: "cloudresourcemanager.googleapis.com/Project" - } - ]; - - // Output only. Email of the service account the key authenticates as. - string service_account_email = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. State of the key. One of ACTIVE, INACTIVE, or DELETED. - // Writable, can be updated by UpdateHmacKey operation. - string state = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. The creation time of the HMAC key. - google.protobuf.Timestamp create_time = 6 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The last modification time of the HMAC key metadata. - google.protobuf.Timestamp update_time = 7 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. The etag of the HMAC key. - string etag = 8 [(google.api.field_behavior) = OPTIONAL]; -} - // Parameters that can be passed to any object request. message CommonObjectRequestParams { // Encryption algorithm used with the Customer-Supplied Encryption Keys @@ -2526,115 +2251,3 @@ message ContentRange { // The complete length of the object data. int64 complete_length = 3; } - -// Request message for DeleteNotificationConfig. -message DeleteNotificationConfigRequest { - // Required. The parent bucket of the NotificationConfig. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "storage.googleapis.com/NotificationConfig" - } - ]; -} - -// Request message for GetNotificationConfig. -message GetNotificationConfigRequest { - // Required. The parent bucket of the NotificationConfig. - // Format: - // `projects/{project}/buckets/{bucket}/notificationConfigs/{notificationConfig}` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "storage.googleapis.com/NotificationConfig" - } - ]; -} - -// Request message for CreateNotificationConfig. -message CreateNotificationConfigRequest { - // Required. The bucket to which this NotificationConfig belongs. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "storage.googleapis.com/NotificationConfig" - } - ]; - - // Required. Properties of the NotificationConfig to be inserted. - NotificationConfig notification_config = 2 - [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for ListNotifications. -message ListNotificationConfigsRequest { - // Required. Name of a Google Cloud Storage bucket. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "storage.googleapis.com/NotificationConfig" - } - ]; - - // Optional. The maximum number of NotificationConfigs to return. The service - // may return fewer than this value. The default value is 100. Specifying a - // value above 100 will result in a page_size of 100. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A page token, received from a previous `ListNotificationConfigs` - // call. Provide this to retrieve the subsequent page. - // - // When paginating, all other parameters provided to `ListNotificationConfigs` - // must match the call that provided the page token. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// The result of a call to ListNotificationConfigs -message ListNotificationConfigsResponse { - // The list of items. - repeated NotificationConfig notification_configs = 1; - - // A token, which can be sent as `page_token` to retrieve the next page. - // If this field is omitted, there are no subsequent pages. - string next_page_token = 2; -} - -// A directive to publish Pub/Sub notifications upon changes to a bucket. -message NotificationConfig { - option (google.api.resource) = { - type: "storage.googleapis.com/NotificationConfig" - pattern: "projects/{project}/buckets/{bucket}/notificationConfigs/{notification_config}" - }; - - // Required. The resource name of this NotificationConfig. - // Format: - // `projects/{project}/buckets/{bucket}/notificationConfigs/{notificationConfig}` - // The `{project}` portion may be `_` for globally unique buckets. - string name = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The Pub/Sub topic to which this subscription publishes. Formatted - // as: - // '//pubsub.googleapis.com/projects/{project-identifier}/topics/{my-topic}' - string topic = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The etag of the NotificationConfig. - // If included in the metadata of GetNotificationConfigRequest, the operation - // will only be performed if the etag matches that of the NotificationConfig. - string etag = 7 [(google.api.field_behavior) = OPTIONAL]; - - // 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]; - - // Optional. A list of additional attributes to attach to each Pub/Sub - // message published for this NotificationConfig. - map custom_attributes = 4 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. If present, only apply this NotificationConfig to object names - // that begin with this prefix. - string object_name_prefix = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Required. The desired content of the Payload. - string payload_format = 6 [(google.api.field_behavior) = REQUIRED]; -} From b93c60a56b109c32f15b0f8547e4b630f2f5ba7e Mon Sep 17 00:00:00 2001 From: cloud-java-bot Date: Tue, 22 Oct 2024 02:24:29 +0000 Subject: [PATCH 12/18] chore: Update generation configuration at Tue Oct 22 02:24:18 UTC 2024 --- generation_config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generation_config.yaml b/generation_config.yaml index 65cebc81e..d3a9cc8ef 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,5 +1,5 @@ gapic_generator_version: 2.47.0 -googleapis_commitish: 211a72fa5cd90bfbfe2d86d4e8163eee23171687 +googleapis_commitish: beea48a164c2a8cc8485185c3a4f56c587090e1a libraries_bom_version: 26.49.0 libraries: - api_shortname: storage From 023488b52191951e12aefdb8d1f77e268ee9421c Mon Sep 17 00:00:00 2001 From: cloud-java-bot Date: Wed, 23 Oct 2024 02:24:01 +0000 Subject: [PATCH 13/18] chore: Update generation configuration at Wed Oct 23 02:23:47 UTC 2024 --- generation_config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generation_config.yaml b/generation_config.yaml index d3a9cc8ef..9d35ec89e 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,5 +1,5 @@ gapic_generator_version: 2.47.0 -googleapis_commitish: beea48a164c2a8cc8485185c3a4f56c587090e1a +googleapis_commitish: 099f913ac825d05776acbe656d44069b302d2345 libraries_bom_version: 26.49.0 libraries: - api_shortname: storage From 00399ce11b9ae0ec99b09ce1bef92f7fb67d4cf4 Mon Sep 17 00:00:00 2001 From: cloud-java-bot Date: Thu, 24 Oct 2024 02:23:52 +0000 Subject: [PATCH 14/18] chore: Update generation configuration at Thu Oct 24 02:23:39 UTC 2024 --- generation_config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generation_config.yaml b/generation_config.yaml index 9d35ec89e..028cf4e4c 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,5 +1,5 @@ -gapic_generator_version: 2.47.0 -googleapis_commitish: 099f913ac825d05776acbe656d44069b302d2345 +gapic_generator_version: 2.48.0 +googleapis_commitish: 7d0624db6f5b5b7d8f5cf36571b33ded2067c5e1 libraries_bom_version: 26.49.0 libraries: - api_shortname: storage From b5f6cfcff7e8cb656fa6a28f7bd49a5a81516ca0 Mon Sep 17 00:00:00 2001 From: cloud-java-bot Date: Thu, 24 Oct 2024 02:26:21 +0000 Subject: [PATCH 15/18] chore: generate libraries at Thu Oct 24 02:24:10 UTC 2024 --- .../com.google.storage.v2/reflect-config.json | 18 ++++++++++++++++++ .../reflect-config.json | 18 ++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/gapic-google-cloud-storage-v2/src/main/resources/META-INF/native-image/com.google.storage.v2/reflect-config.json b/gapic-google-cloud-storage-v2/src/main/resources/META-INF/native-image/com.google.storage.v2/reflect-config.json index f63c1baef..9a4f2eff4 100644 --- a/gapic-google-cloud-storage-v2/src/main/resources/META-INF/native-image/com.google.storage.v2/reflect-config.json +++ b/gapic-google-cloud-storage-v2/src/main/resources/META-INF/native-image/com.google.storage.v2/reflect-config.json @@ -431,6 +431,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.api.SelectiveGapicGeneration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.SelectiveGapicGeneration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.iam.v1.AuditConfig", "queryAllDeclaredConstructors": true, diff --git a/google-cloud-storage-control/src/main/resources/META-INF/native-image/com.google.storage.control.v2/reflect-config.json b/google-cloud-storage-control/src/main/resources/META-INF/native-image/com.google.storage.control.v2/reflect-config.json index 24bff013d..93efae775 100644 --- a/google-cloud-storage-control/src/main/resources/META-INF/native-image/com.google.storage.control.v2/reflect-config.json +++ b/google-cloud-storage-control/src/main/resources/META-INF/native-image/com.google.storage.control.v2/reflect-config.json @@ -458,6 +458,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.api.SelectiveGapicGeneration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.SelectiveGapicGeneration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.api.TypeReference", "queryAllDeclaredConstructors": true, From c5f957a5843b27aa981b6d738fed55ab0a3536b6 Mon Sep 17 00:00:00 2001 From: cloud-java-bot Date: Fri, 25 Oct 2024 02:24:27 +0000 Subject: [PATCH 16/18] chore: Update generation configuration at Fri Oct 25 02:24:19 UTC 2024 --- generation_config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generation_config.yaml b/generation_config.yaml index 028cf4e4c..20b923165 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,5 +1,5 @@ gapic_generator_version: 2.48.0 -googleapis_commitish: 7d0624db6f5b5b7d8f5cf36571b33ded2067c5e1 +googleapis_commitish: 537fd482f6bb8afb3a146d9b21673a8eb27958bd libraries_bom_version: 26.49.0 libraries: - api_shortname: storage From e53395f9b709cceba1b9a19bfcce93775ad77174 Mon Sep 17 00:00:00 2001 From: cloud-java-bot Date: Sat, 26 Oct 2024 02:21:45 +0000 Subject: [PATCH 17/18] chore: Update generation configuration at Sat Oct 26 02:21:35 UTC 2024 --- generation_config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generation_config.yaml b/generation_config.yaml index 20b923165..0456dcfc6 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,5 +1,5 @@ gapic_generator_version: 2.48.0 -googleapis_commitish: 537fd482f6bb8afb3a146d9b21673a8eb27958bd +googleapis_commitish: 0b8fa5230f3f04e3ea8aa8343f21b505bb2b7a10 libraries_bom_version: 26.49.0 libraries: - api_shortname: storage From 071896e7b65ab034640bb5e2240a0c7c206d2d66 Mon Sep 17 00:00:00 2001 From: cloud-java-bot Date: Sun, 27 Oct 2024 02:28:30 +0000 Subject: [PATCH 18/18] chore: Update generation configuration at Sun Oct 27 02:28:23 UTC 2024 --- generation_config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generation_config.yaml b/generation_config.yaml index 0456dcfc6..85e4d2ce0 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,5 +1,5 @@ -gapic_generator_version: 2.48.0 -googleapis_commitish: 0b8fa5230f3f04e3ea8aa8343f21b505bb2b7a10 +gapic_generator_version: 2.49.0 +googleapis_commitish: 48d30c4966ef9ea31b897e13f75d8f94070cc8e9 libraries_bom_version: 26.49.0 libraries: - api_shortname: storage