From f4e58f23d7ec440b129ce0090bcbc5301d2e1ed8 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 12 Aug 2020 17:01:43 -0700 Subject: [PATCH] feat: add client integrity verification fields to the KMS protos (#234) * changes without context autosynth cannot find the source of changes triggered by earlier changes in this repository, or by version upgrades to tools such as linters. * Add client integrity verification fields to the KMS protos PiperOrigin-RevId: 326100874 Source-Author: Google APIs Source-Date: Tue Aug 11 14:22:10 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: b40e4533f841c96aac1d9d7d342514d146b5b4cb Source-Link: https://github.com/googleapis/googleapis/commit/b40e4533f841c96aac1d9d7d342514d146b5b4cb --- README.md | 4 +- .../kms/v1/KeyManagementServiceClient.java | 8 +- .../v1/KeyManagementServiceClientTest.java | 29 +- .../kms/v1/AsymmetricDecryptRequest.java | 456 +++++++++ .../v1/AsymmetricDecryptRequestOrBuilder.java | 80 ++ .../kms/v1/AsymmetricDecryptResponse.java | 530 ++++++++++ .../AsymmetricDecryptResponseOrBuilder.java | 89 ++ .../cloud/kms/v1/AsymmetricSignRequest.java | 453 +++++++++ .../v1/AsymmetricSignRequestOrBuilder.java | 77 ++ .../cloud/kms/v1/AsymmetricSignResponse.java | 723 ++++++++++++++ .../v1/AsymmetricSignResponseOrBuilder.java | 118 +++ .../com/google/cloud/kms/v1/CryptoKey.java | 8 +- .../google/cloud/kms/v1/DecryptRequest.java | 931 ++++++++++++++++++ .../cloud/kms/v1/DecryptRequestOrBuilder.java | 163 +++ .../google/cloud/kms/v1/DecryptResponse.java | 432 ++++++++ .../kms/v1/DecryptResponseOrBuilder.java | 74 ++ .../google/cloud/kms/v1/EncryptRequest.java | 931 ++++++++++++++++++ .../cloud/kms/v1/EncryptRequestOrBuilder.java | 163 +++ .../google/cloud/kms/v1/EncryptResponse.java | 664 +++++++++++++ .../kms/v1/EncryptResponseOrBuilder.java | 111 +++ .../com/google/cloud/kms/v1/KmsProto.java | 509 +++++----- .../cloud/kms/v1/KmsResourcesProto.java | 249 ++--- .../com/google/cloud/kms/v1/PublicKey.java | 597 +++++++++++ .../cloud/kms/v1/PublicKeyOrBuilder.java | 97 ++ .../proto/google/cloud/kms/v1/resources.proto | 26 +- .../proto/google/cloud/kms/v1/service.proto | 222 +++++ synth.metadata | 6 +- 27 files changed, 7372 insertions(+), 378 deletions(-) diff --git a/README.md b/README.md index 0d863138..ee371f5e 100644 --- a/README.md +++ b/README.md @@ -48,11 +48,11 @@ If you are using Maven without BOM, add this to your dependencies: If you are using Gradle, add this to your dependencies ```Groovy -compile 'com.google.cloud:google-cloud-kms:1.39.1' +compile 'com.google.cloud:google-cloud-kms:1.39.0' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-kms" % "1.39.1" +libraryDependencies += "com.google.cloud" % "google-cloud-kms" % "1.39.0" ``` [//]: # ({x-version-update-end}) diff --git a/google-cloud-kms/src/main/java/com/google/cloud/kms/v1/KeyManagementServiceClient.java b/google-cloud-kms/src/main/java/com/google/cloud/kms/v1/KeyManagementServiceClient.java index 84a9ef21..9ed98a16 100644 --- a/google-cloud-kms/src/main/java/com/google/cloud/kms/v1/KeyManagementServiceClient.java +++ b/google-cloud-kms/src/main/java/com/google/cloud/kms/v1/KeyManagementServiceClient.java @@ -529,7 +529,7 @@ public final UnaryCallable createCryptoKeyCal /** * Sets the access control policy on the specified resource. Replaces any existing policy. * - *

Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. * *

Sample code: * @@ -617,7 +617,7 @@ public final Policy setIamPolicy(String resource, Policy policy) { /** * Sets the access control policy on the specified resource. Replaces any existing policy. * - *

Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. * *

Sample code: * @@ -738,7 +738,7 @@ public final UnaryCallable getIamPolicyCallable() { // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Returns permissions that a caller has on the specified resource. If the resource does not - * exist, this will return an empty set of permissions, not a NOT_FOUND error. + * exist, this will return an empty set of permissions, not a `NOT_FOUND` error. * *

Note: This operation is designed to be used for building permission-aware UIs and * command-line tools, not for authorization checking. This operation may "fail open" without @@ -840,7 +840,7 @@ public final TestIamPermissionsResponse testIamPermissions( // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Returns permissions that a caller has on the specified resource. If the resource does not - * exist, this will return an empty set of permissions, not a NOT_FOUND error. + * exist, this will return an empty set of permissions, not a `NOT_FOUND` error. * *

Note: This operation is designed to be used for building permission-aware UIs and * command-line tools, not for authorization checking. This operation may "fail open" without diff --git a/google-cloud-kms/src/test/java/com/google/cloud/kms/v1/KeyManagementServiceClientTest.java b/google-cloud-kms/src/test/java/com/google/cloud/kms/v1/KeyManagementServiceClientTest.java index bcdf7d54..bb103b52 100644 --- a/google-cloud-kms/src/test/java/com/google/cloud/kms/v1/KeyManagementServiceClientTest.java +++ b/google-cloud-kms/src/test/java/com/google/cloud/kms/v1/KeyManagementServiceClientTest.java @@ -706,7 +706,11 @@ public void getCryptoKeyVersionExceptionTest() throws Exception { @SuppressWarnings("all") public void getPublicKeyTest() { String pem = "pem110872"; - PublicKey expectedResponse = PublicKey.newBuilder().setPem(pem).build(); + PublicKeyName name2 = + PublicKeyName.of( + "[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]", "[CRYPTO_KEY_VERSION]"); + PublicKey expectedResponse = + PublicKey.newBuilder().setPem(pem).setName(name2.toString()).build(); mockKeyManagementService.addResponse(expectedResponse); CryptoKeyVersionName name = @@ -1054,8 +1058,15 @@ public void updateCryptoKeyVersionExceptionTest() throws Exception { public void encryptTest() { String name2 = "name2-1052831874"; ByteString ciphertext = ByteString.copyFromUtf8("-72"); + boolean verifiedPlaintextCrc32c = false; + boolean verifiedAdditionalAuthenticatedDataCrc32c = true; EncryptResponse expectedResponse = - EncryptResponse.newBuilder().setName(name2).setCiphertext(ciphertext).build(); + EncryptResponse.newBuilder() + .setName(name2) + .setCiphertext(ciphertext) + .setVerifiedPlaintextCrc32C(verifiedPlaintextCrc32c) + .setVerifiedAdditionalAuthenticatedDataCrc32C(verifiedAdditionalAuthenticatedDataCrc32c) + .build(); mockKeyManagementService.addResponse(expectedResponse); ResourceName name = CryptoKeyName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]"); @@ -1140,8 +1151,14 @@ public void decryptExceptionTest() throws Exception { @SuppressWarnings("all") public void asymmetricSignTest() { ByteString signature = ByteString.copyFromUtf8("106"); + boolean verifiedDigestCrc32c = true; + String name2 = "name2-1052831874"; AsymmetricSignResponse expectedResponse = - AsymmetricSignResponse.newBuilder().setSignature(signature).build(); + AsymmetricSignResponse.newBuilder() + .setSignature(signature) + .setVerifiedDigestCrc32C(verifiedDigestCrc32c) + .setName(name2) + .build(); mockKeyManagementService.addResponse(expectedResponse); CryptoKeyVersionName name = @@ -1187,8 +1204,12 @@ public void asymmetricSignExceptionTest() throws Exception { @SuppressWarnings("all") public void asymmetricDecryptTest() { ByteString plaintext = ByteString.copyFromUtf8("-9"); + boolean verifiedCiphertextCrc32c = true; AsymmetricDecryptResponse expectedResponse = - AsymmetricDecryptResponse.newBuilder().setPlaintext(plaintext).build(); + AsymmetricDecryptResponse.newBuilder() + .setPlaintext(plaintext) + .setVerifiedCiphertextCrc32C(verifiedCiphertextCrc32c) + .build(); mockKeyManagementService.addResponse(expectedResponse); CryptoKeyVersionName name = diff --git a/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/AsymmetricDecryptRequest.java b/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/AsymmetricDecryptRequest.java index ba521ab1..79de6ad4 100644 --- a/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/AsymmetricDecryptRequest.java +++ b/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/AsymmetricDecryptRequest.java @@ -81,6 +81,21 @@ private AsymmetricDecryptRequest( case 26: { ciphertext_ = input.readBytes(); + break; + } + case 34: + { + com.google.protobuf.Int64Value.Builder subBuilder = null; + if (ciphertextCrc32C_ != null) { + subBuilder = ciphertextCrc32C_.toBuilder(); + } + ciphertextCrc32C_ = + input.readMessage(com.google.protobuf.Int64Value.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(ciphertextCrc32C_); + ciphertextCrc32C_ = subBuilder.buildPartial(); + } + break; } default: @@ -191,6 +206,99 @@ public com.google.protobuf.ByteString getCiphertext() { return ciphertext_; } + public static final int CIPHERTEXT_CRC32C_FIELD_NUMBER = 4; + private com.google.protobuf.Int64Value ciphertextCrc32C_; + /** + * + * + *

+   * Optional. An optional CRC32C checksum of the [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext].
+   * If specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the
+   * received [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext] using this checksum.
+   * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+   * fails. If you receive a checksum error, your client should verify that
+   * CRC32C([AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]) is equal to
+   * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c], and if so, perform a
+   * limited number of retries. A persistent mismatch may indicate an issue in
+   * your computation of the CRC32C checksum.
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * + * .google.protobuf.Int64Value ciphertext_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the ciphertextCrc32c field is set. + */ + @java.lang.Override + public boolean hasCiphertextCrc32C() { + return ciphertextCrc32C_ != null; + } + /** + * + * + *
+   * Optional. An optional CRC32C checksum of the [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext].
+   * If specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the
+   * received [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext] using this checksum.
+   * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+   * fails. If you receive a checksum error, your client should verify that
+   * CRC32C([AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]) is equal to
+   * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c], and if so, perform a
+   * limited number of retries. A persistent mismatch may indicate an issue in
+   * your computation of the CRC32C checksum.
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * + * .google.protobuf.Int64Value ciphertext_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The ciphertextCrc32c. + */ + @java.lang.Override + public com.google.protobuf.Int64Value getCiphertextCrc32C() { + return ciphertextCrc32C_ == null + ? com.google.protobuf.Int64Value.getDefaultInstance() + : ciphertextCrc32C_; + } + /** + * + * + *
+   * Optional. An optional CRC32C checksum of the [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext].
+   * If specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the
+   * received [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext] using this checksum.
+   * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+   * fails. If you receive a checksum error, your client should verify that
+   * CRC32C([AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]) is equal to
+   * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c], and if so, perform a
+   * limited number of retries. A persistent mismatch may indicate an issue in
+   * your computation of the CRC32C checksum.
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * + * .google.protobuf.Int64Value ciphertext_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.Int64ValueOrBuilder getCiphertextCrc32COrBuilder() { + return getCiphertextCrc32C(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -211,6 +319,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!ciphertext_.isEmpty()) { output.writeBytes(3, ciphertext_); } + if (ciphertextCrc32C_ != null) { + output.writeMessage(4, getCiphertextCrc32C()); + } unknownFields.writeTo(output); } @@ -226,6 +337,9 @@ public int getSerializedSize() { if (!ciphertext_.isEmpty()) { size += com.google.protobuf.CodedOutputStream.computeBytesSize(3, ciphertext_); } + if (ciphertextCrc32C_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getCiphertextCrc32C()); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -244,6 +358,10 @@ public boolean equals(final java.lang.Object obj) { if (!getName().equals(other.getName())) return false; if (!getCiphertext().equals(other.getCiphertext())) return false; + if (hasCiphertextCrc32C() != other.hasCiphertextCrc32C()) return false; + if (hasCiphertextCrc32C()) { + if (!getCiphertextCrc32C().equals(other.getCiphertextCrc32C())) return false; + } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -259,6 +377,10 @@ public int hashCode() { hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + CIPHERTEXT_FIELD_NUMBER; hash = (53 * hash) + getCiphertext().hashCode(); + if (hasCiphertextCrc32C()) { + hash = (37 * hash) + CIPHERTEXT_CRC32C_FIELD_NUMBER; + hash = (53 * hash) + getCiphertextCrc32C().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -408,6 +530,12 @@ public Builder clear() { ciphertext_ = com.google.protobuf.ByteString.EMPTY; + if (ciphertextCrc32CBuilder_ == null) { + ciphertextCrc32C_ = null; + } else { + ciphertextCrc32C_ = null; + ciphertextCrc32CBuilder_ = null; + } return this; } @@ -437,6 +565,11 @@ public com.google.cloud.kms.v1.AsymmetricDecryptRequest buildPartial() { new com.google.cloud.kms.v1.AsymmetricDecryptRequest(this); result.name_ = name_; result.ciphertext_ = ciphertext_; + if (ciphertextCrc32CBuilder_ == null) { + result.ciphertextCrc32C_ = ciphertextCrc32C_; + } else { + result.ciphertextCrc32C_ = ciphertextCrc32CBuilder_.build(); + } onBuilt(); return result; } @@ -494,6 +627,9 @@ public Builder mergeFrom(com.google.cloud.kms.v1.AsymmetricDecryptRequest other) if (other.getCiphertext() != com.google.protobuf.ByteString.EMPTY) { setCiphertext(other.getCiphertext()); } + if (other.hasCiphertextCrc32C()) { + mergeCiphertextCrc32C(other.getCiphertextCrc32C()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -702,6 +838,326 @@ public Builder clearCiphertext() { return this; } + private com.google.protobuf.Int64Value ciphertextCrc32C_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int64Value, + com.google.protobuf.Int64Value.Builder, + com.google.protobuf.Int64ValueOrBuilder> + ciphertextCrc32CBuilder_; + /** + * + * + *
+     * Optional. An optional CRC32C checksum of the [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext].
+     * If specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the
+     * received [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext] using this checksum.
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+     * fails. If you receive a checksum error, your client should verify that
+     * CRC32C([AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]) is equal to
+     * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c], and if so, perform a
+     * limited number of retries. A persistent mismatch may indicate an issue in
+     * your computation of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * + * .google.protobuf.Int64Value ciphertext_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the ciphertextCrc32c field is set. + */ + public boolean hasCiphertextCrc32C() { + return ciphertextCrc32CBuilder_ != null || ciphertextCrc32C_ != null; + } + /** + * + * + *
+     * Optional. An optional CRC32C checksum of the [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext].
+     * If specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the
+     * received [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext] using this checksum.
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+     * fails. If you receive a checksum error, your client should verify that
+     * CRC32C([AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]) is equal to
+     * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c], and if so, perform a
+     * limited number of retries. A persistent mismatch may indicate an issue in
+     * your computation of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * + * .google.protobuf.Int64Value ciphertext_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The ciphertextCrc32c. + */ + public com.google.protobuf.Int64Value getCiphertextCrc32C() { + if (ciphertextCrc32CBuilder_ == null) { + return ciphertextCrc32C_ == null + ? com.google.protobuf.Int64Value.getDefaultInstance() + : ciphertextCrc32C_; + } else { + return ciphertextCrc32CBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. An optional CRC32C checksum of the [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext].
+     * If specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the
+     * received [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext] using this checksum.
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+     * fails. If you receive a checksum error, your client should verify that
+     * CRC32C([AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]) is equal to
+     * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c], and if so, perform a
+     * limited number of retries. A persistent mismatch may indicate an issue in
+     * your computation of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * + * .google.protobuf.Int64Value ciphertext_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setCiphertextCrc32C(com.google.protobuf.Int64Value value) { + if (ciphertextCrc32CBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ciphertextCrc32C_ = value; + onChanged(); + } else { + ciphertextCrc32CBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. An optional CRC32C checksum of the [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext].
+     * If specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the
+     * received [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext] using this checksum.
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+     * fails. If you receive a checksum error, your client should verify that
+     * CRC32C([AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]) is equal to
+     * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c], and if so, perform a
+     * limited number of retries. A persistent mismatch may indicate an issue in
+     * your computation of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * + * .google.protobuf.Int64Value ciphertext_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setCiphertextCrc32C(com.google.protobuf.Int64Value.Builder builderForValue) { + if (ciphertextCrc32CBuilder_ == null) { + ciphertextCrc32C_ = builderForValue.build(); + onChanged(); + } else { + ciphertextCrc32CBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. An optional CRC32C checksum of the [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext].
+     * If specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the
+     * received [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext] using this checksum.
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+     * fails. If you receive a checksum error, your client should verify that
+     * CRC32C([AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]) is equal to
+     * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c], and if so, perform a
+     * limited number of retries. A persistent mismatch may indicate an issue in
+     * your computation of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * + * .google.protobuf.Int64Value ciphertext_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeCiphertextCrc32C(com.google.protobuf.Int64Value value) { + if (ciphertextCrc32CBuilder_ == null) { + if (ciphertextCrc32C_ != null) { + ciphertextCrc32C_ = + com.google.protobuf.Int64Value.newBuilder(ciphertextCrc32C_) + .mergeFrom(value) + .buildPartial(); + } else { + ciphertextCrc32C_ = value; + } + onChanged(); + } else { + ciphertextCrc32CBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. An optional CRC32C checksum of the [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext].
+     * If specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the
+     * received [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext] using this checksum.
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+     * fails. If you receive a checksum error, your client should verify that
+     * CRC32C([AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]) is equal to
+     * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c], and if so, perform a
+     * limited number of retries. A persistent mismatch may indicate an issue in
+     * your computation of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * + * .google.protobuf.Int64Value ciphertext_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearCiphertextCrc32C() { + if (ciphertextCrc32CBuilder_ == null) { + ciphertextCrc32C_ = null; + onChanged(); + } else { + ciphertextCrc32C_ = null; + ciphertextCrc32CBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. An optional CRC32C checksum of the [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext].
+     * If specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the
+     * received [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext] using this checksum.
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+     * fails. If you receive a checksum error, your client should verify that
+     * CRC32C([AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]) is equal to
+     * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c], and if so, perform a
+     * limited number of retries. A persistent mismatch may indicate an issue in
+     * your computation of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * + * .google.protobuf.Int64Value ciphertext_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Int64Value.Builder getCiphertextCrc32CBuilder() { + + onChanged(); + return getCiphertextCrc32CFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. An optional CRC32C checksum of the [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext].
+     * If specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the
+     * received [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext] using this checksum.
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+     * fails. If you receive a checksum error, your client should verify that
+     * CRC32C([AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]) is equal to
+     * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c], and if so, perform a
+     * limited number of retries. A persistent mismatch may indicate an issue in
+     * your computation of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * + * .google.protobuf.Int64Value ciphertext_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Int64ValueOrBuilder getCiphertextCrc32COrBuilder() { + if (ciphertextCrc32CBuilder_ != null) { + return ciphertextCrc32CBuilder_.getMessageOrBuilder(); + } else { + return ciphertextCrc32C_ == null + ? com.google.protobuf.Int64Value.getDefaultInstance() + : ciphertextCrc32C_; + } + } + /** + * + * + *
+     * Optional. An optional CRC32C checksum of the [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext].
+     * If specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the
+     * received [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext] using this checksum.
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+     * fails. If you receive a checksum error, your client should verify that
+     * CRC32C([AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]) is equal to
+     * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c], and if so, perform a
+     * limited number of retries. A persistent mismatch may indicate an issue in
+     * your computation of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * + * .google.protobuf.Int64Value ciphertext_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int64Value, + com.google.protobuf.Int64Value.Builder, + com.google.protobuf.Int64ValueOrBuilder> + getCiphertextCrc32CFieldBuilder() { + if (ciphertextCrc32CBuilder_ == null) { + ciphertextCrc32CBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int64Value, + com.google.protobuf.Int64Value.Builder, + com.google.protobuf.Int64ValueOrBuilder>( + getCiphertextCrc32C(), getParentForChildren(), isClean()); + ciphertextCrc32C_ = null; + } + return ciphertextCrc32CBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/AsymmetricDecryptRequestOrBuilder.java b/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/AsymmetricDecryptRequestOrBuilder.java index cc14cdb3..a871ae5c 100644 --- a/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/AsymmetricDecryptRequestOrBuilder.java +++ b/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/AsymmetricDecryptRequestOrBuilder.java @@ -67,4 +67,84 @@ public interface AsymmetricDecryptRequestOrBuilder * @return The ciphertext. */ com.google.protobuf.ByteString getCiphertext(); + + /** + * + * + *
+   * Optional. An optional CRC32C checksum of the [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext].
+   * If specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the
+   * received [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext] using this checksum.
+   * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+   * fails. If you receive a checksum error, your client should verify that
+   * CRC32C([AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]) is equal to
+   * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c], and if so, perform a
+   * limited number of retries. A persistent mismatch may indicate an issue in
+   * your computation of the CRC32C checksum.
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * + * .google.protobuf.Int64Value ciphertext_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the ciphertextCrc32c field is set. + */ + boolean hasCiphertextCrc32C(); + /** + * + * + *
+   * Optional. An optional CRC32C checksum of the [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext].
+   * If specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the
+   * received [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext] using this checksum.
+   * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+   * fails. If you receive a checksum error, your client should verify that
+   * CRC32C([AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]) is equal to
+   * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c], and if so, perform a
+   * limited number of retries. A persistent mismatch may indicate an issue in
+   * your computation of the CRC32C checksum.
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * + * .google.protobuf.Int64Value ciphertext_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The ciphertextCrc32c. + */ + com.google.protobuf.Int64Value getCiphertextCrc32C(); + /** + * + * + *
+   * Optional. An optional CRC32C checksum of the [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext].
+   * If specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the
+   * received [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext] using this checksum.
+   * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+   * fails. If you receive a checksum error, your client should verify that
+   * CRC32C([AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]) is equal to
+   * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c], and if so, perform a
+   * limited number of retries. A persistent mismatch may indicate an issue in
+   * your computation of the CRC32C checksum.
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * + * .google.protobuf.Int64Value ciphertext_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.Int64ValueOrBuilder getCiphertextCrc32COrBuilder(); } diff --git a/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/AsymmetricDecryptResponse.java b/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/AsymmetricDecryptResponse.java index 8adb4562..f60acebe 100644 --- a/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/AsymmetricDecryptResponse.java +++ b/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/AsymmetricDecryptResponse.java @@ -75,6 +75,26 @@ private AsymmetricDecryptResponse( plaintext_ = input.readBytes(); break; } + case 18: + { + com.google.protobuf.Int64Value.Builder subBuilder = null; + if (plaintextCrc32C_ != null) { + subBuilder = plaintextCrc32C_.toBuilder(); + } + plaintextCrc32C_ = + input.readMessage(com.google.protobuf.Int64Value.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(plaintextCrc32C_); + plaintextCrc32C_ = subBuilder.buildPartial(); + } + + break; + } + case 24: + { + verifiedCiphertextCrc32C_ = input.readBool(); + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -127,6 +147,113 @@ public com.google.protobuf.ByteString getPlaintext() { return plaintext_; } + public static final int PLAINTEXT_CRC32C_FIELD_NUMBER = 2; + private com.google.protobuf.Int64Value plaintextCrc32C_; + /** + * + * + *
+   * Integrity verification field. A CRC32C checksum of the returned
+   * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]. An integrity check of
+   * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] can be performed by computing the
+   * CRC32C checksum of [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] and comparing
+   * your results to this field. Discard the response in case of non-matching
+   * checksum values, and perform a limited number of retries. A persistent
+   * mismatch may indicate an issue in your computation of the CRC32C checksum.
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * .google.protobuf.Int64Value plaintext_crc32c = 2; + * + * @return Whether the plaintextCrc32c field is set. + */ + @java.lang.Override + public boolean hasPlaintextCrc32C() { + return plaintextCrc32C_ != null; + } + /** + * + * + *
+   * Integrity verification field. A CRC32C checksum of the returned
+   * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]. An integrity check of
+   * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] can be performed by computing the
+   * CRC32C checksum of [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] and comparing
+   * your results to this field. Discard the response in case of non-matching
+   * checksum values, and perform a limited number of retries. A persistent
+   * mismatch may indicate an issue in your computation of the CRC32C checksum.
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * .google.protobuf.Int64Value plaintext_crc32c = 2; + * + * @return The plaintextCrc32c. + */ + @java.lang.Override + public com.google.protobuf.Int64Value getPlaintextCrc32C() { + return plaintextCrc32C_ == null + ? com.google.protobuf.Int64Value.getDefaultInstance() + : plaintextCrc32C_; + } + /** + * + * + *
+   * Integrity verification field. A CRC32C checksum of the returned
+   * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]. An integrity check of
+   * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] can be performed by computing the
+   * CRC32C checksum of [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] and comparing
+   * your results to this field. Discard the response in case of non-matching
+   * checksum values, and perform a limited number of retries. A persistent
+   * mismatch may indicate an issue in your computation of the CRC32C checksum.
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * .google.protobuf.Int64Value plaintext_crc32c = 2; + */ + @java.lang.Override + public com.google.protobuf.Int64ValueOrBuilder getPlaintextCrc32COrBuilder() { + return getPlaintextCrc32C(); + } + + public static final int VERIFIED_CIPHERTEXT_CRC32C_FIELD_NUMBER = 3; + private boolean verifiedCiphertextCrc32C_; + /** + * + * + *
+   * Integrity verification field. A flag indicating whether
+   * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c] was received by
+   * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used for the integrity verification of the
+   * [ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]. A false value of this
+   * field indicates either that [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c]
+   * was left unset or that it was not delivered to [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If
+   * you've set [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c] but this field is
+   * still false, discard the response and perform a limited number of retries.
+   * NOTE: This field is in Beta.
+   * 
+ * + * bool verified_ciphertext_crc32c = 3; + * + * @return The verifiedCiphertextCrc32c. + */ + @java.lang.Override + public boolean getVerifiedCiphertextCrc32C() { + return verifiedCiphertextCrc32C_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -144,6 +271,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!plaintext_.isEmpty()) { output.writeBytes(1, plaintext_); } + if (plaintextCrc32C_ != null) { + output.writeMessage(2, getPlaintextCrc32C()); + } + if (verifiedCiphertextCrc32C_ != false) { + output.writeBool(3, verifiedCiphertextCrc32C_); + } unknownFields.writeTo(output); } @@ -156,6 +289,12 @@ public int getSerializedSize() { if (!plaintext_.isEmpty()) { size += com.google.protobuf.CodedOutputStream.computeBytesSize(1, plaintext_); } + if (plaintextCrc32C_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getPlaintextCrc32C()); + } + if (verifiedCiphertextCrc32C_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, verifiedCiphertextCrc32C_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -173,6 +312,11 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.kms.v1.AsymmetricDecryptResponse) obj; if (!getPlaintext().equals(other.getPlaintext())) return false; + if (hasPlaintextCrc32C() != other.hasPlaintextCrc32C()) return false; + if (hasPlaintextCrc32C()) { + if (!getPlaintextCrc32C().equals(other.getPlaintextCrc32C())) return false; + } + if (getVerifiedCiphertextCrc32C() != other.getVerifiedCiphertextCrc32C()) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -186,6 +330,12 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + PLAINTEXT_FIELD_NUMBER; hash = (53 * hash) + getPlaintext().hashCode(); + if (hasPlaintextCrc32C()) { + hash = (37 * hash) + PLAINTEXT_CRC32C_FIELD_NUMBER; + hash = (53 * hash) + getPlaintextCrc32C().hashCode(); + } + hash = (37 * hash) + VERIFIED_CIPHERTEXT_CRC32C_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getVerifiedCiphertextCrc32C()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -333,6 +483,14 @@ public Builder clear() { super.clear(); plaintext_ = com.google.protobuf.ByteString.EMPTY; + if (plaintextCrc32CBuilder_ == null) { + plaintextCrc32C_ = null; + } else { + plaintextCrc32C_ = null; + plaintextCrc32CBuilder_ = null; + } + verifiedCiphertextCrc32C_ = false; + return this; } @@ -361,6 +519,12 @@ public com.google.cloud.kms.v1.AsymmetricDecryptResponse buildPartial() { com.google.cloud.kms.v1.AsymmetricDecryptResponse result = new com.google.cloud.kms.v1.AsymmetricDecryptResponse(this); result.plaintext_ = plaintext_; + if (plaintextCrc32CBuilder_ == null) { + result.plaintextCrc32C_ = plaintextCrc32C_; + } else { + result.plaintextCrc32C_ = plaintextCrc32CBuilder_.build(); + } + result.verifiedCiphertextCrc32C_ = verifiedCiphertextCrc32C_; onBuilt(); return result; } @@ -414,6 +578,12 @@ public Builder mergeFrom(com.google.cloud.kms.v1.AsymmetricDecryptResponse other if (other.getPlaintext() != com.google.protobuf.ByteString.EMPTY) { setPlaintext(other.getPlaintext()); } + if (other.hasPlaintextCrc32C()) { + mergePlaintextCrc32C(other.getPlaintextCrc32C()); + } + if (other.getVerifiedCiphertextCrc32C() != false) { + setVerifiedCiphertextCrc32C(other.getVerifiedCiphertextCrc32C()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -499,6 +669,366 @@ public Builder clearPlaintext() { return this; } + private com.google.protobuf.Int64Value plaintextCrc32C_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int64Value, + com.google.protobuf.Int64Value.Builder, + com.google.protobuf.Int64ValueOrBuilder> + plaintextCrc32CBuilder_; + /** + * + * + *
+     * Integrity verification field. A CRC32C checksum of the returned
+     * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]. An integrity check of
+     * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] can be performed by computing the
+     * CRC32C checksum of [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] and comparing
+     * your results to this field. Discard the response in case of non-matching
+     * checksum values, and perform a limited number of retries. A persistent
+     * mismatch may indicate an issue in your computation of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * .google.protobuf.Int64Value plaintext_crc32c = 2; + * + * @return Whether the plaintextCrc32c field is set. + */ + public boolean hasPlaintextCrc32C() { + return plaintextCrc32CBuilder_ != null || plaintextCrc32C_ != null; + } + /** + * + * + *
+     * Integrity verification field. A CRC32C checksum of the returned
+     * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]. An integrity check of
+     * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] can be performed by computing the
+     * CRC32C checksum of [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] and comparing
+     * your results to this field. Discard the response in case of non-matching
+     * checksum values, and perform a limited number of retries. A persistent
+     * mismatch may indicate an issue in your computation of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * .google.protobuf.Int64Value plaintext_crc32c = 2; + * + * @return The plaintextCrc32c. + */ + public com.google.protobuf.Int64Value getPlaintextCrc32C() { + if (plaintextCrc32CBuilder_ == null) { + return plaintextCrc32C_ == null + ? com.google.protobuf.Int64Value.getDefaultInstance() + : plaintextCrc32C_; + } else { + return plaintextCrc32CBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Integrity verification field. A CRC32C checksum of the returned
+     * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]. An integrity check of
+     * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] can be performed by computing the
+     * CRC32C checksum of [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] and comparing
+     * your results to this field. Discard the response in case of non-matching
+     * checksum values, and perform a limited number of retries. A persistent
+     * mismatch may indicate an issue in your computation of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * .google.protobuf.Int64Value plaintext_crc32c = 2; + */ + public Builder setPlaintextCrc32C(com.google.protobuf.Int64Value value) { + if (plaintextCrc32CBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + plaintextCrc32C_ = value; + onChanged(); + } else { + plaintextCrc32CBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Integrity verification field. A CRC32C checksum of the returned
+     * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]. An integrity check of
+     * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] can be performed by computing the
+     * CRC32C checksum of [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] and comparing
+     * your results to this field. Discard the response in case of non-matching
+     * checksum values, and perform a limited number of retries. A persistent
+     * mismatch may indicate an issue in your computation of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * .google.protobuf.Int64Value plaintext_crc32c = 2; + */ + public Builder setPlaintextCrc32C(com.google.protobuf.Int64Value.Builder builderForValue) { + if (plaintextCrc32CBuilder_ == null) { + plaintextCrc32C_ = builderForValue.build(); + onChanged(); + } else { + plaintextCrc32CBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Integrity verification field. A CRC32C checksum of the returned
+     * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]. An integrity check of
+     * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] can be performed by computing the
+     * CRC32C checksum of [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] and comparing
+     * your results to this field. Discard the response in case of non-matching
+     * checksum values, and perform a limited number of retries. A persistent
+     * mismatch may indicate an issue in your computation of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * .google.protobuf.Int64Value plaintext_crc32c = 2; + */ + public Builder mergePlaintextCrc32C(com.google.protobuf.Int64Value value) { + if (plaintextCrc32CBuilder_ == null) { + if (plaintextCrc32C_ != null) { + plaintextCrc32C_ = + com.google.protobuf.Int64Value.newBuilder(plaintextCrc32C_) + .mergeFrom(value) + .buildPartial(); + } else { + plaintextCrc32C_ = value; + } + onChanged(); + } else { + plaintextCrc32CBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Integrity verification field. A CRC32C checksum of the returned
+     * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]. An integrity check of
+     * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] can be performed by computing the
+     * CRC32C checksum of [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] and comparing
+     * your results to this field. Discard the response in case of non-matching
+     * checksum values, and perform a limited number of retries. A persistent
+     * mismatch may indicate an issue in your computation of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * .google.protobuf.Int64Value plaintext_crc32c = 2; + */ + public Builder clearPlaintextCrc32C() { + if (plaintextCrc32CBuilder_ == null) { + plaintextCrc32C_ = null; + onChanged(); + } else { + plaintextCrc32C_ = null; + plaintextCrc32CBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Integrity verification field. A CRC32C checksum of the returned
+     * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]. An integrity check of
+     * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] can be performed by computing the
+     * CRC32C checksum of [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] and comparing
+     * your results to this field. Discard the response in case of non-matching
+     * checksum values, and perform a limited number of retries. A persistent
+     * mismatch may indicate an issue in your computation of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * .google.protobuf.Int64Value plaintext_crc32c = 2; + */ + public com.google.protobuf.Int64Value.Builder getPlaintextCrc32CBuilder() { + + onChanged(); + return getPlaintextCrc32CFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Integrity verification field. A CRC32C checksum of the returned
+     * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]. An integrity check of
+     * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] can be performed by computing the
+     * CRC32C checksum of [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] and comparing
+     * your results to this field. Discard the response in case of non-matching
+     * checksum values, and perform a limited number of retries. A persistent
+     * mismatch may indicate an issue in your computation of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * .google.protobuf.Int64Value plaintext_crc32c = 2; + */ + public com.google.protobuf.Int64ValueOrBuilder getPlaintextCrc32COrBuilder() { + if (plaintextCrc32CBuilder_ != null) { + return plaintextCrc32CBuilder_.getMessageOrBuilder(); + } else { + return plaintextCrc32C_ == null + ? com.google.protobuf.Int64Value.getDefaultInstance() + : plaintextCrc32C_; + } + } + /** + * + * + *
+     * Integrity verification field. A CRC32C checksum of the returned
+     * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]. An integrity check of
+     * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] can be performed by computing the
+     * CRC32C checksum of [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] and comparing
+     * your results to this field. Discard the response in case of non-matching
+     * checksum values, and perform a limited number of retries. A persistent
+     * mismatch may indicate an issue in your computation of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * .google.protobuf.Int64Value plaintext_crc32c = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int64Value, + com.google.protobuf.Int64Value.Builder, + com.google.protobuf.Int64ValueOrBuilder> + getPlaintextCrc32CFieldBuilder() { + if (plaintextCrc32CBuilder_ == null) { + plaintextCrc32CBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int64Value, + com.google.protobuf.Int64Value.Builder, + com.google.protobuf.Int64ValueOrBuilder>( + getPlaintextCrc32C(), getParentForChildren(), isClean()); + plaintextCrc32C_ = null; + } + return plaintextCrc32CBuilder_; + } + + private boolean verifiedCiphertextCrc32C_; + /** + * + * + *
+     * Integrity verification field. A flag indicating whether
+     * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c] was received by
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used for the integrity verification of the
+     * [ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]. A false value of this
+     * field indicates either that [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c]
+     * was left unset or that it was not delivered to [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If
+     * you've set [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c] but this field is
+     * still false, discard the response and perform a limited number of retries.
+     * NOTE: This field is in Beta.
+     * 
+ * + * bool verified_ciphertext_crc32c = 3; + * + * @return The verifiedCiphertextCrc32c. + */ + @java.lang.Override + public boolean getVerifiedCiphertextCrc32C() { + return verifiedCiphertextCrc32C_; + } + /** + * + * + *
+     * Integrity verification field. A flag indicating whether
+     * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c] was received by
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used for the integrity verification of the
+     * [ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]. A false value of this
+     * field indicates either that [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c]
+     * was left unset or that it was not delivered to [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If
+     * you've set [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c] but this field is
+     * still false, discard the response and perform a limited number of retries.
+     * NOTE: This field is in Beta.
+     * 
+ * + * bool verified_ciphertext_crc32c = 3; + * + * @param value The verifiedCiphertextCrc32c to set. + * @return This builder for chaining. + */ + public Builder setVerifiedCiphertextCrc32C(boolean value) { + + verifiedCiphertextCrc32C_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Integrity verification field. A flag indicating whether
+     * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c] was received by
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used for the integrity verification of the
+     * [ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]. A false value of this
+     * field indicates either that [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c]
+     * was left unset or that it was not delivered to [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If
+     * you've set [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c] but this field is
+     * still false, discard the response and perform a limited number of retries.
+     * NOTE: This field is in Beta.
+     * 
+ * + * bool verified_ciphertext_crc32c = 3; + * + * @return This builder for chaining. + */ + public Builder clearVerifiedCiphertextCrc32C() { + + verifiedCiphertextCrc32C_ = false; + 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-kms-v1/src/main/java/com/google/cloud/kms/v1/AsymmetricDecryptResponseOrBuilder.java b/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/AsymmetricDecryptResponseOrBuilder.java index cf824475..6cc2c01f 100644 --- a/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/AsymmetricDecryptResponseOrBuilder.java +++ b/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/AsymmetricDecryptResponseOrBuilder.java @@ -35,4 +35,93 @@ public interface AsymmetricDecryptResponseOrBuilder * @return The plaintext. */ com.google.protobuf.ByteString getPlaintext(); + + /** + * + * + *
+   * Integrity verification field. A CRC32C checksum of the returned
+   * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]. An integrity check of
+   * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] can be performed by computing the
+   * CRC32C checksum of [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] and comparing
+   * your results to this field. Discard the response in case of non-matching
+   * checksum values, and perform a limited number of retries. A persistent
+   * mismatch may indicate an issue in your computation of the CRC32C checksum.
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * .google.protobuf.Int64Value plaintext_crc32c = 2; + * + * @return Whether the plaintextCrc32c field is set. + */ + boolean hasPlaintextCrc32C(); + /** + * + * + *
+   * Integrity verification field. A CRC32C checksum of the returned
+   * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]. An integrity check of
+   * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] can be performed by computing the
+   * CRC32C checksum of [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] and comparing
+   * your results to this field. Discard the response in case of non-matching
+   * checksum values, and perform a limited number of retries. A persistent
+   * mismatch may indicate an issue in your computation of the CRC32C checksum.
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * .google.protobuf.Int64Value plaintext_crc32c = 2; + * + * @return The plaintextCrc32c. + */ + com.google.protobuf.Int64Value getPlaintextCrc32C(); + /** + * + * + *
+   * Integrity verification field. A CRC32C checksum of the returned
+   * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]. An integrity check of
+   * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] can be performed by computing the
+   * CRC32C checksum of [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] and comparing
+   * your results to this field. Discard the response in case of non-matching
+   * checksum values, and perform a limited number of retries. A persistent
+   * mismatch may indicate an issue in your computation of the CRC32C checksum.
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * .google.protobuf.Int64Value plaintext_crc32c = 2; + */ + com.google.protobuf.Int64ValueOrBuilder getPlaintextCrc32COrBuilder(); + + /** + * + * + *
+   * Integrity verification field. A flag indicating whether
+   * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c] was received by
+   * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used for the integrity verification of the
+   * [ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]. A false value of this
+   * field indicates either that [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c]
+   * was left unset or that it was not delivered to [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If
+   * you've set [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c] but this field is
+   * still false, discard the response and perform a limited number of retries.
+   * NOTE: This field is in Beta.
+   * 
+ * + * bool verified_ciphertext_crc32c = 3; + * + * @return The verifiedCiphertextCrc32c. + */ + boolean getVerifiedCiphertextCrc32C(); } diff --git a/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/AsymmetricSignRequest.java b/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/AsymmetricSignRequest.java index 1d32ac65..c6e07790 100644 --- a/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/AsymmetricSignRequest.java +++ b/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/AsymmetricSignRequest.java @@ -90,6 +90,21 @@ private AsymmetricSignRequest( digest_ = subBuilder.buildPartial(); } + break; + } + case 34: + { + com.google.protobuf.Int64Value.Builder subBuilder = null; + if (digestCrc32C_ != null) { + subBuilder = digestCrc32C_.toBuilder(); + } + digestCrc32C_ = + input.readMessage(com.google.protobuf.Int64Value.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(digestCrc32C_); + digestCrc32C_ = subBuilder.buildPartial(); + } + break; } default: @@ -231,6 +246,96 @@ public com.google.cloud.kms.v1.DigestOrBuilder getDigestOrBuilder() { return getDigest(); } + public static final int DIGEST_CRC32C_FIELD_NUMBER = 4; + private com.google.protobuf.Int64Value digestCrc32C_; + /** + * + * + *
+   * Optional. An optional CRC32C checksum of the [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. If
+   * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the
+   * received [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest] using this checksum.
+   * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+   * fails. If you receive a checksum error, your client should verify that
+   * CRC32C([AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]) is equal to
+   * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c], and if so, perform a limited
+   * number of retries. A persistent mismatch may indicate an issue in your
+   * computation of the CRC32C checksum.
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * .google.protobuf.Int64Value digest_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the digestCrc32c field is set. + */ + @java.lang.Override + public boolean hasDigestCrc32C() { + return digestCrc32C_ != null; + } + /** + * + * + *
+   * Optional. An optional CRC32C checksum of the [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. If
+   * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the
+   * received [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest] using this checksum.
+   * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+   * fails. If you receive a checksum error, your client should verify that
+   * CRC32C([AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]) is equal to
+   * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c], and if so, perform a limited
+   * number of retries. A persistent mismatch may indicate an issue in your
+   * computation of the CRC32C checksum.
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * .google.protobuf.Int64Value digest_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The digestCrc32c. + */ + @java.lang.Override + public com.google.protobuf.Int64Value getDigestCrc32C() { + return digestCrc32C_ == null + ? com.google.protobuf.Int64Value.getDefaultInstance() + : digestCrc32C_; + } + /** + * + * + *
+   * Optional. An optional CRC32C checksum of the [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. If
+   * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the
+   * received [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest] using this checksum.
+   * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+   * fails. If you receive a checksum error, your client should verify that
+   * CRC32C([AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]) is equal to
+   * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c], and if so, perform a limited
+   * number of retries. A persistent mismatch may indicate an issue in your
+   * computation of the CRC32C checksum.
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * .google.protobuf.Int64Value digest_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.Int64ValueOrBuilder getDigestCrc32COrBuilder() { + return getDigestCrc32C(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -251,6 +356,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (digest_ != null) { output.writeMessage(3, getDigest()); } + if (digestCrc32C_ != null) { + output.writeMessage(4, getDigestCrc32C()); + } unknownFields.writeTo(output); } @@ -266,6 +374,9 @@ public int getSerializedSize() { if (digest_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getDigest()); } + if (digestCrc32C_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getDigestCrc32C()); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -287,6 +398,10 @@ public boolean equals(final java.lang.Object obj) { if (hasDigest()) { if (!getDigest().equals(other.getDigest())) return false; } + if (hasDigestCrc32C() != other.hasDigestCrc32C()) return false; + if (hasDigestCrc32C()) { + if (!getDigestCrc32C().equals(other.getDigestCrc32C())) return false; + } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -304,6 +419,10 @@ public int hashCode() { hash = (37 * hash) + DIGEST_FIELD_NUMBER; hash = (53 * hash) + getDigest().hashCode(); } + if (hasDigestCrc32C()) { + hash = (37 * hash) + DIGEST_CRC32C_FIELD_NUMBER; + hash = (53 * hash) + getDigestCrc32C().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -457,6 +576,12 @@ public Builder clear() { digest_ = null; digestBuilder_ = null; } + if (digestCrc32CBuilder_ == null) { + digestCrc32C_ = null; + } else { + digestCrc32C_ = null; + digestCrc32CBuilder_ = null; + } return this; } @@ -490,6 +615,11 @@ public com.google.cloud.kms.v1.AsymmetricSignRequest buildPartial() { } else { result.digest_ = digestBuilder_.build(); } + if (digestCrc32CBuilder_ == null) { + result.digestCrc32C_ = digestCrc32C_; + } else { + result.digestCrc32C_ = digestCrc32CBuilder_.build(); + } onBuilt(); return result; } @@ -546,6 +676,9 @@ public Builder mergeFrom(com.google.cloud.kms.v1.AsymmetricSignRequest other) { if (other.hasDigest()) { mergeDigest(other.getDigest()); } + if (other.hasDigestCrc32C()) { + mergeDigestCrc32C(other.getDigestCrc32C()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -897,6 +1030,326 @@ public com.google.cloud.kms.v1.DigestOrBuilder getDigestOrBuilder() { return digestBuilder_; } + private com.google.protobuf.Int64Value digestCrc32C_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int64Value, + com.google.protobuf.Int64Value.Builder, + com.google.protobuf.Int64ValueOrBuilder> + digestCrc32CBuilder_; + /** + * + * + *
+     * Optional. An optional CRC32C checksum of the [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. If
+     * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the
+     * received [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest] using this checksum.
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+     * fails. If you receive a checksum error, your client should verify that
+     * CRC32C([AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]) is equal to
+     * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c], and if so, perform a limited
+     * number of retries. A persistent mismatch may indicate an issue in your
+     * computation of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * + * .google.protobuf.Int64Value digest_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the digestCrc32c field is set. + */ + public boolean hasDigestCrc32C() { + return digestCrc32CBuilder_ != null || digestCrc32C_ != null; + } + /** + * + * + *
+     * Optional. An optional CRC32C checksum of the [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. If
+     * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the
+     * received [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest] using this checksum.
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+     * fails. If you receive a checksum error, your client should verify that
+     * CRC32C([AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]) is equal to
+     * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c], and if so, perform a limited
+     * number of retries. A persistent mismatch may indicate an issue in your
+     * computation of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * + * .google.protobuf.Int64Value digest_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The digestCrc32c. + */ + public com.google.protobuf.Int64Value getDigestCrc32C() { + if (digestCrc32CBuilder_ == null) { + return digestCrc32C_ == null + ? com.google.protobuf.Int64Value.getDefaultInstance() + : digestCrc32C_; + } else { + return digestCrc32CBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. An optional CRC32C checksum of the [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. If
+     * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the
+     * received [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest] using this checksum.
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+     * fails. If you receive a checksum error, your client should verify that
+     * CRC32C([AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]) is equal to
+     * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c], and if so, perform a limited
+     * number of retries. A persistent mismatch may indicate an issue in your
+     * computation of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * + * .google.protobuf.Int64Value digest_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDigestCrc32C(com.google.protobuf.Int64Value value) { + if (digestCrc32CBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + digestCrc32C_ = value; + onChanged(); + } else { + digestCrc32CBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. An optional CRC32C checksum of the [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. If
+     * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the
+     * received [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest] using this checksum.
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+     * fails. If you receive a checksum error, your client should verify that
+     * CRC32C([AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]) is equal to
+     * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c], and if so, perform a limited
+     * number of retries. A persistent mismatch may indicate an issue in your
+     * computation of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * + * .google.protobuf.Int64Value digest_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDigestCrc32C(com.google.protobuf.Int64Value.Builder builderForValue) { + if (digestCrc32CBuilder_ == null) { + digestCrc32C_ = builderForValue.build(); + onChanged(); + } else { + digestCrc32CBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. An optional CRC32C checksum of the [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. If
+     * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the
+     * received [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest] using this checksum.
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+     * fails. If you receive a checksum error, your client should verify that
+     * CRC32C([AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]) is equal to
+     * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c], and if so, perform a limited
+     * number of retries. A persistent mismatch may indicate an issue in your
+     * computation of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * + * .google.protobuf.Int64Value digest_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeDigestCrc32C(com.google.protobuf.Int64Value value) { + if (digestCrc32CBuilder_ == null) { + if (digestCrc32C_ != null) { + digestCrc32C_ = + com.google.protobuf.Int64Value.newBuilder(digestCrc32C_) + .mergeFrom(value) + .buildPartial(); + } else { + digestCrc32C_ = value; + } + onChanged(); + } else { + digestCrc32CBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. An optional CRC32C checksum of the [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. If
+     * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the
+     * received [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest] using this checksum.
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+     * fails. If you receive a checksum error, your client should verify that
+     * CRC32C([AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]) is equal to
+     * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c], and if so, perform a limited
+     * number of retries. A persistent mismatch may indicate an issue in your
+     * computation of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * + * .google.protobuf.Int64Value digest_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearDigestCrc32C() { + if (digestCrc32CBuilder_ == null) { + digestCrc32C_ = null; + onChanged(); + } else { + digestCrc32C_ = null; + digestCrc32CBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. An optional CRC32C checksum of the [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. If
+     * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the
+     * received [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest] using this checksum.
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+     * fails. If you receive a checksum error, your client should verify that
+     * CRC32C([AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]) is equal to
+     * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c], and if so, perform a limited
+     * number of retries. A persistent mismatch may indicate an issue in your
+     * computation of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * + * .google.protobuf.Int64Value digest_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Int64Value.Builder getDigestCrc32CBuilder() { + + onChanged(); + return getDigestCrc32CFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. An optional CRC32C checksum of the [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. If
+     * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the
+     * received [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest] using this checksum.
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+     * fails. If you receive a checksum error, your client should verify that
+     * CRC32C([AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]) is equal to
+     * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c], and if so, perform a limited
+     * number of retries. A persistent mismatch may indicate an issue in your
+     * computation of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * + * .google.protobuf.Int64Value digest_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Int64ValueOrBuilder getDigestCrc32COrBuilder() { + if (digestCrc32CBuilder_ != null) { + return digestCrc32CBuilder_.getMessageOrBuilder(); + } else { + return digestCrc32C_ == null + ? com.google.protobuf.Int64Value.getDefaultInstance() + : digestCrc32C_; + } + } + /** + * + * + *
+     * Optional. An optional CRC32C checksum of the [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. If
+     * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the
+     * received [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest] using this checksum.
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+     * fails. If you receive a checksum error, your client should verify that
+     * CRC32C([AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]) is equal to
+     * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c], and if so, perform a limited
+     * number of retries. A persistent mismatch may indicate an issue in your
+     * computation of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * + * .google.protobuf.Int64Value digest_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int64Value, + com.google.protobuf.Int64Value.Builder, + com.google.protobuf.Int64ValueOrBuilder> + getDigestCrc32CFieldBuilder() { + if (digestCrc32CBuilder_ == null) { + digestCrc32CBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int64Value, + com.google.protobuf.Int64Value.Builder, + com.google.protobuf.Int64ValueOrBuilder>( + getDigestCrc32C(), getParentForChildren(), isClean()); + digestCrc32C_ = null; + } + return digestCrc32CBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/AsymmetricSignRequestOrBuilder.java b/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/AsymmetricSignRequestOrBuilder.java index 5c1cc06f..c2a41dfe 100644 --- a/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/AsymmetricSignRequestOrBuilder.java +++ b/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/AsymmetricSignRequestOrBuilder.java @@ -92,4 +92,81 @@ public interface AsymmetricSignRequestOrBuilder * .google.cloud.kms.v1.Digest digest = 3 [(.google.api.field_behavior) = REQUIRED]; */ com.google.cloud.kms.v1.DigestOrBuilder getDigestOrBuilder(); + + /** + * + * + *
+   * Optional. An optional CRC32C checksum of the [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. If
+   * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the
+   * received [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest] using this checksum.
+   * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+   * fails. If you receive a checksum error, your client should verify that
+   * CRC32C([AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]) is equal to
+   * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c], and if so, perform a limited
+   * number of retries. A persistent mismatch may indicate an issue in your
+   * computation of the CRC32C checksum.
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * .google.protobuf.Int64Value digest_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the digestCrc32c field is set. + */ + boolean hasDigestCrc32C(); + /** + * + * + *
+   * Optional. An optional CRC32C checksum of the [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. If
+   * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the
+   * received [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest] using this checksum.
+   * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+   * fails. If you receive a checksum error, your client should verify that
+   * CRC32C([AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]) is equal to
+   * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c], and if so, perform a limited
+   * number of retries. A persistent mismatch may indicate an issue in your
+   * computation of the CRC32C checksum.
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * .google.protobuf.Int64Value digest_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The digestCrc32c. + */ + com.google.protobuf.Int64Value getDigestCrc32C(); + /** + * + * + *
+   * Optional. An optional CRC32C checksum of the [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. If
+   * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the
+   * received [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest] using this checksum.
+   * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+   * fails. If you receive a checksum error, your client should verify that
+   * CRC32C([AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]) is equal to
+   * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c], and if so, perform a limited
+   * number of retries. A persistent mismatch may indicate an issue in your
+   * computation of the CRC32C checksum.
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * .google.protobuf.Int64Value digest_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.Int64ValueOrBuilder getDigestCrc32COrBuilder(); } diff --git a/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/AsymmetricSignResponse.java b/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/AsymmetricSignResponse.java index a1682f99..6c1e9c3a 100644 --- a/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/AsymmetricSignResponse.java +++ b/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/AsymmetricSignResponse.java @@ -39,6 +39,7 @@ private AsymmetricSignResponse(com.google.protobuf.GeneratedMessageV3.Builder private AsymmetricSignResponse() { signature_ = com.google.protobuf.ByteString.EMPTY; + name_ = ""; } @java.lang.Override @@ -75,6 +76,33 @@ private AsymmetricSignResponse( signature_ = input.readBytes(); break; } + case 18: + { + com.google.protobuf.Int64Value.Builder subBuilder = null; + if (signatureCrc32C_ != null) { + subBuilder = signatureCrc32C_.toBuilder(); + } + signatureCrc32C_ = + input.readMessage(com.google.protobuf.Int64Value.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(signatureCrc32C_); + signatureCrc32C_ = subBuilder.buildPartial(); + } + + break; + } + case 24: + { + verifiedDigestCrc32C_ = input.readBool(); + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -127,6 +155,166 @@ public com.google.protobuf.ByteString getSignature() { return signature_; } + public static final int SIGNATURE_CRC32C_FIELD_NUMBER = 2; + private com.google.protobuf.Int64Value signatureCrc32C_; + /** + * + * + *
+   * Integrity verification field. A CRC32C checksum of the returned
+   * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature]. An integrity check of
+   * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] can be performed by computing the
+   * CRC32C checksum of [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] and comparing your
+   * results to this field. Discard the response in case of non-matching
+   * checksum values, and perform a limited number of retries. A persistent
+   * mismatch may indicate an issue in your computation of the CRC32C checksum.
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * .google.protobuf.Int64Value signature_crc32c = 2; + * + * @return Whether the signatureCrc32c field is set. + */ + @java.lang.Override + public boolean hasSignatureCrc32C() { + return signatureCrc32C_ != null; + } + /** + * + * + *
+   * Integrity verification field. A CRC32C checksum of the returned
+   * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature]. An integrity check of
+   * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] can be performed by computing the
+   * CRC32C checksum of [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] and comparing your
+   * results to this field. Discard the response in case of non-matching
+   * checksum values, and perform a limited number of retries. A persistent
+   * mismatch may indicate an issue in your computation of the CRC32C checksum.
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * .google.protobuf.Int64Value signature_crc32c = 2; + * + * @return The signatureCrc32c. + */ + @java.lang.Override + public com.google.protobuf.Int64Value getSignatureCrc32C() { + return signatureCrc32C_ == null + ? com.google.protobuf.Int64Value.getDefaultInstance() + : signatureCrc32C_; + } + /** + * + * + *
+   * Integrity verification field. A CRC32C checksum of the returned
+   * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature]. An integrity check of
+   * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] can be performed by computing the
+   * CRC32C checksum of [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] and comparing your
+   * results to this field. Discard the response in case of non-matching
+   * checksum values, and perform a limited number of retries. A persistent
+   * mismatch may indicate an issue in your computation of the CRC32C checksum.
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * .google.protobuf.Int64Value signature_crc32c = 2; + */ + @java.lang.Override + public com.google.protobuf.Int64ValueOrBuilder getSignatureCrc32COrBuilder() { + return getSignatureCrc32C(); + } + + public static final int VERIFIED_DIGEST_CRC32C_FIELD_NUMBER = 3; + private boolean verifiedDigestCrc32C_; + /** + * + * + *
+   * Integrity verification field. A flag indicating whether
+   * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] was received by
+   * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used for the integrity verification of the
+   * [digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. A false value of this field
+   * indicates either that [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] was left
+   * unset or that it was not delivered to [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've
+   * set [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] but this field is still false,
+   * discard the response and perform a limited number of retries.
+   * NOTE: This field is in Beta.
+   * 
+ * + * bool verified_digest_crc32c = 3; + * + * @return The verifiedDigestCrc32c. + */ + @java.lang.Override + public boolean getVerifiedDigestCrc32C() { + return verifiedDigestCrc32C_; + } + + public static final int NAME_FIELD_NUMBER = 4; + private volatile java.lang.Object name_; + /** + * + * + *
+   * The resource name of the [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. Check
+   * this field to verify that the intended resource was used for signing.
+   * NOTE: This field is in Beta.
+   * 
+ * + * string name = 4; + * + * @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; + } + } + /** + * + * + *
+   * The resource name of the [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. Check
+   * this field to verify that the intended resource was used for signing.
+   * NOTE: This field is in Beta.
+   * 
+ * + * string name = 4; + * + * @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 @@ -144,6 +332,15 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!signature_.isEmpty()) { output.writeBytes(1, signature_); } + if (signatureCrc32C_ != null) { + output.writeMessage(2, getSignatureCrc32C()); + } + if (verifiedDigestCrc32C_ != false) { + output.writeBool(3, verifiedDigestCrc32C_); + } + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, name_); + } unknownFields.writeTo(output); } @@ -156,6 +353,15 @@ public int getSerializedSize() { if (!signature_.isEmpty()) { size += com.google.protobuf.CodedOutputStream.computeBytesSize(1, signature_); } + if (signatureCrc32C_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSignatureCrc32C()); + } + if (verifiedDigestCrc32C_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, verifiedDigestCrc32C_); + } + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, name_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -173,6 +379,12 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.kms.v1.AsymmetricSignResponse) obj; if (!getSignature().equals(other.getSignature())) return false; + if (hasSignatureCrc32C() != other.hasSignatureCrc32C()) return false; + if (hasSignatureCrc32C()) { + if (!getSignatureCrc32C().equals(other.getSignatureCrc32C())) return false; + } + if (getVerifiedDigestCrc32C() != other.getVerifiedDigestCrc32C()) return false; + if (!getName().equals(other.getName())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -186,6 +398,14 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + SIGNATURE_FIELD_NUMBER; hash = (53 * hash) + getSignature().hashCode(); + if (hasSignatureCrc32C()) { + hash = (37 * hash) + SIGNATURE_CRC32C_FIELD_NUMBER; + hash = (53 * hash) + getSignatureCrc32C().hashCode(); + } + hash = (37 * hash) + VERIFIED_DIGEST_CRC32C_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getVerifiedDigestCrc32C()); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -333,6 +553,16 @@ public Builder clear() { super.clear(); signature_ = com.google.protobuf.ByteString.EMPTY; + if (signatureCrc32CBuilder_ == null) { + signatureCrc32C_ = null; + } else { + signatureCrc32C_ = null; + signatureCrc32CBuilder_ = null; + } + verifiedDigestCrc32C_ = false; + + name_ = ""; + return this; } @@ -361,6 +591,13 @@ public com.google.cloud.kms.v1.AsymmetricSignResponse buildPartial() { com.google.cloud.kms.v1.AsymmetricSignResponse result = new com.google.cloud.kms.v1.AsymmetricSignResponse(this); result.signature_ = signature_; + if (signatureCrc32CBuilder_ == null) { + result.signatureCrc32C_ = signatureCrc32C_; + } else { + result.signatureCrc32C_ = signatureCrc32CBuilder_.build(); + } + result.verifiedDigestCrc32C_ = verifiedDigestCrc32C_; + result.name_ = name_; onBuilt(); return result; } @@ -413,6 +650,16 @@ public Builder mergeFrom(com.google.cloud.kms.v1.AsymmetricSignResponse other) { if (other.getSignature() != com.google.protobuf.ByteString.EMPTY) { setSignature(other.getSignature()); } + if (other.hasSignatureCrc32C()) { + mergeSignatureCrc32C(other.getSignatureCrc32C()); + } + if (other.getVerifiedDigestCrc32C() != false) { + setVerifiedDigestCrc32C(other.getVerifiedDigestCrc32C()); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -497,6 +744,482 @@ public Builder clearSignature() { return this; } + private com.google.protobuf.Int64Value signatureCrc32C_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int64Value, + com.google.protobuf.Int64Value.Builder, + com.google.protobuf.Int64ValueOrBuilder> + signatureCrc32CBuilder_; + /** + * + * + *
+     * Integrity verification field. A CRC32C checksum of the returned
+     * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature]. An integrity check of
+     * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] can be performed by computing the
+     * CRC32C checksum of [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] and comparing your
+     * results to this field. Discard the response in case of non-matching
+     * checksum values, and perform a limited number of retries. A persistent
+     * mismatch may indicate an issue in your computation of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * .google.protobuf.Int64Value signature_crc32c = 2; + * + * @return Whether the signatureCrc32c field is set. + */ + public boolean hasSignatureCrc32C() { + return signatureCrc32CBuilder_ != null || signatureCrc32C_ != null; + } + /** + * + * + *
+     * Integrity verification field. A CRC32C checksum of the returned
+     * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature]. An integrity check of
+     * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] can be performed by computing the
+     * CRC32C checksum of [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] and comparing your
+     * results to this field. Discard the response in case of non-matching
+     * checksum values, and perform a limited number of retries. A persistent
+     * mismatch may indicate an issue in your computation of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * .google.protobuf.Int64Value signature_crc32c = 2; + * + * @return The signatureCrc32c. + */ + public com.google.protobuf.Int64Value getSignatureCrc32C() { + if (signatureCrc32CBuilder_ == null) { + return signatureCrc32C_ == null + ? com.google.protobuf.Int64Value.getDefaultInstance() + : signatureCrc32C_; + } else { + return signatureCrc32CBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Integrity verification field. A CRC32C checksum of the returned
+     * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature]. An integrity check of
+     * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] can be performed by computing the
+     * CRC32C checksum of [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] and comparing your
+     * results to this field. Discard the response in case of non-matching
+     * checksum values, and perform a limited number of retries. A persistent
+     * mismatch may indicate an issue in your computation of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * .google.protobuf.Int64Value signature_crc32c = 2; + */ + public Builder setSignatureCrc32C(com.google.protobuf.Int64Value value) { + if (signatureCrc32CBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + signatureCrc32C_ = value; + onChanged(); + } else { + signatureCrc32CBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Integrity verification field. A CRC32C checksum of the returned
+     * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature]. An integrity check of
+     * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] can be performed by computing the
+     * CRC32C checksum of [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] and comparing your
+     * results to this field. Discard the response in case of non-matching
+     * checksum values, and perform a limited number of retries. A persistent
+     * mismatch may indicate an issue in your computation of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * .google.protobuf.Int64Value signature_crc32c = 2; + */ + public Builder setSignatureCrc32C(com.google.protobuf.Int64Value.Builder builderForValue) { + if (signatureCrc32CBuilder_ == null) { + signatureCrc32C_ = builderForValue.build(); + onChanged(); + } else { + signatureCrc32CBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Integrity verification field. A CRC32C checksum of the returned
+     * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature]. An integrity check of
+     * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] can be performed by computing the
+     * CRC32C checksum of [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] and comparing your
+     * results to this field. Discard the response in case of non-matching
+     * checksum values, and perform a limited number of retries. A persistent
+     * mismatch may indicate an issue in your computation of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * .google.protobuf.Int64Value signature_crc32c = 2; + */ + public Builder mergeSignatureCrc32C(com.google.protobuf.Int64Value value) { + if (signatureCrc32CBuilder_ == null) { + if (signatureCrc32C_ != null) { + signatureCrc32C_ = + com.google.protobuf.Int64Value.newBuilder(signatureCrc32C_) + .mergeFrom(value) + .buildPartial(); + } else { + signatureCrc32C_ = value; + } + onChanged(); + } else { + signatureCrc32CBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Integrity verification field. A CRC32C checksum of the returned
+     * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature]. An integrity check of
+     * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] can be performed by computing the
+     * CRC32C checksum of [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] and comparing your
+     * results to this field. Discard the response in case of non-matching
+     * checksum values, and perform a limited number of retries. A persistent
+     * mismatch may indicate an issue in your computation of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * .google.protobuf.Int64Value signature_crc32c = 2; + */ + public Builder clearSignatureCrc32C() { + if (signatureCrc32CBuilder_ == null) { + signatureCrc32C_ = null; + onChanged(); + } else { + signatureCrc32C_ = null; + signatureCrc32CBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Integrity verification field. A CRC32C checksum of the returned
+     * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature]. An integrity check of
+     * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] can be performed by computing the
+     * CRC32C checksum of [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] and comparing your
+     * results to this field. Discard the response in case of non-matching
+     * checksum values, and perform a limited number of retries. A persistent
+     * mismatch may indicate an issue in your computation of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * .google.protobuf.Int64Value signature_crc32c = 2; + */ + public com.google.protobuf.Int64Value.Builder getSignatureCrc32CBuilder() { + + onChanged(); + return getSignatureCrc32CFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Integrity verification field. A CRC32C checksum of the returned
+     * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature]. An integrity check of
+     * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] can be performed by computing the
+     * CRC32C checksum of [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] and comparing your
+     * results to this field. Discard the response in case of non-matching
+     * checksum values, and perform a limited number of retries. A persistent
+     * mismatch may indicate an issue in your computation of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * .google.protobuf.Int64Value signature_crc32c = 2; + */ + public com.google.protobuf.Int64ValueOrBuilder getSignatureCrc32COrBuilder() { + if (signatureCrc32CBuilder_ != null) { + return signatureCrc32CBuilder_.getMessageOrBuilder(); + } else { + return signatureCrc32C_ == null + ? com.google.protobuf.Int64Value.getDefaultInstance() + : signatureCrc32C_; + } + } + /** + * + * + *
+     * Integrity verification field. A CRC32C checksum of the returned
+     * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature]. An integrity check of
+     * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] can be performed by computing the
+     * CRC32C checksum of [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] and comparing your
+     * results to this field. Discard the response in case of non-matching
+     * checksum values, and perform a limited number of retries. A persistent
+     * mismatch may indicate an issue in your computation of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * .google.protobuf.Int64Value signature_crc32c = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int64Value, + com.google.protobuf.Int64Value.Builder, + com.google.protobuf.Int64ValueOrBuilder> + getSignatureCrc32CFieldBuilder() { + if (signatureCrc32CBuilder_ == null) { + signatureCrc32CBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int64Value, + com.google.protobuf.Int64Value.Builder, + com.google.protobuf.Int64ValueOrBuilder>( + getSignatureCrc32C(), getParentForChildren(), isClean()); + signatureCrc32C_ = null; + } + return signatureCrc32CBuilder_; + } + + private boolean verifiedDigestCrc32C_; + /** + * + * + *
+     * Integrity verification field. A flag indicating whether
+     * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] was received by
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used for the integrity verification of the
+     * [digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. A false value of this field
+     * indicates either that [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] was left
+     * unset or that it was not delivered to [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've
+     * set [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] but this field is still false,
+     * discard the response and perform a limited number of retries.
+     * NOTE: This field is in Beta.
+     * 
+ * + * bool verified_digest_crc32c = 3; + * + * @return The verifiedDigestCrc32c. + */ + @java.lang.Override + public boolean getVerifiedDigestCrc32C() { + return verifiedDigestCrc32C_; + } + /** + * + * + *
+     * Integrity verification field. A flag indicating whether
+     * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] was received by
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used for the integrity verification of the
+     * [digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. A false value of this field
+     * indicates either that [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] was left
+     * unset or that it was not delivered to [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've
+     * set [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] but this field is still false,
+     * discard the response and perform a limited number of retries.
+     * NOTE: This field is in Beta.
+     * 
+ * + * bool verified_digest_crc32c = 3; + * + * @param value The verifiedDigestCrc32c to set. + * @return This builder for chaining. + */ + public Builder setVerifiedDigestCrc32C(boolean value) { + + verifiedDigestCrc32C_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Integrity verification field. A flag indicating whether
+     * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] was received by
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used for the integrity verification of the
+     * [digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. A false value of this field
+     * indicates either that [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] was left
+     * unset or that it was not delivered to [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've
+     * set [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] but this field is still false,
+     * discard the response and perform a limited number of retries.
+     * NOTE: This field is in Beta.
+     * 
+ * + * bool verified_digest_crc32c = 3; + * + * @return This builder for chaining. + */ + public Builder clearVerifiedDigestCrc32C() { + + verifiedDigestCrc32C_ = false; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The resource name of the [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. Check
+     * this field to verify that the intended resource was used for signing.
+     * NOTE: This field is in Beta.
+     * 
+ * + * string name = 4; + * + * @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; + } + } + /** + * + * + *
+     * The resource name of the [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. Check
+     * this field to verify that the intended resource was used for signing.
+     * NOTE: This field is in Beta.
+     * 
+ * + * string name = 4; + * + * @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; + } + } + /** + * + * + *
+     * The resource name of the [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. Check
+     * this field to verify that the intended resource was used for signing.
+     * NOTE: This field is in Beta.
+     * 
+ * + * string name = 4; + * + * @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; + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. Check
+     * this field to verify that the intended resource was used for signing.
+     * NOTE: This field is in Beta.
+     * 
+ * + * string name = 4; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. Check
+     * this field to verify that the intended resource was used for signing.
+     * NOTE: This field is in Beta.
+     * 
+ * + * string name = 4; + * + * @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; + 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-kms-v1/src/main/java/com/google/cloud/kms/v1/AsymmetricSignResponseOrBuilder.java b/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/AsymmetricSignResponseOrBuilder.java index 3933597d..f176c76a 100644 --- a/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/AsymmetricSignResponseOrBuilder.java +++ b/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/AsymmetricSignResponseOrBuilder.java @@ -35,4 +35,122 @@ public interface AsymmetricSignResponseOrBuilder * @return The signature. */ com.google.protobuf.ByteString getSignature(); + + /** + * + * + *
+   * Integrity verification field. A CRC32C checksum of the returned
+   * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature]. An integrity check of
+   * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] can be performed by computing the
+   * CRC32C checksum of [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] and comparing your
+   * results to this field. Discard the response in case of non-matching
+   * checksum values, and perform a limited number of retries. A persistent
+   * mismatch may indicate an issue in your computation of the CRC32C checksum.
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * .google.protobuf.Int64Value signature_crc32c = 2; + * + * @return Whether the signatureCrc32c field is set. + */ + boolean hasSignatureCrc32C(); + /** + * + * + *
+   * Integrity verification field. A CRC32C checksum of the returned
+   * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature]. An integrity check of
+   * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] can be performed by computing the
+   * CRC32C checksum of [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] and comparing your
+   * results to this field. Discard the response in case of non-matching
+   * checksum values, and perform a limited number of retries. A persistent
+   * mismatch may indicate an issue in your computation of the CRC32C checksum.
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * .google.protobuf.Int64Value signature_crc32c = 2; + * + * @return The signatureCrc32c. + */ + com.google.protobuf.Int64Value getSignatureCrc32C(); + /** + * + * + *
+   * Integrity verification field. A CRC32C checksum of the returned
+   * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature]. An integrity check of
+   * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] can be performed by computing the
+   * CRC32C checksum of [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] and comparing your
+   * results to this field. Discard the response in case of non-matching
+   * checksum values, and perform a limited number of retries. A persistent
+   * mismatch may indicate an issue in your computation of the CRC32C checksum.
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * .google.protobuf.Int64Value signature_crc32c = 2; + */ + com.google.protobuf.Int64ValueOrBuilder getSignatureCrc32COrBuilder(); + + /** + * + * + *
+   * Integrity verification field. A flag indicating whether
+   * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] was received by
+   * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used for the integrity verification of the
+   * [digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. A false value of this field
+   * indicates either that [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] was left
+   * unset or that it was not delivered to [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've
+   * set [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] but this field is still false,
+   * discard the response and perform a limited number of retries.
+   * NOTE: This field is in Beta.
+   * 
+ * + * bool verified_digest_crc32c = 3; + * + * @return The verifiedDigestCrc32c. + */ + boolean getVerifiedDigestCrc32C(); + + /** + * + * + *
+   * The resource name of the [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. Check
+   * this field to verify that the intended resource was used for signing.
+   * NOTE: This field is in Beta.
+   * 
+ * + * string name = 4; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The resource name of the [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. Check
+   * this field to verify that the intended resource was used for signing.
+   * NOTE: This field is in Beta.
+   * 
+ * + * string name = 4; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); } diff --git a/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/CryptoKey.java b/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/CryptoKey.java index 5281de34..34f5f321 100644 --- a/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/CryptoKey.java +++ b/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/CryptoKey.java @@ -24,8 +24,8 @@ *
  * A [CryptoKey][google.cloud.kms.v1.CryptoKey] represents a logical key that can be used for cryptographic
  * operations.
- * A [CryptoKey][google.cloud.kms.v1.CryptoKey] is made up of one or more [versions][google.cloud.kms.v1.CryptoKeyVersion], which
- * represent the actual key material used in cryptographic operations.
+ * A [CryptoKey][google.cloud.kms.v1.CryptoKey] is made up of zero or more [versions][google.cloud.kms.v1.CryptoKeyVersion],
+ * which represent the actual key material used in cryptographic operations.
  * 
* * Protobuf type {@code google.cloud.kms.v1.CryptoKey} @@ -1257,8 +1257,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build *
    * A [CryptoKey][google.cloud.kms.v1.CryptoKey] represents a logical key that can be used for cryptographic
    * operations.
-   * A [CryptoKey][google.cloud.kms.v1.CryptoKey] is made up of one or more [versions][google.cloud.kms.v1.CryptoKeyVersion], which
-   * represent the actual key material used in cryptographic operations.
+   * A [CryptoKey][google.cloud.kms.v1.CryptoKey] is made up of zero or more [versions][google.cloud.kms.v1.CryptoKeyVersion],
+   * which represent the actual key material used in cryptographic operations.
    * 
* * Protobuf type {@code google.cloud.kms.v1.CryptoKey} diff --git a/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/DecryptRequest.java b/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/DecryptRequest.java index 3c0752f7..5278d995 100644 --- a/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/DecryptRequest.java +++ b/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/DecryptRequest.java @@ -87,6 +87,36 @@ private DecryptRequest( case 26: { additionalAuthenticatedData_ = input.readBytes(); + break; + } + case 42: + { + com.google.protobuf.Int64Value.Builder subBuilder = null; + if (ciphertextCrc32C_ != null) { + subBuilder = ciphertextCrc32C_.toBuilder(); + } + ciphertextCrc32C_ = + input.readMessage(com.google.protobuf.Int64Value.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(ciphertextCrc32C_); + ciphertextCrc32C_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + com.google.protobuf.Int64Value.Builder subBuilder = null; + if (additionalAuthenticatedDataCrc32C_ != null) { + subBuilder = additionalAuthenticatedDataCrc32C_.toBuilder(); + } + additionalAuthenticatedDataCrc32C_ = + input.readMessage(com.google.protobuf.Int64Value.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(additionalAuthenticatedDataCrc32C_); + additionalAuthenticatedDataCrc32C_ = subBuilder.buildPartial(); + } + break; } default: @@ -216,6 +246,195 @@ public com.google.protobuf.ByteString getAdditionalAuthenticatedData() { return additionalAuthenticatedData_; } + public static final int CIPHERTEXT_CRC32C_FIELD_NUMBER = 5; + private com.google.protobuf.Int64Value ciphertextCrc32C_; + /** + * + * + *
+   * Optional. An optional CRC32C checksum of the [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]. If
+   * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the
+   * received [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext] using this checksum.
+   * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+   * fails. If you receive a checksum error, your client should verify that
+   * CRC32C([DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]) is equal to
+   * [DecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.DecryptRequest.ciphertext_crc32c], and if so, perform a limited number
+   * of retries. A persistent mismatch may indicate an issue in your computation
+   * of the CRC32C checksum.
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * + * .google.protobuf.Int64Value ciphertext_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the ciphertextCrc32c field is set. + */ + @java.lang.Override + public boolean hasCiphertextCrc32C() { + return ciphertextCrc32C_ != null; + } + /** + * + * + *
+   * Optional. An optional CRC32C checksum of the [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]. If
+   * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the
+   * received [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext] using this checksum.
+   * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+   * fails. If you receive a checksum error, your client should verify that
+   * CRC32C([DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]) is equal to
+   * [DecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.DecryptRequest.ciphertext_crc32c], and if so, perform a limited number
+   * of retries. A persistent mismatch may indicate an issue in your computation
+   * of the CRC32C checksum.
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * + * .google.protobuf.Int64Value ciphertext_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The ciphertextCrc32c. + */ + @java.lang.Override + public com.google.protobuf.Int64Value getCiphertextCrc32C() { + return ciphertextCrc32C_ == null + ? com.google.protobuf.Int64Value.getDefaultInstance() + : ciphertextCrc32C_; + } + /** + * + * + *
+   * Optional. An optional CRC32C checksum of the [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]. If
+   * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the
+   * received [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext] using this checksum.
+   * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+   * fails. If you receive a checksum error, your client should verify that
+   * CRC32C([DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]) is equal to
+   * [DecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.DecryptRequest.ciphertext_crc32c], and if so, perform a limited number
+   * of retries. A persistent mismatch may indicate an issue in your computation
+   * of the CRC32C checksum.
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * + * .google.protobuf.Int64Value ciphertext_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.Int64ValueOrBuilder getCiphertextCrc32COrBuilder() { + return getCiphertextCrc32C(); + } + + public static final int ADDITIONAL_AUTHENTICATED_DATA_CRC32C_FIELD_NUMBER = 6; + private com.google.protobuf.Int64Value additionalAuthenticatedDataCrc32C_; + /** + * + * + *
+   * Optional. An optional CRC32C checksum of the
+   * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]. If specified,
+   * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the received
+   * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data] using this checksum.
+   * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+   * fails. If you receive a checksum error, your client should verify that
+   * CRC32C([DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]) is equal to
+   * [DecryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data_crc32c], and if so, perform
+   * a limited number of retries. A persistent mismatch may indicate an issue in
+   * your computation of the CRC32C checksum.
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * + * .google.protobuf.Int64Value additional_authenticated_data_crc32c = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the additionalAuthenticatedDataCrc32c field is set. + */ + @java.lang.Override + public boolean hasAdditionalAuthenticatedDataCrc32C() { + return additionalAuthenticatedDataCrc32C_ != null; + } + /** + * + * + *
+   * Optional. An optional CRC32C checksum of the
+   * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]. If specified,
+   * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the received
+   * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data] using this checksum.
+   * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+   * fails. If you receive a checksum error, your client should verify that
+   * CRC32C([DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]) is equal to
+   * [DecryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data_crc32c], and if so, perform
+   * a limited number of retries. A persistent mismatch may indicate an issue in
+   * your computation of the CRC32C checksum.
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * + * .google.protobuf.Int64Value additional_authenticated_data_crc32c = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The additionalAuthenticatedDataCrc32c. + */ + @java.lang.Override + public com.google.protobuf.Int64Value getAdditionalAuthenticatedDataCrc32C() { + return additionalAuthenticatedDataCrc32C_ == null + ? com.google.protobuf.Int64Value.getDefaultInstance() + : additionalAuthenticatedDataCrc32C_; + } + /** + * + * + *
+   * Optional. An optional CRC32C checksum of the
+   * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]. If specified,
+   * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the received
+   * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data] using this checksum.
+   * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+   * fails. If you receive a checksum error, your client should verify that
+   * CRC32C([DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]) is equal to
+   * [DecryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data_crc32c], and if so, perform
+   * a limited number of retries. A persistent mismatch may indicate an issue in
+   * your computation of the CRC32C checksum.
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * + * .google.protobuf.Int64Value additional_authenticated_data_crc32c = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.Int64ValueOrBuilder getAdditionalAuthenticatedDataCrc32COrBuilder() { + return getAdditionalAuthenticatedDataCrc32C(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -239,6 +458,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!additionalAuthenticatedData_.isEmpty()) { output.writeBytes(3, additionalAuthenticatedData_); } + if (ciphertextCrc32C_ != null) { + output.writeMessage(5, getCiphertextCrc32C()); + } + if (additionalAuthenticatedDataCrc32C_ != null) { + output.writeMessage(6, getAdditionalAuthenticatedDataCrc32C()); + } unknownFields.writeTo(output); } @@ -258,6 +483,14 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBytesSize(3, additionalAuthenticatedData_); } + if (ciphertextCrc32C_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCiphertextCrc32C()); + } + if (additionalAuthenticatedDataCrc32C_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, getAdditionalAuthenticatedDataCrc32C()); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -277,6 +510,16 @@ public boolean equals(final java.lang.Object obj) { if (!getCiphertext().equals(other.getCiphertext())) return false; if (!getAdditionalAuthenticatedData().equals(other.getAdditionalAuthenticatedData())) return false; + if (hasCiphertextCrc32C() != other.hasCiphertextCrc32C()) return false; + if (hasCiphertextCrc32C()) { + if (!getCiphertextCrc32C().equals(other.getCiphertextCrc32C())) return false; + } + if (hasAdditionalAuthenticatedDataCrc32C() != other.hasAdditionalAuthenticatedDataCrc32C()) + return false; + if (hasAdditionalAuthenticatedDataCrc32C()) { + if (!getAdditionalAuthenticatedDataCrc32C() + .equals(other.getAdditionalAuthenticatedDataCrc32C())) return false; + } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -294,6 +537,14 @@ public int hashCode() { hash = (53 * hash) + getCiphertext().hashCode(); hash = (37 * hash) + ADDITIONAL_AUTHENTICATED_DATA_FIELD_NUMBER; hash = (53 * hash) + getAdditionalAuthenticatedData().hashCode(); + if (hasCiphertextCrc32C()) { + hash = (37 * hash) + CIPHERTEXT_CRC32C_FIELD_NUMBER; + hash = (53 * hash) + getCiphertextCrc32C().hashCode(); + } + if (hasAdditionalAuthenticatedDataCrc32C()) { + hash = (37 * hash) + ADDITIONAL_AUTHENTICATED_DATA_CRC32C_FIELD_NUMBER; + hash = (53 * hash) + getAdditionalAuthenticatedDataCrc32C().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -445,6 +696,18 @@ public Builder clear() { additionalAuthenticatedData_ = com.google.protobuf.ByteString.EMPTY; + if (ciphertextCrc32CBuilder_ == null) { + ciphertextCrc32C_ = null; + } else { + ciphertextCrc32C_ = null; + ciphertextCrc32CBuilder_ = null; + } + if (additionalAuthenticatedDataCrc32CBuilder_ == null) { + additionalAuthenticatedDataCrc32C_ = null; + } else { + additionalAuthenticatedDataCrc32C_ = null; + additionalAuthenticatedDataCrc32CBuilder_ = null; + } return this; } @@ -475,6 +738,17 @@ public com.google.cloud.kms.v1.DecryptRequest buildPartial() { result.name_ = name_; result.ciphertext_ = ciphertext_; result.additionalAuthenticatedData_ = additionalAuthenticatedData_; + if (ciphertextCrc32CBuilder_ == null) { + result.ciphertextCrc32C_ = ciphertextCrc32C_; + } else { + result.ciphertextCrc32C_ = ciphertextCrc32CBuilder_.build(); + } + if (additionalAuthenticatedDataCrc32CBuilder_ == null) { + result.additionalAuthenticatedDataCrc32C_ = additionalAuthenticatedDataCrc32C_; + } else { + result.additionalAuthenticatedDataCrc32C_ = + additionalAuthenticatedDataCrc32CBuilder_.build(); + } onBuilt(); return result; } @@ -534,6 +808,12 @@ public Builder mergeFrom(com.google.cloud.kms.v1.DecryptRequest other) { if (other.getAdditionalAuthenticatedData() != com.google.protobuf.ByteString.EMPTY) { setAdditionalAuthenticatedData(other.getAdditionalAuthenticatedData()); } + if (other.hasCiphertextCrc32C()) { + mergeCiphertextCrc32C(other.getCiphertextCrc32C()); + } + if (other.hasAdditionalAuthenticatedDataCrc32C()) { + mergeAdditionalAuthenticatedDataCrc32C(other.getAdditionalAuthenticatedDataCrc32C()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -804,6 +1084,657 @@ public Builder clearAdditionalAuthenticatedData() { return this; } + private com.google.protobuf.Int64Value ciphertextCrc32C_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int64Value, + com.google.protobuf.Int64Value.Builder, + com.google.protobuf.Int64ValueOrBuilder> + ciphertextCrc32CBuilder_; + /** + * + * + *
+     * Optional. An optional CRC32C checksum of the [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]. If
+     * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the
+     * received [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext] using this checksum.
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+     * fails. If you receive a checksum error, your client should verify that
+     * CRC32C([DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]) is equal to
+     * [DecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.DecryptRequest.ciphertext_crc32c], and if so, perform a limited number
+     * of retries. A persistent mismatch may indicate an issue in your computation
+     * of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * + * .google.protobuf.Int64Value ciphertext_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the ciphertextCrc32c field is set. + */ + public boolean hasCiphertextCrc32C() { + return ciphertextCrc32CBuilder_ != null || ciphertextCrc32C_ != null; + } + /** + * + * + *
+     * Optional. An optional CRC32C checksum of the [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]. If
+     * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the
+     * received [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext] using this checksum.
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+     * fails. If you receive a checksum error, your client should verify that
+     * CRC32C([DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]) is equal to
+     * [DecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.DecryptRequest.ciphertext_crc32c], and if so, perform a limited number
+     * of retries. A persistent mismatch may indicate an issue in your computation
+     * of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * + * .google.protobuf.Int64Value ciphertext_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The ciphertextCrc32c. + */ + public com.google.protobuf.Int64Value getCiphertextCrc32C() { + if (ciphertextCrc32CBuilder_ == null) { + return ciphertextCrc32C_ == null + ? com.google.protobuf.Int64Value.getDefaultInstance() + : ciphertextCrc32C_; + } else { + return ciphertextCrc32CBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. An optional CRC32C checksum of the [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]. If
+     * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the
+     * received [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext] using this checksum.
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+     * fails. If you receive a checksum error, your client should verify that
+     * CRC32C([DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]) is equal to
+     * [DecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.DecryptRequest.ciphertext_crc32c], and if so, perform a limited number
+     * of retries. A persistent mismatch may indicate an issue in your computation
+     * of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * + * .google.protobuf.Int64Value ciphertext_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setCiphertextCrc32C(com.google.protobuf.Int64Value value) { + if (ciphertextCrc32CBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ciphertextCrc32C_ = value; + onChanged(); + } else { + ciphertextCrc32CBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. An optional CRC32C checksum of the [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]. If
+     * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the
+     * received [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext] using this checksum.
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+     * fails. If you receive a checksum error, your client should verify that
+     * CRC32C([DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]) is equal to
+     * [DecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.DecryptRequest.ciphertext_crc32c], and if so, perform a limited number
+     * of retries. A persistent mismatch may indicate an issue in your computation
+     * of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * + * .google.protobuf.Int64Value ciphertext_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setCiphertextCrc32C(com.google.protobuf.Int64Value.Builder builderForValue) { + if (ciphertextCrc32CBuilder_ == null) { + ciphertextCrc32C_ = builderForValue.build(); + onChanged(); + } else { + ciphertextCrc32CBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. An optional CRC32C checksum of the [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]. If
+     * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the
+     * received [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext] using this checksum.
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+     * fails. If you receive a checksum error, your client should verify that
+     * CRC32C([DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]) is equal to
+     * [DecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.DecryptRequest.ciphertext_crc32c], and if so, perform a limited number
+     * of retries. A persistent mismatch may indicate an issue in your computation
+     * of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * + * .google.protobuf.Int64Value ciphertext_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeCiphertextCrc32C(com.google.protobuf.Int64Value value) { + if (ciphertextCrc32CBuilder_ == null) { + if (ciphertextCrc32C_ != null) { + ciphertextCrc32C_ = + com.google.protobuf.Int64Value.newBuilder(ciphertextCrc32C_) + .mergeFrom(value) + .buildPartial(); + } else { + ciphertextCrc32C_ = value; + } + onChanged(); + } else { + ciphertextCrc32CBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. An optional CRC32C checksum of the [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]. If
+     * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the
+     * received [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext] using this checksum.
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+     * fails. If you receive a checksum error, your client should verify that
+     * CRC32C([DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]) is equal to
+     * [DecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.DecryptRequest.ciphertext_crc32c], and if so, perform a limited number
+     * of retries. A persistent mismatch may indicate an issue in your computation
+     * of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * + * .google.protobuf.Int64Value ciphertext_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearCiphertextCrc32C() { + if (ciphertextCrc32CBuilder_ == null) { + ciphertextCrc32C_ = null; + onChanged(); + } else { + ciphertextCrc32C_ = null; + ciphertextCrc32CBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. An optional CRC32C checksum of the [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]. If
+     * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the
+     * received [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext] using this checksum.
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+     * fails. If you receive a checksum error, your client should verify that
+     * CRC32C([DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]) is equal to
+     * [DecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.DecryptRequest.ciphertext_crc32c], and if so, perform a limited number
+     * of retries. A persistent mismatch may indicate an issue in your computation
+     * of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * + * .google.protobuf.Int64Value ciphertext_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Int64Value.Builder getCiphertextCrc32CBuilder() { + + onChanged(); + return getCiphertextCrc32CFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. An optional CRC32C checksum of the [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]. If
+     * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the
+     * received [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext] using this checksum.
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+     * fails. If you receive a checksum error, your client should verify that
+     * CRC32C([DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]) is equal to
+     * [DecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.DecryptRequest.ciphertext_crc32c], and if so, perform a limited number
+     * of retries. A persistent mismatch may indicate an issue in your computation
+     * of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * + * .google.protobuf.Int64Value ciphertext_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Int64ValueOrBuilder getCiphertextCrc32COrBuilder() { + if (ciphertextCrc32CBuilder_ != null) { + return ciphertextCrc32CBuilder_.getMessageOrBuilder(); + } else { + return ciphertextCrc32C_ == null + ? com.google.protobuf.Int64Value.getDefaultInstance() + : ciphertextCrc32C_; + } + } + /** + * + * + *
+     * Optional. An optional CRC32C checksum of the [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]. If
+     * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the
+     * received [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext] using this checksum.
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+     * fails. If you receive a checksum error, your client should verify that
+     * CRC32C([DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]) is equal to
+     * [DecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.DecryptRequest.ciphertext_crc32c], and if so, perform a limited number
+     * of retries. A persistent mismatch may indicate an issue in your computation
+     * of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * + * .google.protobuf.Int64Value ciphertext_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int64Value, + com.google.protobuf.Int64Value.Builder, + com.google.protobuf.Int64ValueOrBuilder> + getCiphertextCrc32CFieldBuilder() { + if (ciphertextCrc32CBuilder_ == null) { + ciphertextCrc32CBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int64Value, + com.google.protobuf.Int64Value.Builder, + com.google.protobuf.Int64ValueOrBuilder>( + getCiphertextCrc32C(), getParentForChildren(), isClean()); + ciphertextCrc32C_ = null; + } + return ciphertextCrc32CBuilder_; + } + + private com.google.protobuf.Int64Value additionalAuthenticatedDataCrc32C_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int64Value, + com.google.protobuf.Int64Value.Builder, + com.google.protobuf.Int64ValueOrBuilder> + additionalAuthenticatedDataCrc32CBuilder_; + /** + * + * + *
+     * Optional. An optional CRC32C checksum of the
+     * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]. If specified,
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the received
+     * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data] using this checksum.
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+     * fails. If you receive a checksum error, your client should verify that
+     * CRC32C([DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]) is equal to
+     * [DecryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data_crc32c], and if so, perform
+     * a limited number of retries. A persistent mismatch may indicate an issue in
+     * your computation of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * + * .google.protobuf.Int64Value additional_authenticated_data_crc32c = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the additionalAuthenticatedDataCrc32c field is set. + */ + public boolean hasAdditionalAuthenticatedDataCrc32C() { + return additionalAuthenticatedDataCrc32CBuilder_ != null + || additionalAuthenticatedDataCrc32C_ != null; + } + /** + * + * + *
+     * Optional. An optional CRC32C checksum of the
+     * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]. If specified,
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the received
+     * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data] using this checksum.
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+     * fails. If you receive a checksum error, your client should verify that
+     * CRC32C([DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]) is equal to
+     * [DecryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data_crc32c], and if so, perform
+     * a limited number of retries. A persistent mismatch may indicate an issue in
+     * your computation of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * + * .google.protobuf.Int64Value additional_authenticated_data_crc32c = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The additionalAuthenticatedDataCrc32c. + */ + public com.google.protobuf.Int64Value getAdditionalAuthenticatedDataCrc32C() { + if (additionalAuthenticatedDataCrc32CBuilder_ == null) { + return additionalAuthenticatedDataCrc32C_ == null + ? com.google.protobuf.Int64Value.getDefaultInstance() + : additionalAuthenticatedDataCrc32C_; + } else { + return additionalAuthenticatedDataCrc32CBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. An optional CRC32C checksum of the
+     * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]. If specified,
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the received
+     * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data] using this checksum.
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+     * fails. If you receive a checksum error, your client should verify that
+     * CRC32C([DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]) is equal to
+     * [DecryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data_crc32c], and if so, perform
+     * a limited number of retries. A persistent mismatch may indicate an issue in
+     * your computation of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * + * .google.protobuf.Int64Value additional_authenticated_data_crc32c = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAdditionalAuthenticatedDataCrc32C(com.google.protobuf.Int64Value value) { + if (additionalAuthenticatedDataCrc32CBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + additionalAuthenticatedDataCrc32C_ = value; + onChanged(); + } else { + additionalAuthenticatedDataCrc32CBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. An optional CRC32C checksum of the
+     * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]. If specified,
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the received
+     * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data] using this checksum.
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+     * fails. If you receive a checksum error, your client should verify that
+     * CRC32C([DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]) is equal to
+     * [DecryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data_crc32c], and if so, perform
+     * a limited number of retries. A persistent mismatch may indicate an issue in
+     * your computation of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * + * .google.protobuf.Int64Value additional_authenticated_data_crc32c = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAdditionalAuthenticatedDataCrc32C( + com.google.protobuf.Int64Value.Builder builderForValue) { + if (additionalAuthenticatedDataCrc32CBuilder_ == null) { + additionalAuthenticatedDataCrc32C_ = builderForValue.build(); + onChanged(); + } else { + additionalAuthenticatedDataCrc32CBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. An optional CRC32C checksum of the
+     * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]. If specified,
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the received
+     * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data] using this checksum.
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+     * fails. If you receive a checksum error, your client should verify that
+     * CRC32C([DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]) is equal to
+     * [DecryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data_crc32c], and if so, perform
+     * a limited number of retries. A persistent mismatch may indicate an issue in
+     * your computation of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * + * .google.protobuf.Int64Value additional_authenticated_data_crc32c = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeAdditionalAuthenticatedDataCrc32C(com.google.protobuf.Int64Value value) { + if (additionalAuthenticatedDataCrc32CBuilder_ == null) { + if (additionalAuthenticatedDataCrc32C_ != null) { + additionalAuthenticatedDataCrc32C_ = + com.google.protobuf.Int64Value.newBuilder(additionalAuthenticatedDataCrc32C_) + .mergeFrom(value) + .buildPartial(); + } else { + additionalAuthenticatedDataCrc32C_ = value; + } + onChanged(); + } else { + additionalAuthenticatedDataCrc32CBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. An optional CRC32C checksum of the
+     * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]. If specified,
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the received
+     * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data] using this checksum.
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+     * fails. If you receive a checksum error, your client should verify that
+     * CRC32C([DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]) is equal to
+     * [DecryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data_crc32c], and if so, perform
+     * a limited number of retries. A persistent mismatch may indicate an issue in
+     * your computation of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * + * .google.protobuf.Int64Value additional_authenticated_data_crc32c = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearAdditionalAuthenticatedDataCrc32C() { + if (additionalAuthenticatedDataCrc32CBuilder_ == null) { + additionalAuthenticatedDataCrc32C_ = null; + onChanged(); + } else { + additionalAuthenticatedDataCrc32C_ = null; + additionalAuthenticatedDataCrc32CBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. An optional CRC32C checksum of the
+     * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]. If specified,
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the received
+     * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data] using this checksum.
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+     * fails. If you receive a checksum error, your client should verify that
+     * CRC32C([DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]) is equal to
+     * [DecryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data_crc32c], and if so, perform
+     * a limited number of retries. A persistent mismatch may indicate an issue in
+     * your computation of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * + * .google.protobuf.Int64Value additional_authenticated_data_crc32c = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Int64Value.Builder getAdditionalAuthenticatedDataCrc32CBuilder() { + + onChanged(); + return getAdditionalAuthenticatedDataCrc32CFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. An optional CRC32C checksum of the
+     * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]. If specified,
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the received
+     * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data] using this checksum.
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+     * fails. If you receive a checksum error, your client should verify that
+     * CRC32C([DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]) is equal to
+     * [DecryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data_crc32c], and if so, perform
+     * a limited number of retries. A persistent mismatch may indicate an issue in
+     * your computation of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * + * .google.protobuf.Int64Value additional_authenticated_data_crc32c = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Int64ValueOrBuilder getAdditionalAuthenticatedDataCrc32COrBuilder() { + if (additionalAuthenticatedDataCrc32CBuilder_ != null) { + return additionalAuthenticatedDataCrc32CBuilder_.getMessageOrBuilder(); + } else { + return additionalAuthenticatedDataCrc32C_ == null + ? com.google.protobuf.Int64Value.getDefaultInstance() + : additionalAuthenticatedDataCrc32C_; + } + } + /** + * + * + *
+     * Optional. An optional CRC32C checksum of the
+     * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]. If specified,
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the received
+     * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data] using this checksum.
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+     * fails. If you receive a checksum error, your client should verify that
+     * CRC32C([DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]) is equal to
+     * [DecryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data_crc32c], and if so, perform
+     * a limited number of retries. A persistent mismatch may indicate an issue in
+     * your computation of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * + * .google.protobuf.Int64Value additional_authenticated_data_crc32c = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int64Value, + com.google.protobuf.Int64Value.Builder, + com.google.protobuf.Int64ValueOrBuilder> + getAdditionalAuthenticatedDataCrc32CFieldBuilder() { + if (additionalAuthenticatedDataCrc32CBuilder_ == null) { + additionalAuthenticatedDataCrc32CBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int64Value, + com.google.protobuf.Int64Value.Builder, + com.google.protobuf.Int64ValueOrBuilder>( + getAdditionalAuthenticatedDataCrc32C(), getParentForChildren(), isClean()); + additionalAuthenticatedDataCrc32C_ = null; + } + return additionalAuthenticatedDataCrc32CBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/DecryptRequestOrBuilder.java b/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/DecryptRequestOrBuilder.java index 0f87439a..c9bbad72 100644 --- a/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/DecryptRequestOrBuilder.java +++ b/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/DecryptRequestOrBuilder.java @@ -81,4 +81,167 @@ public interface DecryptRequestOrBuilder * @return The additionalAuthenticatedData. */ com.google.protobuf.ByteString getAdditionalAuthenticatedData(); + + /** + * + * + *
+   * Optional. An optional CRC32C checksum of the [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]. If
+   * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the
+   * received [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext] using this checksum.
+   * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+   * fails. If you receive a checksum error, your client should verify that
+   * CRC32C([DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]) is equal to
+   * [DecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.DecryptRequest.ciphertext_crc32c], and if so, perform a limited number
+   * of retries. A persistent mismatch may indicate an issue in your computation
+   * of the CRC32C checksum.
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * + * .google.protobuf.Int64Value ciphertext_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the ciphertextCrc32c field is set. + */ + boolean hasCiphertextCrc32C(); + /** + * + * + *
+   * Optional. An optional CRC32C checksum of the [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]. If
+   * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the
+   * received [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext] using this checksum.
+   * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+   * fails. If you receive a checksum error, your client should verify that
+   * CRC32C([DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]) is equal to
+   * [DecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.DecryptRequest.ciphertext_crc32c], and if so, perform a limited number
+   * of retries. A persistent mismatch may indicate an issue in your computation
+   * of the CRC32C checksum.
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * + * .google.protobuf.Int64Value ciphertext_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The ciphertextCrc32c. + */ + com.google.protobuf.Int64Value getCiphertextCrc32C(); + /** + * + * + *
+   * Optional. An optional CRC32C checksum of the [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]. If
+   * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the
+   * received [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext] using this checksum.
+   * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+   * fails. If you receive a checksum error, your client should verify that
+   * CRC32C([DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]) is equal to
+   * [DecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.DecryptRequest.ciphertext_crc32c], and if so, perform a limited number
+   * of retries. A persistent mismatch may indicate an issue in your computation
+   * of the CRC32C checksum.
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * + * .google.protobuf.Int64Value ciphertext_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.Int64ValueOrBuilder getCiphertextCrc32COrBuilder(); + + /** + * + * + *
+   * Optional. An optional CRC32C checksum of the
+   * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]. If specified,
+   * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the received
+   * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data] using this checksum.
+   * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+   * fails. If you receive a checksum error, your client should verify that
+   * CRC32C([DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]) is equal to
+   * [DecryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data_crc32c], and if so, perform
+   * a limited number of retries. A persistent mismatch may indicate an issue in
+   * your computation of the CRC32C checksum.
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * + * .google.protobuf.Int64Value additional_authenticated_data_crc32c = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the additionalAuthenticatedDataCrc32c field is set. + */ + boolean hasAdditionalAuthenticatedDataCrc32C(); + /** + * + * + *
+   * Optional. An optional CRC32C checksum of the
+   * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]. If specified,
+   * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the received
+   * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data] using this checksum.
+   * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+   * fails. If you receive a checksum error, your client should verify that
+   * CRC32C([DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]) is equal to
+   * [DecryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data_crc32c], and if so, perform
+   * a limited number of retries. A persistent mismatch may indicate an issue in
+   * your computation of the CRC32C checksum.
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * + * .google.protobuf.Int64Value additional_authenticated_data_crc32c = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The additionalAuthenticatedDataCrc32c. + */ + com.google.protobuf.Int64Value getAdditionalAuthenticatedDataCrc32C(); + /** + * + * + *
+   * Optional. An optional CRC32C checksum of the
+   * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]. If specified,
+   * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the received
+   * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data] using this checksum.
+   * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+   * fails. If you receive a checksum error, your client should verify that
+   * CRC32C([DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]) is equal to
+   * [DecryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data_crc32c], and if so, perform
+   * a limited number of retries. A persistent mismatch may indicate an issue in
+   * your computation of the CRC32C checksum.
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * + * .google.protobuf.Int64Value additional_authenticated_data_crc32c = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.Int64ValueOrBuilder getAdditionalAuthenticatedDataCrc32COrBuilder(); } diff --git a/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/DecryptResponse.java b/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/DecryptResponse.java index ca5c9d40..cbef74c6 100644 --- a/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/DecryptResponse.java +++ b/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/DecryptResponse.java @@ -73,6 +73,21 @@ private DecryptResponse( case 10: { plaintext_ = input.readBytes(); + break; + } + case 18: + { + com.google.protobuf.Int64Value.Builder subBuilder = null; + if (plaintextCrc32C_ != null) { + subBuilder = plaintextCrc32C_.toBuilder(); + } + plaintextCrc32C_ = + input.readMessage(com.google.protobuf.Int64Value.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(plaintextCrc32C_); + plaintextCrc32C_ = subBuilder.buildPartial(); + } + break; } default: @@ -127,6 +142,93 @@ public com.google.protobuf.ByteString getPlaintext() { return plaintext_; } + public static final int PLAINTEXT_CRC32C_FIELD_NUMBER = 2; + private com.google.protobuf.Int64Value plaintextCrc32C_; + /** + * + * + *
+   * Integrity verification field. A CRC32C checksum of the returned
+   * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext]. An integrity check of
+   * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] can be performed by computing the CRC32C
+   * checksum of [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] and comparing your results to
+   * this field. Discard the response in case of non-matching checksum values,
+   * and perform a limited number of retries. A persistent mismatch may indicate
+   * an issue in your computation of the CRC32C checksum. Note: receiving this
+   * response message indicates that [KeyManagementService][google.cloud.kms.v1.KeyManagementService] is able to
+   * successfully decrypt the [ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext].
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * .google.protobuf.Int64Value plaintext_crc32c = 2; + * + * @return Whether the plaintextCrc32c field is set. + */ + @java.lang.Override + public boolean hasPlaintextCrc32C() { + return plaintextCrc32C_ != null; + } + /** + * + * + *
+   * Integrity verification field. A CRC32C checksum of the returned
+   * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext]. An integrity check of
+   * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] can be performed by computing the CRC32C
+   * checksum of [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] and comparing your results to
+   * this field. Discard the response in case of non-matching checksum values,
+   * and perform a limited number of retries. A persistent mismatch may indicate
+   * an issue in your computation of the CRC32C checksum. Note: receiving this
+   * response message indicates that [KeyManagementService][google.cloud.kms.v1.KeyManagementService] is able to
+   * successfully decrypt the [ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext].
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * .google.protobuf.Int64Value plaintext_crc32c = 2; + * + * @return The plaintextCrc32c. + */ + @java.lang.Override + public com.google.protobuf.Int64Value getPlaintextCrc32C() { + return plaintextCrc32C_ == null + ? com.google.protobuf.Int64Value.getDefaultInstance() + : plaintextCrc32C_; + } + /** + * + * + *
+   * Integrity verification field. A CRC32C checksum of the returned
+   * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext]. An integrity check of
+   * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] can be performed by computing the CRC32C
+   * checksum of [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] and comparing your results to
+   * this field. Discard the response in case of non-matching checksum values,
+   * and perform a limited number of retries. A persistent mismatch may indicate
+   * an issue in your computation of the CRC32C checksum. Note: receiving this
+   * response message indicates that [KeyManagementService][google.cloud.kms.v1.KeyManagementService] is able to
+   * successfully decrypt the [ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext].
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * .google.protobuf.Int64Value plaintext_crc32c = 2; + */ + @java.lang.Override + public com.google.protobuf.Int64ValueOrBuilder getPlaintextCrc32COrBuilder() { + return getPlaintextCrc32C(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -144,6 +246,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!plaintext_.isEmpty()) { output.writeBytes(1, plaintext_); } + if (plaintextCrc32C_ != null) { + output.writeMessage(2, getPlaintextCrc32C()); + } unknownFields.writeTo(output); } @@ -156,6 +261,9 @@ public int getSerializedSize() { if (!plaintext_.isEmpty()) { size += com.google.protobuf.CodedOutputStream.computeBytesSize(1, plaintext_); } + if (plaintextCrc32C_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getPlaintextCrc32C()); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -172,6 +280,10 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.kms.v1.DecryptResponse other = (com.google.cloud.kms.v1.DecryptResponse) obj; if (!getPlaintext().equals(other.getPlaintext())) return false; + if (hasPlaintextCrc32C() != other.hasPlaintextCrc32C()) return false; + if (hasPlaintextCrc32C()) { + if (!getPlaintextCrc32C().equals(other.getPlaintextCrc32C())) return false; + } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -185,6 +297,10 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + PLAINTEXT_FIELD_NUMBER; hash = (53 * hash) + getPlaintext().hashCode(); + if (hasPlaintextCrc32C()) { + hash = (37 * hash) + PLAINTEXT_CRC32C_FIELD_NUMBER; + hash = (53 * hash) + getPlaintextCrc32C().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -332,6 +448,12 @@ public Builder clear() { super.clear(); plaintext_ = com.google.protobuf.ByteString.EMPTY; + if (plaintextCrc32CBuilder_ == null) { + plaintextCrc32C_ = null; + } else { + plaintextCrc32C_ = null; + plaintextCrc32CBuilder_ = null; + } return this; } @@ -360,6 +482,11 @@ public com.google.cloud.kms.v1.DecryptResponse buildPartial() { com.google.cloud.kms.v1.DecryptResponse result = new com.google.cloud.kms.v1.DecryptResponse(this); result.plaintext_ = plaintext_; + if (plaintextCrc32CBuilder_ == null) { + result.plaintextCrc32C_ = plaintextCrc32C_; + } else { + result.plaintextCrc32C_ = plaintextCrc32CBuilder_.build(); + } onBuilt(); return result; } @@ -412,6 +539,9 @@ public Builder mergeFrom(com.google.cloud.kms.v1.DecryptResponse other) { if (other.getPlaintext() != com.google.protobuf.ByteString.EMPTY) { setPlaintext(other.getPlaintext()); } + if (other.hasPlaintextCrc32C()) { + mergePlaintextCrc32C(other.getPlaintextCrc32C()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -496,6 +626,308 @@ public Builder clearPlaintext() { return this; } + private com.google.protobuf.Int64Value plaintextCrc32C_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int64Value, + com.google.protobuf.Int64Value.Builder, + com.google.protobuf.Int64ValueOrBuilder> + plaintextCrc32CBuilder_; + /** + * + * + *
+     * Integrity verification field. A CRC32C checksum of the returned
+     * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext]. An integrity check of
+     * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] can be performed by computing the CRC32C
+     * checksum of [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] and comparing your results to
+     * this field. Discard the response in case of non-matching checksum values,
+     * and perform a limited number of retries. A persistent mismatch may indicate
+     * an issue in your computation of the CRC32C checksum. Note: receiving this
+     * response message indicates that [KeyManagementService][google.cloud.kms.v1.KeyManagementService] is able to
+     * successfully decrypt the [ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext].
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * .google.protobuf.Int64Value plaintext_crc32c = 2; + * + * @return Whether the plaintextCrc32c field is set. + */ + public boolean hasPlaintextCrc32C() { + return plaintextCrc32CBuilder_ != null || plaintextCrc32C_ != null; + } + /** + * + * + *
+     * Integrity verification field. A CRC32C checksum of the returned
+     * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext]. An integrity check of
+     * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] can be performed by computing the CRC32C
+     * checksum of [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] and comparing your results to
+     * this field. Discard the response in case of non-matching checksum values,
+     * and perform a limited number of retries. A persistent mismatch may indicate
+     * an issue in your computation of the CRC32C checksum. Note: receiving this
+     * response message indicates that [KeyManagementService][google.cloud.kms.v1.KeyManagementService] is able to
+     * successfully decrypt the [ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext].
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * .google.protobuf.Int64Value plaintext_crc32c = 2; + * + * @return The plaintextCrc32c. + */ + public com.google.protobuf.Int64Value getPlaintextCrc32C() { + if (plaintextCrc32CBuilder_ == null) { + return plaintextCrc32C_ == null + ? com.google.protobuf.Int64Value.getDefaultInstance() + : plaintextCrc32C_; + } else { + return plaintextCrc32CBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Integrity verification field. A CRC32C checksum of the returned
+     * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext]. An integrity check of
+     * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] can be performed by computing the CRC32C
+     * checksum of [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] and comparing your results to
+     * this field. Discard the response in case of non-matching checksum values,
+     * and perform a limited number of retries. A persistent mismatch may indicate
+     * an issue in your computation of the CRC32C checksum. Note: receiving this
+     * response message indicates that [KeyManagementService][google.cloud.kms.v1.KeyManagementService] is able to
+     * successfully decrypt the [ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext].
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * .google.protobuf.Int64Value plaintext_crc32c = 2; + */ + public Builder setPlaintextCrc32C(com.google.protobuf.Int64Value value) { + if (plaintextCrc32CBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + plaintextCrc32C_ = value; + onChanged(); + } else { + plaintextCrc32CBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Integrity verification field. A CRC32C checksum of the returned
+     * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext]. An integrity check of
+     * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] can be performed by computing the CRC32C
+     * checksum of [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] and comparing your results to
+     * this field. Discard the response in case of non-matching checksum values,
+     * and perform a limited number of retries. A persistent mismatch may indicate
+     * an issue in your computation of the CRC32C checksum. Note: receiving this
+     * response message indicates that [KeyManagementService][google.cloud.kms.v1.KeyManagementService] is able to
+     * successfully decrypt the [ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext].
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * .google.protobuf.Int64Value plaintext_crc32c = 2; + */ + public Builder setPlaintextCrc32C(com.google.protobuf.Int64Value.Builder builderForValue) { + if (plaintextCrc32CBuilder_ == null) { + plaintextCrc32C_ = builderForValue.build(); + onChanged(); + } else { + plaintextCrc32CBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Integrity verification field. A CRC32C checksum of the returned
+     * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext]. An integrity check of
+     * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] can be performed by computing the CRC32C
+     * checksum of [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] and comparing your results to
+     * this field. Discard the response in case of non-matching checksum values,
+     * and perform a limited number of retries. A persistent mismatch may indicate
+     * an issue in your computation of the CRC32C checksum. Note: receiving this
+     * response message indicates that [KeyManagementService][google.cloud.kms.v1.KeyManagementService] is able to
+     * successfully decrypt the [ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext].
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * .google.protobuf.Int64Value plaintext_crc32c = 2; + */ + public Builder mergePlaintextCrc32C(com.google.protobuf.Int64Value value) { + if (plaintextCrc32CBuilder_ == null) { + if (plaintextCrc32C_ != null) { + plaintextCrc32C_ = + com.google.protobuf.Int64Value.newBuilder(plaintextCrc32C_) + .mergeFrom(value) + .buildPartial(); + } else { + plaintextCrc32C_ = value; + } + onChanged(); + } else { + plaintextCrc32CBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Integrity verification field. A CRC32C checksum of the returned
+     * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext]. An integrity check of
+     * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] can be performed by computing the CRC32C
+     * checksum of [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] and comparing your results to
+     * this field. Discard the response in case of non-matching checksum values,
+     * and perform a limited number of retries. A persistent mismatch may indicate
+     * an issue in your computation of the CRC32C checksum. Note: receiving this
+     * response message indicates that [KeyManagementService][google.cloud.kms.v1.KeyManagementService] is able to
+     * successfully decrypt the [ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext].
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * .google.protobuf.Int64Value plaintext_crc32c = 2; + */ + public Builder clearPlaintextCrc32C() { + if (plaintextCrc32CBuilder_ == null) { + plaintextCrc32C_ = null; + onChanged(); + } else { + plaintextCrc32C_ = null; + plaintextCrc32CBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Integrity verification field. A CRC32C checksum of the returned
+     * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext]. An integrity check of
+     * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] can be performed by computing the CRC32C
+     * checksum of [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] and comparing your results to
+     * this field. Discard the response in case of non-matching checksum values,
+     * and perform a limited number of retries. A persistent mismatch may indicate
+     * an issue in your computation of the CRC32C checksum. Note: receiving this
+     * response message indicates that [KeyManagementService][google.cloud.kms.v1.KeyManagementService] is able to
+     * successfully decrypt the [ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext].
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * .google.protobuf.Int64Value plaintext_crc32c = 2; + */ + public com.google.protobuf.Int64Value.Builder getPlaintextCrc32CBuilder() { + + onChanged(); + return getPlaintextCrc32CFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Integrity verification field. A CRC32C checksum of the returned
+     * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext]. An integrity check of
+     * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] can be performed by computing the CRC32C
+     * checksum of [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] and comparing your results to
+     * this field. Discard the response in case of non-matching checksum values,
+     * and perform a limited number of retries. A persistent mismatch may indicate
+     * an issue in your computation of the CRC32C checksum. Note: receiving this
+     * response message indicates that [KeyManagementService][google.cloud.kms.v1.KeyManagementService] is able to
+     * successfully decrypt the [ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext].
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * .google.protobuf.Int64Value plaintext_crc32c = 2; + */ + public com.google.protobuf.Int64ValueOrBuilder getPlaintextCrc32COrBuilder() { + if (plaintextCrc32CBuilder_ != null) { + return plaintextCrc32CBuilder_.getMessageOrBuilder(); + } else { + return plaintextCrc32C_ == null + ? com.google.protobuf.Int64Value.getDefaultInstance() + : plaintextCrc32C_; + } + } + /** + * + * + *
+     * Integrity verification field. A CRC32C checksum of the returned
+     * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext]. An integrity check of
+     * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] can be performed by computing the CRC32C
+     * checksum of [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] and comparing your results to
+     * this field. Discard the response in case of non-matching checksum values,
+     * and perform a limited number of retries. A persistent mismatch may indicate
+     * an issue in your computation of the CRC32C checksum. Note: receiving this
+     * response message indicates that [KeyManagementService][google.cloud.kms.v1.KeyManagementService] is able to
+     * successfully decrypt the [ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext].
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * .google.protobuf.Int64Value plaintext_crc32c = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int64Value, + com.google.protobuf.Int64Value.Builder, + com.google.protobuf.Int64ValueOrBuilder> + getPlaintextCrc32CFieldBuilder() { + if (plaintextCrc32CBuilder_ == null) { + plaintextCrc32CBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int64Value, + com.google.protobuf.Int64Value.Builder, + com.google.protobuf.Int64ValueOrBuilder>( + getPlaintextCrc32C(), getParentForChildren(), isClean()); + plaintextCrc32C_ = null; + } + return plaintextCrc32CBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/DecryptResponseOrBuilder.java b/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/DecryptResponseOrBuilder.java index 6b15c96d..2f8d5816 100644 --- a/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/DecryptResponseOrBuilder.java +++ b/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/DecryptResponseOrBuilder.java @@ -35,4 +35,78 @@ public interface DecryptResponseOrBuilder * @return The plaintext. */ com.google.protobuf.ByteString getPlaintext(); + + /** + * + * + *
+   * Integrity verification field. A CRC32C checksum of the returned
+   * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext]. An integrity check of
+   * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] can be performed by computing the CRC32C
+   * checksum of [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] and comparing your results to
+   * this field. Discard the response in case of non-matching checksum values,
+   * and perform a limited number of retries. A persistent mismatch may indicate
+   * an issue in your computation of the CRC32C checksum. Note: receiving this
+   * response message indicates that [KeyManagementService][google.cloud.kms.v1.KeyManagementService] is able to
+   * successfully decrypt the [ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext].
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * .google.protobuf.Int64Value plaintext_crc32c = 2; + * + * @return Whether the plaintextCrc32c field is set. + */ + boolean hasPlaintextCrc32C(); + /** + * + * + *
+   * Integrity verification field. A CRC32C checksum of the returned
+   * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext]. An integrity check of
+   * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] can be performed by computing the CRC32C
+   * checksum of [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] and comparing your results to
+   * this field. Discard the response in case of non-matching checksum values,
+   * and perform a limited number of retries. A persistent mismatch may indicate
+   * an issue in your computation of the CRC32C checksum. Note: receiving this
+   * response message indicates that [KeyManagementService][google.cloud.kms.v1.KeyManagementService] is able to
+   * successfully decrypt the [ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext].
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * .google.protobuf.Int64Value plaintext_crc32c = 2; + * + * @return The plaintextCrc32c. + */ + com.google.protobuf.Int64Value getPlaintextCrc32C(); + /** + * + * + *
+   * Integrity verification field. A CRC32C checksum of the returned
+   * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext]. An integrity check of
+   * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] can be performed by computing the CRC32C
+   * checksum of [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] and comparing your results to
+   * this field. Discard the response in case of non-matching checksum values,
+   * and perform a limited number of retries. A persistent mismatch may indicate
+   * an issue in your computation of the CRC32C checksum. Note: receiving this
+   * response message indicates that [KeyManagementService][google.cloud.kms.v1.KeyManagementService] is able to
+   * successfully decrypt the [ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext].
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * .google.protobuf.Int64Value plaintext_crc32c = 2; + */ + com.google.protobuf.Int64ValueOrBuilder getPlaintextCrc32COrBuilder(); } diff --git a/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/EncryptRequest.java b/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/EncryptRequest.java index bcfee271..1225c186 100644 --- a/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/EncryptRequest.java +++ b/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/EncryptRequest.java @@ -87,6 +87,36 @@ private EncryptRequest( case 26: { additionalAuthenticatedData_ = input.readBytes(); + break; + } + case 58: + { + com.google.protobuf.Int64Value.Builder subBuilder = null; + if (plaintextCrc32C_ != null) { + subBuilder = plaintextCrc32C_.toBuilder(); + } + plaintextCrc32C_ = + input.readMessage(com.google.protobuf.Int64Value.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(plaintextCrc32C_); + plaintextCrc32C_ = subBuilder.buildPartial(); + } + + break; + } + case 66: + { + com.google.protobuf.Int64Value.Builder subBuilder = null; + if (additionalAuthenticatedDataCrc32C_ != null) { + subBuilder = additionalAuthenticatedDataCrc32C_.toBuilder(); + } + additionalAuthenticatedDataCrc32C_ = + input.readMessage(com.google.protobuf.Int64Value.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(additionalAuthenticatedDataCrc32C_); + additionalAuthenticatedDataCrc32C_ = subBuilder.buildPartial(); + } + break; } default: @@ -231,6 +261,195 @@ public com.google.protobuf.ByteString getAdditionalAuthenticatedData() { return additionalAuthenticatedData_; } + public static final int PLAINTEXT_CRC32C_FIELD_NUMBER = 7; + private com.google.protobuf.Int64Value plaintextCrc32C_; + /** + * + * + *
+   * Optional. An optional CRC32C checksum of the [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. If
+   * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the
+   * received [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext] using this checksum.
+   * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+   * fails. If you receive a checksum error, your client should verify that
+   * CRC32C([EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]) is equal to
+   * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c], and if so, perform a limited number of
+   * retries. A persistent mismatch may indicate an issue in your computation of
+   * the CRC32C checksum.
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * + * .google.protobuf.Int64Value plaintext_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the plaintextCrc32c field is set. + */ + @java.lang.Override + public boolean hasPlaintextCrc32C() { + return plaintextCrc32C_ != null; + } + /** + * + * + *
+   * Optional. An optional CRC32C checksum of the [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. If
+   * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the
+   * received [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext] using this checksum.
+   * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+   * fails. If you receive a checksum error, your client should verify that
+   * CRC32C([EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]) is equal to
+   * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c], and if so, perform a limited number of
+   * retries. A persistent mismatch may indicate an issue in your computation of
+   * the CRC32C checksum.
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * + * .google.protobuf.Int64Value plaintext_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The plaintextCrc32c. + */ + @java.lang.Override + public com.google.protobuf.Int64Value getPlaintextCrc32C() { + return plaintextCrc32C_ == null + ? com.google.protobuf.Int64Value.getDefaultInstance() + : plaintextCrc32C_; + } + /** + * + * + *
+   * Optional. An optional CRC32C checksum of the [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. If
+   * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the
+   * received [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext] using this checksum.
+   * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+   * fails. If you receive a checksum error, your client should verify that
+   * CRC32C([EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]) is equal to
+   * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c], and if so, perform a limited number of
+   * retries. A persistent mismatch may indicate an issue in your computation of
+   * the CRC32C checksum.
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * + * .google.protobuf.Int64Value plaintext_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.Int64ValueOrBuilder getPlaintextCrc32COrBuilder() { + return getPlaintextCrc32C(); + } + + public static final int ADDITIONAL_AUTHENTICATED_DATA_CRC32C_FIELD_NUMBER = 8; + private com.google.protobuf.Int64Value additionalAuthenticatedDataCrc32C_; + /** + * + * + *
+   * Optional. An optional CRC32C checksum of the
+   * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. If specified,
+   * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the received
+   * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data] using this checksum.
+   * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+   * fails. If you receive a checksum error, your client should verify that
+   * CRC32C([EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]) is equal to
+   * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c], and if so, perform
+   * a limited number of retries. A persistent mismatch may indicate an issue in
+   * your computation of the CRC32C checksum.
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * + * .google.protobuf.Int64Value additional_authenticated_data_crc32c = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the additionalAuthenticatedDataCrc32c field is set. + */ + @java.lang.Override + public boolean hasAdditionalAuthenticatedDataCrc32C() { + return additionalAuthenticatedDataCrc32C_ != null; + } + /** + * + * + *
+   * Optional. An optional CRC32C checksum of the
+   * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. If specified,
+   * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the received
+   * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data] using this checksum.
+   * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+   * fails. If you receive a checksum error, your client should verify that
+   * CRC32C([EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]) is equal to
+   * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c], and if so, perform
+   * a limited number of retries. A persistent mismatch may indicate an issue in
+   * your computation of the CRC32C checksum.
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * + * .google.protobuf.Int64Value additional_authenticated_data_crc32c = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The additionalAuthenticatedDataCrc32c. + */ + @java.lang.Override + public com.google.protobuf.Int64Value getAdditionalAuthenticatedDataCrc32C() { + return additionalAuthenticatedDataCrc32C_ == null + ? com.google.protobuf.Int64Value.getDefaultInstance() + : additionalAuthenticatedDataCrc32C_; + } + /** + * + * + *
+   * Optional. An optional CRC32C checksum of the
+   * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. If specified,
+   * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the received
+   * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data] using this checksum.
+   * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+   * fails. If you receive a checksum error, your client should verify that
+   * CRC32C([EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]) is equal to
+   * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c], and if so, perform
+   * a limited number of retries. A persistent mismatch may indicate an issue in
+   * your computation of the CRC32C checksum.
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * + * .google.protobuf.Int64Value additional_authenticated_data_crc32c = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.Int64ValueOrBuilder getAdditionalAuthenticatedDataCrc32COrBuilder() { + return getAdditionalAuthenticatedDataCrc32C(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -254,6 +473,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!additionalAuthenticatedData_.isEmpty()) { output.writeBytes(3, additionalAuthenticatedData_); } + if (plaintextCrc32C_ != null) { + output.writeMessage(7, getPlaintextCrc32C()); + } + if (additionalAuthenticatedDataCrc32C_ != null) { + output.writeMessage(8, getAdditionalAuthenticatedDataCrc32C()); + } unknownFields.writeTo(output); } @@ -273,6 +498,14 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBytesSize(3, additionalAuthenticatedData_); } + if (plaintextCrc32C_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getPlaintextCrc32C()); + } + if (additionalAuthenticatedDataCrc32C_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 8, getAdditionalAuthenticatedDataCrc32C()); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -292,6 +525,16 @@ public boolean equals(final java.lang.Object obj) { if (!getPlaintext().equals(other.getPlaintext())) return false; if (!getAdditionalAuthenticatedData().equals(other.getAdditionalAuthenticatedData())) return false; + if (hasPlaintextCrc32C() != other.hasPlaintextCrc32C()) return false; + if (hasPlaintextCrc32C()) { + if (!getPlaintextCrc32C().equals(other.getPlaintextCrc32C())) return false; + } + if (hasAdditionalAuthenticatedDataCrc32C() != other.hasAdditionalAuthenticatedDataCrc32C()) + return false; + if (hasAdditionalAuthenticatedDataCrc32C()) { + if (!getAdditionalAuthenticatedDataCrc32C() + .equals(other.getAdditionalAuthenticatedDataCrc32C())) return false; + } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -309,6 +552,14 @@ public int hashCode() { hash = (53 * hash) + getPlaintext().hashCode(); hash = (37 * hash) + ADDITIONAL_AUTHENTICATED_DATA_FIELD_NUMBER; hash = (53 * hash) + getAdditionalAuthenticatedData().hashCode(); + if (hasPlaintextCrc32C()) { + hash = (37 * hash) + PLAINTEXT_CRC32C_FIELD_NUMBER; + hash = (53 * hash) + getPlaintextCrc32C().hashCode(); + } + if (hasAdditionalAuthenticatedDataCrc32C()) { + hash = (37 * hash) + ADDITIONAL_AUTHENTICATED_DATA_CRC32C_FIELD_NUMBER; + hash = (53 * hash) + getAdditionalAuthenticatedDataCrc32C().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -460,6 +711,18 @@ public Builder clear() { additionalAuthenticatedData_ = com.google.protobuf.ByteString.EMPTY; + if (plaintextCrc32CBuilder_ == null) { + plaintextCrc32C_ = null; + } else { + plaintextCrc32C_ = null; + plaintextCrc32CBuilder_ = null; + } + if (additionalAuthenticatedDataCrc32CBuilder_ == null) { + additionalAuthenticatedDataCrc32C_ = null; + } else { + additionalAuthenticatedDataCrc32C_ = null; + additionalAuthenticatedDataCrc32CBuilder_ = null; + } return this; } @@ -490,6 +753,17 @@ public com.google.cloud.kms.v1.EncryptRequest buildPartial() { result.name_ = name_; result.plaintext_ = plaintext_; result.additionalAuthenticatedData_ = additionalAuthenticatedData_; + if (plaintextCrc32CBuilder_ == null) { + result.plaintextCrc32C_ = plaintextCrc32C_; + } else { + result.plaintextCrc32C_ = plaintextCrc32CBuilder_.build(); + } + if (additionalAuthenticatedDataCrc32CBuilder_ == null) { + result.additionalAuthenticatedDataCrc32C_ = additionalAuthenticatedDataCrc32C_; + } else { + result.additionalAuthenticatedDataCrc32C_ = + additionalAuthenticatedDataCrc32CBuilder_.build(); + } onBuilt(); return result; } @@ -549,6 +823,12 @@ public Builder mergeFrom(com.google.cloud.kms.v1.EncryptRequest other) { if (other.getAdditionalAuthenticatedData() != com.google.protobuf.ByteString.EMPTY) { setAdditionalAuthenticatedData(other.getAdditionalAuthenticatedData()); } + if (other.hasPlaintextCrc32C()) { + mergePlaintextCrc32C(other.getPlaintextCrc32C()); + } + if (other.hasAdditionalAuthenticatedDataCrc32C()) { + mergeAdditionalAuthenticatedDataCrc32C(other.getAdditionalAuthenticatedDataCrc32C()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -862,6 +1142,657 @@ public Builder clearAdditionalAuthenticatedData() { return this; } + private com.google.protobuf.Int64Value plaintextCrc32C_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int64Value, + com.google.protobuf.Int64Value.Builder, + com.google.protobuf.Int64ValueOrBuilder> + plaintextCrc32CBuilder_; + /** + * + * + *
+     * Optional. An optional CRC32C checksum of the [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. If
+     * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the
+     * received [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext] using this checksum.
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+     * fails. If you receive a checksum error, your client should verify that
+     * CRC32C([EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]) is equal to
+     * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c], and if so, perform a limited number of
+     * retries. A persistent mismatch may indicate an issue in your computation of
+     * the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * + * .google.protobuf.Int64Value plaintext_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the plaintextCrc32c field is set. + */ + public boolean hasPlaintextCrc32C() { + return plaintextCrc32CBuilder_ != null || plaintextCrc32C_ != null; + } + /** + * + * + *
+     * Optional. An optional CRC32C checksum of the [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. If
+     * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the
+     * received [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext] using this checksum.
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+     * fails. If you receive a checksum error, your client should verify that
+     * CRC32C([EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]) is equal to
+     * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c], and if so, perform a limited number of
+     * retries. A persistent mismatch may indicate an issue in your computation of
+     * the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * + * .google.protobuf.Int64Value plaintext_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The plaintextCrc32c. + */ + public com.google.protobuf.Int64Value getPlaintextCrc32C() { + if (plaintextCrc32CBuilder_ == null) { + return plaintextCrc32C_ == null + ? com.google.protobuf.Int64Value.getDefaultInstance() + : plaintextCrc32C_; + } else { + return plaintextCrc32CBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. An optional CRC32C checksum of the [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. If
+     * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the
+     * received [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext] using this checksum.
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+     * fails. If you receive a checksum error, your client should verify that
+     * CRC32C([EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]) is equal to
+     * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c], and if so, perform a limited number of
+     * retries. A persistent mismatch may indicate an issue in your computation of
+     * the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * + * .google.protobuf.Int64Value plaintext_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPlaintextCrc32C(com.google.protobuf.Int64Value value) { + if (plaintextCrc32CBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + plaintextCrc32C_ = value; + onChanged(); + } else { + plaintextCrc32CBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. An optional CRC32C checksum of the [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. If
+     * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the
+     * received [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext] using this checksum.
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+     * fails. If you receive a checksum error, your client should verify that
+     * CRC32C([EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]) is equal to
+     * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c], and if so, perform a limited number of
+     * retries. A persistent mismatch may indicate an issue in your computation of
+     * the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * + * .google.protobuf.Int64Value plaintext_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPlaintextCrc32C(com.google.protobuf.Int64Value.Builder builderForValue) { + if (plaintextCrc32CBuilder_ == null) { + plaintextCrc32C_ = builderForValue.build(); + onChanged(); + } else { + plaintextCrc32CBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. An optional CRC32C checksum of the [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. If
+     * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the
+     * received [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext] using this checksum.
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+     * fails. If you receive a checksum error, your client should verify that
+     * CRC32C([EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]) is equal to
+     * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c], and if so, perform a limited number of
+     * retries. A persistent mismatch may indicate an issue in your computation of
+     * the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * + * .google.protobuf.Int64Value plaintext_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergePlaintextCrc32C(com.google.protobuf.Int64Value value) { + if (plaintextCrc32CBuilder_ == null) { + if (plaintextCrc32C_ != null) { + plaintextCrc32C_ = + com.google.protobuf.Int64Value.newBuilder(plaintextCrc32C_) + .mergeFrom(value) + .buildPartial(); + } else { + plaintextCrc32C_ = value; + } + onChanged(); + } else { + plaintextCrc32CBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. An optional CRC32C checksum of the [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. If
+     * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the
+     * received [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext] using this checksum.
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+     * fails. If you receive a checksum error, your client should verify that
+     * CRC32C([EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]) is equal to
+     * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c], and if so, perform a limited number of
+     * retries. A persistent mismatch may indicate an issue in your computation of
+     * the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * + * .google.protobuf.Int64Value plaintext_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearPlaintextCrc32C() { + if (plaintextCrc32CBuilder_ == null) { + plaintextCrc32C_ = null; + onChanged(); + } else { + plaintextCrc32C_ = null; + plaintextCrc32CBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. An optional CRC32C checksum of the [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. If
+     * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the
+     * received [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext] using this checksum.
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+     * fails. If you receive a checksum error, your client should verify that
+     * CRC32C([EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]) is equal to
+     * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c], and if so, perform a limited number of
+     * retries. A persistent mismatch may indicate an issue in your computation of
+     * the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * + * .google.protobuf.Int64Value plaintext_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Int64Value.Builder getPlaintextCrc32CBuilder() { + + onChanged(); + return getPlaintextCrc32CFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. An optional CRC32C checksum of the [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. If
+     * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the
+     * received [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext] using this checksum.
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+     * fails. If you receive a checksum error, your client should verify that
+     * CRC32C([EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]) is equal to
+     * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c], and if so, perform a limited number of
+     * retries. A persistent mismatch may indicate an issue in your computation of
+     * the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * + * .google.protobuf.Int64Value plaintext_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Int64ValueOrBuilder getPlaintextCrc32COrBuilder() { + if (plaintextCrc32CBuilder_ != null) { + return plaintextCrc32CBuilder_.getMessageOrBuilder(); + } else { + return plaintextCrc32C_ == null + ? com.google.protobuf.Int64Value.getDefaultInstance() + : plaintextCrc32C_; + } + } + /** + * + * + *
+     * Optional. An optional CRC32C checksum of the [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. If
+     * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the
+     * received [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext] using this checksum.
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+     * fails. If you receive a checksum error, your client should verify that
+     * CRC32C([EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]) is equal to
+     * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c], and if so, perform a limited number of
+     * retries. A persistent mismatch may indicate an issue in your computation of
+     * the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * + * .google.protobuf.Int64Value plaintext_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int64Value, + com.google.protobuf.Int64Value.Builder, + com.google.protobuf.Int64ValueOrBuilder> + getPlaintextCrc32CFieldBuilder() { + if (plaintextCrc32CBuilder_ == null) { + plaintextCrc32CBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int64Value, + com.google.protobuf.Int64Value.Builder, + com.google.protobuf.Int64ValueOrBuilder>( + getPlaintextCrc32C(), getParentForChildren(), isClean()); + plaintextCrc32C_ = null; + } + return plaintextCrc32CBuilder_; + } + + private com.google.protobuf.Int64Value additionalAuthenticatedDataCrc32C_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int64Value, + com.google.protobuf.Int64Value.Builder, + com.google.protobuf.Int64ValueOrBuilder> + additionalAuthenticatedDataCrc32CBuilder_; + /** + * + * + *
+     * Optional. An optional CRC32C checksum of the
+     * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. If specified,
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the received
+     * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data] using this checksum.
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+     * fails. If you receive a checksum error, your client should verify that
+     * CRC32C([EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]) is equal to
+     * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c], and if so, perform
+     * a limited number of retries. A persistent mismatch may indicate an issue in
+     * your computation of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * + * .google.protobuf.Int64Value additional_authenticated_data_crc32c = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the additionalAuthenticatedDataCrc32c field is set. + */ + public boolean hasAdditionalAuthenticatedDataCrc32C() { + return additionalAuthenticatedDataCrc32CBuilder_ != null + || additionalAuthenticatedDataCrc32C_ != null; + } + /** + * + * + *
+     * Optional. An optional CRC32C checksum of the
+     * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. If specified,
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the received
+     * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data] using this checksum.
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+     * fails. If you receive a checksum error, your client should verify that
+     * CRC32C([EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]) is equal to
+     * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c], and if so, perform
+     * a limited number of retries. A persistent mismatch may indicate an issue in
+     * your computation of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * + * .google.protobuf.Int64Value additional_authenticated_data_crc32c = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The additionalAuthenticatedDataCrc32c. + */ + public com.google.protobuf.Int64Value getAdditionalAuthenticatedDataCrc32C() { + if (additionalAuthenticatedDataCrc32CBuilder_ == null) { + return additionalAuthenticatedDataCrc32C_ == null + ? com.google.protobuf.Int64Value.getDefaultInstance() + : additionalAuthenticatedDataCrc32C_; + } else { + return additionalAuthenticatedDataCrc32CBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. An optional CRC32C checksum of the
+     * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. If specified,
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the received
+     * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data] using this checksum.
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+     * fails. If you receive a checksum error, your client should verify that
+     * CRC32C([EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]) is equal to
+     * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c], and if so, perform
+     * a limited number of retries. A persistent mismatch may indicate an issue in
+     * your computation of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * + * .google.protobuf.Int64Value additional_authenticated_data_crc32c = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAdditionalAuthenticatedDataCrc32C(com.google.protobuf.Int64Value value) { + if (additionalAuthenticatedDataCrc32CBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + additionalAuthenticatedDataCrc32C_ = value; + onChanged(); + } else { + additionalAuthenticatedDataCrc32CBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. An optional CRC32C checksum of the
+     * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. If specified,
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the received
+     * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data] using this checksum.
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+     * fails. If you receive a checksum error, your client should verify that
+     * CRC32C([EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]) is equal to
+     * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c], and if so, perform
+     * a limited number of retries. A persistent mismatch may indicate an issue in
+     * your computation of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * + * .google.protobuf.Int64Value additional_authenticated_data_crc32c = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAdditionalAuthenticatedDataCrc32C( + com.google.protobuf.Int64Value.Builder builderForValue) { + if (additionalAuthenticatedDataCrc32CBuilder_ == null) { + additionalAuthenticatedDataCrc32C_ = builderForValue.build(); + onChanged(); + } else { + additionalAuthenticatedDataCrc32CBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. An optional CRC32C checksum of the
+     * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. If specified,
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the received
+     * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data] using this checksum.
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+     * fails. If you receive a checksum error, your client should verify that
+     * CRC32C([EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]) is equal to
+     * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c], and if so, perform
+     * a limited number of retries. A persistent mismatch may indicate an issue in
+     * your computation of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * + * .google.protobuf.Int64Value additional_authenticated_data_crc32c = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeAdditionalAuthenticatedDataCrc32C(com.google.protobuf.Int64Value value) { + if (additionalAuthenticatedDataCrc32CBuilder_ == null) { + if (additionalAuthenticatedDataCrc32C_ != null) { + additionalAuthenticatedDataCrc32C_ = + com.google.protobuf.Int64Value.newBuilder(additionalAuthenticatedDataCrc32C_) + .mergeFrom(value) + .buildPartial(); + } else { + additionalAuthenticatedDataCrc32C_ = value; + } + onChanged(); + } else { + additionalAuthenticatedDataCrc32CBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. An optional CRC32C checksum of the
+     * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. If specified,
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the received
+     * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data] using this checksum.
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+     * fails. If you receive a checksum error, your client should verify that
+     * CRC32C([EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]) is equal to
+     * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c], and if so, perform
+     * a limited number of retries. A persistent mismatch may indicate an issue in
+     * your computation of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * + * .google.protobuf.Int64Value additional_authenticated_data_crc32c = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearAdditionalAuthenticatedDataCrc32C() { + if (additionalAuthenticatedDataCrc32CBuilder_ == null) { + additionalAuthenticatedDataCrc32C_ = null; + onChanged(); + } else { + additionalAuthenticatedDataCrc32C_ = null; + additionalAuthenticatedDataCrc32CBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. An optional CRC32C checksum of the
+     * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. If specified,
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the received
+     * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data] using this checksum.
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+     * fails. If you receive a checksum error, your client should verify that
+     * CRC32C([EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]) is equal to
+     * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c], and if so, perform
+     * a limited number of retries. A persistent mismatch may indicate an issue in
+     * your computation of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * + * .google.protobuf.Int64Value additional_authenticated_data_crc32c = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Int64Value.Builder getAdditionalAuthenticatedDataCrc32CBuilder() { + + onChanged(); + return getAdditionalAuthenticatedDataCrc32CFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. An optional CRC32C checksum of the
+     * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. If specified,
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the received
+     * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data] using this checksum.
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+     * fails. If you receive a checksum error, your client should verify that
+     * CRC32C([EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]) is equal to
+     * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c], and if so, perform
+     * a limited number of retries. A persistent mismatch may indicate an issue in
+     * your computation of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * + * .google.protobuf.Int64Value additional_authenticated_data_crc32c = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Int64ValueOrBuilder getAdditionalAuthenticatedDataCrc32COrBuilder() { + if (additionalAuthenticatedDataCrc32CBuilder_ != null) { + return additionalAuthenticatedDataCrc32CBuilder_.getMessageOrBuilder(); + } else { + return additionalAuthenticatedDataCrc32C_ == null + ? com.google.protobuf.Int64Value.getDefaultInstance() + : additionalAuthenticatedDataCrc32C_; + } + } + /** + * + * + *
+     * Optional. An optional CRC32C checksum of the
+     * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. If specified,
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the received
+     * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data] using this checksum.
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+     * fails. If you receive a checksum error, your client should verify that
+     * CRC32C([EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]) is equal to
+     * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c], and if so, perform
+     * a limited number of retries. A persistent mismatch may indicate an issue in
+     * your computation of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * + * .google.protobuf.Int64Value additional_authenticated_data_crc32c = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int64Value, + com.google.protobuf.Int64Value.Builder, + com.google.protobuf.Int64ValueOrBuilder> + getAdditionalAuthenticatedDataCrc32CFieldBuilder() { + if (additionalAuthenticatedDataCrc32CBuilder_ == null) { + additionalAuthenticatedDataCrc32CBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int64Value, + com.google.protobuf.Int64Value.Builder, + com.google.protobuf.Int64ValueOrBuilder>( + getAdditionalAuthenticatedDataCrc32C(), getParentForChildren(), isClean()); + additionalAuthenticatedDataCrc32C_ = null; + } + return additionalAuthenticatedDataCrc32CBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/EncryptRequestOrBuilder.java b/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/EncryptRequestOrBuilder.java index 13630f35..b0f7e922 100644 --- a/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/EncryptRequestOrBuilder.java +++ b/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/EncryptRequestOrBuilder.java @@ -96,4 +96,167 @@ public interface EncryptRequestOrBuilder * @return The additionalAuthenticatedData. */ com.google.protobuf.ByteString getAdditionalAuthenticatedData(); + + /** + * + * + *
+   * Optional. An optional CRC32C checksum of the [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. If
+   * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the
+   * received [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext] using this checksum.
+   * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+   * fails. If you receive a checksum error, your client should verify that
+   * CRC32C([EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]) is equal to
+   * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c], and if so, perform a limited number of
+   * retries. A persistent mismatch may indicate an issue in your computation of
+   * the CRC32C checksum.
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * + * .google.protobuf.Int64Value plaintext_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the plaintextCrc32c field is set. + */ + boolean hasPlaintextCrc32C(); + /** + * + * + *
+   * Optional. An optional CRC32C checksum of the [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. If
+   * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the
+   * received [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext] using this checksum.
+   * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+   * fails. If you receive a checksum error, your client should verify that
+   * CRC32C([EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]) is equal to
+   * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c], and if so, perform a limited number of
+   * retries. A persistent mismatch may indicate an issue in your computation of
+   * the CRC32C checksum.
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * + * .google.protobuf.Int64Value plaintext_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The plaintextCrc32c. + */ + com.google.protobuf.Int64Value getPlaintextCrc32C(); + /** + * + * + *
+   * Optional. An optional CRC32C checksum of the [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. If
+   * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the
+   * received [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext] using this checksum.
+   * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+   * fails. If you receive a checksum error, your client should verify that
+   * CRC32C([EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]) is equal to
+   * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c], and if so, perform a limited number of
+   * retries. A persistent mismatch may indicate an issue in your computation of
+   * the CRC32C checksum.
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * + * .google.protobuf.Int64Value plaintext_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.Int64ValueOrBuilder getPlaintextCrc32COrBuilder(); + + /** + * + * + *
+   * Optional. An optional CRC32C checksum of the
+   * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. If specified,
+   * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the received
+   * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data] using this checksum.
+   * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+   * fails. If you receive a checksum error, your client should verify that
+   * CRC32C([EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]) is equal to
+   * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c], and if so, perform
+   * a limited number of retries. A persistent mismatch may indicate an issue in
+   * your computation of the CRC32C checksum.
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * + * .google.protobuf.Int64Value additional_authenticated_data_crc32c = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the additionalAuthenticatedDataCrc32c field is set. + */ + boolean hasAdditionalAuthenticatedDataCrc32C(); + /** + * + * + *
+   * Optional. An optional CRC32C checksum of the
+   * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. If specified,
+   * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the received
+   * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data] using this checksum.
+   * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+   * fails. If you receive a checksum error, your client should verify that
+   * CRC32C([EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]) is equal to
+   * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c], and if so, perform
+   * a limited number of retries. A persistent mismatch may indicate an issue in
+   * your computation of the CRC32C checksum.
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * + * .google.protobuf.Int64Value additional_authenticated_data_crc32c = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The additionalAuthenticatedDataCrc32c. + */ + com.google.protobuf.Int64Value getAdditionalAuthenticatedDataCrc32C(); + /** + * + * + *
+   * Optional. An optional CRC32C checksum of the
+   * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. If specified,
+   * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the received
+   * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data] using this checksum.
+   * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification
+   * fails. If you receive a checksum error, your client should verify that
+   * CRC32C([EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]) is equal to
+   * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c], and if so, perform
+   * a limited number of retries. A persistent mismatch may indicate an issue in
+   * your computation of the CRC32C checksum.
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * + * .google.protobuf.Int64Value additional_authenticated_data_crc32c = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.Int64ValueOrBuilder getAdditionalAuthenticatedDataCrc32COrBuilder(); } diff --git a/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/EncryptResponse.java b/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/EncryptResponse.java index a2eb1fc5..72f065c4 100644 --- a/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/EncryptResponse.java +++ b/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/EncryptResponse.java @@ -83,6 +83,31 @@ private EncryptResponse( ciphertext_ = input.readBytes(); break; } + case 34: + { + com.google.protobuf.Int64Value.Builder subBuilder = null; + if (ciphertextCrc32C_ != null) { + subBuilder = ciphertextCrc32C_.toBuilder(); + } + ciphertextCrc32C_ = + input.readMessage(com.google.protobuf.Int64Value.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(ciphertextCrc32C_); + ciphertextCrc32C_ = subBuilder.buildPartial(); + } + + break; + } + case 40: + { + verifiedPlaintextCrc32C_ = input.readBool(); + break; + } + case 48: + { + verifiedAdditionalAuthenticatedDataCrc32C_ = input.readBool(); + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -186,6 +211,140 @@ public com.google.protobuf.ByteString getCiphertext() { return ciphertext_; } + public static final int CIPHERTEXT_CRC32C_FIELD_NUMBER = 4; + private com.google.protobuf.Int64Value ciphertextCrc32C_; + /** + * + * + *
+   * Integrity verification field. A CRC32C checksum of the returned
+   * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. An integrity check of
+   * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] can be performed by computing the CRC32C
+   * checksum of [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] and comparing your results to
+   * this field. Discard the response in case of non-matching checksum values,
+   * and perform a limited number of retries. A persistent mismatch may indicate
+   * an issue in your computation of the CRC32C checksum.
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * .google.protobuf.Int64Value ciphertext_crc32c = 4; + * + * @return Whether the ciphertextCrc32c field is set. + */ + @java.lang.Override + public boolean hasCiphertextCrc32C() { + return ciphertextCrc32C_ != null; + } + /** + * + * + *
+   * Integrity verification field. A CRC32C checksum of the returned
+   * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. An integrity check of
+   * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] can be performed by computing the CRC32C
+   * checksum of [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] and comparing your results to
+   * this field. Discard the response in case of non-matching checksum values,
+   * and perform a limited number of retries. A persistent mismatch may indicate
+   * an issue in your computation of the CRC32C checksum.
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * .google.protobuf.Int64Value ciphertext_crc32c = 4; + * + * @return The ciphertextCrc32c. + */ + @java.lang.Override + public com.google.protobuf.Int64Value getCiphertextCrc32C() { + return ciphertextCrc32C_ == null + ? com.google.protobuf.Int64Value.getDefaultInstance() + : ciphertextCrc32C_; + } + /** + * + * + *
+   * Integrity verification field. A CRC32C checksum of the returned
+   * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. An integrity check of
+   * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] can be performed by computing the CRC32C
+   * checksum of [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] and comparing your results to
+   * this field. Discard the response in case of non-matching checksum values,
+   * and perform a limited number of retries. A persistent mismatch may indicate
+   * an issue in your computation of the CRC32C checksum.
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * .google.protobuf.Int64Value ciphertext_crc32c = 4; + */ + @java.lang.Override + public com.google.protobuf.Int64ValueOrBuilder getCiphertextCrc32COrBuilder() { + return getCiphertextCrc32C(); + } + + public static final int VERIFIED_PLAINTEXT_CRC32C_FIELD_NUMBER = 5; + private boolean verifiedPlaintextCrc32C_; + /** + * + * + *
+   * Integrity verification field. A flag indicating whether
+   * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] was received by
+   * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used for the integrity verification of the
+   * [plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. A false value of this field
+   * indicates either that [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] was left unset or
+   * that it was not delivered to [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've set
+   * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] but this field is still false, discard
+   * the response and perform a limited number of retries.
+   * NOTE: This field is in Beta.
+   * 
+ * + * bool verified_plaintext_crc32c = 5; + * + * @return The verifiedPlaintextCrc32c. + */ + @java.lang.Override + public boolean getVerifiedPlaintextCrc32C() { + return verifiedPlaintextCrc32C_; + } + + public static final int VERIFIED_ADDITIONAL_AUTHENTICATED_DATA_CRC32C_FIELD_NUMBER = 6; + private boolean verifiedAdditionalAuthenticatedDataCrc32C_; + /** + * + * + *
+   * Integrity verification field. A flag indicating whether
+   * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] was received by
+   * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used for the integrity verification of the
+   * [AAD][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. A false value of this
+   * field indicates either that
+   * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] was left unset or
+   * that it was not delivered to [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've set
+   * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] but this field is
+   * still false, discard the response and perform a limited number of retries.
+   * NOTE: This field is in Beta.
+   * 
+ * + * bool verified_additional_authenticated_data_crc32c = 6; + * + * @return The verifiedAdditionalAuthenticatedDataCrc32c. + */ + @java.lang.Override + public boolean getVerifiedAdditionalAuthenticatedDataCrc32C() { + return verifiedAdditionalAuthenticatedDataCrc32C_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -206,6 +365,15 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!ciphertext_.isEmpty()) { output.writeBytes(2, ciphertext_); } + if (ciphertextCrc32C_ != null) { + output.writeMessage(4, getCiphertextCrc32C()); + } + if (verifiedPlaintextCrc32C_ != false) { + output.writeBool(5, verifiedPlaintextCrc32C_); + } + if (verifiedAdditionalAuthenticatedDataCrc32C_ != false) { + output.writeBool(6, verifiedAdditionalAuthenticatedDataCrc32C_); + } unknownFields.writeTo(output); } @@ -221,6 +389,17 @@ public int getSerializedSize() { if (!ciphertext_.isEmpty()) { size += com.google.protobuf.CodedOutputStream.computeBytesSize(2, ciphertext_); } + if (ciphertextCrc32C_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getCiphertextCrc32C()); + } + if (verifiedPlaintextCrc32C_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, verifiedPlaintextCrc32C_); + } + if (verifiedAdditionalAuthenticatedDataCrc32C_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 6, verifiedAdditionalAuthenticatedDataCrc32C_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -238,6 +417,13 @@ public boolean equals(final java.lang.Object obj) { if (!getName().equals(other.getName())) return false; if (!getCiphertext().equals(other.getCiphertext())) return false; + if (hasCiphertextCrc32C() != other.hasCiphertextCrc32C()) return false; + if (hasCiphertextCrc32C()) { + if (!getCiphertextCrc32C().equals(other.getCiphertextCrc32C())) return false; + } + if (getVerifiedPlaintextCrc32C() != other.getVerifiedPlaintextCrc32C()) return false; + if (getVerifiedAdditionalAuthenticatedDataCrc32C() + != other.getVerifiedAdditionalAuthenticatedDataCrc32C()) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -253,6 +439,17 @@ public int hashCode() { hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + CIPHERTEXT_FIELD_NUMBER; hash = (53 * hash) + getCiphertext().hashCode(); + if (hasCiphertextCrc32C()) { + hash = (37 * hash) + CIPHERTEXT_CRC32C_FIELD_NUMBER; + hash = (53 * hash) + getCiphertextCrc32C().hashCode(); + } + hash = (37 * hash) + VERIFIED_PLAINTEXT_CRC32C_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getVerifiedPlaintextCrc32C()); + hash = (37 * hash) + VERIFIED_ADDITIONAL_AUTHENTICATED_DATA_CRC32C_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashBoolean( + getVerifiedAdditionalAuthenticatedDataCrc32C()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -402,6 +599,16 @@ public Builder clear() { ciphertext_ = com.google.protobuf.ByteString.EMPTY; + if (ciphertextCrc32CBuilder_ == null) { + ciphertextCrc32C_ = null; + } else { + ciphertextCrc32C_ = null; + ciphertextCrc32CBuilder_ = null; + } + verifiedPlaintextCrc32C_ = false; + + verifiedAdditionalAuthenticatedDataCrc32C_ = false; + return this; } @@ -431,6 +638,14 @@ public com.google.cloud.kms.v1.EncryptResponse buildPartial() { new com.google.cloud.kms.v1.EncryptResponse(this); result.name_ = name_; result.ciphertext_ = ciphertext_; + if (ciphertextCrc32CBuilder_ == null) { + result.ciphertextCrc32C_ = ciphertextCrc32C_; + } else { + result.ciphertextCrc32C_ = ciphertextCrc32CBuilder_.build(); + } + result.verifiedPlaintextCrc32C_ = verifiedPlaintextCrc32C_; + result.verifiedAdditionalAuthenticatedDataCrc32C_ = + verifiedAdditionalAuthenticatedDataCrc32C_; onBuilt(); return result; } @@ -487,6 +702,16 @@ public Builder mergeFrom(com.google.cloud.kms.v1.EncryptResponse other) { if (other.getCiphertext() != com.google.protobuf.ByteString.EMPTY) { setCiphertext(other.getCiphertext()); } + if (other.hasCiphertextCrc32C()) { + mergeCiphertextCrc32C(other.getCiphertextCrc32C()); + } + if (other.getVerifiedPlaintextCrc32C() != false) { + setVerifiedPlaintextCrc32C(other.getVerifiedPlaintextCrc32C()); + } + if (other.getVerifiedAdditionalAuthenticatedDataCrc32C() != false) { + setVerifiedAdditionalAuthenticatedDataCrc32C( + other.getVerifiedAdditionalAuthenticatedDataCrc32C()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -682,6 +907,445 @@ public Builder clearCiphertext() { return this; } + private com.google.protobuf.Int64Value ciphertextCrc32C_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int64Value, + com.google.protobuf.Int64Value.Builder, + com.google.protobuf.Int64ValueOrBuilder> + ciphertextCrc32CBuilder_; + /** + * + * + *
+     * Integrity verification field. A CRC32C checksum of the returned
+     * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. An integrity check of
+     * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] can be performed by computing the CRC32C
+     * checksum of [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] and comparing your results to
+     * this field. Discard the response in case of non-matching checksum values,
+     * and perform a limited number of retries. A persistent mismatch may indicate
+     * an issue in your computation of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * .google.protobuf.Int64Value ciphertext_crc32c = 4; + * + * @return Whether the ciphertextCrc32c field is set. + */ + public boolean hasCiphertextCrc32C() { + return ciphertextCrc32CBuilder_ != null || ciphertextCrc32C_ != null; + } + /** + * + * + *
+     * Integrity verification field. A CRC32C checksum of the returned
+     * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. An integrity check of
+     * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] can be performed by computing the CRC32C
+     * checksum of [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] and comparing your results to
+     * this field. Discard the response in case of non-matching checksum values,
+     * and perform a limited number of retries. A persistent mismatch may indicate
+     * an issue in your computation of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * .google.protobuf.Int64Value ciphertext_crc32c = 4; + * + * @return The ciphertextCrc32c. + */ + public com.google.protobuf.Int64Value getCiphertextCrc32C() { + if (ciphertextCrc32CBuilder_ == null) { + return ciphertextCrc32C_ == null + ? com.google.protobuf.Int64Value.getDefaultInstance() + : ciphertextCrc32C_; + } else { + return ciphertextCrc32CBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Integrity verification field. A CRC32C checksum of the returned
+     * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. An integrity check of
+     * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] can be performed by computing the CRC32C
+     * checksum of [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] and comparing your results to
+     * this field. Discard the response in case of non-matching checksum values,
+     * and perform a limited number of retries. A persistent mismatch may indicate
+     * an issue in your computation of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * .google.protobuf.Int64Value ciphertext_crc32c = 4; + */ + public Builder setCiphertextCrc32C(com.google.protobuf.Int64Value value) { + if (ciphertextCrc32CBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ciphertextCrc32C_ = value; + onChanged(); + } else { + ciphertextCrc32CBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Integrity verification field. A CRC32C checksum of the returned
+     * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. An integrity check of
+     * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] can be performed by computing the CRC32C
+     * checksum of [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] and comparing your results to
+     * this field. Discard the response in case of non-matching checksum values,
+     * and perform a limited number of retries. A persistent mismatch may indicate
+     * an issue in your computation of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * .google.protobuf.Int64Value ciphertext_crc32c = 4; + */ + public Builder setCiphertextCrc32C(com.google.protobuf.Int64Value.Builder builderForValue) { + if (ciphertextCrc32CBuilder_ == null) { + ciphertextCrc32C_ = builderForValue.build(); + onChanged(); + } else { + ciphertextCrc32CBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Integrity verification field. A CRC32C checksum of the returned
+     * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. An integrity check of
+     * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] can be performed by computing the CRC32C
+     * checksum of [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] and comparing your results to
+     * this field. Discard the response in case of non-matching checksum values,
+     * and perform a limited number of retries. A persistent mismatch may indicate
+     * an issue in your computation of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * .google.protobuf.Int64Value ciphertext_crc32c = 4; + */ + public Builder mergeCiphertextCrc32C(com.google.protobuf.Int64Value value) { + if (ciphertextCrc32CBuilder_ == null) { + if (ciphertextCrc32C_ != null) { + ciphertextCrc32C_ = + com.google.protobuf.Int64Value.newBuilder(ciphertextCrc32C_) + .mergeFrom(value) + .buildPartial(); + } else { + ciphertextCrc32C_ = value; + } + onChanged(); + } else { + ciphertextCrc32CBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Integrity verification field. A CRC32C checksum of the returned
+     * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. An integrity check of
+     * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] can be performed by computing the CRC32C
+     * checksum of [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] and comparing your results to
+     * this field. Discard the response in case of non-matching checksum values,
+     * and perform a limited number of retries. A persistent mismatch may indicate
+     * an issue in your computation of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * .google.protobuf.Int64Value ciphertext_crc32c = 4; + */ + public Builder clearCiphertextCrc32C() { + if (ciphertextCrc32CBuilder_ == null) { + ciphertextCrc32C_ = null; + onChanged(); + } else { + ciphertextCrc32C_ = null; + ciphertextCrc32CBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Integrity verification field. A CRC32C checksum of the returned
+     * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. An integrity check of
+     * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] can be performed by computing the CRC32C
+     * checksum of [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] and comparing your results to
+     * this field. Discard the response in case of non-matching checksum values,
+     * and perform a limited number of retries. A persistent mismatch may indicate
+     * an issue in your computation of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * .google.protobuf.Int64Value ciphertext_crc32c = 4; + */ + public com.google.protobuf.Int64Value.Builder getCiphertextCrc32CBuilder() { + + onChanged(); + return getCiphertextCrc32CFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Integrity verification field. A CRC32C checksum of the returned
+     * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. An integrity check of
+     * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] can be performed by computing the CRC32C
+     * checksum of [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] and comparing your results to
+     * this field. Discard the response in case of non-matching checksum values,
+     * and perform a limited number of retries. A persistent mismatch may indicate
+     * an issue in your computation of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * .google.protobuf.Int64Value ciphertext_crc32c = 4; + */ + public com.google.protobuf.Int64ValueOrBuilder getCiphertextCrc32COrBuilder() { + if (ciphertextCrc32CBuilder_ != null) { + return ciphertextCrc32CBuilder_.getMessageOrBuilder(); + } else { + return ciphertextCrc32C_ == null + ? com.google.protobuf.Int64Value.getDefaultInstance() + : ciphertextCrc32C_; + } + } + /** + * + * + *
+     * Integrity verification field. A CRC32C checksum of the returned
+     * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. An integrity check of
+     * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] can be performed by computing the CRC32C
+     * checksum of [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] and comparing your results to
+     * this field. Discard the response in case of non-matching checksum values,
+     * and perform a limited number of retries. A persistent mismatch may indicate
+     * an issue in your computation of the CRC32C checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * .google.protobuf.Int64Value ciphertext_crc32c = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int64Value, + com.google.protobuf.Int64Value.Builder, + com.google.protobuf.Int64ValueOrBuilder> + getCiphertextCrc32CFieldBuilder() { + if (ciphertextCrc32CBuilder_ == null) { + ciphertextCrc32CBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int64Value, + com.google.protobuf.Int64Value.Builder, + com.google.protobuf.Int64ValueOrBuilder>( + getCiphertextCrc32C(), getParentForChildren(), isClean()); + ciphertextCrc32C_ = null; + } + return ciphertextCrc32CBuilder_; + } + + private boolean verifiedPlaintextCrc32C_; + /** + * + * + *
+     * Integrity verification field. A flag indicating whether
+     * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] was received by
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used for the integrity verification of the
+     * [plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. A false value of this field
+     * indicates either that [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] was left unset or
+     * that it was not delivered to [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've set
+     * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] but this field is still false, discard
+     * the response and perform a limited number of retries.
+     * NOTE: This field is in Beta.
+     * 
+ * + * bool verified_plaintext_crc32c = 5; + * + * @return The verifiedPlaintextCrc32c. + */ + @java.lang.Override + public boolean getVerifiedPlaintextCrc32C() { + return verifiedPlaintextCrc32C_; + } + /** + * + * + *
+     * Integrity verification field. A flag indicating whether
+     * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] was received by
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used for the integrity verification of the
+     * [plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. A false value of this field
+     * indicates either that [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] was left unset or
+     * that it was not delivered to [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've set
+     * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] but this field is still false, discard
+     * the response and perform a limited number of retries.
+     * NOTE: This field is in Beta.
+     * 
+ * + * bool verified_plaintext_crc32c = 5; + * + * @param value The verifiedPlaintextCrc32c to set. + * @return This builder for chaining. + */ + public Builder setVerifiedPlaintextCrc32C(boolean value) { + + verifiedPlaintextCrc32C_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Integrity verification field. A flag indicating whether
+     * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] was received by
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used for the integrity verification of the
+     * [plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. A false value of this field
+     * indicates either that [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] was left unset or
+     * that it was not delivered to [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've set
+     * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] but this field is still false, discard
+     * the response and perform a limited number of retries.
+     * NOTE: This field is in Beta.
+     * 
+ * + * bool verified_plaintext_crc32c = 5; + * + * @return This builder for chaining. + */ + public Builder clearVerifiedPlaintextCrc32C() { + + verifiedPlaintextCrc32C_ = false; + onChanged(); + return this; + } + + private boolean verifiedAdditionalAuthenticatedDataCrc32C_; + /** + * + * + *
+     * Integrity verification field. A flag indicating whether
+     * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] was received by
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used for the integrity verification of the
+     * [AAD][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. A false value of this
+     * field indicates either that
+     * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] was left unset or
+     * that it was not delivered to [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've set
+     * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] but this field is
+     * still false, discard the response and perform a limited number of retries.
+     * NOTE: This field is in Beta.
+     * 
+ * + * bool verified_additional_authenticated_data_crc32c = 6; + * + * @return The verifiedAdditionalAuthenticatedDataCrc32c. + */ + @java.lang.Override + public boolean getVerifiedAdditionalAuthenticatedDataCrc32C() { + return verifiedAdditionalAuthenticatedDataCrc32C_; + } + /** + * + * + *
+     * Integrity verification field. A flag indicating whether
+     * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] was received by
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used for the integrity verification of the
+     * [AAD][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. A false value of this
+     * field indicates either that
+     * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] was left unset or
+     * that it was not delivered to [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've set
+     * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] but this field is
+     * still false, discard the response and perform a limited number of retries.
+     * NOTE: This field is in Beta.
+     * 
+ * + * bool verified_additional_authenticated_data_crc32c = 6; + * + * @param value The verifiedAdditionalAuthenticatedDataCrc32c to set. + * @return This builder for chaining. + */ + public Builder setVerifiedAdditionalAuthenticatedDataCrc32C(boolean value) { + + verifiedAdditionalAuthenticatedDataCrc32C_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Integrity verification field. A flag indicating whether
+     * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] was received by
+     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used for the integrity verification of the
+     * [AAD][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. A false value of this
+     * field indicates either that
+     * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] was left unset or
+     * that it was not delivered to [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've set
+     * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] but this field is
+     * still false, discard the response and perform a limited number of retries.
+     * NOTE: This field is in Beta.
+     * 
+ * + * bool verified_additional_authenticated_data_crc32c = 6; + * + * @return This builder for chaining. + */ + public Builder clearVerifiedAdditionalAuthenticatedDataCrc32C() { + + verifiedAdditionalAuthenticatedDataCrc32C_ = false; + 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-kms-v1/src/main/java/com/google/cloud/kms/v1/EncryptResponseOrBuilder.java b/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/EncryptResponseOrBuilder.java index a6437c67..31e9ce68 100644 --- a/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/EncryptResponseOrBuilder.java +++ b/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/EncryptResponseOrBuilder.java @@ -62,4 +62,115 @@ public interface EncryptResponseOrBuilder * @return The ciphertext. */ com.google.protobuf.ByteString getCiphertext(); + + /** + * + * + *
+   * Integrity verification field. A CRC32C checksum of the returned
+   * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. An integrity check of
+   * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] can be performed by computing the CRC32C
+   * checksum of [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] and comparing your results to
+   * this field. Discard the response in case of non-matching checksum values,
+   * and perform a limited number of retries. A persistent mismatch may indicate
+   * an issue in your computation of the CRC32C checksum.
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * .google.protobuf.Int64Value ciphertext_crc32c = 4; + * + * @return Whether the ciphertextCrc32c field is set. + */ + boolean hasCiphertextCrc32C(); + /** + * + * + *
+   * Integrity verification field. A CRC32C checksum of the returned
+   * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. An integrity check of
+   * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] can be performed by computing the CRC32C
+   * checksum of [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] and comparing your results to
+   * this field. Discard the response in case of non-matching checksum values,
+   * and perform a limited number of retries. A persistent mismatch may indicate
+   * an issue in your computation of the CRC32C checksum.
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * .google.protobuf.Int64Value ciphertext_crc32c = 4; + * + * @return The ciphertextCrc32c. + */ + com.google.protobuf.Int64Value getCiphertextCrc32C(); + /** + * + * + *
+   * Integrity verification field. A CRC32C checksum of the returned
+   * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. An integrity check of
+   * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] can be performed by computing the CRC32C
+   * checksum of [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] and comparing your results to
+   * this field. Discard the response in case of non-matching checksum values,
+   * and perform a limited number of retries. A persistent mismatch may indicate
+   * an issue in your computation of the CRC32C checksum.
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * .google.protobuf.Int64Value ciphertext_crc32c = 4; + */ + com.google.protobuf.Int64ValueOrBuilder getCiphertextCrc32COrBuilder(); + + /** + * + * + *
+   * Integrity verification field. A flag indicating whether
+   * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] was received by
+   * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used for the integrity verification of the
+   * [plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. A false value of this field
+   * indicates either that [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] was left unset or
+   * that it was not delivered to [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've set
+   * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] but this field is still false, discard
+   * the response and perform a limited number of retries.
+   * NOTE: This field is in Beta.
+   * 
+ * + * bool verified_plaintext_crc32c = 5; + * + * @return The verifiedPlaintextCrc32c. + */ + boolean getVerifiedPlaintextCrc32C(); + + /** + * + * + *
+   * Integrity verification field. A flag indicating whether
+   * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] was received by
+   * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used for the integrity verification of the
+   * [AAD][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. A false value of this
+   * field indicates either that
+   * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] was left unset or
+   * that it was not delivered to [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've set
+   * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] but this field is
+   * still false, discard the response and perform a limited number of retries.
+   * NOTE: This field is in Beta.
+   * 
+ * + * bool verified_additional_authenticated_data_crc32c = 6; + * + * @return The verifiedAdditionalAuthenticatedDataCrc32c. + */ + boolean getVerifiedAdditionalAuthenticatedDataCrc32C(); } diff --git a/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/KmsProto.java b/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/KmsProto.java index ecea61f1..c5e62001 100644 --- a/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/KmsProto.java +++ b/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/KmsProto.java @@ -174,238 +174,259 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "api/field_behavior.proto\032\031google/api/res" + "ource.proto\032#google/cloud/kms/v1/resourc" + "es.proto\032 google/protobuf/field_mask.pro" - + "to\"\255\001\n\023ListKeyRingsRequest\0229\n\006parent\030\001 \001" - + "(\tB)\340A\002\372A#\n!locations.googleapis.com/Loc" - + "ation\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\npage_to" - + "ken\030\003 \001(\tB\003\340A\001\022\023\n\006filter\030\004 \001(\tB\003\340A\001\022\025\n\010o" - + "rder_by\030\005 \001(\tB\003\340A\001\"\377\001\n\025ListCryptoKeysReq" - + "uest\0227\n\006parent\030\001 \001(\tB\'\340A\002\372A!\n\037cloudkms.g" - + "oogleapis.com/KeyRing\022\026\n\tpage_size\030\002 \001(\005" - + "B\003\340A\001\022\027\n\npage_token\030\003 \001(\tB\003\340A\001\022P\n\014versio" - + "n_view\030\004 \001(\0162:.google.cloud.kms.v1.Crypt" - + "oKeyVersion.CryptoKeyVersionView\022\023\n\006filt" - + "er\030\005 \001(\tB\003\340A\001\022\025\n\010order_by\030\006 \001(\tB\003\340A\001\"\200\002\n" - + "\034ListCryptoKeyVersionsRequest\0229\n\006parent\030" - + "\001 \001(\tB)\340A\002\372A#\n!cloudkms.googleapis.com/C" - + "ryptoKey\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\npage" - + "_token\030\003 \001(\tB\003\340A\001\022H\n\004view\030\004 \001(\0162:.google" - + ".cloud.kms.v1.CryptoKeyVersion.CryptoKey" - + "VersionView\022\023\n\006filter\030\005 \001(\tB\003\340A\001\022\025\n\010orde" - + "r_by\030\006 \001(\tB\003\340A\001\"\255\001\n\025ListImportJobsReques" - + "t\0227\n\006parent\030\001 \001(\tB\'\340A\002\372A!\n\037cloudkms.goog" - + "leapis.com/KeyRing\022\026\n\tpage_size\030\002 \001(\005B\003\340" - + "A\001\022\027\n\npage_token\030\003 \001(\tB\003\340A\001\022\023\n\006filter\030\004 " - + "\001(\tB\003\340A\001\022\025\n\010order_by\030\005 \001(\tB\003\340A\001\"t\n\024ListK" - + "eyRingsResponse\022/\n\tkey_rings\030\001 \003(\0132\034.goo" - + "gle.cloud.kms.v1.KeyRing\022\027\n\017next_page_to" - + "ken\030\002 \001(\t\022\022\n\ntotal_size\030\003 \001(\005\"z\n\026ListCry" - + "ptoKeysResponse\0223\n\013crypto_keys\030\001 \003(\0132\036.g" - + "oogle.cloud.kms.v1.CryptoKey\022\027\n\017next_pag" - + "e_token\030\002 \001(\t\022\022\n\ntotal_size\030\003 \001(\005\"\220\001\n\035Li" - + "stCryptoKeyVersionsResponse\022B\n\023crypto_ke" - + "y_versions\030\001 \003(\0132%.google.cloud.kms.v1.C" - + "ryptoKeyVersion\022\027\n\017next_page_token\030\002 \001(\t" - + "\022\022\n\ntotal_size\030\003 \001(\005\"z\n\026ListImportJobsRe" - + "sponse\0223\n\013import_jobs\030\001 \003(\0132\036.google.clo" - + "ud.kms.v1.ImportJob\022\027\n\017next_page_token\030\002" - + " \001(\t\022\022\n\ntotal_size\030\003 \001(\005\"J\n\021GetKeyRingRe" - + "quest\0225\n\004name\030\001 \001(\tB\'\340A\002\372A!\n\037cloudkms.go" - + "ogleapis.com/KeyRing\"N\n\023GetCryptoKeyRequ" - + "est\0227\n\004name\030\001 \001(\tB)\340A\002\372A#\n!cloudkms.goog" - + "leapis.com/CryptoKey\"\\\n\032GetCryptoKeyVers" - + "ionRequest\022>\n\004name\030\001 \001(\tB0\340A\002\372A*\n(cloudk" - + "ms.googleapis.com/CryptoKeyVersion\"U\n\023Ge" - + "tPublicKeyRequest\022>\n\004name\030\001 \001(\tB0\340A\002\372A*\n" - + "(cloudkms.googleapis.com/CryptoKeyVersio" - + "n\"N\n\023GetImportJobRequest\0227\n\004name\030\001 \001(\tB)" - + "\340A\002\372A#\n!cloudkms.googleapis.com/ImportJo" - + "b\"\240\001\n\024CreateKeyRingRequest\0229\n\006parent\030\001 \001" - + "(\tB)\340A\002\372A#\n!locations.googleapis.com/Loc" - + "ation\022\030\n\013key_ring_id\030\002 \001(\tB\003\340A\002\0223\n\010key_r" - + "ing\030\003 \001(\0132\034.google.cloud.kms.v1.KeyRingB" - + "\003\340A\002\"\315\001\n\026CreateCryptoKeyRequest\0227\n\006paren" - + "t\030\001 \001(\tB\'\340A\002\372A!\n\037cloudkms.googleapis.com" - + "/KeyRing\022\032\n\rcrypto_key_id\030\002 \001(\tB\003\340A\002\0227\n\n" - + "crypto_key\030\003 \001(\0132\036.google.cloud.kms.v1.C" - + "ryptoKeyB\003\340A\002\022%\n\035skip_initial_version_cr" - + "eation\030\005 \001(\010\"\242\001\n\035CreateCryptoKeyVersionR" - + "equest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!cloudkms" - + ".googleapis.com/CryptoKey\022F\n\022crypto_key_" - + "version\030\002 \001(\0132%.google.cloud.kms.v1.Cryp" - + "toKeyVersionB\003\340A\002\"\203\002\n\035ImportCryptoKeyVer" - + "sionRequest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!clo" - + "udkms.googleapis.com/CryptoKey\022W\n\talgori" - + "thm\030\002 \001(\0162?.google.cloud.kms.v1.CryptoKe" - + "yVersion.CryptoKeyVersionAlgorithmB\003\340A\002\022" - + "\027\n\nimport_job\030\004 \001(\tB\003\340A\002\022\035\n\023rsa_aes_wrap" - + "ped_key\030\005 \001(\014H\000B\026\n\024wrapped_key_material\"" - + "\246\001\n\026CreateImportJobRequest\0227\n\006parent\030\001 \001" - + "(\tB\'\340A\002\372A!\n\037cloudkms.googleapis.com/KeyR" - + "ing\022\032\n\rimport_job_id\030\002 \001(\tB\003\340A\002\0227\n\nimpor" - + "t_job\030\003 \001(\0132\036.google.cloud.kms.v1.Import" - + "JobB\003\340A\002\"\207\001\n\026UpdateCryptoKeyRequest\0227\n\nc" - + "rypto_key\030\001 \001(\0132\036.google.cloud.kms.v1.Cr" - + "yptoKeyB\003\340A\002\0224\n\013update_mask\030\002 \001(\0132\032.goog" - + "le.protobuf.FieldMaskB\003\340A\002\"\235\001\n\035UpdateCry" - + "ptoKeyVersionRequest\022F\n\022crypto_key_versi" - + "on\030\001 \001(\0132%.google.cloud.kms.v1.CryptoKey" - + "VersionB\003\340A\002\0224\n\013update_mask\030\002 \001(\0132\032.goog" - + "le.protobuf.FieldMaskB\003\340A\002\"m\n\016EncryptReq" - + "uest\022\027\n\004name\030\001 \001(\tB\t\340A\002\372A\003\n\001*\022\026\n\tplainte" - + "xt\030\002 \001(\014B\003\340A\002\022*\n\035additional_authenticate" - + "d_data\030\003 \001(\014B\003\340A\001\"\216\001\n\016DecryptRequest\0227\n\004" - + "name\030\001 \001(\tB)\340A\002\372A#\n!cloudkms.googleapis." - + "com/CryptoKey\022\027\n\nciphertext\030\002 \001(\014B\003\340A\002\022*" - + "\n\035additional_authenticated_data\030\003 \001(\014B\003\340" - + "A\001\"\211\001\n\025AsymmetricSignRequest\022>\n\004name\030\001 \001" - + "(\tB0\340A\002\372A*\n(cloudkms.googleapis.com/Cryp" - + "toKeyVersion\0220\n\006digest\030\003 \001(\0132\033.google.cl" - + "oud.kms.v1.DigestB\003\340A\002\"s\n\030AsymmetricDecr" - + "yptRequest\022>\n\004name\030\001 \001(\tB0\340A\002\372A*\n(cloudk" - + "ms.googleapis.com/CryptoKeyVersion\022\027\n\nci" - + "phertext\030\003 \001(\014B\003\340A\002\"$\n\017DecryptResponse\022\021" - + "\n\tplaintext\030\001 \001(\014\"3\n\017EncryptResponse\022\014\n\004" - + "name\030\001 \001(\t\022\022\n\nciphertext\030\002 \001(\014\"+\n\026Asymme" - + "tricSignResponse\022\021\n\tsignature\030\001 \001(\014\".\n\031A" - + "symmetricDecryptResponse\022\021\n\tplaintext\030\001 " - + "\001(\014\"\203\001\n$UpdateCryptoKeyPrimaryVersionReq" - + "uest\0227\n\004name\030\001 \001(\tB)\340A\002\372A#\n!cloudkms.goo" - + "gleapis.com/CryptoKey\022\"\n\025crypto_key_vers" - + "ion_id\030\002 \001(\tB\003\340A\002\"`\n\036DestroyCryptoKeyVer" - + "sionRequest\022>\n\004name\030\001 \001(\tB0\340A\002\372A*\n(cloud" - + "kms.googleapis.com/CryptoKeyVersion\"`\n\036R" - + "estoreCryptoKeyVersionRequest\022>\n\004name\030\001 " - + "\001(\tB0\340A\002\372A*\n(cloudkms.googleapis.com/Cry" - + "ptoKeyVersion\"H\n\006Digest\022\020\n\006sha256\030\001 \001(\014H" - + "\000\022\020\n\006sha384\030\002 \001(\014H\000\022\020\n\006sha512\030\003 \001(\014H\000B\010\n" - + "\006digest\"@\n\020LocationMetadata\022\025\n\rhsm_avail" - + "able\030\001 \001(\010\022\025\n\rekm_available\030\002 \001(\0102\206&\n\024Ke" - + "yManagementService\022\242\001\n\014ListKeyRings\022(.go" - + "ogle.cloud.kms.v1.ListKeyRingsRequest\032)." - + "google.cloud.kms.v1.ListKeyRingsResponse" - + "\"=\202\323\344\223\002.\022,/v1/{parent=projects/*/locatio" - + "ns/*}/keyRings\332A\006parent\022\265\001\n\016ListCryptoKe" - + "ys\022*.google.cloud.kms.v1.ListCryptoKeysR" - + "equest\032+.google.cloud.kms.v1.ListCryptoK" - + "eysResponse\"J\202\323\344\223\002;\0229/v1/{parent=project" - + "s/*/locations/*/keyRings/*}/cryptoKeys\332A" - + "\006parent\022\336\001\n\025ListCryptoKeyVersions\0221.goog" - + "le.cloud.kms.v1.ListCryptoKeyVersionsReq" - + "uest\0322.google.cloud.kms.v1.ListCryptoKey" - + "VersionsResponse\"^\202\323\344\223\002O\022M/v1/{parent=pr" - + "ojects/*/locations/*/keyRings/*/cryptoKe" - + "ys/*}/cryptoKeyVersions\332A\006parent\022\265\001\n\016Lis" - + "tImportJobs\022*.google.cloud.kms.v1.ListIm" - + "portJobsRequest\032+.google.cloud.kms.v1.Li" - + "stImportJobsResponse\"J\202\323\344\223\002;\0229/v1/{paren" - + "t=projects/*/locations/*/keyRings/*}/imp" - + "ortJobs\332A\006parent\022\217\001\n\nGetKeyRing\022&.google" - + ".cloud.kms.v1.GetKeyRingRequest\032\034.google" - + ".cloud.kms.v1.KeyRing\";\202\323\344\223\002.\022,/v1/{name" - + "=projects/*/locations/*/keyRings/*}\332A\004na" - + "me\022\242\001\n\014GetCryptoKey\022(.google.cloud.kms.v" - + "1.GetCryptoKeyRequest\032\036.google.cloud.kms" - + ".v1.CryptoKey\"H\202\323\344\223\002;\0229/v1/{name=project" - + "s/*/locations/*/keyRings/*/cryptoKeys/*}" - + "\332A\004name\022\313\001\n\023GetCryptoKeyVersion\022/.google" - + ".cloud.kms.v1.GetCryptoKeyVersionRequest" - + "\032%.google.cloud.kms.v1.CryptoKeyVersion\"" - + "\\\202\323\344\223\002O\022M/v1/{name=projects/*/locations/" - + "*/keyRings/*/cryptoKeys/*/cryptoKeyVersi" - + "ons/*}\332A\004name\022\300\001\n\014GetPublicKey\022(.google." - + "cloud.kms.v1.GetPublicKeyRequest\032\036.googl" - + "e.cloud.kms.v1.PublicKey\"f\202\323\344\223\002Y\022W/v1/{n" + + "to\032\036google/protobuf/wrappers.proto\"\255\001\n\023L" + + "istKeyRingsRequest\0229\n\006parent\030\001 \001(\tB)\340A\002\372" + + "A#\n!locations.googleapis.com/Location\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\npage_token\030\003 \001(" + + "\tB\003\340A\001\022\023\n\006filter\030\004 \001(\tB\003\340A\001\022\025\n\010order_by\030" + + "\005 \001(\tB\003\340A\001\"\377\001\n\025ListCryptoKeysRequest\0227\n\006" + + "parent\030\001 \001(\tB\'\340A\002\372A!\n\037cloudkms.googleapi" + + "s.com/KeyRing\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n" + + "\npage_token\030\003 \001(\tB\003\340A\001\022P\n\014version_view\030\004" + + " \001(\0162:.google.cloud.kms.v1.CryptoKeyVers" + + "ion.CryptoKeyVersionView\022\023\n\006filter\030\005 \001(\t" + + "B\003\340A\001\022\025\n\010order_by\030\006 \001(\tB\003\340A\001\"\200\002\n\034ListCry" + + "ptoKeyVersionsRequest\0229\n\006parent\030\001 \001(\tB)\340" + + "A\002\372A#\n!cloudkms.googleapis.com/CryptoKey" + + "\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\npage_token\030\003" + + " \001(\tB\003\340A\001\022H\n\004view\030\004 \001(\0162:.google.cloud.k" + + "ms.v1.CryptoKeyVersion.CryptoKeyVersionV" + + "iew\022\023\n\006filter\030\005 \001(\tB\003\340A\001\022\025\n\010order_by\030\006 \001" + + "(\tB\003\340A\001\"\255\001\n\025ListImportJobsRequest\0227\n\006par" + + "ent\030\001 \001(\tB\'\340A\002\372A!\n\037cloudkms.googleapis.c" + + "om/KeyRing\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\npa" + + "ge_token\030\003 \001(\tB\003\340A\001\022\023\n\006filter\030\004 \001(\tB\003\340A\001" + + "\022\025\n\010order_by\030\005 \001(\tB\003\340A\001\"t\n\024ListKeyRingsR" + + "esponse\022/\n\tkey_rings\030\001 \003(\0132\034.google.clou" + + "d.kms.v1.KeyRing\022\027\n\017next_page_token\030\002 \001(" + + "\t\022\022\n\ntotal_size\030\003 \001(\005\"z\n\026ListCryptoKeysR" + + "esponse\0223\n\013crypto_keys\030\001 \003(\0132\036.google.cl" + + "oud.kms.v1.CryptoKey\022\027\n\017next_page_token\030" + + "\002 \001(\t\022\022\n\ntotal_size\030\003 \001(\005\"\220\001\n\035ListCrypto" + + "KeyVersionsResponse\022B\n\023crypto_key_versio" + + "ns\030\001 \003(\0132%.google.cloud.kms.v1.CryptoKey" + + "Version\022\027\n\017next_page_token\030\002 \001(\t\022\022\n\ntota" + + "l_size\030\003 \001(\005\"z\n\026ListImportJobsResponse\0223" + + "\n\013import_jobs\030\001 \003(\0132\036.google.cloud.kms.v" + + "1.ImportJob\022\027\n\017next_page_token\030\002 \001(\t\022\022\n\n" + + "total_size\030\003 \001(\005\"J\n\021GetKeyRingRequest\0225\n" + + "\004name\030\001 \001(\tB\'\340A\002\372A!\n\037cloudkms.googleapis" + + ".com/KeyRing\"N\n\023GetCryptoKeyRequest\0227\n\004n" + + "ame\030\001 \001(\tB)\340A\002\372A#\n!cloudkms.googleapis.c" + + "om/CryptoKey\"\\\n\032GetCryptoKeyVersionReque" + + "st\022>\n\004name\030\001 \001(\tB0\340A\002\372A*\n(cloudkms.googl" + + "eapis.com/CryptoKeyVersion\"U\n\023GetPublicK" + + "eyRequest\022>\n\004name\030\001 \001(\tB0\340A\002\372A*\n(cloudkm" + + "s.googleapis.com/CryptoKeyVersion\"N\n\023Get" + + "ImportJobRequest\0227\n\004name\030\001 \001(\tB)\340A\002\372A#\n!" + + "cloudkms.googleapis.com/ImportJob\"\240\001\n\024Cr" + + "eateKeyRingRequest\0229\n\006parent\030\001 \001(\tB)\340A\002\372" + + "A#\n!locations.googleapis.com/Location\022\030\n" + + "\013key_ring_id\030\002 \001(\tB\003\340A\002\0223\n\010key_ring\030\003 \001(" + + "\0132\034.google.cloud.kms.v1.KeyRingB\003\340A\002\"\315\001\n" + + "\026CreateCryptoKeyRequest\0227\n\006parent\030\001 \001(\tB" + + "\'\340A\002\372A!\n\037cloudkms.googleapis.com/KeyRing" + + "\022\032\n\rcrypto_key_id\030\002 \001(\tB\003\340A\002\0227\n\ncrypto_k" + + "ey\030\003 \001(\0132\036.google.cloud.kms.v1.CryptoKey" + + "B\003\340A\002\022%\n\035skip_initial_version_creation\030\005" + + " \001(\010\"\242\001\n\035CreateCryptoKeyVersionRequest\0229" + + "\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!cloudkms.googlea" + + "pis.com/CryptoKey\022F\n\022crypto_key_version\030" + + "\002 \001(\0132%.google.cloud.kms.v1.CryptoKeyVer" + + "sionB\003\340A\002\"\203\002\n\035ImportCryptoKeyVersionRequ" + + "est\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!cloudkms.go" + + "ogleapis.com/CryptoKey\022W\n\talgorithm\030\002 \001(" + + "\0162?.google.cloud.kms.v1.CryptoKeyVersion" + + ".CryptoKeyVersionAlgorithmB\003\340A\002\022\027\n\nimpor" + + "t_job\030\004 \001(\tB\003\340A\002\022\035\n\023rsa_aes_wrapped_key\030" + + "\005 \001(\014H\000B\026\n\024wrapped_key_material\"\246\001\n\026Crea" + + "teImportJobRequest\0227\n\006parent\030\001 \001(\tB\'\340A\002\372" + + "A!\n\037cloudkms.googleapis.com/KeyRing\022\032\n\ri" + + "mport_job_id\030\002 \001(\tB\003\340A\002\0227\n\nimport_job\030\003 " + + "\001(\0132\036.google.cloud.kms.v1.ImportJobB\003\340A\002" + + "\"\207\001\n\026UpdateCryptoKeyRequest\0227\n\ncrypto_ke" + + "y\030\001 \001(\0132\036.google.cloud.kms.v1.CryptoKeyB" + + "\003\340A\002\0224\n\013update_mask\030\002 \001(\0132\032.google.proto" + + "buf.FieldMaskB\003\340A\002\"\235\001\n\035UpdateCryptoKeyVe" + + "rsionRequest\022F\n\022crypto_key_version\030\001 \001(\013" + + "2%.google.cloud.kms.v1.CryptoKeyVersionB" + + "\003\340A\002\0224\n\013update_mask\030\002 \001(\0132\032.google.proto" + + "buf.FieldMaskB\003\340A\002\"\371\001\n\016EncryptRequest\022\027\n" + + "\004name\030\001 \001(\tB\t\340A\002\372A\003\n\001*\022\026\n\tplaintext\030\002 \001(" + + "\014B\003\340A\002\022*\n\035additional_authenticated_data\030" + + "\003 \001(\014B\003\340A\001\022:\n\020plaintext_crc32c\030\007 \001(\0132\033.g" + + "oogle.protobuf.Int64ValueB\003\340A\001\022N\n$additi" + + "onal_authenticated_data_crc32c\030\010 \001(\0132\033.g" + + "oogle.protobuf.Int64ValueB\003\340A\001\"\233\002\n\016Decry" + + "ptRequest\0227\n\004name\030\001 \001(\tB)\340A\002\372A#\n!cloudkm" + + "s.googleapis.com/CryptoKey\022\027\n\nciphertext" + + "\030\002 \001(\014B\003\340A\002\022*\n\035additional_authenticated_" + + "data\030\003 \001(\014B\003\340A\001\022;\n\021ciphertext_crc32c\030\005 \001" + + "(\0132\033.google.protobuf.Int64ValueB\003\340A\001\022N\n$" + + "additional_authenticated_data_crc32c\030\006 \001" + + "(\0132\033.google.protobuf.Int64ValueB\003\340A\001\"\302\001\n" + + "\025AsymmetricSignRequest\022>\n\004name\030\001 \001(\tB0\340A" + + "\002\372A*\n(cloudkms.googleapis.com/CryptoKeyV" + + "ersion\0220\n\006digest\030\003 \001(\0132\033.google.cloud.km" + + "s.v1.DigestB\003\340A\002\0227\n\rdigest_crc32c\030\004 \001(\0132" + + "\033.google.protobuf.Int64ValueB\003\340A\001\"\260\001\n\030As" + + "ymmetricDecryptRequest\022>\n\004name\030\001 \001(\tB0\340A" + + "\002\372A*\n(cloudkms.googleapis.com/CryptoKeyV" + + "ersion\022\027\n\nciphertext\030\003 \001(\014B\003\340A\002\022;\n\021ciphe" + + "rtext_crc32c\030\004 \001(\0132\033.google.protobuf.Int" + + "64ValueB\003\340A\001\"[\n\017DecryptResponse\022\021\n\tplain" + + "text\030\001 \001(\014\0225\n\020plaintext_crc32c\030\002 \001(\0132\033.g" + + "oogle.protobuf.Int64Value\"\305\001\n\017EncryptRes" + + "ponse\022\014\n\004name\030\001 \001(\t\022\022\n\nciphertext\030\002 \001(\014\022" + + "6\n\021ciphertext_crc32c\030\004 \001(\0132\033.google.prot" + + "obuf.Int64Value\022!\n\031verified_plaintext_cr" + + "c32c\030\005 \001(\010\0225\n-verified_additional_authen" + + "ticated_data_crc32c\030\006 \001(\010\"\220\001\n\026Asymmetric" + + "SignResponse\022\021\n\tsignature\030\001 \001(\014\0225\n\020signa" + + "ture_crc32c\030\002 \001(\0132\033.google.protobuf.Int6" + + "4Value\022\036\n\026verified_digest_crc32c\030\003 \001(\010\022\014" + + "\n\004name\030\004 \001(\t\"\211\001\n\031AsymmetricDecryptRespon" + + "se\022\021\n\tplaintext\030\001 \001(\014\0225\n\020plaintext_crc32" + + "c\030\002 \001(\0132\033.google.protobuf.Int64Value\022\"\n\032" + + "verified_ciphertext_crc32c\030\003 \001(\010\"\203\001\n$Upd" + + "ateCryptoKeyPrimaryVersionRequest\0227\n\004nam" + + "e\030\001 \001(\tB)\340A\002\372A#\n!cloudkms.googleapis.com" + + "/CryptoKey\022\"\n\025crypto_key_version_id\030\002 \001(" + + "\tB\003\340A\002\"`\n\036DestroyCryptoKeyVersionRequest" + + "\022>\n\004name\030\001 \001(\tB0\340A\002\372A*\n(cloudkms.googlea" + + "pis.com/CryptoKeyVersion\"`\n\036RestoreCrypt" + + "oKeyVersionRequest\022>\n\004name\030\001 \001(\tB0\340A\002\372A*" + + "\n(cloudkms.googleapis.com/CryptoKeyVersi" + + "on\"H\n\006Digest\022\020\n\006sha256\030\001 \001(\014H\000\022\020\n\006sha384" + + "\030\002 \001(\014H\000\022\020\n\006sha512\030\003 \001(\014H\000B\010\n\006digest\"@\n\020" + + "LocationMetadata\022\025\n\rhsm_available\030\001 \001(\010\022" + + "\025\n\rekm_available\030\002 \001(\0102\206&\n\024KeyManagement" + + "Service\022\242\001\n\014ListKeyRings\022(.google.cloud." + + "kms.v1.ListKeyRingsRequest\032).google.clou" + + "d.kms.v1.ListKeyRingsResponse\"=\202\323\344\223\002.\022,/" + + "v1/{parent=projects/*/locations/*}/keyRi" + + "ngs\332A\006parent\022\265\001\n\016ListCryptoKeys\022*.google" + + ".cloud.kms.v1.ListCryptoKeysRequest\032+.go" + + "ogle.cloud.kms.v1.ListCryptoKeysResponse" + + "\"J\202\323\344\223\002;\0229/v1/{parent=projects/*/locatio" + + "ns/*/keyRings/*}/cryptoKeys\332A\006parent\022\336\001\n" + + "\025ListCryptoKeyVersions\0221.google.cloud.km" + + "s.v1.ListCryptoKeyVersionsRequest\0322.goog" + + "le.cloud.kms.v1.ListCryptoKeyVersionsRes" + + "ponse\"^\202\323\344\223\002O\022M/v1/{parent=projects/*/lo" + + "cations/*/keyRings/*/cryptoKeys/*}/crypt" + + "oKeyVersions\332A\006parent\022\265\001\n\016ListImportJobs" + + "\022*.google.cloud.kms.v1.ListImportJobsReq" + + "uest\032+.google.cloud.kms.v1.ListImportJob" + + "sResponse\"J\202\323\344\223\002;\0229/v1/{parent=projects/" + + "*/locations/*/keyRings/*}/importJobs\332A\006p" + + "arent\022\217\001\n\nGetKeyRing\022&.google.cloud.kms." + + "v1.GetKeyRingRequest\032\034.google.cloud.kms." + + "v1.KeyRing\";\202\323\344\223\002.\022,/v1/{name=projects/*" + + "/locations/*/keyRings/*}\332A\004name\022\242\001\n\014GetC" + + "ryptoKey\022(.google.cloud.kms.v1.GetCrypto" + + "KeyRequest\032\036.google.cloud.kms.v1.CryptoK" + + "ey\"H\202\323\344\223\002;\0229/v1/{name=projects/*/locatio" + + "ns/*/keyRings/*/cryptoKeys/*}\332A\004name\022\313\001\n" + + "\023GetCryptoKeyVersion\022/.google.cloud.kms." + + "v1.GetCryptoKeyVersionRequest\032%.google.c" + + "loud.kms.v1.CryptoKeyVersion\"\\\202\323\344\223\002O\022M/v" + + "1/{name=projects/*/locations/*/keyRings/" + + "*/cryptoKeys/*/cryptoKeyVersions/*}\332A\004na" + + "me\022\300\001\n\014GetPublicKey\022(.google.cloud.kms.v" + + "1.GetPublicKeyRequest\032\036.google.cloud.kms" + + ".v1.PublicKey\"f\202\323\344\223\002Y\022W/v1/{name=project" + + "s/*/locations/*/keyRings/*/cryptoKeys/*/" + + "cryptoKeyVersions/*}/publicKey\332A\004name\022\242\001" + + "\n\014GetImportJob\022(.google.cloud.kms.v1.Get" + + "ImportJobRequest\032\036.google.cloud.kms.v1.I" + + "mportJob\"H\202\323\344\223\002;\0229/v1/{name=projects/*/l" + + "ocations/*/keyRings/*/importJobs/*}\332A\004na" + + "me\022\266\001\n\rCreateKeyRing\022).google.cloud.kms." + + "v1.CreateKeyRingRequest\032\034.google.cloud.k" + + "ms.v1.KeyRing\"\\\202\323\344\223\0028\",/v1/{parent=proje" + + "cts/*/locations/*}/keyRings:\010key_ring\332A\033" + + "parent,key_ring_id,key_ring\022\317\001\n\017CreateCr" + + "yptoKey\022+.google.cloud.kms.v1.CreateCryp" + + "toKeyRequest\032\036.google.cloud.kms.v1.Crypt" + + "oKey\"o\202\323\344\223\002G\"9/v1/{parent=projects/*/loc" + + "ations/*/keyRings/*}/cryptoKeys:\ncrypto_" + + "key\332A\037parent,crypto_key_id,crypto_key\022\373\001" + + "\n\026CreateCryptoKeyVersion\0222.google.cloud." + + "kms.v1.CreateCryptoKeyVersionRequest\032%.g" + + "oogle.cloud.kms.v1.CryptoKeyVersion\"\205\001\202\323" + + "\344\223\002c\"M/v1/{parent=projects/*/locations/*" + + "/keyRings/*/cryptoKeys/*}/cryptoKeyVersi" + + "ons:\022crypto_key_version\332A\031parent,crypto_" + + "key_version\022\324\001\n\026ImportCryptoKeyVersion\0222" + + ".google.cloud.kms.v1.ImportCryptoKeyVers" + + "ionRequest\032%.google.cloud.kms.v1.CryptoK" + + "eyVersion\"_\202\323\344\223\002Y\"T/v1/{parent=projects/" + + "*/locations/*/keyRings/*/cryptoKeys/*}/c" + + "ryptoKeyVersions:import:\001*\022\317\001\n\017CreateImp" + + "ortJob\022+.google.cloud.kms.v1.CreateImpor" + + "tJobRequest\032\036.google.cloud.kms.v1.Import" + + "Job\"o\202\323\344\223\002G\"9/v1/{parent=projects/*/loca" + + "tions/*/keyRings/*}/importJobs:\nimport_j" + + "ob\332A\037parent,import_job_id,import_job\022\321\001\n" + + "\017UpdateCryptoKey\022+.google.cloud.kms.v1.U" + + "pdateCryptoKeyRequest\032\036.google.cloud.kms" + + ".v1.CryptoKey\"q\202\323\344\223\002R2D/v1/{crypto_key.n" + "ame=projects/*/locations/*/keyRings/*/cr" - + "yptoKeys/*/cryptoKeyVersions/*}/publicKe" - + "y\332A\004name\022\242\001\n\014GetImportJob\022(.google.cloud" - + ".kms.v1.GetImportJobRequest\032\036.google.clo" - + "ud.kms.v1.ImportJob\"H\202\323\344\223\002;\0229/v1/{name=p" - + "rojects/*/locations/*/keyRings/*/importJ" - + "obs/*}\332A\004name\022\266\001\n\rCreateKeyRing\022).google" - + ".cloud.kms.v1.CreateKeyRingRequest\032\034.goo" - + "gle.cloud.kms.v1.KeyRing\"\\\202\323\344\223\0028\",/v1/{p" - + "arent=projects/*/locations/*}/keyRings:\010" - + "key_ring\332A\033parent,key_ring_id,key_ring\022\317" - + "\001\n\017CreateCryptoKey\022+.google.cloud.kms.v1" - + ".CreateCryptoKeyRequest\032\036.google.cloud.k" - + "ms.v1.CryptoKey\"o\202\323\344\223\002G\"9/v1/{parent=pro" - + "jects/*/locations/*/keyRings/*}/cryptoKe" - + "ys:\ncrypto_key\332A\037parent,crypto_key_id,cr" - + "ypto_key\022\373\001\n\026CreateCryptoKeyVersion\0222.go" - + "ogle.cloud.kms.v1.CreateCryptoKeyVersion" + + "yptoKeys/*}:\ncrypto_key\332A\026crypto_key,upd" + + "ate_mask\022\223\002\n\026UpdateCryptoKeyVersion\0222.go" + + "ogle.cloud.kms.v1.UpdateCryptoKeyVersion" + "Request\032%.google.cloud.kms.v1.CryptoKeyV" - + "ersion\"\205\001\202\323\344\223\002c\"M/v1/{parent=projects/*/" - + "locations/*/keyRings/*/cryptoKeys/*}/cry" - + "ptoKeyVersions:\022crypto_key_version\332A\031par" - + "ent,crypto_key_version\022\324\001\n\026ImportCryptoK" - + "eyVersion\0222.google.cloud.kms.v1.ImportCr" - + "yptoKeyVersionRequest\032%.google.cloud.kms" - + ".v1.CryptoKeyVersion\"_\202\323\344\223\002Y\"T/v1/{paren" - + "t=projects/*/locations/*/keyRings/*/cryp" - + "toKeys/*}/cryptoKeyVersions:import:\001*\022\317\001" - + "\n\017CreateImportJob\022+.google.cloud.kms.v1." - + "CreateImportJobRequest\032\036.google.cloud.km" - + "s.v1.ImportJob\"o\202\323\344\223\002G\"9/v1/{parent=proj" - + "ects/*/locations/*/keyRings/*}/importJob" - + "s:\nimport_job\332A\037parent,import_job_id,imp" - + "ort_job\022\321\001\n\017UpdateCryptoKey\022+.google.clo" - + "ud.kms.v1.UpdateCryptoKeyRequest\032\036.googl" - + "e.cloud.kms.v1.CryptoKey\"q\202\323\344\223\002R2D/v1/{c" - + "rypto_key.name=projects/*/locations/*/ke" - + "yRings/*/cryptoKeys/*}:\ncrypto_key\332A\026cry" - + "pto_key,update_mask\022\223\002\n\026UpdateCryptoKeyV" - + "ersion\0222.google.cloud.kms.v1.UpdateCrypt" - + "oKeyVersionRequest\032%.google.cloud.kms.v1" - + ".CryptoKeyVersion\"\235\001\202\323\344\223\002v2`/v1/{crypto_" - + "key_version.name=projects/*/locations/*/" - + "keyRings/*/cryptoKeys/*/cryptoKeyVersion" - + "s/*}:\022crypto_key_version\332A\036crypto_key_ve" - + "rsion,update_mask\022\264\001\n\007Encrypt\022#.google.c" - + "loud.kms.v1.EncryptRequest\032$.google.clou" - + "d.kms.v1.EncryptResponse\"^\202\323\344\223\002G\"B/v1/{n" - + "ame=projects/*/locations/*/keyRings/*/cr" - + "yptoKeys/**}:encrypt:\001*\332A\016name,plaintext" - + "\022\264\001\n\007Decrypt\022#.google.cloud.kms.v1.Decry" - + "ptRequest\032$.google.cloud.kms.v1.DecryptR" - + "esponse\"^\202\323\344\223\002F\"A/v1/{name=projects/*/lo" - + "cations/*/keyRings/*/cryptoKeys/*}:decry" - + "pt:\001*\332A\017name,ciphertext\022\340\001\n\016AsymmetricSi" - + "gn\022*.google.cloud.kms.v1.AsymmetricSignR" - + "equest\032+.google.cloud.kms.v1.AsymmetricS" - + "ignResponse\"u\202\323\344\223\002a\"\\/v1/{name=projects/" - + "*/locations/*/keyRings/*/cryptoKeys/*/cr" - + "yptoKeyVersions/*}:asymmetricSign:\001*\332A\013n" - + "ame,digest\022\360\001\n\021AsymmetricDecrypt\022-.googl" - + "e.cloud.kms.v1.AsymmetricDecryptRequest\032" - + "..google.cloud.kms.v1.AsymmetricDecryptR" - + "esponse\"|\202\323\344\223\002d\"_/v1/{name=projects/*/lo" + + "ersion\"\235\001\202\323\344\223\002v2`/v1/{crypto_key_version" + + ".name=projects/*/locations/*/keyRings/*/" + + "cryptoKeys/*/cryptoKeyVersions/*}:\022crypt" + + "o_key_version\332A\036crypto_key_version,updat" + + "e_mask\022\264\001\n\007Encrypt\022#.google.cloud.kms.v1" + + ".EncryptRequest\032$.google.cloud.kms.v1.En" + + "cryptResponse\"^\202\323\344\223\002G\"B/v1/{name=project" + + "s/*/locations/*/keyRings/*/cryptoKeys/**" + + "}:encrypt:\001*\332A\016name,plaintext\022\264\001\n\007Decryp" + + "t\022#.google.cloud.kms.v1.DecryptRequest\032$" + + ".google.cloud.kms.v1.DecryptResponse\"^\202\323" + + "\344\223\002F\"A/v1/{name=projects/*/locations/*/k" + + "eyRings/*/cryptoKeys/*}:decrypt:\001*\332A\017nam" + + "e,ciphertext\022\340\001\n\016AsymmetricSign\022*.google" + + ".cloud.kms.v1.AsymmetricSignRequest\032+.go" + + "ogle.cloud.kms.v1.AsymmetricSignResponse" + + "\"u\202\323\344\223\002a\"\\/v1/{name=projects/*/locations" + + "/*/keyRings/*/cryptoKeys/*/cryptoKeyVers" + + "ions/*}:asymmetricSign:\001*\332A\013name,digest\022" + + "\360\001\n\021AsymmetricDecrypt\022-.google.cloud.kms" + + ".v1.AsymmetricDecryptRequest\032..google.cl" + + "oud.kms.v1.AsymmetricDecryptResponse\"|\202\323" + + "\344\223\002d\"_/v1/{name=projects/*/locations/*/k" + + "eyRings/*/cryptoKeys/*/cryptoKeyVersions" + + "/*}:asymmetricDecrypt:\001*\332A\017name,cipherte" + + "xt\022\362\001\n\035UpdateCryptoKeyPrimaryVersion\0229.g" + + "oogle.cloud.kms.v1.UpdateCryptoKeyPrimar" + + "yVersionRequest\032\036.google.cloud.kms.v1.Cr" + + "yptoKey\"v\202\323\344\223\002S\"N/v1/{name=projects/*/lo" + + "cations/*/keyRings/*/cryptoKeys/*}:updat" + + "ePrimaryVersion:\001*\332A\032name,crypto_key_ver" + + "sion_id\022\336\001\n\027DestroyCryptoKeyVersion\0223.go" + + "ogle.cloud.kms.v1.DestroyCryptoKeyVersio" + + "nRequest\032%.google.cloud.kms.v1.CryptoKey" + + "Version\"g\202\323\344\223\002Z\"U/v1/{name=projects/*/lo" + "cations/*/keyRings/*/cryptoKeys/*/crypto" - + "KeyVersions/*}:asymmetricDecrypt:\001*\332A\017na" - + "me,ciphertext\022\362\001\n\035UpdateCryptoKeyPrimary" - + "Version\0229.google.cloud.kms.v1.UpdateCryp" - + "toKeyPrimaryVersionRequest\032\036.google.clou" - + "d.kms.v1.CryptoKey\"v\202\323\344\223\002S\"N/v1/{name=pr" - + "ojects/*/locations/*/keyRings/*/cryptoKe" - + "ys/*}:updatePrimaryVersion:\001*\332A\032name,cry" - + "pto_key_version_id\022\336\001\n\027DestroyCryptoKeyV" - + "ersion\0223.google.cloud.kms.v1.DestroyCryp" - + "toKeyVersionRequest\032%.google.cloud.kms.v" - + "1.CryptoKeyVersion\"g\202\323\344\223\002Z\"U/v1/{name=pr" - + "ojects/*/locations/*/keyRings/*/cryptoKe" - + "ys/*/cryptoKeyVersions/*}:destroy:\001*\332A\004n" - + "ame\022\336\001\n\027RestoreCryptoKeyVersion\0223.google" - + ".cloud.kms.v1.RestoreCryptoKeyVersionReq" - + "uest\032%.google.cloud.kms.v1.CryptoKeyVers" - + "ion\"g\202\323\344\223\002Z\"U/v1/{name=projects/*/locati" - + "ons/*/keyRings/*/cryptoKeys/*/cryptoKeyV" - + "ersions/*}:restore:\001*\332A\004name\032t\312A\027cloudkm" - + "s.googleapis.com\322AWhttps://www.googleapi" - + "s.com/auth/cloud-platform,https://www.go" - + "ogleapis.com/auth/cloudkmsB\214\001\n\027com.googl" - + "e.cloud.kms.v1B\010KmsProtoP\001Z6google.golan" - + "g.org/genproto/googleapis/cloud/kms/v1;k" - + "ms\370\001\001\252\002\023Google.Cloud.Kms.V1\312\002\023Google\\Clo" - + "ud\\Kms\\V1b\006proto3" + + "KeyVersions/*}:destroy:\001*\332A\004name\022\336\001\n\027Res" + + "toreCryptoKeyVersion\0223.google.cloud.kms." + + "v1.RestoreCryptoKeyVersionRequest\032%.goog" + + "le.cloud.kms.v1.CryptoKeyVersion\"g\202\323\344\223\002Z" + + "\"U/v1/{name=projects/*/locations/*/keyRi" + + "ngs/*/cryptoKeys/*/cryptoKeyVersions/*}:" + + "restore:\001*\332A\004name\032t\312A\027cloudkms.googleapi" + + "s.com\322AWhttps://www.googleapis.com/auth/" + + "cloud-platform,https://www.googleapis.co" + + "m/auth/cloudkmsB\214\001\n\027com.google.cloud.kms" + + ".v1B\010KmsProtoP\001Z6google.golang.org/genpr" + + "oto/googleapis/cloud/kms/v1;kms\370\001\001\252\002\023Goo" + + "gle.Cloud.Kms.V1\312\002\023Google\\Cloud\\Kms\\V1b\006" + + "proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -417,6 +438,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ResourceProto.getDescriptor(), com.google.cloud.kms.v1.KmsResourcesProto.getDescriptor(), com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.protobuf.WrappersProto.getDescriptor(), }); internal_static_google_cloud_kms_v1_ListKeyRingsRequest_descriptor = getDescriptor().getMessageTypes().get(0); @@ -584,7 +606,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_kms_v1_EncryptRequest_descriptor, new java.lang.String[] { - "Name", "Plaintext", "AdditionalAuthenticatedData", + "Name", + "Plaintext", + "AdditionalAuthenticatedData", + "PlaintextCrc32C", + "AdditionalAuthenticatedDataCrc32C", }); internal_static_google_cloud_kms_v1_DecryptRequest_descriptor = getDescriptor().getMessageTypes().get(21); @@ -592,7 +618,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_kms_v1_DecryptRequest_descriptor, new java.lang.String[] { - "Name", "Ciphertext", "AdditionalAuthenticatedData", + "Name", + "Ciphertext", + "AdditionalAuthenticatedData", + "CiphertextCrc32C", + "AdditionalAuthenticatedDataCrc32C", }); internal_static_google_cloud_kms_v1_AsymmetricSignRequest_descriptor = getDescriptor().getMessageTypes().get(22); @@ -600,7 +630,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_kms_v1_AsymmetricSignRequest_descriptor, new java.lang.String[] { - "Name", "Digest", + "Name", "Digest", "DigestCrc32C", }); internal_static_google_cloud_kms_v1_AsymmetricDecryptRequest_descriptor = getDescriptor().getMessageTypes().get(23); @@ -608,7 +638,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_kms_v1_AsymmetricDecryptRequest_descriptor, new java.lang.String[] { - "Name", "Ciphertext", + "Name", "Ciphertext", "CiphertextCrc32C", }); internal_static_google_cloud_kms_v1_DecryptResponse_descriptor = getDescriptor().getMessageTypes().get(24); @@ -616,7 +646,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_kms_v1_DecryptResponse_descriptor, new java.lang.String[] { - "Plaintext", + "Plaintext", "PlaintextCrc32C", }); internal_static_google_cloud_kms_v1_EncryptResponse_descriptor = getDescriptor().getMessageTypes().get(25); @@ -624,7 +654,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_kms_v1_EncryptResponse_descriptor, new java.lang.String[] { - "Name", "Ciphertext", + "Name", + "Ciphertext", + "CiphertextCrc32C", + "VerifiedPlaintextCrc32C", + "VerifiedAdditionalAuthenticatedDataCrc32C", }); internal_static_google_cloud_kms_v1_AsymmetricSignResponse_descriptor = getDescriptor().getMessageTypes().get(26); @@ -632,7 +666,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_kms_v1_AsymmetricSignResponse_descriptor, new java.lang.String[] { - "Signature", + "Signature", "SignatureCrc32C", "VerifiedDigestCrc32C", "Name", }); internal_static_google_cloud_kms_v1_AsymmetricDecryptResponse_descriptor = getDescriptor().getMessageTypes().get(27); @@ -640,7 +674,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_kms_v1_AsymmetricDecryptResponse_descriptor, new java.lang.String[] { - "Plaintext", + "Plaintext", "PlaintextCrc32C", "VerifiedCiphertextCrc32C", }); internal_static_google_cloud_kms_v1_UpdateCryptoKeyPrimaryVersionRequest_descriptor = getDescriptor().getMessageTypes().get(28); @@ -698,6 +732,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ResourceProto.getDescriptor(); com.google.cloud.kms.v1.KmsResourcesProto.getDescriptor(); com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.WrappersProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/KmsResourcesProto.java b/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/KmsResourcesProto.java index e2a04a1c..2acb0e34 100644 --- a/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/KmsResourcesProto.java +++ b/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/KmsResourcesProto.java @@ -80,127 +80,130 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "oogle.cloud.kms.v1\032\037google/api/field_beh" + "avior.proto\032\031google/api/resource.proto\032\036" + "google/protobuf/duration.proto\032\037google/p" - + "rotobuf/timestamp.proto\032\034google/api/anno" - + "tations.proto\"\265\001\n\007KeyRing\022\021\n\004name\030\001 \001(\tB" - + "\003\340A\003\0224\n\013create_time\030\002 \001(\0132\032.google.proto" - + "buf.TimestampB\003\340A\003:a\352A^\n\037cloudkms.google" - + "apis.com/KeyRing\022;projects/{project}/loc" - + "ations/{location}/keyRings/{key_ring}\"\206\006" - + "\n\tCryptoKey\022\021\n\004name\030\001 \001(\tB\003\340A\003\022;\n\007primar" - + "y\030\002 \001(\0132%.google.cloud.kms.v1.CryptoKeyV" - + "ersionB\003\340A\003\022E\n\007purpose\030\003 \001(\0162/.google.cl" - + "oud.kms.v1.CryptoKey.CryptoKeyPurposeB\003\340" - + "A\005\0224\n\013create_time\030\005 \001(\0132\032.google.protobu" - + "f.TimestampB\003\340A\003\0226\n\022next_rotation_time\030\007" - + " \001(\0132\032.google.protobuf.Timestamp\0224\n\017rota" - + "tion_period\030\010 \001(\0132\031.google.protobuf.Dura" - + "tionH\000\022G\n\020version_template\030\013 \001(\0132-.googl" - + "e.cloud.kms.v1.CryptoKeyVersionTemplate\022" - + ":\n\006labels\030\n \003(\0132*.google.cloud.kms.v1.Cr" - + "yptoKey.LabelsEntry\032-\n\013LabelsEntry\022\013\n\003ke" - + "y\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"x\n\020CryptoKeyP" - + "urpose\022\"\n\036CRYPTO_KEY_PURPOSE_UNSPECIFIED" - + "\020\000\022\023\n\017ENCRYPT_DECRYPT\020\001\022\023\n\017ASYMMETRIC_SI" - + "GN\020\005\022\026\n\022ASYMMETRIC_DECRYPT\020\006:{\352Ax\n!cloud" - + "kms.googleapis.com/CryptoKey\022Sprojects/{" - + "project}/locations/{location}/keyRings/{" - + "key_ring}/cryptoKeys/{crypto_key}B\023\n\021rot" - + "ation_schedule\"\263\001\n\030CryptoKeyVersionTempl" - + "ate\022>\n\020protection_level\030\001 \001(\0162$.google.c" - + "loud.kms.v1.ProtectionLevel\022W\n\talgorithm" - + "\030\003 \001(\0162?.google.cloud.kms.v1.CryptoKeyVe" - + "rsion.CryptoKeyVersionAlgorithmB\003\340A\002\"\361\001\n" - + "\027KeyOperationAttestation\022S\n\006format\030\004 \001(\016" - + "2>.google.cloud.kms.v1.KeyOperationAttes" - + "tation.AttestationFormatB\003\340A\003\022\024\n\007content" - + "\030\005 \001(\014B\003\340A\003\"k\n\021AttestationFormat\022\"\n\036ATTE" - + "STATION_FORMAT_UNSPECIFIED\020\000\022\030\n\024CAVIUM_V" - + "1_COMPRESSED\020\003\022\030\n\024CAVIUM_V2_COMPRESSED\020\004" - + "\"\212\016\n\020CryptoKeyVersion\022\021\n\004name\030\001 \001(\tB\003\340A\003" - + "\022J\n\005state\030\003 \001(\0162;.google.cloud.kms.v1.Cr" - + "yptoKeyVersion.CryptoKeyVersionState\022C\n\020" - + "protection_level\030\007 \001(\0162$.google.cloud.km" - + "s.v1.ProtectionLevelB\003\340A\003\022W\n\talgorithm\030\n" - + " \001(\0162?.google.cloud.kms.v1.CryptoKeyVers" - + "ion.CryptoKeyVersionAlgorithmB\003\340A\003\022F\n\013at" - + "testation\030\010 \001(\0132,.google.cloud.kms.v1.Ke" - + "yOperationAttestationB\003\340A\003\0224\n\013create_tim" - + "e\030\004 \001(\0132\032.google.protobuf.TimestampB\003\340A\003" - + "\0226\n\rgenerate_time\030\013 \001(\0132\032.google.protobu" - + "f.TimestampB\003\340A\003\0225\n\014destroy_time\030\005 \001(\0132\032" - + ".google.protobuf.TimestampB\003\340A\003\022;\n\022destr" - + "oy_event_time\030\006 \001(\0132\032.google.protobuf.Ti" - + "mestampB\003\340A\003\022\027\n\nimport_job\030\016 \001(\tB\003\340A\003\0224\n" - + "\013import_time\030\017 \001(\0132\032.google.protobuf.Tim" - + "estampB\003\340A\003\022\"\n\025import_failure_reason\030\020 \001" - + "(\tB\003\340A\003\022^\n!external_protection_level_opt" - + "ions\030\021 \001(\01323.google.cloud.kms.v1.Externa" - + "lProtectionLevelOptions\"\277\004\n\031CryptoKeyVer" - + "sionAlgorithm\022,\n(CRYPTO_KEY_VERSION_ALGO" - + "RITHM_UNSPECIFIED\020\000\022\037\n\033GOOGLE_SYMMETRIC_" - + "ENCRYPTION\020\001\022\034\n\030RSA_SIGN_PSS_2048_SHA256" - + "\020\002\022\034\n\030RSA_SIGN_PSS_3072_SHA256\020\003\022\034\n\030RSA_" - + "SIGN_PSS_4096_SHA256\020\004\022\034\n\030RSA_SIGN_PSS_4" - + "096_SHA512\020\017\022\036\n\032RSA_SIGN_PKCS1_2048_SHA2" - + "56\020\005\022\036\n\032RSA_SIGN_PKCS1_3072_SHA256\020\006\022\036\n\032" - + "RSA_SIGN_PKCS1_4096_SHA256\020\007\022\036\n\032RSA_SIGN" - + "_PKCS1_4096_SHA512\020\020\022 \n\034RSA_DECRYPT_OAEP" - + "_2048_SHA256\020\010\022 \n\034RSA_DECRYPT_OAEP_3072_" - + "SHA256\020\t\022 \n\034RSA_DECRYPT_OAEP_4096_SHA256" - + "\020\n\022 \n\034RSA_DECRYPT_OAEP_4096_SHA512\020\021\022\027\n\023" - + "EC_SIGN_P256_SHA256\020\014\022\027\n\023EC_SIGN_P384_SH" - + "A384\020\r\022!\n\035EXTERNAL_SYMMETRIC_ENCRYPTION\020" - + "\022\"\301\001\n\025CryptoKeyVersionState\022(\n$CRYPTO_KE" - + "Y_VERSION_STATE_UNSPECIFIED\020\000\022\026\n\022PENDING" - + "_GENERATION\020\005\022\013\n\007ENABLED\020\001\022\014\n\010DISABLED\020\002" - + "\022\r\n\tDESTROYED\020\003\022\025\n\021DESTROY_SCHEDULED\020\004\022\022" - + "\n\016PENDING_IMPORT\020\006\022\021\n\rIMPORT_FAILED\020\007\"I\n" - + "\024CryptoKeyVersionView\022\'\n#CRYPTO_KEY_VERS" - + "ION_VIEW_UNSPECIFIED\020\000\022\010\n\004FULL\020\001:\252\001\352A\246\001\n" - + "(cloudkms.googleapis.com/CryptoKeyVersio" - + "n\022zprojects/{project}/locations/{locatio" - + "n}/keyRings/{key_ring}/cryptoKeys/{crypt" - + "o_key}/cryptoKeyVersions/{crypto_key_ver" - + "sion}\"\235\002\n\tPublicKey\022\013\n\003pem\030\001 \001(\t\022R\n\talgo" - + "rithm\030\002 \001(\0162?.google.cloud.kms.v1.Crypto" - + "KeyVersion.CryptoKeyVersionAlgorithm:\256\001\352" - + "A\252\001\n!cloudkms.googleapis.com/PublicKey\022\204" - + "\001projects/{project}/locations/{location}" - + "/keyRings/{key_ring}/cryptoKeys/{crypto_" - + "key}/cryptoKeyVersions/{crypto_key_versi" - + "on}/publicKey\"\333\007\n\tImportJob\022\021\n\004name\030\001 \001(" - + "\tB\003\340A\003\022J\n\rimport_method\030\002 \001(\0162+.google.c" - + "loud.kms.v1.ImportJob.ImportMethodB\006\340A\002\340" - + "A\005\022F\n\020protection_level\030\t \001(\0162$.google.cl" - + "oud.kms.v1.ProtectionLevelB\006\340A\002\340A\005\0224\n\013cr" - + "eate_time\030\003 \001(\0132\032.google.protobuf.Timest" - + "ampB\003\340A\003\0226\n\rgenerate_time\030\004 \001(\0132\032.google" - + ".protobuf.TimestampB\003\340A\003\0224\n\013expire_time\030" - + "\005 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022:" - + "\n\021expire_event_time\030\n \001(\0132\032.google.proto" - + "buf.TimestampB\003\340A\003\022A\n\005state\030\006 \001(\0162-.goog" - + "le.cloud.kms.v1.ImportJob.ImportJobState" - + "B\003\340A\003\022I\n\npublic_key\030\007 \001(\01320.google.cloud" - + ".kms.v1.ImportJob.WrappingPublicKeyB\003\340A\003" - + "\022F\n\013attestation\030\010 \001(\0132,.google.cloud.kms" - + ".v1.KeyOperationAttestationB\003\340A\003\032 \n\021Wrap" - + "pingPublicKey\022\013\n\003pem\030\001 \001(\t\"m\n\014ImportMeth" - + "od\022\035\n\031IMPORT_METHOD_UNSPECIFIED\020\000\022\036\n\032RSA" - + "_OAEP_3072_SHA1_AES_256\020\001\022\036\n\032RSA_OAEP_40" - + "96_SHA1_AES_256\020\002\"c\n\016ImportJobState\022 \n\034I" - + "MPORT_JOB_STATE_UNSPECIFIED\020\000\022\026\n\022PENDING" - + "_GENERATION\020\001\022\n\n\006ACTIVE\020\002\022\013\n\007EXPIRED\020\003:{" - + "\352Ax\n!cloudkms.googleapis.com/ImportJob\022S" - + "projects/{project}/locations/{location}/" - + "keyRings/{key_ring}/importJobs/{import_j" - + "ob}\":\n\036ExternalProtectionLevelOptions\022\030\n" - + "\020external_key_uri\030\001 \001(\t*X\n\017ProtectionLev" - + "el\022 \n\034PROTECTION_LEVEL_UNSPECIFIED\020\000\022\014\n\010" - + "SOFTWARE\020\001\022\007\n\003HSM\020\002\022\014\n\010EXTERNAL\020\003B\225\001\n\027co" - + "m.google.cloud.kms.v1B\021KmsResourcesProto" - + "P\001Z6google.golang.org/genproto/googleapi" - + "s/cloud/kms/v1;kms\370\001\001\252\002\023Google.Cloud.Kms" - + ".V1\312\002\023Google\\Cloud\\Kms\\V1b\006proto3" + + "rotobuf/timestamp.proto\032\036google/protobuf" + + "/wrappers.proto\032\034google/api/annotations." + + "proto\"\265\001\n\007KeyRing\022\021\n\004name\030\001 \001(\tB\003\340A\003\0224\n\013" + + "create_time\030\002 \001(\0132\032.google.protobuf.Time" + + "stampB\003\340A\003:a\352A^\n\037cloudkms.googleapis.com" + + "/KeyRing\022;projects/{project}/locations/{" + + "location}/keyRings/{key_ring}\"\206\006\n\tCrypto" + + "Key\022\021\n\004name\030\001 \001(\tB\003\340A\003\022;\n\007primary\030\002 \001(\0132" + + "%.google.cloud.kms.v1.CryptoKeyVersionB\003" + + "\340A\003\022E\n\007purpose\030\003 \001(\0162/.google.cloud.kms." + + "v1.CryptoKey.CryptoKeyPurposeB\003\340A\005\0224\n\013cr" + + "eate_time\030\005 \001(\0132\032.google.protobuf.Timest" + + "ampB\003\340A\003\0226\n\022next_rotation_time\030\007 \001(\0132\032.g" + + "oogle.protobuf.Timestamp\0224\n\017rotation_per" + + "iod\030\010 \001(\0132\031.google.protobuf.DurationH\000\022G" + + "\n\020version_template\030\013 \001(\0132-.google.cloud." + + "kms.v1.CryptoKeyVersionTemplate\022:\n\006label" + + "s\030\n \003(\0132*.google.cloud.kms.v1.CryptoKey." + + "LabelsEntry\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022" + + "\r\n\005value\030\002 \001(\t:\0028\001\"x\n\020CryptoKeyPurpose\022\"" + + "\n\036CRYPTO_KEY_PURPOSE_UNSPECIFIED\020\000\022\023\n\017EN" + + "CRYPT_DECRYPT\020\001\022\023\n\017ASYMMETRIC_SIGN\020\005\022\026\n\022" + + "ASYMMETRIC_DECRYPT\020\006:{\352Ax\n!cloudkms.goog" + + "leapis.com/CryptoKey\022Sprojects/{project}" + + "/locations/{location}/keyRings/{key_ring" + + "}/cryptoKeys/{crypto_key}B\023\n\021rotation_sc" + + "hedule\"\263\001\n\030CryptoKeyVersionTemplate\022>\n\020p" + + "rotection_level\030\001 \001(\0162$.google.cloud.kms" + + ".v1.ProtectionLevel\022W\n\talgorithm\030\003 \001(\0162?" + + ".google.cloud.kms.v1.CryptoKeyVersion.Cr" + + "yptoKeyVersionAlgorithmB\003\340A\002\"\361\001\n\027KeyOper" + + "ationAttestation\022S\n\006format\030\004 \001(\0162>.googl" + + "e.cloud.kms.v1.KeyOperationAttestation.A" + + "ttestationFormatB\003\340A\003\022\024\n\007content\030\005 \001(\014B\003" + + "\340A\003\"k\n\021AttestationFormat\022\"\n\036ATTESTATION_" + + "FORMAT_UNSPECIFIED\020\000\022\030\n\024CAVIUM_V1_COMPRE" + + "SSED\020\003\022\030\n\024CAVIUM_V2_COMPRESSED\020\004\"\212\016\n\020Cry" + + "ptoKeyVersion\022\021\n\004name\030\001 \001(\tB\003\340A\003\022J\n\005stat" + + "e\030\003 \001(\0162;.google.cloud.kms.v1.CryptoKeyV" + + "ersion.CryptoKeyVersionState\022C\n\020protecti" + + "on_level\030\007 \001(\0162$.google.cloud.kms.v1.Pro" + + "tectionLevelB\003\340A\003\022W\n\talgorithm\030\n \001(\0162?.g" + + "oogle.cloud.kms.v1.CryptoKeyVersion.Cryp" + + "toKeyVersionAlgorithmB\003\340A\003\022F\n\013attestatio" + + "n\030\010 \001(\0132,.google.cloud.kms.v1.KeyOperati" + + "onAttestationB\003\340A\003\0224\n\013create_time\030\004 \001(\0132" + + "\032.google.protobuf.TimestampB\003\340A\003\0226\n\rgene" + + "rate_time\030\013 \001(\0132\032.google.protobuf.Timest" + + "ampB\003\340A\003\0225\n\014destroy_time\030\005 \001(\0132\032.google." + + "protobuf.TimestampB\003\340A\003\022;\n\022destroy_event" + + "_time\030\006 \001(\0132\032.google.protobuf.TimestampB" + + "\003\340A\003\022\027\n\nimport_job\030\016 \001(\tB\003\340A\003\0224\n\013import_" + + "time\030\017 \001(\0132\032.google.protobuf.TimestampB\003" + + "\340A\003\022\"\n\025import_failure_reason\030\020 \001(\tB\003\340A\003\022" + + "^\n!external_protection_level_options\030\021 \001" + + "(\01323.google.cloud.kms.v1.ExternalProtect" + + "ionLevelOptions\"\277\004\n\031CryptoKeyVersionAlgo" + + "rithm\022,\n(CRYPTO_KEY_VERSION_ALGORITHM_UN" + + "SPECIFIED\020\000\022\037\n\033GOOGLE_SYMMETRIC_ENCRYPTI" + + "ON\020\001\022\034\n\030RSA_SIGN_PSS_2048_SHA256\020\002\022\034\n\030RS" + + "A_SIGN_PSS_3072_SHA256\020\003\022\034\n\030RSA_SIGN_PSS" + + "_4096_SHA256\020\004\022\034\n\030RSA_SIGN_PSS_4096_SHA5" + + "12\020\017\022\036\n\032RSA_SIGN_PKCS1_2048_SHA256\020\005\022\036\n\032" + + "RSA_SIGN_PKCS1_3072_SHA256\020\006\022\036\n\032RSA_SIGN" + + "_PKCS1_4096_SHA256\020\007\022\036\n\032RSA_SIGN_PKCS1_4" + + "096_SHA512\020\020\022 \n\034RSA_DECRYPT_OAEP_2048_SH" + + "A256\020\010\022 \n\034RSA_DECRYPT_OAEP_3072_SHA256\020\t" + + "\022 \n\034RSA_DECRYPT_OAEP_4096_SHA256\020\n\022 \n\034RS" + + "A_DECRYPT_OAEP_4096_SHA512\020\021\022\027\n\023EC_SIGN_" + + "P256_SHA256\020\014\022\027\n\023EC_SIGN_P384_SHA384\020\r\022!" + + "\n\035EXTERNAL_SYMMETRIC_ENCRYPTION\020\022\"\301\001\n\025Cr" + + "yptoKeyVersionState\022(\n$CRYPTO_KEY_VERSIO" + + "N_STATE_UNSPECIFIED\020\000\022\026\n\022PENDING_GENERAT" + + "ION\020\005\022\013\n\007ENABLED\020\001\022\014\n\010DISABLED\020\002\022\r\n\tDEST" + + "ROYED\020\003\022\025\n\021DESTROY_SCHEDULED\020\004\022\022\n\016PENDIN" + + "G_IMPORT\020\006\022\021\n\rIMPORT_FAILED\020\007\"I\n\024CryptoK" + + "eyVersionView\022\'\n#CRYPTO_KEY_VERSION_VIEW" + + "_UNSPECIFIED\020\000\022\010\n\004FULL\020\001:\252\001\352A\246\001\n(cloudkm" + + "s.googleapis.com/CryptoKeyVersion\022zproje" + + "cts/{project}/locations/{location}/keyRi" + + "ngs/{key_ring}/cryptoKeys/{crypto_key}/c" + + "ryptoKeyVersions/{crypto_key_version}\"\334\002" + + "\n\tPublicKey\022\013\n\003pem\030\001 \001(\t\022R\n\talgorithm\030\002 " + + "\001(\0162?.google.cloud.kms.v1.CryptoKeyVersi" + + "on.CryptoKeyVersionAlgorithm\022/\n\npem_crc3" + + "2c\030\003 \001(\0132\033.google.protobuf.Int64Value\022\014\n" + + "\004name\030\004 \001(\t:\256\001\352A\252\001\n!cloudkms.googleapis." + + "com/PublicKey\022\204\001projects/{project}/locat" + + "ions/{location}/keyRings/{key_ring}/cryp" + + "toKeys/{crypto_key}/cryptoKeyVersions/{c" + + "rypto_key_version}/publicKey\"\333\007\n\tImportJ" + + "ob\022\021\n\004name\030\001 \001(\tB\003\340A\003\022J\n\rimport_method\030\002" + + " \001(\0162+.google.cloud.kms.v1.ImportJob.Imp" + + "ortMethodB\006\340A\002\340A\005\022F\n\020protection_level\030\t " + + "\001(\0162$.google.cloud.kms.v1.ProtectionLeve" + + "lB\006\340A\002\340A\005\0224\n\013create_time\030\003 \001(\0132\032.google." + + "protobuf.TimestampB\003\340A\003\0226\n\rgenerate_time" + + "\030\004 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022" + + "4\n\013expire_time\030\005 \001(\0132\032.google.protobuf.T" + + "imestampB\003\340A\003\022:\n\021expire_event_time\030\n \001(\013" + + "2\032.google.protobuf.TimestampB\003\340A\003\022A\n\005sta" + + "te\030\006 \001(\0162-.google.cloud.kms.v1.ImportJob" + + ".ImportJobStateB\003\340A\003\022I\n\npublic_key\030\007 \001(\013" + + "20.google.cloud.kms.v1.ImportJob.Wrappin" + + "gPublicKeyB\003\340A\003\022F\n\013attestation\030\010 \001(\0132,.g" + + "oogle.cloud.kms.v1.KeyOperationAttestati" + + "onB\003\340A\003\032 \n\021WrappingPublicKey\022\013\n\003pem\030\001 \001(" + + "\t\"m\n\014ImportMethod\022\035\n\031IMPORT_METHOD_UNSPE" + + "CIFIED\020\000\022\036\n\032RSA_OAEP_3072_SHA1_AES_256\020\001" + + "\022\036\n\032RSA_OAEP_4096_SHA1_AES_256\020\002\"c\n\016Impo" + + "rtJobState\022 \n\034IMPORT_JOB_STATE_UNSPECIFI" + + "ED\020\000\022\026\n\022PENDING_GENERATION\020\001\022\n\n\006ACTIVE\020\002" + + "\022\013\n\007EXPIRED\020\003:{\352Ax\n!cloudkms.googleapis." + + "com/ImportJob\022Sprojects/{project}/locati" + + "ons/{location}/keyRings/{key_ring}/impor" + + "tJobs/{import_job}\":\n\036ExternalProtection" + + "LevelOptions\022\030\n\020external_key_uri\030\001 \001(\t*X" + + "\n\017ProtectionLevel\022 \n\034PROTECTION_LEVEL_UN" + + "SPECIFIED\020\000\022\014\n\010SOFTWARE\020\001\022\007\n\003HSM\020\002\022\014\n\010EX" + + "TERNAL\020\003B\225\001\n\027com.google.cloud.kms.v1B\021Km" + + "sResourcesProtoP\001Z6google.golang.org/gen" + + "proto/googleapis/cloud/kms/v1;kms\370\001\001\252\002\023G" + + "oogle.Cloud.Kms.V1\312\002\023Google\\Cloud\\Kms\\V1" + + "b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -210,6 +213,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ResourceProto.getDescriptor(), com.google.protobuf.DurationProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), + com.google.protobuf.WrappersProto.getDescriptor(), com.google.api.AnnotationsProto.getDescriptor(), }); internal_static_google_cloud_kms_v1_KeyRing_descriptor = @@ -286,7 +290,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_kms_v1_PublicKey_descriptor, new java.lang.String[] { - "Pem", "Algorithm", + "Pem", "Algorithm", "PemCrc32C", "Name", }); internal_static_google_cloud_kms_v1_ImportJob_descriptor = getDescriptor().getMessageTypes().get(6); @@ -331,6 +335,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ResourceProto.getDescriptor(); com.google.protobuf.DurationProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); + com.google.protobuf.WrappersProto.getDescriptor(); com.google.api.AnnotationsProto.getDescriptor(); } diff --git a/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/PublicKey.java b/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/PublicKey.java index 0aab67a7..051a4283 100644 --- a/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/PublicKey.java +++ b/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/PublicKey.java @@ -41,6 +41,7 @@ private PublicKey(com.google.protobuf.GeneratedMessageV3.Builder builder) { private PublicKey() { pem_ = ""; algorithm_ = 0; + name_ = ""; } @java.lang.Override @@ -86,6 +87,28 @@ private PublicKey( algorithm_ = rawValue; break; } + case 26: + { + com.google.protobuf.Int64Value.Builder subBuilder = null; + if (pemCrc32C_ != null) { + subBuilder = pemCrc32C_.toBuilder(); + } + pemCrc32C_ = + input.readMessage(com.google.protobuf.Int64Value.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(pemCrc32C_); + pemCrc32C_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -217,6 +240,138 @@ public com.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm getAlg : result; } + public static final int PEM_CRC32C_FIELD_NUMBER = 3; + private com.google.protobuf.Int64Value pemCrc32C_; + /** + * + * + *
+   * Integrity verification field. A CRC32C checksum of the returned
+   * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. An integrity check of [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] can be performed
+   * by computing the CRC32C checksum of [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] and
+   * comparing your results to this field. Discard the response in case of
+   * non-matching checksum values, and perform a limited number of retries. A
+   * persistent mismatch may indicate an issue in your computation of the CRC32C
+   * checksum.
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * .google.protobuf.Int64Value pem_crc32c = 3; + * + * @return Whether the pemCrc32c field is set. + */ + @java.lang.Override + public boolean hasPemCrc32C() { + return pemCrc32C_ != null; + } + /** + * + * + *
+   * Integrity verification field. A CRC32C checksum of the returned
+   * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. An integrity check of [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] can be performed
+   * by computing the CRC32C checksum of [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] and
+   * comparing your results to this field. Discard the response in case of
+   * non-matching checksum values, and perform a limited number of retries. A
+   * persistent mismatch may indicate an issue in your computation of the CRC32C
+   * checksum.
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * .google.protobuf.Int64Value pem_crc32c = 3; + * + * @return The pemCrc32c. + */ + @java.lang.Override + public com.google.protobuf.Int64Value getPemCrc32C() { + return pemCrc32C_ == null ? com.google.protobuf.Int64Value.getDefaultInstance() : pemCrc32C_; + } + /** + * + * + *
+   * Integrity verification field. A CRC32C checksum of the returned
+   * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. An integrity check of [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] can be performed
+   * by computing the CRC32C checksum of [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] and
+   * comparing your results to this field. Discard the response in case of
+   * non-matching checksum values, and perform a limited number of retries. A
+   * persistent mismatch may indicate an issue in your computation of the CRC32C
+   * checksum.
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * .google.protobuf.Int64Value pem_crc32c = 3; + */ + @java.lang.Override + public com.google.protobuf.Int64ValueOrBuilder getPemCrc32COrBuilder() { + return getPemCrc32C(); + } + + public static final int NAME_FIELD_NUMBER = 4; + private volatile java.lang.Object name_; + /** + * + * + *
+   * The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key.
+   * Provided here for verification.
+   * NOTE: This field is in Beta.
+   * 
+ * + * string name = 4; + * + * @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; + } + } + /** + * + * + *
+   * The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key.
+   * Provided here for verification.
+   * NOTE: This field is in Beta.
+   * 
+ * + * string name = 4; + * + * @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 @@ -240,6 +395,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(2, algorithm_); } + if (pemCrc32C_ != null) { + output.writeMessage(3, getPemCrc32C()); + } + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, name_); + } unknownFields.writeTo(output); } @@ -258,6 +419,12 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, algorithm_); } + if (pemCrc32C_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getPemCrc32C()); + } + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, name_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -275,6 +442,11 @@ public boolean equals(final java.lang.Object obj) { if (!getPem().equals(other.getPem())) return false; if (algorithm_ != other.algorithm_) return false; + if (hasPemCrc32C() != other.hasPemCrc32C()) return false; + if (hasPemCrc32C()) { + if (!getPemCrc32C().equals(other.getPemCrc32C())) return false; + } + if (!getName().equals(other.getName())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -290,6 +462,12 @@ public int hashCode() { hash = (53 * hash) + getPem().hashCode(); hash = (37 * hash) + ALGORITHM_FIELD_NUMBER; hash = (53 * hash) + algorithm_; + if (hasPemCrc32C()) { + hash = (37 * hash) + PEM_CRC32C_FIELD_NUMBER; + hash = (53 * hash) + getPemCrc32C().hashCode(); + } + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -439,6 +617,14 @@ public Builder clear() { algorithm_ = 0; + if (pemCrc32CBuilder_ == null) { + pemCrc32C_ = null; + } else { + pemCrc32C_ = null; + pemCrc32CBuilder_ = null; + } + name_ = ""; + return this; } @@ -467,6 +653,12 @@ public com.google.cloud.kms.v1.PublicKey buildPartial() { com.google.cloud.kms.v1.PublicKey result = new com.google.cloud.kms.v1.PublicKey(this); result.pem_ = pem_; result.algorithm_ = algorithm_; + if (pemCrc32CBuilder_ == null) { + result.pemCrc32C_ = pemCrc32C_; + } else { + result.pemCrc32C_ = pemCrc32CBuilder_.build(); + } + result.name_ = name_; onBuilt(); return result; } @@ -523,6 +715,13 @@ public Builder mergeFrom(com.google.cloud.kms.v1.PublicKey other) { if (other.algorithm_ != 0) { setAlgorithmValue(other.getAlgorithmValue()); } + if (other.hasPemCrc32C()) { + mergePemCrc32C(other.getPemCrc32C()); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -777,6 +976,404 @@ public Builder clearAlgorithm() { return this; } + private com.google.protobuf.Int64Value pemCrc32C_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int64Value, + com.google.protobuf.Int64Value.Builder, + com.google.protobuf.Int64ValueOrBuilder> + pemCrc32CBuilder_; + /** + * + * + *
+     * Integrity verification field. A CRC32C checksum of the returned
+     * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. An integrity check of [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] can be performed
+     * by computing the CRC32C checksum of [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] and
+     * comparing your results to this field. Discard the response in case of
+     * non-matching checksum values, and perform a limited number of retries. A
+     * persistent mismatch may indicate an issue in your computation of the CRC32C
+     * checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * .google.protobuf.Int64Value pem_crc32c = 3; + * + * @return Whether the pemCrc32c field is set. + */ + public boolean hasPemCrc32C() { + return pemCrc32CBuilder_ != null || pemCrc32C_ != null; + } + /** + * + * + *
+     * Integrity verification field. A CRC32C checksum of the returned
+     * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. An integrity check of [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] can be performed
+     * by computing the CRC32C checksum of [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] and
+     * comparing your results to this field. Discard the response in case of
+     * non-matching checksum values, and perform a limited number of retries. A
+     * persistent mismatch may indicate an issue in your computation of the CRC32C
+     * checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * .google.protobuf.Int64Value pem_crc32c = 3; + * + * @return The pemCrc32c. + */ + public com.google.protobuf.Int64Value getPemCrc32C() { + if (pemCrc32CBuilder_ == null) { + return pemCrc32C_ == null + ? com.google.protobuf.Int64Value.getDefaultInstance() + : pemCrc32C_; + } else { + return pemCrc32CBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Integrity verification field. A CRC32C checksum of the returned
+     * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. An integrity check of [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] can be performed
+     * by computing the CRC32C checksum of [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] and
+     * comparing your results to this field. Discard the response in case of
+     * non-matching checksum values, and perform a limited number of retries. A
+     * persistent mismatch may indicate an issue in your computation of the CRC32C
+     * checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * .google.protobuf.Int64Value pem_crc32c = 3; + */ + public Builder setPemCrc32C(com.google.protobuf.Int64Value value) { + if (pemCrc32CBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + pemCrc32C_ = value; + onChanged(); + } else { + pemCrc32CBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Integrity verification field. A CRC32C checksum of the returned
+     * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. An integrity check of [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] can be performed
+     * by computing the CRC32C checksum of [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] and
+     * comparing your results to this field. Discard the response in case of
+     * non-matching checksum values, and perform a limited number of retries. A
+     * persistent mismatch may indicate an issue in your computation of the CRC32C
+     * checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * .google.protobuf.Int64Value pem_crc32c = 3; + */ + public Builder setPemCrc32C(com.google.protobuf.Int64Value.Builder builderForValue) { + if (pemCrc32CBuilder_ == null) { + pemCrc32C_ = builderForValue.build(); + onChanged(); + } else { + pemCrc32CBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Integrity verification field. A CRC32C checksum of the returned
+     * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. An integrity check of [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] can be performed
+     * by computing the CRC32C checksum of [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] and
+     * comparing your results to this field. Discard the response in case of
+     * non-matching checksum values, and perform a limited number of retries. A
+     * persistent mismatch may indicate an issue in your computation of the CRC32C
+     * checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * .google.protobuf.Int64Value pem_crc32c = 3; + */ + public Builder mergePemCrc32C(com.google.protobuf.Int64Value value) { + if (pemCrc32CBuilder_ == null) { + if (pemCrc32C_ != null) { + pemCrc32C_ = + com.google.protobuf.Int64Value.newBuilder(pemCrc32C_).mergeFrom(value).buildPartial(); + } else { + pemCrc32C_ = value; + } + onChanged(); + } else { + pemCrc32CBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Integrity verification field. A CRC32C checksum of the returned
+     * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. An integrity check of [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] can be performed
+     * by computing the CRC32C checksum of [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] and
+     * comparing your results to this field. Discard the response in case of
+     * non-matching checksum values, and perform a limited number of retries. A
+     * persistent mismatch may indicate an issue in your computation of the CRC32C
+     * checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * .google.protobuf.Int64Value pem_crc32c = 3; + */ + public Builder clearPemCrc32C() { + if (pemCrc32CBuilder_ == null) { + pemCrc32C_ = null; + onChanged(); + } else { + pemCrc32C_ = null; + pemCrc32CBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Integrity verification field. A CRC32C checksum of the returned
+     * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. An integrity check of [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] can be performed
+     * by computing the CRC32C checksum of [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] and
+     * comparing your results to this field. Discard the response in case of
+     * non-matching checksum values, and perform a limited number of retries. A
+     * persistent mismatch may indicate an issue in your computation of the CRC32C
+     * checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * .google.protobuf.Int64Value pem_crc32c = 3; + */ + public com.google.protobuf.Int64Value.Builder getPemCrc32CBuilder() { + + onChanged(); + return getPemCrc32CFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Integrity verification field. A CRC32C checksum of the returned
+     * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. An integrity check of [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] can be performed
+     * by computing the CRC32C checksum of [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] and
+     * comparing your results to this field. Discard the response in case of
+     * non-matching checksum values, and perform a limited number of retries. A
+     * persistent mismatch may indicate an issue in your computation of the CRC32C
+     * checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * .google.protobuf.Int64Value pem_crc32c = 3; + */ + public com.google.protobuf.Int64ValueOrBuilder getPemCrc32COrBuilder() { + if (pemCrc32CBuilder_ != null) { + return pemCrc32CBuilder_.getMessageOrBuilder(); + } else { + return pemCrc32C_ == null + ? com.google.protobuf.Int64Value.getDefaultInstance() + : pemCrc32C_; + } + } + /** + * + * + *
+     * Integrity verification field. A CRC32C checksum of the returned
+     * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. An integrity check of [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] can be performed
+     * by computing the CRC32C checksum of [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] and
+     * comparing your results to this field. Discard the response in case of
+     * non-matching checksum values, and perform a limited number of retries. A
+     * persistent mismatch may indicate an issue in your computation of the CRC32C
+     * checksum.
+     * Note: This field is defined as int64 for reasons of compatibility across
+     * different languages. However, it is a non-negative integer, which will
+     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+     * that support this type.
+     * NOTE: This field is in Beta.
+     * 
+ * + * .google.protobuf.Int64Value pem_crc32c = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int64Value, + com.google.protobuf.Int64Value.Builder, + com.google.protobuf.Int64ValueOrBuilder> + getPemCrc32CFieldBuilder() { + if (pemCrc32CBuilder_ == null) { + pemCrc32CBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int64Value, + com.google.protobuf.Int64Value.Builder, + com.google.protobuf.Int64ValueOrBuilder>( + getPemCrc32C(), getParentForChildren(), isClean()); + pemCrc32C_ = null; + } + return pemCrc32CBuilder_; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key.
+     * Provided here for verification.
+     * NOTE: This field is in Beta.
+     * 
+ * + * string name = 4; + * + * @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; + } + } + /** + * + * + *
+     * The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key.
+     * Provided here for verification.
+     * NOTE: This field is in Beta.
+     * 
+ * + * string name = 4; + * + * @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; + } + } + /** + * + * + *
+     * The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key.
+     * Provided here for verification.
+     * NOTE: This field is in Beta.
+     * 
+ * + * string name = 4; + * + * @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; + onChanged(); + return this; + } + /** + * + * + *
+     * The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key.
+     * Provided here for verification.
+     * NOTE: This field is in Beta.
+     * 
+ * + * string name = 4; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key.
+     * Provided here for verification.
+     * NOTE: This field is in Beta.
+     * 
+ * + * string name = 4; + * + * @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; + 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-kms-v1/src/main/java/com/google/cloud/kms/v1/PublicKeyOrBuilder.java b/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/PublicKeyOrBuilder.java index 3aa0aef8..dfda0ab8 100644 --- a/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/PublicKeyOrBuilder.java +++ b/proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/PublicKeyOrBuilder.java @@ -82,4 +82,101 @@ public interface PublicKeyOrBuilder * @return The algorithm. */ com.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm getAlgorithm(); + + /** + * + * + *
+   * Integrity verification field. A CRC32C checksum of the returned
+   * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. An integrity check of [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] can be performed
+   * by computing the CRC32C checksum of [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] and
+   * comparing your results to this field. Discard the response in case of
+   * non-matching checksum values, and perform a limited number of retries. A
+   * persistent mismatch may indicate an issue in your computation of the CRC32C
+   * checksum.
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * .google.protobuf.Int64Value pem_crc32c = 3; + * + * @return Whether the pemCrc32c field is set. + */ + boolean hasPemCrc32C(); + /** + * + * + *
+   * Integrity verification field. A CRC32C checksum of the returned
+   * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. An integrity check of [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] can be performed
+   * by computing the CRC32C checksum of [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] and
+   * comparing your results to this field. Discard the response in case of
+   * non-matching checksum values, and perform a limited number of retries. A
+   * persistent mismatch may indicate an issue in your computation of the CRC32C
+   * checksum.
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * .google.protobuf.Int64Value pem_crc32c = 3; + * + * @return The pemCrc32c. + */ + com.google.protobuf.Int64Value getPemCrc32C(); + /** + * + * + *
+   * Integrity verification field. A CRC32C checksum of the returned
+   * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. An integrity check of [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] can be performed
+   * by computing the CRC32C checksum of [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] and
+   * comparing your results to this field. Discard the response in case of
+   * non-matching checksum values, and perform a limited number of retries. A
+   * persistent mismatch may indicate an issue in your computation of the CRC32C
+   * checksum.
+   * Note: This field is defined as int64 for reasons of compatibility across
+   * different languages. However, it is a non-negative integer, which will
+   * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+   * that support this type.
+   * NOTE: This field is in Beta.
+   * 
+ * + * .google.protobuf.Int64Value pem_crc32c = 3; + */ + com.google.protobuf.Int64ValueOrBuilder getPemCrc32COrBuilder(); + + /** + * + * + *
+   * The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key.
+   * Provided here for verification.
+   * NOTE: This field is in Beta.
+   * 
+ * + * string name = 4; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key.
+   * Provided here for verification.
+   * NOTE: This field is in Beta.
+   * 
+ * + * string name = 4; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); } diff --git a/proto-google-cloud-kms-v1/src/main/proto/google/cloud/kms/v1/resources.proto b/proto-google-cloud-kms-v1/src/main/proto/google/cloud/kms/v1/resources.proto index e78b10cc..88e31bd9 100644 --- a/proto-google-cloud-kms-v1/src/main/proto/google/cloud/kms/v1/resources.proto +++ b/proto-google-cloud-kms-v1/src/main/proto/google/cloud/kms/v1/resources.proto @@ -20,6 +20,7 @@ import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; import "google/api/annotations.proto"; option cc_enable_arenas = true; @@ -48,8 +49,8 @@ message KeyRing { // A [CryptoKey][google.cloud.kms.v1.CryptoKey] represents a logical key that can be used for cryptographic // operations. // -// A [CryptoKey][google.cloud.kms.v1.CryptoKey] is made up of one or more [versions][google.cloud.kms.v1.CryptoKeyVersion], which -// represent the actual key material used in cryptographic operations. +// A [CryptoKey][google.cloud.kms.v1.CryptoKey] is made up of zero or more [versions][google.cloud.kms.v1.CryptoKeyVersion], +// which represent the actual key material used in cryptographic operations. message CryptoKey { option (google.api.resource) = { type: "cloudkms.googleapis.com/CryptoKey" @@ -418,6 +419,27 @@ message PublicKey { // The [Algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] associated // with this key. CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 2; + + // Integrity verification field. A CRC32C checksum of the returned + // [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. An integrity check of [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] can be performed + // by computing the CRC32C checksum of [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] and + // comparing your results to this field. Discard the response in case of + // non-matching checksum values, and perform a limited number of retries. A + // persistent mismatch may indicate an issue in your computation of the CRC32C + // checksum. + // Note: This field is defined as int64 for reasons of compatibility across + // different languages. However, it is a non-negative integer, which will + // never exceed 2^32-1, and can be safely downconverted to uint32 in languages + // that support this type. + // + // NOTE: This field is in Beta. + google.protobuf.Int64Value pem_crc32c = 3; + + // The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key. + // Provided here for verification. + // + // NOTE: This field is in Beta. + string name = 4; } // An [ImportJob][google.cloud.kms.v1.ImportJob] can be used to create [CryptoKeys][google.cloud.kms.v1.CryptoKey] and diff --git a/proto-google-cloud-kms-v1/src/main/proto/google/cloud/kms/v1/service.proto b/proto-google-cloud-kms-v1/src/main/proto/google/cloud/kms/v1/service.proto index d0c8949c..65d20771 100644 --- a/proto-google-cloud-kms-v1/src/main/proto/google/cloud/kms/v1/service.proto +++ b/proto-google-cloud-kms-v1/src/main/proto/google/cloud/kms/v1/service.proto @@ -22,6 +22,7 @@ import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/kms/v1/resources.proto"; import "google/protobuf/field_mask.proto"; +import "google/protobuf/wrappers.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Kms.V1"; @@ -731,6 +732,41 @@ message EncryptRequest { // plaintext and additional_authenticated_data fields must be no larger than // 8KiB. bytes additional_authenticated_data = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. An optional CRC32C checksum of the [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. If + // specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the + // received [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext] using this checksum. + // [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification + // fails. If you receive a checksum error, your client should verify that + // CRC32C([EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]) is equal to + // [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c], and if so, perform a limited number of + // retries. A persistent mismatch may indicate an issue in your computation of + // the CRC32C checksum. + // Note: This field is defined as int64 for reasons of compatibility across + // different languages. However, it is a non-negative integer, which will + // never exceed 2^32-1, and can be safely downconverted to uint32 in languages + // that support this type. + // + // NOTE: This field is in Beta. + google.protobuf.Int64Value plaintext_crc32c = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. An optional CRC32C checksum of the + // [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. If specified, + // [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the received + // [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data] using this checksum. + // [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification + // fails. If you receive a checksum error, your client should verify that + // CRC32C([EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]) is equal to + // [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c], and if so, perform + // a limited number of retries. A persistent mismatch may indicate an issue in + // your computation of the CRC32C checksum. + // Note: This field is defined as int64 for reasons of compatibility across + // different languages. However, it is a non-negative integer, which will + // never exceed 2^32-1, and can be safely downconverted to uint32 in languages + // that support this type. + // + // NOTE: This field is in Beta. + google.protobuf.Int64Value additional_authenticated_data_crc32c = 8 [(google.api.field_behavior) = OPTIONAL]; } // Request message for [KeyManagementService.Decrypt][google.cloud.kms.v1.KeyManagementService.Decrypt]. @@ -751,6 +787,41 @@ message DecryptRequest { // Optional. Optional data that must match the data originally supplied in // [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. bytes additional_authenticated_data = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. An optional CRC32C checksum of the [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]. If + // specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the + // received [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext] using this checksum. + // [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification + // fails. If you receive a checksum error, your client should verify that + // CRC32C([DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]) is equal to + // [DecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.DecryptRequest.ciphertext_crc32c], and if so, perform a limited number + // of retries. A persistent mismatch may indicate an issue in your computation + // of the CRC32C checksum. + // Note: This field is defined as int64 for reasons of compatibility across + // different languages. However, it is a non-negative integer, which will + // never exceed 2^32-1, and can be safely downconverted to uint32 in languages + // that support this type. + // + // NOTE: This field is in Beta. + google.protobuf.Int64Value ciphertext_crc32c = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. An optional CRC32C checksum of the + // [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]. If specified, + // [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the received + // [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data] using this checksum. + // [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification + // fails. If you receive a checksum error, your client should verify that + // CRC32C([DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]) is equal to + // [DecryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data_crc32c], and if so, perform + // a limited number of retries. A persistent mismatch may indicate an issue in + // your computation of the CRC32C checksum. + // Note: This field is defined as int64 for reasons of compatibility across + // different languages. However, it is a non-negative integer, which will + // never exceed 2^32-1, and can be safely downconverted to uint32 in languages + // that support this type. + // + // NOTE: This field is in Beta. + google.protobuf.Int64Value additional_authenticated_data_crc32c = 6 [(google.api.field_behavior) = OPTIONAL]; } // Request message for [KeyManagementService.AsymmetricSign][google.cloud.kms.v1.KeyManagementService.AsymmetricSign]. @@ -767,6 +838,23 @@ message AsymmetricSignRequest { // the same digest algorithm as specified by the key version's // [algorithm][google.cloud.kms.v1.CryptoKeyVersion.algorithm]. Digest digest = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional CRC32C checksum of the [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. If + // specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the + // received [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest] using this checksum. + // [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification + // fails. If you receive a checksum error, your client should verify that + // CRC32C([AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]) is equal to + // [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c], and if so, perform a limited + // number of retries. A persistent mismatch may indicate an issue in your + // computation of the CRC32C checksum. + // Note: This field is defined as int64 for reasons of compatibility across + // different languages. However, it is a non-negative integer, which will + // never exceed 2^32-1, and can be safely downconverted to uint32 in languages + // that support this type. + // + // NOTE: This field is in Beta. + google.protobuf.Int64Value digest_crc32c = 4 [(google.api.field_behavior) = OPTIONAL]; } // Request message for [KeyManagementService.AsymmetricDecrypt][google.cloud.kms.v1.KeyManagementService.AsymmetricDecrypt]. @@ -783,12 +871,46 @@ message AsymmetricDecryptRequest { // Required. The data encrypted with the named [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s public // key using OAEP. bytes ciphertext = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional CRC32C checksum of the [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]. + // If specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will verify the integrity of the + // received [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext] using this checksum. + // [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification + // fails. If you receive a checksum error, your client should verify that + // CRC32C([AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]) is equal to + // [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c], and if so, perform a + // limited number of retries. A persistent mismatch may indicate an issue in + // your computation of the CRC32C checksum. + // Note: This field is defined as int64 for reasons of compatibility across + // different languages. However, it is a non-negative integer, which will + // never exceed 2^32-1, and can be safely downconverted to uint32 in languages + // that support this type. + // + // NOTE: This field is in Beta. + google.protobuf.Int64Value ciphertext_crc32c = 4 [(google.api.field_behavior) = OPTIONAL]; } // Response message for [KeyManagementService.Decrypt][google.cloud.kms.v1.KeyManagementService.Decrypt]. message DecryptResponse { // The decrypted data originally supplied in [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. bytes plaintext = 1; + + // Integrity verification field. A CRC32C checksum of the returned + // [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext]. An integrity check of + // [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] can be performed by computing the CRC32C + // checksum of [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] and comparing your results to + // this field. Discard the response in case of non-matching checksum values, + // and perform a limited number of retries. A persistent mismatch may indicate + // an issue in your computation of the CRC32C checksum. Note: receiving this + // response message indicates that [KeyManagementService][google.cloud.kms.v1.KeyManagementService] is able to + // successfully decrypt the [ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]. + // Note: This field is defined as int64 for reasons of compatibility across + // different languages. However, it is a non-negative integer, which will + // never exceed 2^32-1, and can be safely downconverted to uint32 in languages + // that support this type. + // + // NOTE: This field is in Beta. + google.protobuf.Int64Value plaintext_crc32c = 2; } // Response message for [KeyManagementService.Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt]. @@ -799,18 +921,118 @@ message EncryptResponse { // The encrypted data. bytes ciphertext = 2; + + // Integrity verification field. A CRC32C checksum of the returned + // [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. An integrity check of + // [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] can be performed by computing the CRC32C + // checksum of [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] and comparing your results to + // this field. Discard the response in case of non-matching checksum values, + // and perform a limited number of retries. A persistent mismatch may indicate + // an issue in your computation of the CRC32C checksum. + // Note: This field is defined as int64 for reasons of compatibility across + // different languages. However, it is a non-negative integer, which will + // never exceed 2^32-1, and can be safely downconverted to uint32 in languages + // that support this type. + // + // NOTE: This field is in Beta. + google.protobuf.Int64Value ciphertext_crc32c = 4; + + // Integrity verification field. A flag indicating whether + // [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] was received by + // [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used for the integrity verification of the + // [plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. A false value of this field + // indicates either that [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] was left unset or + // that it was not delivered to [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've set + // [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] but this field is still false, discard + // the response and perform a limited number of retries. + // + // NOTE: This field is in Beta. + bool verified_plaintext_crc32c = 5; + + // Integrity verification field. A flag indicating whether + // [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] was received by + // [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used for the integrity verification of the + // [AAD][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. A false value of this + // field indicates either that + // [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] was left unset or + // that it was not delivered to [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've set + // [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] but this field is + // still false, discard the response and perform a limited number of retries. + // + // NOTE: This field is in Beta. + bool verified_additional_authenticated_data_crc32c = 6; } // Response message for [KeyManagementService.AsymmetricSign][google.cloud.kms.v1.KeyManagementService.AsymmetricSign]. message AsymmetricSignResponse { // The created signature. bytes signature = 1; + + // Integrity verification field. A CRC32C checksum of the returned + // [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature]. An integrity check of + // [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] can be performed by computing the + // CRC32C checksum of [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] and comparing your + // results to this field. Discard the response in case of non-matching + // checksum values, and perform a limited number of retries. A persistent + // mismatch may indicate an issue in your computation of the CRC32C checksum. + // Note: This field is defined as int64 for reasons of compatibility across + // different languages. However, it is a non-negative integer, which will + // never exceed 2^32-1, and can be safely downconverted to uint32 in languages + // that support this type. + // + // NOTE: This field is in Beta. + google.protobuf.Int64Value signature_crc32c = 2; + + // Integrity verification field. A flag indicating whether + // [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] was received by + // [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used for the integrity verification of the + // [digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. A false value of this field + // indicates either that [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] was left + // unset or that it was not delivered to [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + // set [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] but this field is still false, + // discard the response and perform a limited number of retries. + // + // NOTE: This field is in Beta. + bool verified_digest_crc32c = 3; + + // The resource name of the [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. Check + // this field to verify that the intended resource was used for signing. + // + // NOTE: This field is in Beta. + string name = 4; } // Response message for [KeyManagementService.AsymmetricDecrypt][google.cloud.kms.v1.KeyManagementService.AsymmetricDecrypt]. message AsymmetricDecryptResponse { // The decrypted data originally encrypted with the matching public key. bytes plaintext = 1; + + // Integrity verification field. A CRC32C checksum of the returned + // [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]. An integrity check of + // [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] can be performed by computing the + // CRC32C checksum of [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] and comparing + // your results to this field. Discard the response in case of non-matching + // checksum values, and perform a limited number of retries. A persistent + // mismatch may indicate an issue in your computation of the CRC32C checksum. + // Note: This field is defined as int64 for reasons of compatibility across + // different languages. However, it is a non-negative integer, which will + // never exceed 2^32-1, and can be safely downconverted to uint32 in languages + // that support this type. + // + // NOTE: This field is in Beta. + google.protobuf.Int64Value plaintext_crc32c = 2; + + // Integrity verification field. A flag indicating whether + // [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c] was received by + // [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used for the integrity verification of the + // [ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]. A false value of this + // field indicates either that [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c] + // was left unset or that it was not delivered to [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If + // you've set [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c] but this field is + // still false, discard the response and perform a limited number of retries. + // + // NOTE: This field is in Beta. + bool verified_ciphertext_crc32c = 3; } // Request message for [KeyManagementService.UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion]. diff --git a/synth.metadata b/synth.metadata index 6482e105..60d525cb 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-kms.git", - "sha": "119de9aa3e2803dc4bc943ed7e496648d861702e" + "sha": "fc5c6cd41f21eabc06aa0f401699a183e6dccb4b" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "dfacde6f19f3c633a678b83b2cee8e3eddafb7d0", - "internalRef": "315978777" + "sha": "b40e4533f841c96aac1d9d7d342514d146b5b4cb", + "internalRef": "326100874" } }, {