• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2020 Google LLC
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     https://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 // Generated by the protocol buffer compiler.  DO NOT EDIT!
17 // source: google/cloud/kms/v1/service.proto
18 
19 package com.google.cloud.kms.v1;
20 
21 /**
22  *
23  *
24  * <pre>
25  * Response message for
26  * [KeyManagementService.AsymmetricDecrypt][google.cloud.kms.v1.KeyManagementService.AsymmetricDecrypt].
27  * </pre>
28  *
29  * Protobuf type {@code google.cloud.kms.v1.AsymmetricDecryptResponse}
30  */
31 public final class AsymmetricDecryptResponse extends com.google.protobuf.GeneratedMessageV3
32     implements
33     // @@protoc_insertion_point(message_implements:google.cloud.kms.v1.AsymmetricDecryptResponse)
34     AsymmetricDecryptResponseOrBuilder {
35   private static final long serialVersionUID = 0L;
36   // Use AsymmetricDecryptResponse.newBuilder() to construct.
AsymmetricDecryptResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)37   private AsymmetricDecryptResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
38     super(builder);
39   }
40 
AsymmetricDecryptResponse()41   private AsymmetricDecryptResponse() {
42     plaintext_ = com.google.protobuf.ByteString.EMPTY;
43     protectionLevel_ = 0;
44   }
45 
46   @java.lang.Override
47   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)48   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
49     return new AsymmetricDecryptResponse();
50   }
51 
52   @java.lang.Override
getUnknownFields()53   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
54     return this.unknownFields;
55   }
56 
getDescriptor()57   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
58     return com.google.cloud.kms.v1.KmsProto
59         .internal_static_google_cloud_kms_v1_AsymmetricDecryptResponse_descriptor;
60   }
61 
62   @java.lang.Override
63   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()64       internalGetFieldAccessorTable() {
65     return com.google.cloud.kms.v1.KmsProto
66         .internal_static_google_cloud_kms_v1_AsymmetricDecryptResponse_fieldAccessorTable
67         .ensureFieldAccessorsInitialized(
68             com.google.cloud.kms.v1.AsymmetricDecryptResponse.class,
69             com.google.cloud.kms.v1.AsymmetricDecryptResponse.Builder.class);
70   }
71 
72   public static final int PLAINTEXT_FIELD_NUMBER = 1;
73   private com.google.protobuf.ByteString plaintext_ = com.google.protobuf.ByteString.EMPTY;
74   /**
75    *
76    *
77    * <pre>
78    * The decrypted data originally encrypted with the matching public key.
79    * </pre>
80    *
81    * <code>bytes plaintext = 1;</code>
82    *
83    * @return The plaintext.
84    */
85   @java.lang.Override
getPlaintext()86   public com.google.protobuf.ByteString getPlaintext() {
87     return plaintext_;
88   }
89 
90   public static final int PLAINTEXT_CRC32C_FIELD_NUMBER = 2;
91   private com.google.protobuf.Int64Value plaintextCrc32C_;
92   /**
93    *
94    *
95    * <pre>
96    * Integrity verification field. A CRC32C checksum of the returned
97    * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext].
98    * An integrity check of
99    * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]
100    * can be performed by computing the CRC32C checksum of
101    * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]
102    * and comparing your results to this field. Discard the response in case of
103    * non-matching checksum values, and perform a limited number of retries. A
104    * persistent mismatch may indicate an issue in your computation of the CRC32C
105    * checksum. Note: This field is defined as int64 for reasons of compatibility
106    * across different languages. However, it is a non-negative integer, which
107    * will never exceed 2^32-1, and can be safely downconverted to uint32 in
108    * languages that support this type.
109    * </pre>
110    *
111    * <code>.google.protobuf.Int64Value plaintext_crc32c = 2;</code>
112    *
113    * @return Whether the plaintextCrc32c field is set.
114    */
115   @java.lang.Override
hasPlaintextCrc32C()116   public boolean hasPlaintextCrc32C() {
117     return plaintextCrc32C_ != null;
118   }
119   /**
120    *
121    *
122    * <pre>
123    * Integrity verification field. A CRC32C checksum of the returned
124    * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext].
125    * An integrity check of
126    * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]
127    * can be performed by computing the CRC32C checksum of
128    * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]
129    * and comparing your results to this field. Discard the response in case of
130    * non-matching checksum values, and perform a limited number of retries. A
131    * persistent mismatch may indicate an issue in your computation of the CRC32C
132    * checksum. Note: This field is defined as int64 for reasons of compatibility
133    * across different languages. However, it is a non-negative integer, which
134    * will never exceed 2^32-1, and can be safely downconverted to uint32 in
135    * languages that support this type.
136    * </pre>
137    *
138    * <code>.google.protobuf.Int64Value plaintext_crc32c = 2;</code>
139    *
140    * @return The plaintextCrc32c.
141    */
142   @java.lang.Override
getPlaintextCrc32C()143   public com.google.protobuf.Int64Value getPlaintextCrc32C() {
144     return plaintextCrc32C_ == null
145         ? com.google.protobuf.Int64Value.getDefaultInstance()
146         : plaintextCrc32C_;
147   }
148   /**
149    *
150    *
151    * <pre>
152    * Integrity verification field. A CRC32C checksum of the returned
153    * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext].
154    * An integrity check of
155    * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]
156    * can be performed by computing the CRC32C checksum of
157    * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]
158    * and comparing your results to this field. Discard the response in case of
159    * non-matching checksum values, and perform a limited number of retries. A
160    * persistent mismatch may indicate an issue in your computation of the CRC32C
161    * checksum. Note: This field is defined as int64 for reasons of compatibility
162    * across different languages. However, it is a non-negative integer, which
163    * will never exceed 2^32-1, and can be safely downconverted to uint32 in
164    * languages that support this type.
165    * </pre>
166    *
167    * <code>.google.protobuf.Int64Value plaintext_crc32c = 2;</code>
168    */
169   @java.lang.Override
getPlaintextCrc32COrBuilder()170   public com.google.protobuf.Int64ValueOrBuilder getPlaintextCrc32COrBuilder() {
171     return plaintextCrc32C_ == null
172         ? com.google.protobuf.Int64Value.getDefaultInstance()
173         : plaintextCrc32C_;
174   }
175 
176   public static final int VERIFIED_CIPHERTEXT_CRC32C_FIELD_NUMBER = 3;
177   private boolean verifiedCiphertextCrc32C_ = false;
178   /**
179    *
180    *
181    * <pre>
182    * Integrity verification field. A flag indicating whether
183    * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c]
184    * was received by
185    * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used
186    * for the integrity verification of the
187    * [ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]. A
188    * false value of this field indicates either that
189    * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c]
190    * was left unset or that it was not delivered to
191    * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've
192    * set
193    * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c]
194    * but this field is still false, discard the response and perform a limited
195    * number of retries.
196    * </pre>
197    *
198    * <code>bool verified_ciphertext_crc32c = 3;</code>
199    *
200    * @return The verifiedCiphertextCrc32c.
201    */
202   @java.lang.Override
getVerifiedCiphertextCrc32C()203   public boolean getVerifiedCiphertextCrc32C() {
204     return verifiedCiphertextCrc32C_;
205   }
206 
207   public static final int PROTECTION_LEVEL_FIELD_NUMBER = 4;
208   private int protectionLevel_ = 0;
209   /**
210    *
211    *
212    * <pre>
213    * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the
214    * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in
215    * decryption.
216    * </pre>
217    *
218    * <code>.google.cloud.kms.v1.ProtectionLevel protection_level = 4;</code>
219    *
220    * @return The enum numeric value on the wire for protectionLevel.
221    */
222   @java.lang.Override
getProtectionLevelValue()223   public int getProtectionLevelValue() {
224     return protectionLevel_;
225   }
226   /**
227    *
228    *
229    * <pre>
230    * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the
231    * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in
232    * decryption.
233    * </pre>
234    *
235    * <code>.google.cloud.kms.v1.ProtectionLevel protection_level = 4;</code>
236    *
237    * @return The protectionLevel.
238    */
239   @java.lang.Override
getProtectionLevel()240   public com.google.cloud.kms.v1.ProtectionLevel getProtectionLevel() {
241     com.google.cloud.kms.v1.ProtectionLevel result =
242         com.google.cloud.kms.v1.ProtectionLevel.forNumber(protectionLevel_);
243     return result == null ? com.google.cloud.kms.v1.ProtectionLevel.UNRECOGNIZED : result;
244   }
245 
246   private byte memoizedIsInitialized = -1;
247 
248   @java.lang.Override
isInitialized()249   public final boolean isInitialized() {
250     byte isInitialized = memoizedIsInitialized;
251     if (isInitialized == 1) return true;
252     if (isInitialized == 0) return false;
253 
254     memoizedIsInitialized = 1;
255     return true;
256   }
257 
258   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)259   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
260     if (!plaintext_.isEmpty()) {
261       output.writeBytes(1, plaintext_);
262     }
263     if (plaintextCrc32C_ != null) {
264       output.writeMessage(2, getPlaintextCrc32C());
265     }
266     if (verifiedCiphertextCrc32C_ != false) {
267       output.writeBool(3, verifiedCiphertextCrc32C_);
268     }
269     if (protectionLevel_
270         != com.google.cloud.kms.v1.ProtectionLevel.PROTECTION_LEVEL_UNSPECIFIED.getNumber()) {
271       output.writeEnum(4, protectionLevel_);
272     }
273     getUnknownFields().writeTo(output);
274   }
275 
276   @java.lang.Override
getSerializedSize()277   public int getSerializedSize() {
278     int size = memoizedSize;
279     if (size != -1) return size;
280 
281     size = 0;
282     if (!plaintext_.isEmpty()) {
283       size += com.google.protobuf.CodedOutputStream.computeBytesSize(1, plaintext_);
284     }
285     if (plaintextCrc32C_ != null) {
286       size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getPlaintextCrc32C());
287     }
288     if (verifiedCiphertextCrc32C_ != false) {
289       size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, verifiedCiphertextCrc32C_);
290     }
291     if (protectionLevel_
292         != com.google.cloud.kms.v1.ProtectionLevel.PROTECTION_LEVEL_UNSPECIFIED.getNumber()) {
293       size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, protectionLevel_);
294     }
295     size += getUnknownFields().getSerializedSize();
296     memoizedSize = size;
297     return size;
298   }
299 
300   @java.lang.Override
equals(final java.lang.Object obj)301   public boolean equals(final java.lang.Object obj) {
302     if (obj == this) {
303       return true;
304     }
305     if (!(obj instanceof com.google.cloud.kms.v1.AsymmetricDecryptResponse)) {
306       return super.equals(obj);
307     }
308     com.google.cloud.kms.v1.AsymmetricDecryptResponse other =
309         (com.google.cloud.kms.v1.AsymmetricDecryptResponse) obj;
310 
311     if (!getPlaintext().equals(other.getPlaintext())) return false;
312     if (hasPlaintextCrc32C() != other.hasPlaintextCrc32C()) return false;
313     if (hasPlaintextCrc32C()) {
314       if (!getPlaintextCrc32C().equals(other.getPlaintextCrc32C())) return false;
315     }
316     if (getVerifiedCiphertextCrc32C() != other.getVerifiedCiphertextCrc32C()) return false;
317     if (protectionLevel_ != other.protectionLevel_) return false;
318     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
319     return true;
320   }
321 
322   @java.lang.Override
hashCode()323   public int hashCode() {
324     if (memoizedHashCode != 0) {
325       return memoizedHashCode;
326     }
327     int hash = 41;
328     hash = (19 * hash) + getDescriptor().hashCode();
329     hash = (37 * hash) + PLAINTEXT_FIELD_NUMBER;
330     hash = (53 * hash) + getPlaintext().hashCode();
331     if (hasPlaintextCrc32C()) {
332       hash = (37 * hash) + PLAINTEXT_CRC32C_FIELD_NUMBER;
333       hash = (53 * hash) + getPlaintextCrc32C().hashCode();
334     }
335     hash = (37 * hash) + VERIFIED_CIPHERTEXT_CRC32C_FIELD_NUMBER;
336     hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getVerifiedCiphertextCrc32C());
337     hash = (37 * hash) + PROTECTION_LEVEL_FIELD_NUMBER;
338     hash = (53 * hash) + protectionLevel_;
339     hash = (29 * hash) + getUnknownFields().hashCode();
340     memoizedHashCode = hash;
341     return hash;
342   }
343 
parseFrom( java.nio.ByteBuffer data)344   public static com.google.cloud.kms.v1.AsymmetricDecryptResponse parseFrom(
345       java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
346     return PARSER.parseFrom(data);
347   }
348 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)349   public static com.google.cloud.kms.v1.AsymmetricDecryptResponse parseFrom(
350       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
351       throws com.google.protobuf.InvalidProtocolBufferException {
352     return PARSER.parseFrom(data, extensionRegistry);
353   }
354 
parseFrom( com.google.protobuf.ByteString data)355   public static com.google.cloud.kms.v1.AsymmetricDecryptResponse parseFrom(
356       com.google.protobuf.ByteString data)
357       throws com.google.protobuf.InvalidProtocolBufferException {
358     return PARSER.parseFrom(data);
359   }
360 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)361   public static com.google.cloud.kms.v1.AsymmetricDecryptResponse parseFrom(
362       com.google.protobuf.ByteString data,
363       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
364       throws com.google.protobuf.InvalidProtocolBufferException {
365     return PARSER.parseFrom(data, extensionRegistry);
366   }
367 
parseFrom(byte[] data)368   public static com.google.cloud.kms.v1.AsymmetricDecryptResponse parseFrom(byte[] data)
369       throws com.google.protobuf.InvalidProtocolBufferException {
370     return PARSER.parseFrom(data);
371   }
372 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)373   public static com.google.cloud.kms.v1.AsymmetricDecryptResponse parseFrom(
374       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
375       throws com.google.protobuf.InvalidProtocolBufferException {
376     return PARSER.parseFrom(data, extensionRegistry);
377   }
378 
parseFrom( java.io.InputStream input)379   public static com.google.cloud.kms.v1.AsymmetricDecryptResponse parseFrom(
380       java.io.InputStream input) throws java.io.IOException {
381     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
382   }
383 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)384   public static com.google.cloud.kms.v1.AsymmetricDecryptResponse parseFrom(
385       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
386       throws java.io.IOException {
387     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
388         PARSER, input, extensionRegistry);
389   }
390 
parseDelimitedFrom( java.io.InputStream input)391   public static com.google.cloud.kms.v1.AsymmetricDecryptResponse parseDelimitedFrom(
392       java.io.InputStream input) throws java.io.IOException {
393     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
394   }
395 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)396   public static com.google.cloud.kms.v1.AsymmetricDecryptResponse parseDelimitedFrom(
397       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
398       throws java.io.IOException {
399     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
400         PARSER, input, extensionRegistry);
401   }
402 
parseFrom( com.google.protobuf.CodedInputStream input)403   public static com.google.cloud.kms.v1.AsymmetricDecryptResponse parseFrom(
404       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
405     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
406   }
407 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)408   public static com.google.cloud.kms.v1.AsymmetricDecryptResponse parseFrom(
409       com.google.protobuf.CodedInputStream input,
410       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
411       throws java.io.IOException {
412     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
413         PARSER, input, extensionRegistry);
414   }
415 
416   @java.lang.Override
newBuilderForType()417   public Builder newBuilderForType() {
418     return newBuilder();
419   }
420 
newBuilder()421   public static Builder newBuilder() {
422     return DEFAULT_INSTANCE.toBuilder();
423   }
424 
newBuilder(com.google.cloud.kms.v1.AsymmetricDecryptResponse prototype)425   public static Builder newBuilder(com.google.cloud.kms.v1.AsymmetricDecryptResponse prototype) {
426     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
427   }
428 
429   @java.lang.Override
toBuilder()430   public Builder toBuilder() {
431     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
432   }
433 
434   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)435   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
436     Builder builder = new Builder(parent);
437     return builder;
438   }
439   /**
440    *
441    *
442    * <pre>
443    * Response message for
444    * [KeyManagementService.AsymmetricDecrypt][google.cloud.kms.v1.KeyManagementService.AsymmetricDecrypt].
445    * </pre>
446    *
447    * Protobuf type {@code google.cloud.kms.v1.AsymmetricDecryptResponse}
448    */
449   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
450       implements
451       // @@protoc_insertion_point(builder_implements:google.cloud.kms.v1.AsymmetricDecryptResponse)
452       com.google.cloud.kms.v1.AsymmetricDecryptResponseOrBuilder {
getDescriptor()453     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
454       return com.google.cloud.kms.v1.KmsProto
455           .internal_static_google_cloud_kms_v1_AsymmetricDecryptResponse_descriptor;
456     }
457 
458     @java.lang.Override
459     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()460         internalGetFieldAccessorTable() {
461       return com.google.cloud.kms.v1.KmsProto
462           .internal_static_google_cloud_kms_v1_AsymmetricDecryptResponse_fieldAccessorTable
463           .ensureFieldAccessorsInitialized(
464               com.google.cloud.kms.v1.AsymmetricDecryptResponse.class,
465               com.google.cloud.kms.v1.AsymmetricDecryptResponse.Builder.class);
466     }
467 
468     // Construct using com.google.cloud.kms.v1.AsymmetricDecryptResponse.newBuilder()
Builder()469     private Builder() {}
470 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)471     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
472       super(parent);
473     }
474 
475     @java.lang.Override
clear()476     public Builder clear() {
477       super.clear();
478       bitField0_ = 0;
479       plaintext_ = com.google.protobuf.ByteString.EMPTY;
480       plaintextCrc32C_ = null;
481       if (plaintextCrc32CBuilder_ != null) {
482         plaintextCrc32CBuilder_.dispose();
483         plaintextCrc32CBuilder_ = null;
484       }
485       verifiedCiphertextCrc32C_ = false;
486       protectionLevel_ = 0;
487       return this;
488     }
489 
490     @java.lang.Override
getDescriptorForType()491     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
492       return com.google.cloud.kms.v1.KmsProto
493           .internal_static_google_cloud_kms_v1_AsymmetricDecryptResponse_descriptor;
494     }
495 
496     @java.lang.Override
getDefaultInstanceForType()497     public com.google.cloud.kms.v1.AsymmetricDecryptResponse getDefaultInstanceForType() {
498       return com.google.cloud.kms.v1.AsymmetricDecryptResponse.getDefaultInstance();
499     }
500 
501     @java.lang.Override
build()502     public com.google.cloud.kms.v1.AsymmetricDecryptResponse build() {
503       com.google.cloud.kms.v1.AsymmetricDecryptResponse result = buildPartial();
504       if (!result.isInitialized()) {
505         throw newUninitializedMessageException(result);
506       }
507       return result;
508     }
509 
510     @java.lang.Override
buildPartial()511     public com.google.cloud.kms.v1.AsymmetricDecryptResponse buildPartial() {
512       com.google.cloud.kms.v1.AsymmetricDecryptResponse result =
513           new com.google.cloud.kms.v1.AsymmetricDecryptResponse(this);
514       if (bitField0_ != 0) {
515         buildPartial0(result);
516       }
517       onBuilt();
518       return result;
519     }
520 
buildPartial0(com.google.cloud.kms.v1.AsymmetricDecryptResponse result)521     private void buildPartial0(com.google.cloud.kms.v1.AsymmetricDecryptResponse result) {
522       int from_bitField0_ = bitField0_;
523       if (((from_bitField0_ & 0x00000001) != 0)) {
524         result.plaintext_ = plaintext_;
525       }
526       if (((from_bitField0_ & 0x00000002) != 0)) {
527         result.plaintextCrc32C_ =
528             plaintextCrc32CBuilder_ == null ? plaintextCrc32C_ : plaintextCrc32CBuilder_.build();
529       }
530       if (((from_bitField0_ & 0x00000004) != 0)) {
531         result.verifiedCiphertextCrc32C_ = verifiedCiphertextCrc32C_;
532       }
533       if (((from_bitField0_ & 0x00000008) != 0)) {
534         result.protectionLevel_ = protectionLevel_;
535       }
536     }
537 
538     @java.lang.Override
clone()539     public Builder clone() {
540       return super.clone();
541     }
542 
543     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)544     public Builder setField(
545         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
546       return super.setField(field, value);
547     }
548 
549     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)550     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
551       return super.clearField(field);
552     }
553 
554     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)555     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
556       return super.clearOneof(oneof);
557     }
558 
559     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)560     public Builder setRepeatedField(
561         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
562       return super.setRepeatedField(field, index, value);
563     }
564 
565     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)566     public Builder addRepeatedField(
567         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
568       return super.addRepeatedField(field, value);
569     }
570 
571     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)572     public Builder mergeFrom(com.google.protobuf.Message other) {
573       if (other instanceof com.google.cloud.kms.v1.AsymmetricDecryptResponse) {
574         return mergeFrom((com.google.cloud.kms.v1.AsymmetricDecryptResponse) other);
575       } else {
576         super.mergeFrom(other);
577         return this;
578       }
579     }
580 
mergeFrom(com.google.cloud.kms.v1.AsymmetricDecryptResponse other)581     public Builder mergeFrom(com.google.cloud.kms.v1.AsymmetricDecryptResponse other) {
582       if (other == com.google.cloud.kms.v1.AsymmetricDecryptResponse.getDefaultInstance())
583         return this;
584       if (other.getPlaintext() != com.google.protobuf.ByteString.EMPTY) {
585         setPlaintext(other.getPlaintext());
586       }
587       if (other.hasPlaintextCrc32C()) {
588         mergePlaintextCrc32C(other.getPlaintextCrc32C());
589       }
590       if (other.getVerifiedCiphertextCrc32C() != false) {
591         setVerifiedCiphertextCrc32C(other.getVerifiedCiphertextCrc32C());
592       }
593       if (other.protectionLevel_ != 0) {
594         setProtectionLevelValue(other.getProtectionLevelValue());
595       }
596       this.mergeUnknownFields(other.getUnknownFields());
597       onChanged();
598       return this;
599     }
600 
601     @java.lang.Override
isInitialized()602     public final boolean isInitialized() {
603       return true;
604     }
605 
606     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)607     public Builder mergeFrom(
608         com.google.protobuf.CodedInputStream input,
609         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
610         throws java.io.IOException {
611       if (extensionRegistry == null) {
612         throw new java.lang.NullPointerException();
613       }
614       try {
615         boolean done = false;
616         while (!done) {
617           int tag = input.readTag();
618           switch (tag) {
619             case 0:
620               done = true;
621               break;
622             case 10:
623               {
624                 plaintext_ = input.readBytes();
625                 bitField0_ |= 0x00000001;
626                 break;
627               } // case 10
628             case 18:
629               {
630                 input.readMessage(getPlaintextCrc32CFieldBuilder().getBuilder(), extensionRegistry);
631                 bitField0_ |= 0x00000002;
632                 break;
633               } // case 18
634             case 24:
635               {
636                 verifiedCiphertextCrc32C_ = input.readBool();
637                 bitField0_ |= 0x00000004;
638                 break;
639               } // case 24
640             case 32:
641               {
642                 protectionLevel_ = input.readEnum();
643                 bitField0_ |= 0x00000008;
644                 break;
645               } // case 32
646             default:
647               {
648                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
649                   done = true; // was an endgroup tag
650                 }
651                 break;
652               } // default:
653           } // switch (tag)
654         } // while (!done)
655       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
656         throw e.unwrapIOException();
657       } finally {
658         onChanged();
659       } // finally
660       return this;
661     }
662 
663     private int bitField0_;
664 
665     private com.google.protobuf.ByteString plaintext_ = com.google.protobuf.ByteString.EMPTY;
666     /**
667      *
668      *
669      * <pre>
670      * The decrypted data originally encrypted with the matching public key.
671      * </pre>
672      *
673      * <code>bytes plaintext = 1;</code>
674      *
675      * @return The plaintext.
676      */
677     @java.lang.Override
getPlaintext()678     public com.google.protobuf.ByteString getPlaintext() {
679       return plaintext_;
680     }
681     /**
682      *
683      *
684      * <pre>
685      * The decrypted data originally encrypted with the matching public key.
686      * </pre>
687      *
688      * <code>bytes plaintext = 1;</code>
689      *
690      * @param value The plaintext to set.
691      * @return This builder for chaining.
692      */
setPlaintext(com.google.protobuf.ByteString value)693     public Builder setPlaintext(com.google.protobuf.ByteString value) {
694       if (value == null) {
695         throw new NullPointerException();
696       }
697       plaintext_ = value;
698       bitField0_ |= 0x00000001;
699       onChanged();
700       return this;
701     }
702     /**
703      *
704      *
705      * <pre>
706      * The decrypted data originally encrypted with the matching public key.
707      * </pre>
708      *
709      * <code>bytes plaintext = 1;</code>
710      *
711      * @return This builder for chaining.
712      */
clearPlaintext()713     public Builder clearPlaintext() {
714       bitField0_ = (bitField0_ & ~0x00000001);
715       plaintext_ = getDefaultInstance().getPlaintext();
716       onChanged();
717       return this;
718     }
719 
720     private com.google.protobuf.Int64Value plaintextCrc32C_;
721     private com.google.protobuf.SingleFieldBuilderV3<
722             com.google.protobuf.Int64Value,
723             com.google.protobuf.Int64Value.Builder,
724             com.google.protobuf.Int64ValueOrBuilder>
725         plaintextCrc32CBuilder_;
726     /**
727      *
728      *
729      * <pre>
730      * Integrity verification field. A CRC32C checksum of the returned
731      * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext].
732      * An integrity check of
733      * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]
734      * can be performed by computing the CRC32C checksum of
735      * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]
736      * and comparing your results to this field. Discard the response in case of
737      * non-matching checksum values, and perform a limited number of retries. A
738      * persistent mismatch may indicate an issue in your computation of the CRC32C
739      * checksum. Note: This field is defined as int64 for reasons of compatibility
740      * across different languages. However, it is a non-negative integer, which
741      * will never exceed 2^32-1, and can be safely downconverted to uint32 in
742      * languages that support this type.
743      * </pre>
744      *
745      * <code>.google.protobuf.Int64Value plaintext_crc32c = 2;</code>
746      *
747      * @return Whether the plaintextCrc32c field is set.
748      */
hasPlaintextCrc32C()749     public boolean hasPlaintextCrc32C() {
750       return ((bitField0_ & 0x00000002) != 0);
751     }
752     /**
753      *
754      *
755      * <pre>
756      * Integrity verification field. A CRC32C checksum of the returned
757      * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext].
758      * An integrity check of
759      * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]
760      * can be performed by computing the CRC32C checksum of
761      * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]
762      * and comparing your results to this field. Discard the response in case of
763      * non-matching checksum values, and perform a limited number of retries. A
764      * persistent mismatch may indicate an issue in your computation of the CRC32C
765      * checksum. Note: This field is defined as int64 for reasons of compatibility
766      * across different languages. However, it is a non-negative integer, which
767      * will never exceed 2^32-1, and can be safely downconverted to uint32 in
768      * languages that support this type.
769      * </pre>
770      *
771      * <code>.google.protobuf.Int64Value plaintext_crc32c = 2;</code>
772      *
773      * @return The plaintextCrc32c.
774      */
getPlaintextCrc32C()775     public com.google.protobuf.Int64Value getPlaintextCrc32C() {
776       if (plaintextCrc32CBuilder_ == null) {
777         return plaintextCrc32C_ == null
778             ? com.google.protobuf.Int64Value.getDefaultInstance()
779             : plaintextCrc32C_;
780       } else {
781         return plaintextCrc32CBuilder_.getMessage();
782       }
783     }
784     /**
785      *
786      *
787      * <pre>
788      * Integrity verification field. A CRC32C checksum of the returned
789      * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext].
790      * An integrity check of
791      * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]
792      * can be performed by computing the CRC32C checksum of
793      * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]
794      * and comparing your results to this field. Discard the response in case of
795      * non-matching checksum values, and perform a limited number of retries. A
796      * persistent mismatch may indicate an issue in your computation of the CRC32C
797      * checksum. Note: This field is defined as int64 for reasons of compatibility
798      * across different languages. However, it is a non-negative integer, which
799      * will never exceed 2^32-1, and can be safely downconverted to uint32 in
800      * languages that support this type.
801      * </pre>
802      *
803      * <code>.google.protobuf.Int64Value plaintext_crc32c = 2;</code>
804      */
setPlaintextCrc32C(com.google.protobuf.Int64Value value)805     public Builder setPlaintextCrc32C(com.google.protobuf.Int64Value value) {
806       if (plaintextCrc32CBuilder_ == null) {
807         if (value == null) {
808           throw new NullPointerException();
809         }
810         plaintextCrc32C_ = value;
811       } else {
812         plaintextCrc32CBuilder_.setMessage(value);
813       }
814       bitField0_ |= 0x00000002;
815       onChanged();
816       return this;
817     }
818     /**
819      *
820      *
821      * <pre>
822      * Integrity verification field. A CRC32C checksum of the returned
823      * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext].
824      * An integrity check of
825      * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]
826      * can be performed by computing the CRC32C checksum of
827      * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]
828      * and comparing your results to this field. Discard the response in case of
829      * non-matching checksum values, and perform a limited number of retries. A
830      * persistent mismatch may indicate an issue in your computation of the CRC32C
831      * checksum. Note: This field is defined as int64 for reasons of compatibility
832      * across different languages. However, it is a non-negative integer, which
833      * will never exceed 2^32-1, and can be safely downconverted to uint32 in
834      * languages that support this type.
835      * </pre>
836      *
837      * <code>.google.protobuf.Int64Value plaintext_crc32c = 2;</code>
838      */
setPlaintextCrc32C(com.google.protobuf.Int64Value.Builder builderForValue)839     public Builder setPlaintextCrc32C(com.google.protobuf.Int64Value.Builder builderForValue) {
840       if (plaintextCrc32CBuilder_ == null) {
841         plaintextCrc32C_ = builderForValue.build();
842       } else {
843         plaintextCrc32CBuilder_.setMessage(builderForValue.build());
844       }
845       bitField0_ |= 0x00000002;
846       onChanged();
847       return this;
848     }
849     /**
850      *
851      *
852      * <pre>
853      * Integrity verification field. A CRC32C checksum of the returned
854      * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext].
855      * An integrity check of
856      * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]
857      * can be performed by computing the CRC32C checksum of
858      * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]
859      * and comparing your results to this field. Discard the response in case of
860      * non-matching checksum values, and perform a limited number of retries. A
861      * persistent mismatch may indicate an issue in your computation of the CRC32C
862      * checksum. Note: This field is defined as int64 for reasons of compatibility
863      * across different languages. However, it is a non-negative integer, which
864      * will never exceed 2^32-1, and can be safely downconverted to uint32 in
865      * languages that support this type.
866      * </pre>
867      *
868      * <code>.google.protobuf.Int64Value plaintext_crc32c = 2;</code>
869      */
mergePlaintextCrc32C(com.google.protobuf.Int64Value value)870     public Builder mergePlaintextCrc32C(com.google.protobuf.Int64Value value) {
871       if (plaintextCrc32CBuilder_ == null) {
872         if (((bitField0_ & 0x00000002) != 0)
873             && plaintextCrc32C_ != null
874             && plaintextCrc32C_ != com.google.protobuf.Int64Value.getDefaultInstance()) {
875           getPlaintextCrc32CBuilder().mergeFrom(value);
876         } else {
877           plaintextCrc32C_ = value;
878         }
879       } else {
880         plaintextCrc32CBuilder_.mergeFrom(value);
881       }
882       bitField0_ |= 0x00000002;
883       onChanged();
884       return this;
885     }
886     /**
887      *
888      *
889      * <pre>
890      * Integrity verification field. A CRC32C checksum of the returned
891      * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext].
892      * An integrity check of
893      * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]
894      * can be performed by computing the CRC32C checksum of
895      * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]
896      * and comparing your results to this field. Discard the response in case of
897      * non-matching checksum values, and perform a limited number of retries. A
898      * persistent mismatch may indicate an issue in your computation of the CRC32C
899      * checksum. Note: This field is defined as int64 for reasons of compatibility
900      * across different languages. However, it is a non-negative integer, which
901      * will never exceed 2^32-1, and can be safely downconverted to uint32 in
902      * languages that support this type.
903      * </pre>
904      *
905      * <code>.google.protobuf.Int64Value plaintext_crc32c = 2;</code>
906      */
clearPlaintextCrc32C()907     public Builder clearPlaintextCrc32C() {
908       bitField0_ = (bitField0_ & ~0x00000002);
909       plaintextCrc32C_ = null;
910       if (plaintextCrc32CBuilder_ != null) {
911         plaintextCrc32CBuilder_.dispose();
912         plaintextCrc32CBuilder_ = null;
913       }
914       onChanged();
915       return this;
916     }
917     /**
918      *
919      *
920      * <pre>
921      * Integrity verification field. A CRC32C checksum of the returned
922      * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext].
923      * An integrity check of
924      * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]
925      * can be performed by computing the CRC32C checksum of
926      * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]
927      * and comparing your results to this field. Discard the response in case of
928      * non-matching checksum values, and perform a limited number of retries. A
929      * persistent mismatch may indicate an issue in your computation of the CRC32C
930      * checksum. Note: This field is defined as int64 for reasons of compatibility
931      * across different languages. However, it is a non-negative integer, which
932      * will never exceed 2^32-1, and can be safely downconverted to uint32 in
933      * languages that support this type.
934      * </pre>
935      *
936      * <code>.google.protobuf.Int64Value plaintext_crc32c = 2;</code>
937      */
getPlaintextCrc32CBuilder()938     public com.google.protobuf.Int64Value.Builder getPlaintextCrc32CBuilder() {
939       bitField0_ |= 0x00000002;
940       onChanged();
941       return getPlaintextCrc32CFieldBuilder().getBuilder();
942     }
943     /**
944      *
945      *
946      * <pre>
947      * Integrity verification field. A CRC32C checksum of the returned
948      * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext].
949      * An integrity check of
950      * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]
951      * can be performed by computing the CRC32C checksum of
952      * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]
953      * and comparing your results to this field. Discard the response in case of
954      * non-matching checksum values, and perform a limited number of retries. A
955      * persistent mismatch may indicate an issue in your computation of the CRC32C
956      * checksum. Note: This field is defined as int64 for reasons of compatibility
957      * across different languages. However, it is a non-negative integer, which
958      * will never exceed 2^32-1, and can be safely downconverted to uint32 in
959      * languages that support this type.
960      * </pre>
961      *
962      * <code>.google.protobuf.Int64Value plaintext_crc32c = 2;</code>
963      */
getPlaintextCrc32COrBuilder()964     public com.google.protobuf.Int64ValueOrBuilder getPlaintextCrc32COrBuilder() {
965       if (plaintextCrc32CBuilder_ != null) {
966         return plaintextCrc32CBuilder_.getMessageOrBuilder();
967       } else {
968         return plaintextCrc32C_ == null
969             ? com.google.protobuf.Int64Value.getDefaultInstance()
970             : plaintextCrc32C_;
971       }
972     }
973     /**
974      *
975      *
976      * <pre>
977      * Integrity verification field. A CRC32C checksum of the returned
978      * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext].
979      * An integrity check of
980      * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]
981      * can be performed by computing the CRC32C checksum of
982      * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]
983      * and comparing your results to this field. Discard the response in case of
984      * non-matching checksum values, and perform a limited number of retries. A
985      * persistent mismatch may indicate an issue in your computation of the CRC32C
986      * checksum. Note: This field is defined as int64 for reasons of compatibility
987      * across different languages. However, it is a non-negative integer, which
988      * will never exceed 2^32-1, and can be safely downconverted to uint32 in
989      * languages that support this type.
990      * </pre>
991      *
992      * <code>.google.protobuf.Int64Value plaintext_crc32c = 2;</code>
993      */
994     private com.google.protobuf.SingleFieldBuilderV3<
995             com.google.protobuf.Int64Value,
996             com.google.protobuf.Int64Value.Builder,
997             com.google.protobuf.Int64ValueOrBuilder>
getPlaintextCrc32CFieldBuilder()998         getPlaintextCrc32CFieldBuilder() {
999       if (plaintextCrc32CBuilder_ == null) {
1000         plaintextCrc32CBuilder_ =
1001             new com.google.protobuf.SingleFieldBuilderV3<
1002                 com.google.protobuf.Int64Value,
1003                 com.google.protobuf.Int64Value.Builder,
1004                 com.google.protobuf.Int64ValueOrBuilder>(
1005                 getPlaintextCrc32C(), getParentForChildren(), isClean());
1006         plaintextCrc32C_ = null;
1007       }
1008       return plaintextCrc32CBuilder_;
1009     }
1010 
1011     private boolean verifiedCiphertextCrc32C_;
1012     /**
1013      *
1014      *
1015      * <pre>
1016      * Integrity verification field. A flag indicating whether
1017      * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c]
1018      * was received by
1019      * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used
1020      * for the integrity verification of the
1021      * [ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]. A
1022      * false value of this field indicates either that
1023      * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c]
1024      * was left unset or that it was not delivered to
1025      * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've
1026      * set
1027      * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c]
1028      * but this field is still false, discard the response and perform a limited
1029      * number of retries.
1030      * </pre>
1031      *
1032      * <code>bool verified_ciphertext_crc32c = 3;</code>
1033      *
1034      * @return The verifiedCiphertextCrc32c.
1035      */
1036     @java.lang.Override
getVerifiedCiphertextCrc32C()1037     public boolean getVerifiedCiphertextCrc32C() {
1038       return verifiedCiphertextCrc32C_;
1039     }
1040     /**
1041      *
1042      *
1043      * <pre>
1044      * Integrity verification field. A flag indicating whether
1045      * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c]
1046      * was received by
1047      * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used
1048      * for the integrity verification of the
1049      * [ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]. A
1050      * false value of this field indicates either that
1051      * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c]
1052      * was left unset or that it was not delivered to
1053      * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've
1054      * set
1055      * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c]
1056      * but this field is still false, discard the response and perform a limited
1057      * number of retries.
1058      * </pre>
1059      *
1060      * <code>bool verified_ciphertext_crc32c = 3;</code>
1061      *
1062      * @param value The verifiedCiphertextCrc32c to set.
1063      * @return This builder for chaining.
1064      */
setVerifiedCiphertextCrc32C(boolean value)1065     public Builder setVerifiedCiphertextCrc32C(boolean value) {
1066 
1067       verifiedCiphertextCrc32C_ = value;
1068       bitField0_ |= 0x00000004;
1069       onChanged();
1070       return this;
1071     }
1072     /**
1073      *
1074      *
1075      * <pre>
1076      * Integrity verification field. A flag indicating whether
1077      * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c]
1078      * was received by
1079      * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used
1080      * for the integrity verification of the
1081      * [ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]. A
1082      * false value of this field indicates either that
1083      * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c]
1084      * was left unset or that it was not delivered to
1085      * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've
1086      * set
1087      * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c]
1088      * but this field is still false, discard the response and perform a limited
1089      * number of retries.
1090      * </pre>
1091      *
1092      * <code>bool verified_ciphertext_crc32c = 3;</code>
1093      *
1094      * @return This builder for chaining.
1095      */
clearVerifiedCiphertextCrc32C()1096     public Builder clearVerifiedCiphertextCrc32C() {
1097       bitField0_ = (bitField0_ & ~0x00000004);
1098       verifiedCiphertextCrc32C_ = false;
1099       onChanged();
1100       return this;
1101     }
1102 
1103     private int protectionLevel_ = 0;
1104     /**
1105      *
1106      *
1107      * <pre>
1108      * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the
1109      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in
1110      * decryption.
1111      * </pre>
1112      *
1113      * <code>.google.cloud.kms.v1.ProtectionLevel protection_level = 4;</code>
1114      *
1115      * @return The enum numeric value on the wire for protectionLevel.
1116      */
1117     @java.lang.Override
getProtectionLevelValue()1118     public int getProtectionLevelValue() {
1119       return protectionLevel_;
1120     }
1121     /**
1122      *
1123      *
1124      * <pre>
1125      * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the
1126      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in
1127      * decryption.
1128      * </pre>
1129      *
1130      * <code>.google.cloud.kms.v1.ProtectionLevel protection_level = 4;</code>
1131      *
1132      * @param value The enum numeric value on the wire for protectionLevel to set.
1133      * @return This builder for chaining.
1134      */
setProtectionLevelValue(int value)1135     public Builder setProtectionLevelValue(int value) {
1136       protectionLevel_ = value;
1137       bitField0_ |= 0x00000008;
1138       onChanged();
1139       return this;
1140     }
1141     /**
1142      *
1143      *
1144      * <pre>
1145      * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the
1146      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in
1147      * decryption.
1148      * </pre>
1149      *
1150      * <code>.google.cloud.kms.v1.ProtectionLevel protection_level = 4;</code>
1151      *
1152      * @return The protectionLevel.
1153      */
1154     @java.lang.Override
getProtectionLevel()1155     public com.google.cloud.kms.v1.ProtectionLevel getProtectionLevel() {
1156       com.google.cloud.kms.v1.ProtectionLevel result =
1157           com.google.cloud.kms.v1.ProtectionLevel.forNumber(protectionLevel_);
1158       return result == null ? com.google.cloud.kms.v1.ProtectionLevel.UNRECOGNIZED : result;
1159     }
1160     /**
1161      *
1162      *
1163      * <pre>
1164      * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the
1165      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in
1166      * decryption.
1167      * </pre>
1168      *
1169      * <code>.google.cloud.kms.v1.ProtectionLevel protection_level = 4;</code>
1170      *
1171      * @param value The protectionLevel to set.
1172      * @return This builder for chaining.
1173      */
setProtectionLevel(com.google.cloud.kms.v1.ProtectionLevel value)1174     public Builder setProtectionLevel(com.google.cloud.kms.v1.ProtectionLevel value) {
1175       if (value == null) {
1176         throw new NullPointerException();
1177       }
1178       bitField0_ |= 0x00000008;
1179       protectionLevel_ = value.getNumber();
1180       onChanged();
1181       return this;
1182     }
1183     /**
1184      *
1185      *
1186      * <pre>
1187      * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the
1188      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in
1189      * decryption.
1190      * </pre>
1191      *
1192      * <code>.google.cloud.kms.v1.ProtectionLevel protection_level = 4;</code>
1193      *
1194      * @return This builder for chaining.
1195      */
clearProtectionLevel()1196     public Builder clearProtectionLevel() {
1197       bitField0_ = (bitField0_ & ~0x00000008);
1198       protectionLevel_ = 0;
1199       onChanged();
1200       return this;
1201     }
1202 
1203     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)1204     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
1205       return super.setUnknownFields(unknownFields);
1206     }
1207 
1208     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1209     public final Builder mergeUnknownFields(
1210         final com.google.protobuf.UnknownFieldSet unknownFields) {
1211       return super.mergeUnknownFields(unknownFields);
1212     }
1213 
1214     // @@protoc_insertion_point(builder_scope:google.cloud.kms.v1.AsymmetricDecryptResponse)
1215   }
1216 
1217   // @@protoc_insertion_point(class_scope:google.cloud.kms.v1.AsymmetricDecryptResponse)
1218   private static final com.google.cloud.kms.v1.AsymmetricDecryptResponse DEFAULT_INSTANCE;
1219 
1220   static {
1221     DEFAULT_INSTANCE = new com.google.cloud.kms.v1.AsymmetricDecryptResponse();
1222   }
1223 
getDefaultInstance()1224   public static com.google.cloud.kms.v1.AsymmetricDecryptResponse getDefaultInstance() {
1225     return DEFAULT_INSTANCE;
1226   }
1227 
1228   private static final com.google.protobuf.Parser<AsymmetricDecryptResponse> PARSER =
1229       new com.google.protobuf.AbstractParser<AsymmetricDecryptResponse>() {
1230         @java.lang.Override
1231         public AsymmetricDecryptResponse parsePartialFrom(
1232             com.google.protobuf.CodedInputStream input,
1233             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1234             throws com.google.protobuf.InvalidProtocolBufferException {
1235           Builder builder = newBuilder();
1236           try {
1237             builder.mergeFrom(input, extensionRegistry);
1238           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1239             throw e.setUnfinishedMessage(builder.buildPartial());
1240           } catch (com.google.protobuf.UninitializedMessageException e) {
1241             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
1242           } catch (java.io.IOException e) {
1243             throw new com.google.protobuf.InvalidProtocolBufferException(e)
1244                 .setUnfinishedMessage(builder.buildPartial());
1245           }
1246           return builder.buildPartial();
1247         }
1248       };
1249 
parser()1250   public static com.google.protobuf.Parser<AsymmetricDecryptResponse> parser() {
1251     return PARSER;
1252   }
1253 
1254   @java.lang.Override
getParserForType()1255   public com.google.protobuf.Parser<AsymmetricDecryptResponse> getParserForType() {
1256     return PARSER;
1257   }
1258 
1259   @java.lang.Override
getDefaultInstanceForType()1260   public com.google.cloud.kms.v1.AsymmetricDecryptResponse getDefaultInstanceForType() {
1261     return DEFAULT_INSTANCE;
1262   }
1263 }
1264