• 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/resources.proto
18 
19 package com.google.cloud.kms.v1;
20 
21 /**
22  *
23  *
24  * <pre>
25  * A [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] represents an
26  * individual cryptographic key, and the associated key material.
27  * An
28  * [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED]
29  * version can be used for cryptographic operations.
30  * For security reasons, the raw cryptographic key material represented by a
31  * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] can never be viewed
32  * or exported. It can only be used to encrypt, decrypt, or sign data when an
33  * authorized user or application invokes Cloud KMS.
34  * </pre>
35  *
36  * Protobuf type {@code google.cloud.kms.v1.CryptoKeyVersion}
37  */
38 public final class CryptoKeyVersion extends com.google.protobuf.GeneratedMessageV3
39     implements
40     // @@protoc_insertion_point(message_implements:google.cloud.kms.v1.CryptoKeyVersion)
41     CryptoKeyVersionOrBuilder {
42   private static final long serialVersionUID = 0L;
43   // Use CryptoKeyVersion.newBuilder() to construct.
CryptoKeyVersion(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)44   private CryptoKeyVersion(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
45     super(builder);
46   }
47 
CryptoKeyVersion()48   private CryptoKeyVersion() {
49     name_ = "";
50     state_ = 0;
51     protectionLevel_ = 0;
52     algorithm_ = 0;
53     importJob_ = "";
54     importFailureReason_ = "";
55     generationFailureReason_ = "";
56     externalDestructionFailureReason_ = "";
57   }
58 
59   @java.lang.Override
60   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)61   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
62     return new CryptoKeyVersion();
63   }
64 
65   @java.lang.Override
getUnknownFields()66   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
67     return this.unknownFields;
68   }
69 
getDescriptor()70   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
71     return com.google.cloud.kms.v1.KmsResourcesProto
72         .internal_static_google_cloud_kms_v1_CryptoKeyVersion_descriptor;
73   }
74 
75   @java.lang.Override
76   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()77       internalGetFieldAccessorTable() {
78     return com.google.cloud.kms.v1.KmsResourcesProto
79         .internal_static_google_cloud_kms_v1_CryptoKeyVersion_fieldAccessorTable
80         .ensureFieldAccessorsInitialized(
81             com.google.cloud.kms.v1.CryptoKeyVersion.class,
82             com.google.cloud.kms.v1.CryptoKeyVersion.Builder.class);
83   }
84 
85   /**
86    *
87    *
88    * <pre>
89    * The algorithm of the
90    * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion], indicating what
91    * parameters must be used for each cryptographic operation.
92    * The
93    * [GOOGLE_SYMMETRIC_ENCRYPTION][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm.GOOGLE_SYMMETRIC_ENCRYPTION]
94    * algorithm is usable with
95    * [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose]
96    * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT].
97    * Algorithms beginning with "RSA_SIGN_" are usable with
98    * [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose]
99    * [ASYMMETRIC_SIGN][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_SIGN].
100    * The fields in the name after "RSA_SIGN_" correspond to the following
101    * parameters: padding algorithm, modulus bit length, and digest algorithm.
102    * For PSS, the salt length used is equal to the length of digest
103    * algorithm. For example,
104    * [RSA_SIGN_PSS_2048_SHA256][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm.RSA_SIGN_PSS_2048_SHA256]
105    * will use PSS with a salt length of 256 bits or 32 bytes.
106    * Algorithms beginning with "RSA_DECRYPT_" are usable with
107    * [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose]
108    * [ASYMMETRIC_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_DECRYPT].
109    * The fields in the name after "RSA_DECRYPT_" correspond to the following
110    * parameters: padding algorithm, modulus bit length, and digest algorithm.
111    * Algorithms beginning with "EC_SIGN_" are usable with
112    * [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose]
113    * [ASYMMETRIC_SIGN][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_SIGN].
114    * The fields in the name after "EC_SIGN_" correspond to the following
115    * parameters: elliptic curve, digest algorithm.
116    * Algorithms beginning with "HMAC_" are usable with
117    * [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose]
118    * [MAC][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.MAC].
119    * The suffix following "HMAC_" corresponds to the hash algorithm being used
120    * (eg. SHA256).
121    * For more information, see [Key purposes and algorithms]
122    * (https://cloud.google.com/kms/docs/algorithms).
123    * </pre>
124    *
125    * Protobuf enum {@code google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm}
126    */
127   public enum CryptoKeyVersionAlgorithm implements com.google.protobuf.ProtocolMessageEnum {
128     /**
129      *
130      *
131      * <pre>
132      * Not specified.
133      * </pre>
134      *
135      * <code>CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED = 0;</code>
136      */
137     CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED(0),
138     /**
139      *
140      *
141      * <pre>
142      * Creates symmetric encryption keys.
143      * </pre>
144      *
145      * <code>GOOGLE_SYMMETRIC_ENCRYPTION = 1;</code>
146      */
147     GOOGLE_SYMMETRIC_ENCRYPTION(1),
148     /**
149      *
150      *
151      * <pre>
152      * RSASSA-PSS 2048 bit key with a SHA256 digest.
153      * </pre>
154      *
155      * <code>RSA_SIGN_PSS_2048_SHA256 = 2;</code>
156      */
157     RSA_SIGN_PSS_2048_SHA256(2),
158     /**
159      *
160      *
161      * <pre>
162      * RSASSA-PSS 3072 bit key with a SHA256 digest.
163      * </pre>
164      *
165      * <code>RSA_SIGN_PSS_3072_SHA256 = 3;</code>
166      */
167     RSA_SIGN_PSS_3072_SHA256(3),
168     /**
169      *
170      *
171      * <pre>
172      * RSASSA-PSS 4096 bit key with a SHA256 digest.
173      * </pre>
174      *
175      * <code>RSA_SIGN_PSS_4096_SHA256 = 4;</code>
176      */
177     RSA_SIGN_PSS_4096_SHA256(4),
178     /**
179      *
180      *
181      * <pre>
182      * RSASSA-PSS 4096 bit key with a SHA512 digest.
183      * </pre>
184      *
185      * <code>RSA_SIGN_PSS_4096_SHA512 = 15;</code>
186      */
187     RSA_SIGN_PSS_4096_SHA512(15),
188     /**
189      *
190      *
191      * <pre>
192      * RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest.
193      * </pre>
194      *
195      * <code>RSA_SIGN_PKCS1_2048_SHA256 = 5;</code>
196      */
197     RSA_SIGN_PKCS1_2048_SHA256(5),
198     /**
199      *
200      *
201      * <pre>
202      * RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest.
203      * </pre>
204      *
205      * <code>RSA_SIGN_PKCS1_3072_SHA256 = 6;</code>
206      */
207     RSA_SIGN_PKCS1_3072_SHA256(6),
208     /**
209      *
210      *
211      * <pre>
212      * RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest.
213      * </pre>
214      *
215      * <code>RSA_SIGN_PKCS1_4096_SHA256 = 7;</code>
216      */
217     RSA_SIGN_PKCS1_4096_SHA256(7),
218     /**
219      *
220      *
221      * <pre>
222      * RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA512 digest.
223      * </pre>
224      *
225      * <code>RSA_SIGN_PKCS1_4096_SHA512 = 16;</code>
226      */
227     RSA_SIGN_PKCS1_4096_SHA512(16),
228     /**
229      *
230      *
231      * <pre>
232      * RSASSA-PKCS1-v1_5 signing without encoding, with a 2048 bit key.
233      * </pre>
234      *
235      * <code>RSA_SIGN_RAW_PKCS1_2048 = 28;</code>
236      */
237     RSA_SIGN_RAW_PKCS1_2048(28),
238     /**
239      *
240      *
241      * <pre>
242      * RSASSA-PKCS1-v1_5 signing without encoding, with a 3072 bit key.
243      * </pre>
244      *
245      * <code>RSA_SIGN_RAW_PKCS1_3072 = 29;</code>
246      */
247     RSA_SIGN_RAW_PKCS1_3072(29),
248     /**
249      *
250      *
251      * <pre>
252      * RSASSA-PKCS1-v1_5 signing without encoding, with a 4096 bit key.
253      * </pre>
254      *
255      * <code>RSA_SIGN_RAW_PKCS1_4096 = 30;</code>
256      */
257     RSA_SIGN_RAW_PKCS1_4096(30),
258     /**
259      *
260      *
261      * <pre>
262      * RSAES-OAEP 2048 bit key with a SHA256 digest.
263      * </pre>
264      *
265      * <code>RSA_DECRYPT_OAEP_2048_SHA256 = 8;</code>
266      */
267     RSA_DECRYPT_OAEP_2048_SHA256(8),
268     /**
269      *
270      *
271      * <pre>
272      * RSAES-OAEP 3072 bit key with a SHA256 digest.
273      * </pre>
274      *
275      * <code>RSA_DECRYPT_OAEP_3072_SHA256 = 9;</code>
276      */
277     RSA_DECRYPT_OAEP_3072_SHA256(9),
278     /**
279      *
280      *
281      * <pre>
282      * RSAES-OAEP 4096 bit key with a SHA256 digest.
283      * </pre>
284      *
285      * <code>RSA_DECRYPT_OAEP_4096_SHA256 = 10;</code>
286      */
287     RSA_DECRYPT_OAEP_4096_SHA256(10),
288     /**
289      *
290      *
291      * <pre>
292      * RSAES-OAEP 4096 bit key with a SHA512 digest.
293      * </pre>
294      *
295      * <code>RSA_DECRYPT_OAEP_4096_SHA512 = 17;</code>
296      */
297     RSA_DECRYPT_OAEP_4096_SHA512(17),
298     /**
299      *
300      *
301      * <pre>
302      * RSAES-OAEP 2048 bit key with a SHA1 digest.
303      * </pre>
304      *
305      * <code>RSA_DECRYPT_OAEP_2048_SHA1 = 37;</code>
306      */
307     RSA_DECRYPT_OAEP_2048_SHA1(37),
308     /**
309      *
310      *
311      * <pre>
312      * RSAES-OAEP 3072 bit key with a SHA1 digest.
313      * </pre>
314      *
315      * <code>RSA_DECRYPT_OAEP_3072_SHA1 = 38;</code>
316      */
317     RSA_DECRYPT_OAEP_3072_SHA1(38),
318     /**
319      *
320      *
321      * <pre>
322      * RSAES-OAEP 4096 bit key with a SHA1 digest.
323      * </pre>
324      *
325      * <code>RSA_DECRYPT_OAEP_4096_SHA1 = 39;</code>
326      */
327     RSA_DECRYPT_OAEP_4096_SHA1(39),
328     /**
329      *
330      *
331      * <pre>
332      * ECDSA on the NIST P-256 curve with a SHA256 digest.
333      * Other hash functions can also be used:
334      * https://cloud.google.com/kms/docs/create-validate-signatures#ecdsa_support_for_other_hash_algorithms
335      * </pre>
336      *
337      * <code>EC_SIGN_P256_SHA256 = 12;</code>
338      */
339     EC_SIGN_P256_SHA256(12),
340     /**
341      *
342      *
343      * <pre>
344      * ECDSA on the NIST P-384 curve with a SHA384 digest.
345      * Other hash functions can also be used:
346      * https://cloud.google.com/kms/docs/create-validate-signatures#ecdsa_support_for_other_hash_algorithms
347      * </pre>
348      *
349      * <code>EC_SIGN_P384_SHA384 = 13;</code>
350      */
351     EC_SIGN_P384_SHA384(13),
352     /**
353      *
354      *
355      * <pre>
356      * ECDSA on the non-NIST secp256k1 curve. This curve is only supported for
357      * HSM protection level.
358      * Other hash functions can also be used:
359      * https://cloud.google.com/kms/docs/create-validate-signatures#ecdsa_support_for_other_hash_algorithms
360      * </pre>
361      *
362      * <code>EC_SIGN_SECP256K1_SHA256 = 31;</code>
363      */
364     EC_SIGN_SECP256K1_SHA256(31),
365     /**
366      *
367      *
368      * <pre>
369      * HMAC-SHA256 signing with a 256 bit key.
370      * </pre>
371      *
372      * <code>HMAC_SHA256 = 32;</code>
373      */
374     HMAC_SHA256(32),
375     /**
376      *
377      *
378      * <pre>
379      * HMAC-SHA1 signing with a 160 bit key.
380      * </pre>
381      *
382      * <code>HMAC_SHA1 = 33;</code>
383      */
384     HMAC_SHA1(33),
385     /**
386      *
387      *
388      * <pre>
389      * HMAC-SHA384 signing with a 384 bit key.
390      * </pre>
391      *
392      * <code>HMAC_SHA384 = 34;</code>
393      */
394     HMAC_SHA384(34),
395     /**
396      *
397      *
398      * <pre>
399      * HMAC-SHA512 signing with a 512 bit key.
400      * </pre>
401      *
402      * <code>HMAC_SHA512 = 35;</code>
403      */
404     HMAC_SHA512(35),
405     /**
406      *
407      *
408      * <pre>
409      * HMAC-SHA224 signing with a 224 bit key.
410      * </pre>
411      *
412      * <code>HMAC_SHA224 = 36;</code>
413      */
414     HMAC_SHA224(36),
415     /**
416      *
417      *
418      * <pre>
419      * Algorithm representing symmetric encryption by an external key manager.
420      * </pre>
421      *
422      * <code>EXTERNAL_SYMMETRIC_ENCRYPTION = 18;</code>
423      */
424     EXTERNAL_SYMMETRIC_ENCRYPTION(18),
425     UNRECOGNIZED(-1),
426     ;
427 
428     /**
429      *
430      *
431      * <pre>
432      * Not specified.
433      * </pre>
434      *
435      * <code>CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED = 0;</code>
436      */
437     public static final int CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED_VALUE = 0;
438     /**
439      *
440      *
441      * <pre>
442      * Creates symmetric encryption keys.
443      * </pre>
444      *
445      * <code>GOOGLE_SYMMETRIC_ENCRYPTION = 1;</code>
446      */
447     public static final int GOOGLE_SYMMETRIC_ENCRYPTION_VALUE = 1;
448     /**
449      *
450      *
451      * <pre>
452      * RSASSA-PSS 2048 bit key with a SHA256 digest.
453      * </pre>
454      *
455      * <code>RSA_SIGN_PSS_2048_SHA256 = 2;</code>
456      */
457     public static final int RSA_SIGN_PSS_2048_SHA256_VALUE = 2;
458     /**
459      *
460      *
461      * <pre>
462      * RSASSA-PSS 3072 bit key with a SHA256 digest.
463      * </pre>
464      *
465      * <code>RSA_SIGN_PSS_3072_SHA256 = 3;</code>
466      */
467     public static final int RSA_SIGN_PSS_3072_SHA256_VALUE = 3;
468     /**
469      *
470      *
471      * <pre>
472      * RSASSA-PSS 4096 bit key with a SHA256 digest.
473      * </pre>
474      *
475      * <code>RSA_SIGN_PSS_4096_SHA256 = 4;</code>
476      */
477     public static final int RSA_SIGN_PSS_4096_SHA256_VALUE = 4;
478     /**
479      *
480      *
481      * <pre>
482      * RSASSA-PSS 4096 bit key with a SHA512 digest.
483      * </pre>
484      *
485      * <code>RSA_SIGN_PSS_4096_SHA512 = 15;</code>
486      */
487     public static final int RSA_SIGN_PSS_4096_SHA512_VALUE = 15;
488     /**
489      *
490      *
491      * <pre>
492      * RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest.
493      * </pre>
494      *
495      * <code>RSA_SIGN_PKCS1_2048_SHA256 = 5;</code>
496      */
497     public static final int RSA_SIGN_PKCS1_2048_SHA256_VALUE = 5;
498     /**
499      *
500      *
501      * <pre>
502      * RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest.
503      * </pre>
504      *
505      * <code>RSA_SIGN_PKCS1_3072_SHA256 = 6;</code>
506      */
507     public static final int RSA_SIGN_PKCS1_3072_SHA256_VALUE = 6;
508     /**
509      *
510      *
511      * <pre>
512      * RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest.
513      * </pre>
514      *
515      * <code>RSA_SIGN_PKCS1_4096_SHA256 = 7;</code>
516      */
517     public static final int RSA_SIGN_PKCS1_4096_SHA256_VALUE = 7;
518     /**
519      *
520      *
521      * <pre>
522      * RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA512 digest.
523      * </pre>
524      *
525      * <code>RSA_SIGN_PKCS1_4096_SHA512 = 16;</code>
526      */
527     public static final int RSA_SIGN_PKCS1_4096_SHA512_VALUE = 16;
528     /**
529      *
530      *
531      * <pre>
532      * RSASSA-PKCS1-v1_5 signing without encoding, with a 2048 bit key.
533      * </pre>
534      *
535      * <code>RSA_SIGN_RAW_PKCS1_2048 = 28;</code>
536      */
537     public static final int RSA_SIGN_RAW_PKCS1_2048_VALUE = 28;
538     /**
539      *
540      *
541      * <pre>
542      * RSASSA-PKCS1-v1_5 signing without encoding, with a 3072 bit key.
543      * </pre>
544      *
545      * <code>RSA_SIGN_RAW_PKCS1_3072 = 29;</code>
546      */
547     public static final int RSA_SIGN_RAW_PKCS1_3072_VALUE = 29;
548     /**
549      *
550      *
551      * <pre>
552      * RSASSA-PKCS1-v1_5 signing without encoding, with a 4096 bit key.
553      * </pre>
554      *
555      * <code>RSA_SIGN_RAW_PKCS1_4096 = 30;</code>
556      */
557     public static final int RSA_SIGN_RAW_PKCS1_4096_VALUE = 30;
558     /**
559      *
560      *
561      * <pre>
562      * RSAES-OAEP 2048 bit key with a SHA256 digest.
563      * </pre>
564      *
565      * <code>RSA_DECRYPT_OAEP_2048_SHA256 = 8;</code>
566      */
567     public static final int RSA_DECRYPT_OAEP_2048_SHA256_VALUE = 8;
568     /**
569      *
570      *
571      * <pre>
572      * RSAES-OAEP 3072 bit key with a SHA256 digest.
573      * </pre>
574      *
575      * <code>RSA_DECRYPT_OAEP_3072_SHA256 = 9;</code>
576      */
577     public static final int RSA_DECRYPT_OAEP_3072_SHA256_VALUE = 9;
578     /**
579      *
580      *
581      * <pre>
582      * RSAES-OAEP 4096 bit key with a SHA256 digest.
583      * </pre>
584      *
585      * <code>RSA_DECRYPT_OAEP_4096_SHA256 = 10;</code>
586      */
587     public static final int RSA_DECRYPT_OAEP_4096_SHA256_VALUE = 10;
588     /**
589      *
590      *
591      * <pre>
592      * RSAES-OAEP 4096 bit key with a SHA512 digest.
593      * </pre>
594      *
595      * <code>RSA_DECRYPT_OAEP_4096_SHA512 = 17;</code>
596      */
597     public static final int RSA_DECRYPT_OAEP_4096_SHA512_VALUE = 17;
598     /**
599      *
600      *
601      * <pre>
602      * RSAES-OAEP 2048 bit key with a SHA1 digest.
603      * </pre>
604      *
605      * <code>RSA_DECRYPT_OAEP_2048_SHA1 = 37;</code>
606      */
607     public static final int RSA_DECRYPT_OAEP_2048_SHA1_VALUE = 37;
608     /**
609      *
610      *
611      * <pre>
612      * RSAES-OAEP 3072 bit key with a SHA1 digest.
613      * </pre>
614      *
615      * <code>RSA_DECRYPT_OAEP_3072_SHA1 = 38;</code>
616      */
617     public static final int RSA_DECRYPT_OAEP_3072_SHA1_VALUE = 38;
618     /**
619      *
620      *
621      * <pre>
622      * RSAES-OAEP 4096 bit key with a SHA1 digest.
623      * </pre>
624      *
625      * <code>RSA_DECRYPT_OAEP_4096_SHA1 = 39;</code>
626      */
627     public static final int RSA_DECRYPT_OAEP_4096_SHA1_VALUE = 39;
628     /**
629      *
630      *
631      * <pre>
632      * ECDSA on the NIST P-256 curve with a SHA256 digest.
633      * Other hash functions can also be used:
634      * https://cloud.google.com/kms/docs/create-validate-signatures#ecdsa_support_for_other_hash_algorithms
635      * </pre>
636      *
637      * <code>EC_SIGN_P256_SHA256 = 12;</code>
638      */
639     public static final int EC_SIGN_P256_SHA256_VALUE = 12;
640     /**
641      *
642      *
643      * <pre>
644      * ECDSA on the NIST P-384 curve with a SHA384 digest.
645      * Other hash functions can also be used:
646      * https://cloud.google.com/kms/docs/create-validate-signatures#ecdsa_support_for_other_hash_algorithms
647      * </pre>
648      *
649      * <code>EC_SIGN_P384_SHA384 = 13;</code>
650      */
651     public static final int EC_SIGN_P384_SHA384_VALUE = 13;
652     /**
653      *
654      *
655      * <pre>
656      * ECDSA on the non-NIST secp256k1 curve. This curve is only supported for
657      * HSM protection level.
658      * Other hash functions can also be used:
659      * https://cloud.google.com/kms/docs/create-validate-signatures#ecdsa_support_for_other_hash_algorithms
660      * </pre>
661      *
662      * <code>EC_SIGN_SECP256K1_SHA256 = 31;</code>
663      */
664     public static final int EC_SIGN_SECP256K1_SHA256_VALUE = 31;
665     /**
666      *
667      *
668      * <pre>
669      * HMAC-SHA256 signing with a 256 bit key.
670      * </pre>
671      *
672      * <code>HMAC_SHA256 = 32;</code>
673      */
674     public static final int HMAC_SHA256_VALUE = 32;
675     /**
676      *
677      *
678      * <pre>
679      * HMAC-SHA1 signing with a 160 bit key.
680      * </pre>
681      *
682      * <code>HMAC_SHA1 = 33;</code>
683      */
684     public static final int HMAC_SHA1_VALUE = 33;
685     /**
686      *
687      *
688      * <pre>
689      * HMAC-SHA384 signing with a 384 bit key.
690      * </pre>
691      *
692      * <code>HMAC_SHA384 = 34;</code>
693      */
694     public static final int HMAC_SHA384_VALUE = 34;
695     /**
696      *
697      *
698      * <pre>
699      * HMAC-SHA512 signing with a 512 bit key.
700      * </pre>
701      *
702      * <code>HMAC_SHA512 = 35;</code>
703      */
704     public static final int HMAC_SHA512_VALUE = 35;
705     /**
706      *
707      *
708      * <pre>
709      * HMAC-SHA224 signing with a 224 bit key.
710      * </pre>
711      *
712      * <code>HMAC_SHA224 = 36;</code>
713      */
714     public static final int HMAC_SHA224_VALUE = 36;
715     /**
716      *
717      *
718      * <pre>
719      * Algorithm representing symmetric encryption by an external key manager.
720      * </pre>
721      *
722      * <code>EXTERNAL_SYMMETRIC_ENCRYPTION = 18;</code>
723      */
724     public static final int EXTERNAL_SYMMETRIC_ENCRYPTION_VALUE = 18;
725 
getNumber()726     public final int getNumber() {
727       if (this == UNRECOGNIZED) {
728         throw new java.lang.IllegalArgumentException(
729             "Can't get the number of an unknown enum value.");
730       }
731       return value;
732     }
733 
734     /**
735      * @param value The numeric wire value of the corresponding enum entry.
736      * @return The enum associated with the given numeric wire value.
737      * @deprecated Use {@link #forNumber(int)} instead.
738      */
739     @java.lang.Deprecated
valueOf(int value)740     public static CryptoKeyVersionAlgorithm valueOf(int value) {
741       return forNumber(value);
742     }
743 
744     /**
745      * @param value The numeric wire value of the corresponding enum entry.
746      * @return The enum associated with the given numeric wire value.
747      */
forNumber(int value)748     public static CryptoKeyVersionAlgorithm forNumber(int value) {
749       switch (value) {
750         case 0:
751           return CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED;
752         case 1:
753           return GOOGLE_SYMMETRIC_ENCRYPTION;
754         case 2:
755           return RSA_SIGN_PSS_2048_SHA256;
756         case 3:
757           return RSA_SIGN_PSS_3072_SHA256;
758         case 4:
759           return RSA_SIGN_PSS_4096_SHA256;
760         case 15:
761           return RSA_SIGN_PSS_4096_SHA512;
762         case 5:
763           return RSA_SIGN_PKCS1_2048_SHA256;
764         case 6:
765           return RSA_SIGN_PKCS1_3072_SHA256;
766         case 7:
767           return RSA_SIGN_PKCS1_4096_SHA256;
768         case 16:
769           return RSA_SIGN_PKCS1_4096_SHA512;
770         case 28:
771           return RSA_SIGN_RAW_PKCS1_2048;
772         case 29:
773           return RSA_SIGN_RAW_PKCS1_3072;
774         case 30:
775           return RSA_SIGN_RAW_PKCS1_4096;
776         case 8:
777           return RSA_DECRYPT_OAEP_2048_SHA256;
778         case 9:
779           return RSA_DECRYPT_OAEP_3072_SHA256;
780         case 10:
781           return RSA_DECRYPT_OAEP_4096_SHA256;
782         case 17:
783           return RSA_DECRYPT_OAEP_4096_SHA512;
784         case 37:
785           return RSA_DECRYPT_OAEP_2048_SHA1;
786         case 38:
787           return RSA_DECRYPT_OAEP_3072_SHA1;
788         case 39:
789           return RSA_DECRYPT_OAEP_4096_SHA1;
790         case 12:
791           return EC_SIGN_P256_SHA256;
792         case 13:
793           return EC_SIGN_P384_SHA384;
794         case 31:
795           return EC_SIGN_SECP256K1_SHA256;
796         case 32:
797           return HMAC_SHA256;
798         case 33:
799           return HMAC_SHA1;
800         case 34:
801           return HMAC_SHA384;
802         case 35:
803           return HMAC_SHA512;
804         case 36:
805           return HMAC_SHA224;
806         case 18:
807           return EXTERNAL_SYMMETRIC_ENCRYPTION;
808         default:
809           return null;
810       }
811     }
812 
813     public static com.google.protobuf.Internal.EnumLiteMap<CryptoKeyVersionAlgorithm>
internalGetValueMap()814         internalGetValueMap() {
815       return internalValueMap;
816     }
817 
818     private static final com.google.protobuf.Internal.EnumLiteMap<CryptoKeyVersionAlgorithm>
819         internalValueMap =
820             new com.google.protobuf.Internal.EnumLiteMap<CryptoKeyVersionAlgorithm>() {
821               public CryptoKeyVersionAlgorithm findValueByNumber(int number) {
822                 return CryptoKeyVersionAlgorithm.forNumber(number);
823               }
824             };
825 
getValueDescriptor()826     public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
827       if (this == UNRECOGNIZED) {
828         throw new java.lang.IllegalStateException(
829             "Can't get the descriptor of an unrecognized enum value.");
830       }
831       return getDescriptor().getValues().get(ordinal());
832     }
833 
getDescriptorForType()834     public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
835       return getDescriptor();
836     }
837 
getDescriptor()838     public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
839       return com.google.cloud.kms.v1.CryptoKeyVersion.getDescriptor().getEnumTypes().get(0);
840     }
841 
842     private static final CryptoKeyVersionAlgorithm[] VALUES = values();
843 
valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc)844     public static CryptoKeyVersionAlgorithm valueOf(
845         com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
846       if (desc.getType() != getDescriptor()) {
847         throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
848       }
849       if (desc.getIndex() == -1) {
850         return UNRECOGNIZED;
851       }
852       return VALUES[desc.getIndex()];
853     }
854 
855     private final int value;
856 
CryptoKeyVersionAlgorithm(int value)857     private CryptoKeyVersionAlgorithm(int value) {
858       this.value = value;
859     }
860 
861     // @@protoc_insertion_point(enum_scope:google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm)
862   }
863 
864   /**
865    *
866    *
867    * <pre>
868    * The state of a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion],
869    * indicating if it can be used.
870    * </pre>
871    *
872    * Protobuf enum {@code google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState}
873    */
874   public enum CryptoKeyVersionState implements com.google.protobuf.ProtocolMessageEnum {
875     /**
876      *
877      *
878      * <pre>
879      * Not specified.
880      * </pre>
881      *
882      * <code>CRYPTO_KEY_VERSION_STATE_UNSPECIFIED = 0;</code>
883      */
884     CRYPTO_KEY_VERSION_STATE_UNSPECIFIED(0),
885     /**
886      *
887      *
888      * <pre>
889      * This version is still being generated. It may not be used, enabled,
890      * disabled, or destroyed yet. Cloud KMS will automatically mark this
891      * version
892      * [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED]
893      * as soon as the version is ready.
894      * </pre>
895      *
896      * <code>PENDING_GENERATION = 5;</code>
897      */
898     PENDING_GENERATION(5),
899     /**
900      *
901      *
902      * <pre>
903      * This version may be used for cryptographic operations.
904      * </pre>
905      *
906      * <code>ENABLED = 1;</code>
907      */
908     ENABLED(1),
909     /**
910      *
911      *
912      * <pre>
913      * This version may not be used, but the key material is still available,
914      * and the version can be placed back into the
915      * [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED]
916      * state.
917      * </pre>
918      *
919      * <code>DISABLED = 2;</code>
920      */
921     DISABLED(2),
922     /**
923      *
924      *
925      * <pre>
926      * This version is destroyed, and the key material is no longer stored.
927      * This version may only become
928      * [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED]
929      * again if this version is
930      * [reimport_eligible][google.cloud.kms.v1.CryptoKeyVersion.reimport_eligible]
931      * and the original key material is reimported with a call to
932      * [KeyManagementService.ImportCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.ImportCryptoKeyVersion].
933      * </pre>
934      *
935      * <code>DESTROYED = 3;</code>
936      */
937     DESTROYED(3),
938     /**
939      *
940      *
941      * <pre>
942      * This version is scheduled for destruction, and will be destroyed soon.
943      * Call
944      * [RestoreCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersion]
945      * to put it back into the
946      * [DISABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DISABLED]
947      * state.
948      * </pre>
949      *
950      * <code>DESTROY_SCHEDULED = 4;</code>
951      */
952     DESTROY_SCHEDULED(4),
953     /**
954      *
955      *
956      * <pre>
957      * This version is still being imported. It may not be used, enabled,
958      * disabled, or destroyed yet. Cloud KMS will automatically mark this
959      * version
960      * [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED]
961      * as soon as the version is ready.
962      * </pre>
963      *
964      * <code>PENDING_IMPORT = 6;</code>
965      */
966     PENDING_IMPORT(6),
967     /**
968      *
969      *
970      * <pre>
971      * This version was not imported successfully. It may not be used, enabled,
972      * disabled, or destroyed. The submitted key material has been discarded.
973      * Additional details can be found in
974      * [CryptoKeyVersion.import_failure_reason][google.cloud.kms.v1.CryptoKeyVersion.import_failure_reason].
975      * </pre>
976      *
977      * <code>IMPORT_FAILED = 7;</code>
978      */
979     IMPORT_FAILED(7),
980     /**
981      *
982      *
983      * <pre>
984      * This version was not generated successfully. It may not be used, enabled,
985      * disabled, or destroyed. Additional details can be found in
986      * [CryptoKeyVersion.generation_failure_reason][google.cloud.kms.v1.CryptoKeyVersion.generation_failure_reason].
987      * </pre>
988      *
989      * <code>GENERATION_FAILED = 8;</code>
990      */
991     GENERATION_FAILED(8),
992     /**
993      *
994      *
995      * <pre>
996      * This version was destroyed, and it may not be used or enabled again.
997      * Cloud KMS is waiting for the corresponding key material residing in an
998      * external key manager to be destroyed.
999      * </pre>
1000      *
1001      * <code>PENDING_EXTERNAL_DESTRUCTION = 9;</code>
1002      */
1003     PENDING_EXTERNAL_DESTRUCTION(9),
1004     /**
1005      *
1006      *
1007      * <pre>
1008      * This version was destroyed, and it may not be used or enabled again.
1009      * However, Cloud KMS could not confirm that the corresponding key material
1010      * residing in an external key manager was destroyed. Additional details can
1011      * be found in
1012      * [CryptoKeyVersion.external_destruction_failure_reason][google.cloud.kms.v1.CryptoKeyVersion.external_destruction_failure_reason].
1013      * </pre>
1014      *
1015      * <code>EXTERNAL_DESTRUCTION_FAILED = 10;</code>
1016      */
1017     EXTERNAL_DESTRUCTION_FAILED(10),
1018     UNRECOGNIZED(-1),
1019     ;
1020 
1021     /**
1022      *
1023      *
1024      * <pre>
1025      * Not specified.
1026      * </pre>
1027      *
1028      * <code>CRYPTO_KEY_VERSION_STATE_UNSPECIFIED = 0;</code>
1029      */
1030     public static final int CRYPTO_KEY_VERSION_STATE_UNSPECIFIED_VALUE = 0;
1031     /**
1032      *
1033      *
1034      * <pre>
1035      * This version is still being generated. It may not be used, enabled,
1036      * disabled, or destroyed yet. Cloud KMS will automatically mark this
1037      * version
1038      * [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED]
1039      * as soon as the version is ready.
1040      * </pre>
1041      *
1042      * <code>PENDING_GENERATION = 5;</code>
1043      */
1044     public static final int PENDING_GENERATION_VALUE = 5;
1045     /**
1046      *
1047      *
1048      * <pre>
1049      * This version may be used for cryptographic operations.
1050      * </pre>
1051      *
1052      * <code>ENABLED = 1;</code>
1053      */
1054     public static final int ENABLED_VALUE = 1;
1055     /**
1056      *
1057      *
1058      * <pre>
1059      * This version may not be used, but the key material is still available,
1060      * and the version can be placed back into the
1061      * [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED]
1062      * state.
1063      * </pre>
1064      *
1065      * <code>DISABLED = 2;</code>
1066      */
1067     public static final int DISABLED_VALUE = 2;
1068     /**
1069      *
1070      *
1071      * <pre>
1072      * This version is destroyed, and the key material is no longer stored.
1073      * This version may only become
1074      * [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED]
1075      * again if this version is
1076      * [reimport_eligible][google.cloud.kms.v1.CryptoKeyVersion.reimport_eligible]
1077      * and the original key material is reimported with a call to
1078      * [KeyManagementService.ImportCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.ImportCryptoKeyVersion].
1079      * </pre>
1080      *
1081      * <code>DESTROYED = 3;</code>
1082      */
1083     public static final int DESTROYED_VALUE = 3;
1084     /**
1085      *
1086      *
1087      * <pre>
1088      * This version is scheduled for destruction, and will be destroyed soon.
1089      * Call
1090      * [RestoreCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersion]
1091      * to put it back into the
1092      * [DISABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DISABLED]
1093      * state.
1094      * </pre>
1095      *
1096      * <code>DESTROY_SCHEDULED = 4;</code>
1097      */
1098     public static final int DESTROY_SCHEDULED_VALUE = 4;
1099     /**
1100      *
1101      *
1102      * <pre>
1103      * This version is still being imported. It may not be used, enabled,
1104      * disabled, or destroyed yet. Cloud KMS will automatically mark this
1105      * version
1106      * [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED]
1107      * as soon as the version is ready.
1108      * </pre>
1109      *
1110      * <code>PENDING_IMPORT = 6;</code>
1111      */
1112     public static final int PENDING_IMPORT_VALUE = 6;
1113     /**
1114      *
1115      *
1116      * <pre>
1117      * This version was not imported successfully. It may not be used, enabled,
1118      * disabled, or destroyed. The submitted key material has been discarded.
1119      * Additional details can be found in
1120      * [CryptoKeyVersion.import_failure_reason][google.cloud.kms.v1.CryptoKeyVersion.import_failure_reason].
1121      * </pre>
1122      *
1123      * <code>IMPORT_FAILED = 7;</code>
1124      */
1125     public static final int IMPORT_FAILED_VALUE = 7;
1126     /**
1127      *
1128      *
1129      * <pre>
1130      * This version was not generated successfully. It may not be used, enabled,
1131      * disabled, or destroyed. Additional details can be found in
1132      * [CryptoKeyVersion.generation_failure_reason][google.cloud.kms.v1.CryptoKeyVersion.generation_failure_reason].
1133      * </pre>
1134      *
1135      * <code>GENERATION_FAILED = 8;</code>
1136      */
1137     public static final int GENERATION_FAILED_VALUE = 8;
1138     /**
1139      *
1140      *
1141      * <pre>
1142      * This version was destroyed, and it may not be used or enabled again.
1143      * Cloud KMS is waiting for the corresponding key material residing in an
1144      * external key manager to be destroyed.
1145      * </pre>
1146      *
1147      * <code>PENDING_EXTERNAL_DESTRUCTION = 9;</code>
1148      */
1149     public static final int PENDING_EXTERNAL_DESTRUCTION_VALUE = 9;
1150     /**
1151      *
1152      *
1153      * <pre>
1154      * This version was destroyed, and it may not be used or enabled again.
1155      * However, Cloud KMS could not confirm that the corresponding key material
1156      * residing in an external key manager was destroyed. Additional details can
1157      * be found in
1158      * [CryptoKeyVersion.external_destruction_failure_reason][google.cloud.kms.v1.CryptoKeyVersion.external_destruction_failure_reason].
1159      * </pre>
1160      *
1161      * <code>EXTERNAL_DESTRUCTION_FAILED = 10;</code>
1162      */
1163     public static final int EXTERNAL_DESTRUCTION_FAILED_VALUE = 10;
1164 
getNumber()1165     public final int getNumber() {
1166       if (this == UNRECOGNIZED) {
1167         throw new java.lang.IllegalArgumentException(
1168             "Can't get the number of an unknown enum value.");
1169       }
1170       return value;
1171     }
1172 
1173     /**
1174      * @param value The numeric wire value of the corresponding enum entry.
1175      * @return The enum associated with the given numeric wire value.
1176      * @deprecated Use {@link #forNumber(int)} instead.
1177      */
1178     @java.lang.Deprecated
valueOf(int value)1179     public static CryptoKeyVersionState valueOf(int value) {
1180       return forNumber(value);
1181     }
1182 
1183     /**
1184      * @param value The numeric wire value of the corresponding enum entry.
1185      * @return The enum associated with the given numeric wire value.
1186      */
forNumber(int value)1187     public static CryptoKeyVersionState forNumber(int value) {
1188       switch (value) {
1189         case 0:
1190           return CRYPTO_KEY_VERSION_STATE_UNSPECIFIED;
1191         case 5:
1192           return PENDING_GENERATION;
1193         case 1:
1194           return ENABLED;
1195         case 2:
1196           return DISABLED;
1197         case 3:
1198           return DESTROYED;
1199         case 4:
1200           return DESTROY_SCHEDULED;
1201         case 6:
1202           return PENDING_IMPORT;
1203         case 7:
1204           return IMPORT_FAILED;
1205         case 8:
1206           return GENERATION_FAILED;
1207         case 9:
1208           return PENDING_EXTERNAL_DESTRUCTION;
1209         case 10:
1210           return EXTERNAL_DESTRUCTION_FAILED;
1211         default:
1212           return null;
1213       }
1214     }
1215 
1216     public static com.google.protobuf.Internal.EnumLiteMap<CryptoKeyVersionState>
internalGetValueMap()1217         internalGetValueMap() {
1218       return internalValueMap;
1219     }
1220 
1221     private static final com.google.protobuf.Internal.EnumLiteMap<CryptoKeyVersionState>
1222         internalValueMap =
1223             new com.google.protobuf.Internal.EnumLiteMap<CryptoKeyVersionState>() {
1224               public CryptoKeyVersionState findValueByNumber(int number) {
1225                 return CryptoKeyVersionState.forNumber(number);
1226               }
1227             };
1228 
getValueDescriptor()1229     public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
1230       if (this == UNRECOGNIZED) {
1231         throw new java.lang.IllegalStateException(
1232             "Can't get the descriptor of an unrecognized enum value.");
1233       }
1234       return getDescriptor().getValues().get(ordinal());
1235     }
1236 
getDescriptorForType()1237     public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
1238       return getDescriptor();
1239     }
1240 
getDescriptor()1241     public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
1242       return com.google.cloud.kms.v1.CryptoKeyVersion.getDescriptor().getEnumTypes().get(1);
1243     }
1244 
1245     private static final CryptoKeyVersionState[] VALUES = values();
1246 
valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc)1247     public static CryptoKeyVersionState valueOf(
1248         com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
1249       if (desc.getType() != getDescriptor()) {
1250         throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
1251       }
1252       if (desc.getIndex() == -1) {
1253         return UNRECOGNIZED;
1254       }
1255       return VALUES[desc.getIndex()];
1256     }
1257 
1258     private final int value;
1259 
CryptoKeyVersionState(int value)1260     private CryptoKeyVersionState(int value) {
1261       this.value = value;
1262     }
1263 
1264     // @@protoc_insertion_point(enum_scope:google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState)
1265   }
1266 
1267   /**
1268    *
1269    *
1270    * <pre>
1271    * A view for [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]s.
1272    * Controls the level of detail returned for
1273    * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] in
1274    * [KeyManagementService.ListCryptoKeyVersions][google.cloud.kms.v1.KeyManagementService.ListCryptoKeyVersions]
1275    * and
1276    * [KeyManagementService.ListCryptoKeys][google.cloud.kms.v1.KeyManagementService.ListCryptoKeys].
1277    * </pre>
1278    *
1279    * Protobuf enum {@code google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionView}
1280    */
1281   public enum CryptoKeyVersionView implements com.google.protobuf.ProtocolMessageEnum {
1282     /**
1283      *
1284      *
1285      * <pre>
1286      * Default view for each
1287      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. Does not
1288      * include the
1289      * [attestation][google.cloud.kms.v1.CryptoKeyVersion.attestation] field.
1290      * </pre>
1291      *
1292      * <code>CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED = 0;</code>
1293      */
1294     CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED(0),
1295     /**
1296      *
1297      *
1298      * <pre>
1299      * Provides all fields in each
1300      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion], including the
1301      * [attestation][google.cloud.kms.v1.CryptoKeyVersion.attestation].
1302      * </pre>
1303      *
1304      * <code>FULL = 1;</code>
1305      */
1306     FULL(1),
1307     UNRECOGNIZED(-1),
1308     ;
1309 
1310     /**
1311      *
1312      *
1313      * <pre>
1314      * Default view for each
1315      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. Does not
1316      * include the
1317      * [attestation][google.cloud.kms.v1.CryptoKeyVersion.attestation] field.
1318      * </pre>
1319      *
1320      * <code>CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED = 0;</code>
1321      */
1322     public static final int CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED_VALUE = 0;
1323     /**
1324      *
1325      *
1326      * <pre>
1327      * Provides all fields in each
1328      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion], including the
1329      * [attestation][google.cloud.kms.v1.CryptoKeyVersion.attestation].
1330      * </pre>
1331      *
1332      * <code>FULL = 1;</code>
1333      */
1334     public static final int FULL_VALUE = 1;
1335 
getNumber()1336     public final int getNumber() {
1337       if (this == UNRECOGNIZED) {
1338         throw new java.lang.IllegalArgumentException(
1339             "Can't get the number of an unknown enum value.");
1340       }
1341       return value;
1342     }
1343 
1344     /**
1345      * @param value The numeric wire value of the corresponding enum entry.
1346      * @return The enum associated with the given numeric wire value.
1347      * @deprecated Use {@link #forNumber(int)} instead.
1348      */
1349     @java.lang.Deprecated
valueOf(int value)1350     public static CryptoKeyVersionView valueOf(int value) {
1351       return forNumber(value);
1352     }
1353 
1354     /**
1355      * @param value The numeric wire value of the corresponding enum entry.
1356      * @return The enum associated with the given numeric wire value.
1357      */
forNumber(int value)1358     public static CryptoKeyVersionView forNumber(int value) {
1359       switch (value) {
1360         case 0:
1361           return CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED;
1362         case 1:
1363           return FULL;
1364         default:
1365           return null;
1366       }
1367     }
1368 
1369     public static com.google.protobuf.Internal.EnumLiteMap<CryptoKeyVersionView>
internalGetValueMap()1370         internalGetValueMap() {
1371       return internalValueMap;
1372     }
1373 
1374     private static final com.google.protobuf.Internal.EnumLiteMap<CryptoKeyVersionView>
1375         internalValueMap =
1376             new com.google.protobuf.Internal.EnumLiteMap<CryptoKeyVersionView>() {
1377               public CryptoKeyVersionView findValueByNumber(int number) {
1378                 return CryptoKeyVersionView.forNumber(number);
1379               }
1380             };
1381 
getValueDescriptor()1382     public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
1383       if (this == UNRECOGNIZED) {
1384         throw new java.lang.IllegalStateException(
1385             "Can't get the descriptor of an unrecognized enum value.");
1386       }
1387       return getDescriptor().getValues().get(ordinal());
1388     }
1389 
getDescriptorForType()1390     public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
1391       return getDescriptor();
1392     }
1393 
getDescriptor()1394     public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
1395       return com.google.cloud.kms.v1.CryptoKeyVersion.getDescriptor().getEnumTypes().get(2);
1396     }
1397 
1398     private static final CryptoKeyVersionView[] VALUES = values();
1399 
valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc)1400     public static CryptoKeyVersionView valueOf(
1401         com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
1402       if (desc.getType() != getDescriptor()) {
1403         throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
1404       }
1405       if (desc.getIndex() == -1) {
1406         return UNRECOGNIZED;
1407       }
1408       return VALUES[desc.getIndex()];
1409     }
1410 
1411     private final int value;
1412 
CryptoKeyVersionView(int value)1413     private CryptoKeyVersionView(int value) {
1414       this.value = value;
1415     }
1416 
1417     // @@protoc_insertion_point(enum_scope:google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionView)
1418   }
1419 
1420   public static final int NAME_FIELD_NUMBER = 1;
1421 
1422   @SuppressWarnings("serial")
1423   private volatile java.lang.Object name_ = "";
1424   /**
1425    *
1426    *
1427    * <pre>
1428    * Output only. The resource name for this
1429    * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in the format
1430    * `projects/&#42;&#47;locations/&#42;&#47;keyRings/&#42;&#47;cryptoKeys/&#42;&#47;cryptoKeyVersions/&#42;`.
1431    * </pre>
1432    *
1433    * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1434    *
1435    * @return The name.
1436    */
1437   @java.lang.Override
getName()1438   public java.lang.String getName() {
1439     java.lang.Object ref = name_;
1440     if (ref instanceof java.lang.String) {
1441       return (java.lang.String) ref;
1442     } else {
1443       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1444       java.lang.String s = bs.toStringUtf8();
1445       name_ = s;
1446       return s;
1447     }
1448   }
1449   /**
1450    *
1451    *
1452    * <pre>
1453    * Output only. The resource name for this
1454    * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in the format
1455    * `projects/&#42;&#47;locations/&#42;&#47;keyRings/&#42;&#47;cryptoKeys/&#42;&#47;cryptoKeyVersions/&#42;`.
1456    * </pre>
1457    *
1458    * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1459    *
1460    * @return The bytes for name.
1461    */
1462   @java.lang.Override
getNameBytes()1463   public com.google.protobuf.ByteString getNameBytes() {
1464     java.lang.Object ref = name_;
1465     if (ref instanceof java.lang.String) {
1466       com.google.protobuf.ByteString b =
1467           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1468       name_ = b;
1469       return b;
1470     } else {
1471       return (com.google.protobuf.ByteString) ref;
1472     }
1473   }
1474 
1475   public static final int STATE_FIELD_NUMBER = 3;
1476   private int state_ = 0;
1477   /**
1478    *
1479    *
1480    * <pre>
1481    * The current state of the
1482    * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion].
1483    * </pre>
1484    *
1485    * <code>.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState state = 3;</code>
1486    *
1487    * @return The enum numeric value on the wire for state.
1488    */
1489   @java.lang.Override
getStateValue()1490   public int getStateValue() {
1491     return state_;
1492   }
1493   /**
1494    *
1495    *
1496    * <pre>
1497    * The current state of the
1498    * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion].
1499    * </pre>
1500    *
1501    * <code>.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState state = 3;</code>
1502    *
1503    * @return The state.
1504    */
1505   @java.lang.Override
getState()1506   public com.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState getState() {
1507     com.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState result =
1508         com.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.forNumber(state_);
1509     return result == null
1510         ? com.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.UNRECOGNIZED
1511         : result;
1512   }
1513 
1514   public static final int PROTECTION_LEVEL_FIELD_NUMBER = 7;
1515   private int protectionLevel_ = 0;
1516   /**
1517    *
1518    *
1519    * <pre>
1520    * Output only. The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel]
1521    * describing how crypto operations are performed with this
1522    * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion].
1523    * </pre>
1524    *
1525    * <code>
1526    * .google.cloud.kms.v1.ProtectionLevel protection_level = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
1527    * </code>
1528    *
1529    * @return The enum numeric value on the wire for protectionLevel.
1530    */
1531   @java.lang.Override
getProtectionLevelValue()1532   public int getProtectionLevelValue() {
1533     return protectionLevel_;
1534   }
1535   /**
1536    *
1537    *
1538    * <pre>
1539    * Output only. The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel]
1540    * describing how crypto operations are performed with this
1541    * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion].
1542    * </pre>
1543    *
1544    * <code>
1545    * .google.cloud.kms.v1.ProtectionLevel protection_level = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
1546    * </code>
1547    *
1548    * @return The protectionLevel.
1549    */
1550   @java.lang.Override
getProtectionLevel()1551   public com.google.cloud.kms.v1.ProtectionLevel getProtectionLevel() {
1552     com.google.cloud.kms.v1.ProtectionLevel result =
1553         com.google.cloud.kms.v1.ProtectionLevel.forNumber(protectionLevel_);
1554     return result == null ? com.google.cloud.kms.v1.ProtectionLevel.UNRECOGNIZED : result;
1555   }
1556 
1557   public static final int ALGORITHM_FIELD_NUMBER = 10;
1558   private int algorithm_ = 0;
1559   /**
1560    *
1561    *
1562    * <pre>
1563    * Output only. The
1564    * [CryptoKeyVersionAlgorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm]
1565    * that this [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]
1566    * supports.
1567    * </pre>
1568    *
1569    * <code>
1570    * .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
1571    * </code>
1572    *
1573    * @return The enum numeric value on the wire for algorithm.
1574    */
1575   @java.lang.Override
getAlgorithmValue()1576   public int getAlgorithmValue() {
1577     return algorithm_;
1578   }
1579   /**
1580    *
1581    *
1582    * <pre>
1583    * Output only. The
1584    * [CryptoKeyVersionAlgorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm]
1585    * that this [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]
1586    * supports.
1587    * </pre>
1588    *
1589    * <code>
1590    * .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
1591    * </code>
1592    *
1593    * @return The algorithm.
1594    */
1595   @java.lang.Override
getAlgorithm()1596   public com.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm getAlgorithm() {
1597     com.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm result =
1598         com.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm.forNumber(algorithm_);
1599     return result == null
1600         ? com.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm.UNRECOGNIZED
1601         : result;
1602   }
1603 
1604   public static final int ATTESTATION_FIELD_NUMBER = 8;
1605   private com.google.cloud.kms.v1.KeyOperationAttestation attestation_;
1606   /**
1607    *
1608    *
1609    * <pre>
1610    * Output only. Statement that was generated and signed by the HSM at key
1611    * creation time. Use this statement to verify attributes of the key as stored
1612    * on the HSM, independently of Google. Only provided for key versions with
1613    * [protection_level][google.cloud.kms.v1.CryptoKeyVersion.protection_level]
1614    * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM].
1615    * </pre>
1616    *
1617    * <code>
1618    * .google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
1619    * </code>
1620    *
1621    * @return Whether the attestation field is set.
1622    */
1623   @java.lang.Override
hasAttestation()1624   public boolean hasAttestation() {
1625     return attestation_ != null;
1626   }
1627   /**
1628    *
1629    *
1630    * <pre>
1631    * Output only. Statement that was generated and signed by the HSM at key
1632    * creation time. Use this statement to verify attributes of the key as stored
1633    * on the HSM, independently of Google. Only provided for key versions with
1634    * [protection_level][google.cloud.kms.v1.CryptoKeyVersion.protection_level]
1635    * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM].
1636    * </pre>
1637    *
1638    * <code>
1639    * .google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
1640    * </code>
1641    *
1642    * @return The attestation.
1643    */
1644   @java.lang.Override
getAttestation()1645   public com.google.cloud.kms.v1.KeyOperationAttestation getAttestation() {
1646     return attestation_ == null
1647         ? com.google.cloud.kms.v1.KeyOperationAttestation.getDefaultInstance()
1648         : attestation_;
1649   }
1650   /**
1651    *
1652    *
1653    * <pre>
1654    * Output only. Statement that was generated and signed by the HSM at key
1655    * creation time. Use this statement to verify attributes of the key as stored
1656    * on the HSM, independently of Google. Only provided for key versions with
1657    * [protection_level][google.cloud.kms.v1.CryptoKeyVersion.protection_level]
1658    * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM].
1659    * </pre>
1660    *
1661    * <code>
1662    * .google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
1663    * </code>
1664    */
1665   @java.lang.Override
getAttestationOrBuilder()1666   public com.google.cloud.kms.v1.KeyOperationAttestationOrBuilder getAttestationOrBuilder() {
1667     return attestation_ == null
1668         ? com.google.cloud.kms.v1.KeyOperationAttestation.getDefaultInstance()
1669         : attestation_;
1670   }
1671 
1672   public static final int CREATE_TIME_FIELD_NUMBER = 4;
1673   private com.google.protobuf.Timestamp createTime_;
1674   /**
1675    *
1676    *
1677    * <pre>
1678    * Output only. The time at which this
1679    * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] was created.
1680    * </pre>
1681    *
1682    * <code>.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
1683    * </code>
1684    *
1685    * @return Whether the createTime field is set.
1686    */
1687   @java.lang.Override
hasCreateTime()1688   public boolean hasCreateTime() {
1689     return createTime_ != null;
1690   }
1691   /**
1692    *
1693    *
1694    * <pre>
1695    * Output only. The time at which this
1696    * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] was created.
1697    * </pre>
1698    *
1699    * <code>.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
1700    * </code>
1701    *
1702    * @return The createTime.
1703    */
1704   @java.lang.Override
getCreateTime()1705   public com.google.protobuf.Timestamp getCreateTime() {
1706     return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;
1707   }
1708   /**
1709    *
1710    *
1711    * <pre>
1712    * Output only. The time at which this
1713    * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] was created.
1714    * </pre>
1715    *
1716    * <code>.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
1717    * </code>
1718    */
1719   @java.lang.Override
getCreateTimeOrBuilder()1720   public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() {
1721     return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;
1722   }
1723 
1724   public static final int GENERATE_TIME_FIELD_NUMBER = 11;
1725   private com.google.protobuf.Timestamp generateTime_;
1726   /**
1727    *
1728    *
1729    * <pre>
1730    * Output only. The time this
1731    * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was
1732    * generated.
1733    * </pre>
1734    *
1735    * <code>
1736    * .google.protobuf.Timestamp generate_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
1737    * </code>
1738    *
1739    * @return Whether the generateTime field is set.
1740    */
1741   @java.lang.Override
hasGenerateTime()1742   public boolean hasGenerateTime() {
1743     return generateTime_ != null;
1744   }
1745   /**
1746    *
1747    *
1748    * <pre>
1749    * Output only. The time this
1750    * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was
1751    * generated.
1752    * </pre>
1753    *
1754    * <code>
1755    * .google.protobuf.Timestamp generate_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
1756    * </code>
1757    *
1758    * @return The generateTime.
1759    */
1760   @java.lang.Override
getGenerateTime()1761   public com.google.protobuf.Timestamp getGenerateTime() {
1762     return generateTime_ == null
1763         ? com.google.protobuf.Timestamp.getDefaultInstance()
1764         : generateTime_;
1765   }
1766   /**
1767    *
1768    *
1769    * <pre>
1770    * Output only. The time this
1771    * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was
1772    * generated.
1773    * </pre>
1774    *
1775    * <code>
1776    * .google.protobuf.Timestamp generate_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
1777    * </code>
1778    */
1779   @java.lang.Override
getGenerateTimeOrBuilder()1780   public com.google.protobuf.TimestampOrBuilder getGenerateTimeOrBuilder() {
1781     return generateTime_ == null
1782         ? com.google.protobuf.Timestamp.getDefaultInstance()
1783         : generateTime_;
1784   }
1785 
1786   public static final int DESTROY_TIME_FIELD_NUMBER = 5;
1787   private com.google.protobuf.Timestamp destroyTime_;
1788   /**
1789    *
1790    *
1791    * <pre>
1792    * Output only. The time this
1793    * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material is
1794    * scheduled for destruction. Only present if
1795    * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is
1796    * [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED].
1797    * </pre>
1798    *
1799    * <code>.google.protobuf.Timestamp destroy_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
1800    * </code>
1801    *
1802    * @return Whether the destroyTime field is set.
1803    */
1804   @java.lang.Override
hasDestroyTime()1805   public boolean hasDestroyTime() {
1806     return destroyTime_ != null;
1807   }
1808   /**
1809    *
1810    *
1811    * <pre>
1812    * Output only. The time this
1813    * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material is
1814    * scheduled for destruction. Only present if
1815    * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is
1816    * [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED].
1817    * </pre>
1818    *
1819    * <code>.google.protobuf.Timestamp destroy_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
1820    * </code>
1821    *
1822    * @return The destroyTime.
1823    */
1824   @java.lang.Override
getDestroyTime()1825   public com.google.protobuf.Timestamp getDestroyTime() {
1826     return destroyTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : destroyTime_;
1827   }
1828   /**
1829    *
1830    *
1831    * <pre>
1832    * Output only. The time this
1833    * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material is
1834    * scheduled for destruction. Only present if
1835    * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is
1836    * [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED].
1837    * </pre>
1838    *
1839    * <code>.google.protobuf.Timestamp destroy_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
1840    * </code>
1841    */
1842   @java.lang.Override
getDestroyTimeOrBuilder()1843   public com.google.protobuf.TimestampOrBuilder getDestroyTimeOrBuilder() {
1844     return destroyTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : destroyTime_;
1845   }
1846 
1847   public static final int DESTROY_EVENT_TIME_FIELD_NUMBER = 6;
1848   private com.google.protobuf.Timestamp destroyEventTime_;
1849   /**
1850    *
1851    *
1852    * <pre>
1853    * Output only. The time this CryptoKeyVersion's key material was
1854    * destroyed. Only present if
1855    * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is
1856    * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED].
1857    * </pre>
1858    *
1859    * <code>
1860    * .google.protobuf.Timestamp destroy_event_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
1861    * </code>
1862    *
1863    * @return Whether the destroyEventTime field is set.
1864    */
1865   @java.lang.Override
hasDestroyEventTime()1866   public boolean hasDestroyEventTime() {
1867     return destroyEventTime_ != null;
1868   }
1869   /**
1870    *
1871    *
1872    * <pre>
1873    * Output only. The time this CryptoKeyVersion's key material was
1874    * destroyed. Only present if
1875    * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is
1876    * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED].
1877    * </pre>
1878    *
1879    * <code>
1880    * .google.protobuf.Timestamp destroy_event_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
1881    * </code>
1882    *
1883    * @return The destroyEventTime.
1884    */
1885   @java.lang.Override
getDestroyEventTime()1886   public com.google.protobuf.Timestamp getDestroyEventTime() {
1887     return destroyEventTime_ == null
1888         ? com.google.protobuf.Timestamp.getDefaultInstance()
1889         : destroyEventTime_;
1890   }
1891   /**
1892    *
1893    *
1894    * <pre>
1895    * Output only. The time this CryptoKeyVersion's key material was
1896    * destroyed. Only present if
1897    * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is
1898    * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED].
1899    * </pre>
1900    *
1901    * <code>
1902    * .google.protobuf.Timestamp destroy_event_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
1903    * </code>
1904    */
1905   @java.lang.Override
getDestroyEventTimeOrBuilder()1906   public com.google.protobuf.TimestampOrBuilder getDestroyEventTimeOrBuilder() {
1907     return destroyEventTime_ == null
1908         ? com.google.protobuf.Timestamp.getDefaultInstance()
1909         : destroyEventTime_;
1910   }
1911 
1912   public static final int IMPORT_JOB_FIELD_NUMBER = 14;
1913 
1914   @SuppressWarnings("serial")
1915   private volatile java.lang.Object importJob_ = "";
1916   /**
1917    *
1918    *
1919    * <pre>
1920    * Output only. The name of the [ImportJob][google.cloud.kms.v1.ImportJob]
1921    * used in the most recent import of this
1922    * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. Only present if
1923    * the underlying key material was imported.
1924    * </pre>
1925    *
1926    * <code>string import_job = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1927    *
1928    * @return The importJob.
1929    */
1930   @java.lang.Override
getImportJob()1931   public java.lang.String getImportJob() {
1932     java.lang.Object ref = importJob_;
1933     if (ref instanceof java.lang.String) {
1934       return (java.lang.String) ref;
1935     } else {
1936       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1937       java.lang.String s = bs.toStringUtf8();
1938       importJob_ = s;
1939       return s;
1940     }
1941   }
1942   /**
1943    *
1944    *
1945    * <pre>
1946    * Output only. The name of the [ImportJob][google.cloud.kms.v1.ImportJob]
1947    * used in the most recent import of this
1948    * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. Only present if
1949    * the underlying key material was imported.
1950    * </pre>
1951    *
1952    * <code>string import_job = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1953    *
1954    * @return The bytes for importJob.
1955    */
1956   @java.lang.Override
getImportJobBytes()1957   public com.google.protobuf.ByteString getImportJobBytes() {
1958     java.lang.Object ref = importJob_;
1959     if (ref instanceof java.lang.String) {
1960       com.google.protobuf.ByteString b =
1961           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1962       importJob_ = b;
1963       return b;
1964     } else {
1965       return (com.google.protobuf.ByteString) ref;
1966     }
1967   }
1968 
1969   public static final int IMPORT_TIME_FIELD_NUMBER = 15;
1970   private com.google.protobuf.Timestamp importTime_;
1971   /**
1972    *
1973    *
1974    * <pre>
1975    * Output only. The time at which this
1976    * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was
1977    * most recently imported.
1978    * </pre>
1979    *
1980    * <code>.google.protobuf.Timestamp import_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
1981    * </code>
1982    *
1983    * @return Whether the importTime field is set.
1984    */
1985   @java.lang.Override
hasImportTime()1986   public boolean hasImportTime() {
1987     return importTime_ != null;
1988   }
1989   /**
1990    *
1991    *
1992    * <pre>
1993    * Output only. The time at which this
1994    * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was
1995    * most recently imported.
1996    * </pre>
1997    *
1998    * <code>.google.protobuf.Timestamp import_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
1999    * </code>
2000    *
2001    * @return The importTime.
2002    */
2003   @java.lang.Override
getImportTime()2004   public com.google.protobuf.Timestamp getImportTime() {
2005     return importTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : importTime_;
2006   }
2007   /**
2008    *
2009    *
2010    * <pre>
2011    * Output only. The time at which this
2012    * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was
2013    * most recently imported.
2014    * </pre>
2015    *
2016    * <code>.google.protobuf.Timestamp import_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
2017    * </code>
2018    */
2019   @java.lang.Override
getImportTimeOrBuilder()2020   public com.google.protobuf.TimestampOrBuilder getImportTimeOrBuilder() {
2021     return importTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : importTime_;
2022   }
2023 
2024   public static final int IMPORT_FAILURE_REASON_FIELD_NUMBER = 16;
2025 
2026   @SuppressWarnings("serial")
2027   private volatile java.lang.Object importFailureReason_ = "";
2028   /**
2029    *
2030    *
2031    * <pre>
2032    * Output only. The root cause of the most recent import failure. Only present
2033    * if [state][google.cloud.kms.v1.CryptoKeyVersion.state] is
2034    * [IMPORT_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.IMPORT_FAILED].
2035    * </pre>
2036    *
2037    * <code>string import_failure_reason = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
2038    *
2039    * @return The importFailureReason.
2040    */
2041   @java.lang.Override
getImportFailureReason()2042   public java.lang.String getImportFailureReason() {
2043     java.lang.Object ref = importFailureReason_;
2044     if (ref instanceof java.lang.String) {
2045       return (java.lang.String) ref;
2046     } else {
2047       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
2048       java.lang.String s = bs.toStringUtf8();
2049       importFailureReason_ = s;
2050       return s;
2051     }
2052   }
2053   /**
2054    *
2055    *
2056    * <pre>
2057    * Output only. The root cause of the most recent import failure. Only present
2058    * if [state][google.cloud.kms.v1.CryptoKeyVersion.state] is
2059    * [IMPORT_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.IMPORT_FAILED].
2060    * </pre>
2061    *
2062    * <code>string import_failure_reason = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
2063    *
2064    * @return The bytes for importFailureReason.
2065    */
2066   @java.lang.Override
getImportFailureReasonBytes()2067   public com.google.protobuf.ByteString getImportFailureReasonBytes() {
2068     java.lang.Object ref = importFailureReason_;
2069     if (ref instanceof java.lang.String) {
2070       com.google.protobuf.ByteString b =
2071           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
2072       importFailureReason_ = b;
2073       return b;
2074     } else {
2075       return (com.google.protobuf.ByteString) ref;
2076     }
2077   }
2078 
2079   public static final int GENERATION_FAILURE_REASON_FIELD_NUMBER = 19;
2080 
2081   @SuppressWarnings("serial")
2082   private volatile java.lang.Object generationFailureReason_ = "";
2083   /**
2084    *
2085    *
2086    * <pre>
2087    * Output only. The root cause of the most recent generation failure. Only
2088    * present if [state][google.cloud.kms.v1.CryptoKeyVersion.state] is
2089    * [GENERATION_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.GENERATION_FAILED].
2090    * </pre>
2091    *
2092    * <code>string generation_failure_reason = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];
2093    * </code>
2094    *
2095    * @return The generationFailureReason.
2096    */
2097   @java.lang.Override
getGenerationFailureReason()2098   public java.lang.String getGenerationFailureReason() {
2099     java.lang.Object ref = generationFailureReason_;
2100     if (ref instanceof java.lang.String) {
2101       return (java.lang.String) ref;
2102     } else {
2103       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
2104       java.lang.String s = bs.toStringUtf8();
2105       generationFailureReason_ = s;
2106       return s;
2107     }
2108   }
2109   /**
2110    *
2111    *
2112    * <pre>
2113    * Output only. The root cause of the most recent generation failure. Only
2114    * present if [state][google.cloud.kms.v1.CryptoKeyVersion.state] is
2115    * [GENERATION_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.GENERATION_FAILED].
2116    * </pre>
2117    *
2118    * <code>string generation_failure_reason = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];
2119    * </code>
2120    *
2121    * @return The bytes for generationFailureReason.
2122    */
2123   @java.lang.Override
getGenerationFailureReasonBytes()2124   public com.google.protobuf.ByteString getGenerationFailureReasonBytes() {
2125     java.lang.Object ref = generationFailureReason_;
2126     if (ref instanceof java.lang.String) {
2127       com.google.protobuf.ByteString b =
2128           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
2129       generationFailureReason_ = b;
2130       return b;
2131     } else {
2132       return (com.google.protobuf.ByteString) ref;
2133     }
2134   }
2135 
2136   public static final int EXTERNAL_DESTRUCTION_FAILURE_REASON_FIELD_NUMBER = 20;
2137 
2138   @SuppressWarnings("serial")
2139   private volatile java.lang.Object externalDestructionFailureReason_ = "";
2140   /**
2141    *
2142    *
2143    * <pre>
2144    * Output only. The root cause of the most recent external destruction
2145    * failure. Only present if
2146    * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is
2147    * [EXTERNAL_DESTRUCTION_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.EXTERNAL_DESTRUCTION_FAILED].
2148    * </pre>
2149    *
2150    * <code>
2151    * string external_destruction_failure_reason = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];
2152    * </code>
2153    *
2154    * @return The externalDestructionFailureReason.
2155    */
2156   @java.lang.Override
getExternalDestructionFailureReason()2157   public java.lang.String getExternalDestructionFailureReason() {
2158     java.lang.Object ref = externalDestructionFailureReason_;
2159     if (ref instanceof java.lang.String) {
2160       return (java.lang.String) ref;
2161     } else {
2162       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
2163       java.lang.String s = bs.toStringUtf8();
2164       externalDestructionFailureReason_ = s;
2165       return s;
2166     }
2167   }
2168   /**
2169    *
2170    *
2171    * <pre>
2172    * Output only. The root cause of the most recent external destruction
2173    * failure. Only present if
2174    * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is
2175    * [EXTERNAL_DESTRUCTION_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.EXTERNAL_DESTRUCTION_FAILED].
2176    * </pre>
2177    *
2178    * <code>
2179    * string external_destruction_failure_reason = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];
2180    * </code>
2181    *
2182    * @return The bytes for externalDestructionFailureReason.
2183    */
2184   @java.lang.Override
getExternalDestructionFailureReasonBytes()2185   public com.google.protobuf.ByteString getExternalDestructionFailureReasonBytes() {
2186     java.lang.Object ref = externalDestructionFailureReason_;
2187     if (ref instanceof java.lang.String) {
2188       com.google.protobuf.ByteString b =
2189           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
2190       externalDestructionFailureReason_ = b;
2191       return b;
2192     } else {
2193       return (com.google.protobuf.ByteString) ref;
2194     }
2195   }
2196 
2197   public static final int EXTERNAL_PROTECTION_LEVEL_OPTIONS_FIELD_NUMBER = 17;
2198   private com.google.cloud.kms.v1.ExternalProtectionLevelOptions externalProtectionLevelOptions_;
2199   /**
2200    *
2201    *
2202    * <pre>
2203    * ExternalProtectionLevelOptions stores a group of additional fields for
2204    * configuring a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that
2205    * are specific to the
2206    * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] protection level
2207    * and [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC]
2208    * protection levels.
2209    * </pre>
2210    *
2211    * <code>
2212    * .google.cloud.kms.v1.ExternalProtectionLevelOptions external_protection_level_options = 17;
2213    * </code>
2214    *
2215    * @return Whether the externalProtectionLevelOptions field is set.
2216    */
2217   @java.lang.Override
hasExternalProtectionLevelOptions()2218   public boolean hasExternalProtectionLevelOptions() {
2219     return externalProtectionLevelOptions_ != null;
2220   }
2221   /**
2222    *
2223    *
2224    * <pre>
2225    * ExternalProtectionLevelOptions stores a group of additional fields for
2226    * configuring a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that
2227    * are specific to the
2228    * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] protection level
2229    * and [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC]
2230    * protection levels.
2231    * </pre>
2232    *
2233    * <code>
2234    * .google.cloud.kms.v1.ExternalProtectionLevelOptions external_protection_level_options = 17;
2235    * </code>
2236    *
2237    * @return The externalProtectionLevelOptions.
2238    */
2239   @java.lang.Override
2240   public com.google.cloud.kms.v1.ExternalProtectionLevelOptions
getExternalProtectionLevelOptions()2241       getExternalProtectionLevelOptions() {
2242     return externalProtectionLevelOptions_ == null
2243         ? com.google.cloud.kms.v1.ExternalProtectionLevelOptions.getDefaultInstance()
2244         : externalProtectionLevelOptions_;
2245   }
2246   /**
2247    *
2248    *
2249    * <pre>
2250    * ExternalProtectionLevelOptions stores a group of additional fields for
2251    * configuring a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that
2252    * are specific to the
2253    * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] protection level
2254    * and [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC]
2255    * protection levels.
2256    * </pre>
2257    *
2258    * <code>
2259    * .google.cloud.kms.v1.ExternalProtectionLevelOptions external_protection_level_options = 17;
2260    * </code>
2261    */
2262   @java.lang.Override
2263   public com.google.cloud.kms.v1.ExternalProtectionLevelOptionsOrBuilder
getExternalProtectionLevelOptionsOrBuilder()2264       getExternalProtectionLevelOptionsOrBuilder() {
2265     return externalProtectionLevelOptions_ == null
2266         ? com.google.cloud.kms.v1.ExternalProtectionLevelOptions.getDefaultInstance()
2267         : externalProtectionLevelOptions_;
2268   }
2269 
2270   public static final int REIMPORT_ELIGIBLE_FIELD_NUMBER = 18;
2271   private boolean reimportEligible_ = false;
2272   /**
2273    *
2274    *
2275    * <pre>
2276    * Output only. Whether or not this key version is eligible for reimport, by
2277    * being specified as a target in
2278    * [ImportCryptoKeyVersionRequest.crypto_key_version][google.cloud.kms.v1.ImportCryptoKeyVersionRequest.crypto_key_version].
2279    * </pre>
2280    *
2281    * <code>bool reimport_eligible = 18 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
2282    *
2283    * @return The reimportEligible.
2284    */
2285   @java.lang.Override
getReimportEligible()2286   public boolean getReimportEligible() {
2287     return reimportEligible_;
2288   }
2289 
2290   private byte memoizedIsInitialized = -1;
2291 
2292   @java.lang.Override
isInitialized()2293   public final boolean isInitialized() {
2294     byte isInitialized = memoizedIsInitialized;
2295     if (isInitialized == 1) return true;
2296     if (isInitialized == 0) return false;
2297 
2298     memoizedIsInitialized = 1;
2299     return true;
2300   }
2301 
2302   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)2303   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
2304     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
2305       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
2306     }
2307     if (state_
2308         != com.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState
2309             .CRYPTO_KEY_VERSION_STATE_UNSPECIFIED
2310             .getNumber()) {
2311       output.writeEnum(3, state_);
2312     }
2313     if (createTime_ != null) {
2314       output.writeMessage(4, getCreateTime());
2315     }
2316     if (destroyTime_ != null) {
2317       output.writeMessage(5, getDestroyTime());
2318     }
2319     if (destroyEventTime_ != null) {
2320       output.writeMessage(6, getDestroyEventTime());
2321     }
2322     if (protectionLevel_
2323         != com.google.cloud.kms.v1.ProtectionLevel.PROTECTION_LEVEL_UNSPECIFIED.getNumber()) {
2324       output.writeEnum(7, protectionLevel_);
2325     }
2326     if (attestation_ != null) {
2327       output.writeMessage(8, getAttestation());
2328     }
2329     if (algorithm_
2330         != com.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm
2331             .CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED
2332             .getNumber()) {
2333       output.writeEnum(10, algorithm_);
2334     }
2335     if (generateTime_ != null) {
2336       output.writeMessage(11, getGenerateTime());
2337     }
2338     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(importJob_)) {
2339       com.google.protobuf.GeneratedMessageV3.writeString(output, 14, importJob_);
2340     }
2341     if (importTime_ != null) {
2342       output.writeMessage(15, getImportTime());
2343     }
2344     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(importFailureReason_)) {
2345       com.google.protobuf.GeneratedMessageV3.writeString(output, 16, importFailureReason_);
2346     }
2347     if (externalProtectionLevelOptions_ != null) {
2348       output.writeMessage(17, getExternalProtectionLevelOptions());
2349     }
2350     if (reimportEligible_ != false) {
2351       output.writeBool(18, reimportEligible_);
2352     }
2353     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(generationFailureReason_)) {
2354       com.google.protobuf.GeneratedMessageV3.writeString(output, 19, generationFailureReason_);
2355     }
2356     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(externalDestructionFailureReason_)) {
2357       com.google.protobuf.GeneratedMessageV3.writeString(
2358           output, 20, externalDestructionFailureReason_);
2359     }
2360     getUnknownFields().writeTo(output);
2361   }
2362 
2363   @java.lang.Override
getSerializedSize()2364   public int getSerializedSize() {
2365     int size = memoizedSize;
2366     if (size != -1) return size;
2367 
2368     size = 0;
2369     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
2370       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
2371     }
2372     if (state_
2373         != com.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState
2374             .CRYPTO_KEY_VERSION_STATE_UNSPECIFIED
2375             .getNumber()) {
2376       size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, state_);
2377     }
2378     if (createTime_ != null) {
2379       size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getCreateTime());
2380     }
2381     if (destroyTime_ != null) {
2382       size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getDestroyTime());
2383     }
2384     if (destroyEventTime_ != null) {
2385       size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getDestroyEventTime());
2386     }
2387     if (protectionLevel_
2388         != com.google.cloud.kms.v1.ProtectionLevel.PROTECTION_LEVEL_UNSPECIFIED.getNumber()) {
2389       size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, protectionLevel_);
2390     }
2391     if (attestation_ != null) {
2392       size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getAttestation());
2393     }
2394     if (algorithm_
2395         != com.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm
2396             .CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED
2397             .getNumber()) {
2398       size += com.google.protobuf.CodedOutputStream.computeEnumSize(10, algorithm_);
2399     }
2400     if (generateTime_ != null) {
2401       size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getGenerateTime());
2402     }
2403     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(importJob_)) {
2404       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, importJob_);
2405     }
2406     if (importTime_ != null) {
2407       size += com.google.protobuf.CodedOutputStream.computeMessageSize(15, getImportTime());
2408     }
2409     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(importFailureReason_)) {
2410       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, importFailureReason_);
2411     }
2412     if (externalProtectionLevelOptions_ != null) {
2413       size +=
2414           com.google.protobuf.CodedOutputStream.computeMessageSize(
2415               17, getExternalProtectionLevelOptions());
2416     }
2417     if (reimportEligible_ != false) {
2418       size += com.google.protobuf.CodedOutputStream.computeBoolSize(18, reimportEligible_);
2419     }
2420     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(generationFailureReason_)) {
2421       size +=
2422           com.google.protobuf.GeneratedMessageV3.computeStringSize(19, generationFailureReason_);
2423     }
2424     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(externalDestructionFailureReason_)) {
2425       size +=
2426           com.google.protobuf.GeneratedMessageV3.computeStringSize(
2427               20, externalDestructionFailureReason_);
2428     }
2429     size += getUnknownFields().getSerializedSize();
2430     memoizedSize = size;
2431     return size;
2432   }
2433 
2434   @java.lang.Override
equals(final java.lang.Object obj)2435   public boolean equals(final java.lang.Object obj) {
2436     if (obj == this) {
2437       return true;
2438     }
2439     if (!(obj instanceof com.google.cloud.kms.v1.CryptoKeyVersion)) {
2440       return super.equals(obj);
2441     }
2442     com.google.cloud.kms.v1.CryptoKeyVersion other = (com.google.cloud.kms.v1.CryptoKeyVersion) obj;
2443 
2444     if (!getName().equals(other.getName())) return false;
2445     if (state_ != other.state_) return false;
2446     if (protectionLevel_ != other.protectionLevel_) return false;
2447     if (algorithm_ != other.algorithm_) return false;
2448     if (hasAttestation() != other.hasAttestation()) return false;
2449     if (hasAttestation()) {
2450       if (!getAttestation().equals(other.getAttestation())) return false;
2451     }
2452     if (hasCreateTime() != other.hasCreateTime()) return false;
2453     if (hasCreateTime()) {
2454       if (!getCreateTime().equals(other.getCreateTime())) return false;
2455     }
2456     if (hasGenerateTime() != other.hasGenerateTime()) return false;
2457     if (hasGenerateTime()) {
2458       if (!getGenerateTime().equals(other.getGenerateTime())) return false;
2459     }
2460     if (hasDestroyTime() != other.hasDestroyTime()) return false;
2461     if (hasDestroyTime()) {
2462       if (!getDestroyTime().equals(other.getDestroyTime())) return false;
2463     }
2464     if (hasDestroyEventTime() != other.hasDestroyEventTime()) return false;
2465     if (hasDestroyEventTime()) {
2466       if (!getDestroyEventTime().equals(other.getDestroyEventTime())) return false;
2467     }
2468     if (!getImportJob().equals(other.getImportJob())) return false;
2469     if (hasImportTime() != other.hasImportTime()) return false;
2470     if (hasImportTime()) {
2471       if (!getImportTime().equals(other.getImportTime())) return false;
2472     }
2473     if (!getImportFailureReason().equals(other.getImportFailureReason())) return false;
2474     if (!getGenerationFailureReason().equals(other.getGenerationFailureReason())) return false;
2475     if (!getExternalDestructionFailureReason().equals(other.getExternalDestructionFailureReason()))
2476       return false;
2477     if (hasExternalProtectionLevelOptions() != other.hasExternalProtectionLevelOptions())
2478       return false;
2479     if (hasExternalProtectionLevelOptions()) {
2480       if (!getExternalProtectionLevelOptions().equals(other.getExternalProtectionLevelOptions()))
2481         return false;
2482     }
2483     if (getReimportEligible() != other.getReimportEligible()) return false;
2484     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
2485     return true;
2486   }
2487 
2488   @java.lang.Override
hashCode()2489   public int hashCode() {
2490     if (memoizedHashCode != 0) {
2491       return memoizedHashCode;
2492     }
2493     int hash = 41;
2494     hash = (19 * hash) + getDescriptor().hashCode();
2495     hash = (37 * hash) + NAME_FIELD_NUMBER;
2496     hash = (53 * hash) + getName().hashCode();
2497     hash = (37 * hash) + STATE_FIELD_NUMBER;
2498     hash = (53 * hash) + state_;
2499     hash = (37 * hash) + PROTECTION_LEVEL_FIELD_NUMBER;
2500     hash = (53 * hash) + protectionLevel_;
2501     hash = (37 * hash) + ALGORITHM_FIELD_NUMBER;
2502     hash = (53 * hash) + algorithm_;
2503     if (hasAttestation()) {
2504       hash = (37 * hash) + ATTESTATION_FIELD_NUMBER;
2505       hash = (53 * hash) + getAttestation().hashCode();
2506     }
2507     if (hasCreateTime()) {
2508       hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER;
2509       hash = (53 * hash) + getCreateTime().hashCode();
2510     }
2511     if (hasGenerateTime()) {
2512       hash = (37 * hash) + GENERATE_TIME_FIELD_NUMBER;
2513       hash = (53 * hash) + getGenerateTime().hashCode();
2514     }
2515     if (hasDestroyTime()) {
2516       hash = (37 * hash) + DESTROY_TIME_FIELD_NUMBER;
2517       hash = (53 * hash) + getDestroyTime().hashCode();
2518     }
2519     if (hasDestroyEventTime()) {
2520       hash = (37 * hash) + DESTROY_EVENT_TIME_FIELD_NUMBER;
2521       hash = (53 * hash) + getDestroyEventTime().hashCode();
2522     }
2523     hash = (37 * hash) + IMPORT_JOB_FIELD_NUMBER;
2524     hash = (53 * hash) + getImportJob().hashCode();
2525     if (hasImportTime()) {
2526       hash = (37 * hash) + IMPORT_TIME_FIELD_NUMBER;
2527       hash = (53 * hash) + getImportTime().hashCode();
2528     }
2529     hash = (37 * hash) + IMPORT_FAILURE_REASON_FIELD_NUMBER;
2530     hash = (53 * hash) + getImportFailureReason().hashCode();
2531     hash = (37 * hash) + GENERATION_FAILURE_REASON_FIELD_NUMBER;
2532     hash = (53 * hash) + getGenerationFailureReason().hashCode();
2533     hash = (37 * hash) + EXTERNAL_DESTRUCTION_FAILURE_REASON_FIELD_NUMBER;
2534     hash = (53 * hash) + getExternalDestructionFailureReason().hashCode();
2535     if (hasExternalProtectionLevelOptions()) {
2536       hash = (37 * hash) + EXTERNAL_PROTECTION_LEVEL_OPTIONS_FIELD_NUMBER;
2537       hash = (53 * hash) + getExternalProtectionLevelOptions().hashCode();
2538     }
2539     hash = (37 * hash) + REIMPORT_ELIGIBLE_FIELD_NUMBER;
2540     hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReimportEligible());
2541     hash = (29 * hash) + getUnknownFields().hashCode();
2542     memoizedHashCode = hash;
2543     return hash;
2544   }
2545 
parseFrom(java.nio.ByteBuffer data)2546   public static com.google.cloud.kms.v1.CryptoKeyVersion parseFrom(java.nio.ByteBuffer data)
2547       throws com.google.protobuf.InvalidProtocolBufferException {
2548     return PARSER.parseFrom(data);
2549   }
2550 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2551   public static com.google.cloud.kms.v1.CryptoKeyVersion parseFrom(
2552       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2553       throws com.google.protobuf.InvalidProtocolBufferException {
2554     return PARSER.parseFrom(data, extensionRegistry);
2555   }
2556 
parseFrom( com.google.protobuf.ByteString data)2557   public static com.google.cloud.kms.v1.CryptoKeyVersion parseFrom(
2558       com.google.protobuf.ByteString data)
2559       throws com.google.protobuf.InvalidProtocolBufferException {
2560     return PARSER.parseFrom(data);
2561   }
2562 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2563   public static com.google.cloud.kms.v1.CryptoKeyVersion parseFrom(
2564       com.google.protobuf.ByteString data,
2565       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2566       throws com.google.protobuf.InvalidProtocolBufferException {
2567     return PARSER.parseFrom(data, extensionRegistry);
2568   }
2569 
parseFrom(byte[] data)2570   public static com.google.cloud.kms.v1.CryptoKeyVersion parseFrom(byte[] data)
2571       throws com.google.protobuf.InvalidProtocolBufferException {
2572     return PARSER.parseFrom(data);
2573   }
2574 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2575   public static com.google.cloud.kms.v1.CryptoKeyVersion parseFrom(
2576       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2577       throws com.google.protobuf.InvalidProtocolBufferException {
2578     return PARSER.parseFrom(data, extensionRegistry);
2579   }
2580 
parseFrom(java.io.InputStream input)2581   public static com.google.cloud.kms.v1.CryptoKeyVersion parseFrom(java.io.InputStream input)
2582       throws java.io.IOException {
2583     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
2584   }
2585 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2586   public static com.google.cloud.kms.v1.CryptoKeyVersion parseFrom(
2587       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2588       throws java.io.IOException {
2589     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
2590         PARSER, input, extensionRegistry);
2591   }
2592 
parseDelimitedFrom( java.io.InputStream input)2593   public static com.google.cloud.kms.v1.CryptoKeyVersion parseDelimitedFrom(
2594       java.io.InputStream input) throws java.io.IOException {
2595     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
2596   }
2597 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2598   public static com.google.cloud.kms.v1.CryptoKeyVersion parseDelimitedFrom(
2599       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2600       throws java.io.IOException {
2601     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
2602         PARSER, input, extensionRegistry);
2603   }
2604 
parseFrom( com.google.protobuf.CodedInputStream input)2605   public static com.google.cloud.kms.v1.CryptoKeyVersion parseFrom(
2606       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
2607     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
2608   }
2609 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2610   public static com.google.cloud.kms.v1.CryptoKeyVersion parseFrom(
2611       com.google.protobuf.CodedInputStream input,
2612       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2613       throws java.io.IOException {
2614     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
2615         PARSER, input, extensionRegistry);
2616   }
2617 
2618   @java.lang.Override
newBuilderForType()2619   public Builder newBuilderForType() {
2620     return newBuilder();
2621   }
2622 
newBuilder()2623   public static Builder newBuilder() {
2624     return DEFAULT_INSTANCE.toBuilder();
2625   }
2626 
newBuilder(com.google.cloud.kms.v1.CryptoKeyVersion prototype)2627   public static Builder newBuilder(com.google.cloud.kms.v1.CryptoKeyVersion prototype) {
2628     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
2629   }
2630 
2631   @java.lang.Override
toBuilder()2632   public Builder toBuilder() {
2633     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
2634   }
2635 
2636   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)2637   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
2638     Builder builder = new Builder(parent);
2639     return builder;
2640   }
2641   /**
2642    *
2643    *
2644    * <pre>
2645    * A [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] represents an
2646    * individual cryptographic key, and the associated key material.
2647    * An
2648    * [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED]
2649    * version can be used for cryptographic operations.
2650    * For security reasons, the raw cryptographic key material represented by a
2651    * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] can never be viewed
2652    * or exported. It can only be used to encrypt, decrypt, or sign data when an
2653    * authorized user or application invokes Cloud KMS.
2654    * </pre>
2655    *
2656    * Protobuf type {@code google.cloud.kms.v1.CryptoKeyVersion}
2657    */
2658   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
2659       implements
2660       // @@protoc_insertion_point(builder_implements:google.cloud.kms.v1.CryptoKeyVersion)
2661       com.google.cloud.kms.v1.CryptoKeyVersionOrBuilder {
getDescriptor()2662     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
2663       return com.google.cloud.kms.v1.KmsResourcesProto
2664           .internal_static_google_cloud_kms_v1_CryptoKeyVersion_descriptor;
2665     }
2666 
2667     @java.lang.Override
2668     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()2669         internalGetFieldAccessorTable() {
2670       return com.google.cloud.kms.v1.KmsResourcesProto
2671           .internal_static_google_cloud_kms_v1_CryptoKeyVersion_fieldAccessorTable
2672           .ensureFieldAccessorsInitialized(
2673               com.google.cloud.kms.v1.CryptoKeyVersion.class,
2674               com.google.cloud.kms.v1.CryptoKeyVersion.Builder.class);
2675     }
2676 
2677     // Construct using com.google.cloud.kms.v1.CryptoKeyVersion.newBuilder()
Builder()2678     private Builder() {}
2679 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)2680     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
2681       super(parent);
2682     }
2683 
2684     @java.lang.Override
clear()2685     public Builder clear() {
2686       super.clear();
2687       bitField0_ = 0;
2688       name_ = "";
2689       state_ = 0;
2690       protectionLevel_ = 0;
2691       algorithm_ = 0;
2692       attestation_ = null;
2693       if (attestationBuilder_ != null) {
2694         attestationBuilder_.dispose();
2695         attestationBuilder_ = null;
2696       }
2697       createTime_ = null;
2698       if (createTimeBuilder_ != null) {
2699         createTimeBuilder_.dispose();
2700         createTimeBuilder_ = null;
2701       }
2702       generateTime_ = null;
2703       if (generateTimeBuilder_ != null) {
2704         generateTimeBuilder_.dispose();
2705         generateTimeBuilder_ = null;
2706       }
2707       destroyTime_ = null;
2708       if (destroyTimeBuilder_ != null) {
2709         destroyTimeBuilder_.dispose();
2710         destroyTimeBuilder_ = null;
2711       }
2712       destroyEventTime_ = null;
2713       if (destroyEventTimeBuilder_ != null) {
2714         destroyEventTimeBuilder_.dispose();
2715         destroyEventTimeBuilder_ = null;
2716       }
2717       importJob_ = "";
2718       importTime_ = null;
2719       if (importTimeBuilder_ != null) {
2720         importTimeBuilder_.dispose();
2721         importTimeBuilder_ = null;
2722       }
2723       importFailureReason_ = "";
2724       generationFailureReason_ = "";
2725       externalDestructionFailureReason_ = "";
2726       externalProtectionLevelOptions_ = null;
2727       if (externalProtectionLevelOptionsBuilder_ != null) {
2728         externalProtectionLevelOptionsBuilder_.dispose();
2729         externalProtectionLevelOptionsBuilder_ = null;
2730       }
2731       reimportEligible_ = false;
2732       return this;
2733     }
2734 
2735     @java.lang.Override
getDescriptorForType()2736     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
2737       return com.google.cloud.kms.v1.KmsResourcesProto
2738           .internal_static_google_cloud_kms_v1_CryptoKeyVersion_descriptor;
2739     }
2740 
2741     @java.lang.Override
getDefaultInstanceForType()2742     public com.google.cloud.kms.v1.CryptoKeyVersion getDefaultInstanceForType() {
2743       return com.google.cloud.kms.v1.CryptoKeyVersion.getDefaultInstance();
2744     }
2745 
2746     @java.lang.Override
build()2747     public com.google.cloud.kms.v1.CryptoKeyVersion build() {
2748       com.google.cloud.kms.v1.CryptoKeyVersion result = buildPartial();
2749       if (!result.isInitialized()) {
2750         throw newUninitializedMessageException(result);
2751       }
2752       return result;
2753     }
2754 
2755     @java.lang.Override
buildPartial()2756     public com.google.cloud.kms.v1.CryptoKeyVersion buildPartial() {
2757       com.google.cloud.kms.v1.CryptoKeyVersion result =
2758           new com.google.cloud.kms.v1.CryptoKeyVersion(this);
2759       if (bitField0_ != 0) {
2760         buildPartial0(result);
2761       }
2762       onBuilt();
2763       return result;
2764     }
2765 
buildPartial0(com.google.cloud.kms.v1.CryptoKeyVersion result)2766     private void buildPartial0(com.google.cloud.kms.v1.CryptoKeyVersion result) {
2767       int from_bitField0_ = bitField0_;
2768       if (((from_bitField0_ & 0x00000001) != 0)) {
2769         result.name_ = name_;
2770       }
2771       if (((from_bitField0_ & 0x00000002) != 0)) {
2772         result.state_ = state_;
2773       }
2774       if (((from_bitField0_ & 0x00000004) != 0)) {
2775         result.protectionLevel_ = protectionLevel_;
2776       }
2777       if (((from_bitField0_ & 0x00000008) != 0)) {
2778         result.algorithm_ = algorithm_;
2779       }
2780       if (((from_bitField0_ & 0x00000010) != 0)) {
2781         result.attestation_ =
2782             attestationBuilder_ == null ? attestation_ : attestationBuilder_.build();
2783       }
2784       if (((from_bitField0_ & 0x00000020) != 0)) {
2785         result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build();
2786       }
2787       if (((from_bitField0_ & 0x00000040) != 0)) {
2788         result.generateTime_ =
2789             generateTimeBuilder_ == null ? generateTime_ : generateTimeBuilder_.build();
2790       }
2791       if (((from_bitField0_ & 0x00000080) != 0)) {
2792         result.destroyTime_ =
2793             destroyTimeBuilder_ == null ? destroyTime_ : destroyTimeBuilder_.build();
2794       }
2795       if (((from_bitField0_ & 0x00000100) != 0)) {
2796         result.destroyEventTime_ =
2797             destroyEventTimeBuilder_ == null ? destroyEventTime_ : destroyEventTimeBuilder_.build();
2798       }
2799       if (((from_bitField0_ & 0x00000200) != 0)) {
2800         result.importJob_ = importJob_;
2801       }
2802       if (((from_bitField0_ & 0x00000400) != 0)) {
2803         result.importTime_ = importTimeBuilder_ == null ? importTime_ : importTimeBuilder_.build();
2804       }
2805       if (((from_bitField0_ & 0x00000800) != 0)) {
2806         result.importFailureReason_ = importFailureReason_;
2807       }
2808       if (((from_bitField0_ & 0x00001000) != 0)) {
2809         result.generationFailureReason_ = generationFailureReason_;
2810       }
2811       if (((from_bitField0_ & 0x00002000) != 0)) {
2812         result.externalDestructionFailureReason_ = externalDestructionFailureReason_;
2813       }
2814       if (((from_bitField0_ & 0x00004000) != 0)) {
2815         result.externalProtectionLevelOptions_ =
2816             externalProtectionLevelOptionsBuilder_ == null
2817                 ? externalProtectionLevelOptions_
2818                 : externalProtectionLevelOptionsBuilder_.build();
2819       }
2820       if (((from_bitField0_ & 0x00008000) != 0)) {
2821         result.reimportEligible_ = reimportEligible_;
2822       }
2823     }
2824 
2825     @java.lang.Override
clone()2826     public Builder clone() {
2827       return super.clone();
2828     }
2829 
2830     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)2831     public Builder setField(
2832         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
2833       return super.setField(field, value);
2834     }
2835 
2836     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)2837     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
2838       return super.clearField(field);
2839     }
2840 
2841     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)2842     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
2843       return super.clearOneof(oneof);
2844     }
2845 
2846     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)2847     public Builder setRepeatedField(
2848         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
2849       return super.setRepeatedField(field, index, value);
2850     }
2851 
2852     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)2853     public Builder addRepeatedField(
2854         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
2855       return super.addRepeatedField(field, value);
2856     }
2857 
2858     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)2859     public Builder mergeFrom(com.google.protobuf.Message other) {
2860       if (other instanceof com.google.cloud.kms.v1.CryptoKeyVersion) {
2861         return mergeFrom((com.google.cloud.kms.v1.CryptoKeyVersion) other);
2862       } else {
2863         super.mergeFrom(other);
2864         return this;
2865       }
2866     }
2867 
mergeFrom(com.google.cloud.kms.v1.CryptoKeyVersion other)2868     public Builder mergeFrom(com.google.cloud.kms.v1.CryptoKeyVersion other) {
2869       if (other == com.google.cloud.kms.v1.CryptoKeyVersion.getDefaultInstance()) return this;
2870       if (!other.getName().isEmpty()) {
2871         name_ = other.name_;
2872         bitField0_ |= 0x00000001;
2873         onChanged();
2874       }
2875       if (other.state_ != 0) {
2876         setStateValue(other.getStateValue());
2877       }
2878       if (other.protectionLevel_ != 0) {
2879         setProtectionLevelValue(other.getProtectionLevelValue());
2880       }
2881       if (other.algorithm_ != 0) {
2882         setAlgorithmValue(other.getAlgorithmValue());
2883       }
2884       if (other.hasAttestation()) {
2885         mergeAttestation(other.getAttestation());
2886       }
2887       if (other.hasCreateTime()) {
2888         mergeCreateTime(other.getCreateTime());
2889       }
2890       if (other.hasGenerateTime()) {
2891         mergeGenerateTime(other.getGenerateTime());
2892       }
2893       if (other.hasDestroyTime()) {
2894         mergeDestroyTime(other.getDestroyTime());
2895       }
2896       if (other.hasDestroyEventTime()) {
2897         mergeDestroyEventTime(other.getDestroyEventTime());
2898       }
2899       if (!other.getImportJob().isEmpty()) {
2900         importJob_ = other.importJob_;
2901         bitField0_ |= 0x00000200;
2902         onChanged();
2903       }
2904       if (other.hasImportTime()) {
2905         mergeImportTime(other.getImportTime());
2906       }
2907       if (!other.getImportFailureReason().isEmpty()) {
2908         importFailureReason_ = other.importFailureReason_;
2909         bitField0_ |= 0x00000800;
2910         onChanged();
2911       }
2912       if (!other.getGenerationFailureReason().isEmpty()) {
2913         generationFailureReason_ = other.generationFailureReason_;
2914         bitField0_ |= 0x00001000;
2915         onChanged();
2916       }
2917       if (!other.getExternalDestructionFailureReason().isEmpty()) {
2918         externalDestructionFailureReason_ = other.externalDestructionFailureReason_;
2919         bitField0_ |= 0x00002000;
2920         onChanged();
2921       }
2922       if (other.hasExternalProtectionLevelOptions()) {
2923         mergeExternalProtectionLevelOptions(other.getExternalProtectionLevelOptions());
2924       }
2925       if (other.getReimportEligible() != false) {
2926         setReimportEligible(other.getReimportEligible());
2927       }
2928       this.mergeUnknownFields(other.getUnknownFields());
2929       onChanged();
2930       return this;
2931     }
2932 
2933     @java.lang.Override
isInitialized()2934     public final boolean isInitialized() {
2935       return true;
2936     }
2937 
2938     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2939     public Builder mergeFrom(
2940         com.google.protobuf.CodedInputStream input,
2941         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2942         throws java.io.IOException {
2943       if (extensionRegistry == null) {
2944         throw new java.lang.NullPointerException();
2945       }
2946       try {
2947         boolean done = false;
2948         while (!done) {
2949           int tag = input.readTag();
2950           switch (tag) {
2951             case 0:
2952               done = true;
2953               break;
2954             case 10:
2955               {
2956                 name_ = input.readStringRequireUtf8();
2957                 bitField0_ |= 0x00000001;
2958                 break;
2959               } // case 10
2960             case 24:
2961               {
2962                 state_ = input.readEnum();
2963                 bitField0_ |= 0x00000002;
2964                 break;
2965               } // case 24
2966             case 34:
2967               {
2968                 input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry);
2969                 bitField0_ |= 0x00000020;
2970                 break;
2971               } // case 34
2972             case 42:
2973               {
2974                 input.readMessage(getDestroyTimeFieldBuilder().getBuilder(), extensionRegistry);
2975                 bitField0_ |= 0x00000080;
2976                 break;
2977               } // case 42
2978             case 50:
2979               {
2980                 input.readMessage(
2981                     getDestroyEventTimeFieldBuilder().getBuilder(), extensionRegistry);
2982                 bitField0_ |= 0x00000100;
2983                 break;
2984               } // case 50
2985             case 56:
2986               {
2987                 protectionLevel_ = input.readEnum();
2988                 bitField0_ |= 0x00000004;
2989                 break;
2990               } // case 56
2991             case 66:
2992               {
2993                 input.readMessage(getAttestationFieldBuilder().getBuilder(), extensionRegistry);
2994                 bitField0_ |= 0x00000010;
2995                 break;
2996               } // case 66
2997             case 80:
2998               {
2999                 algorithm_ = input.readEnum();
3000                 bitField0_ |= 0x00000008;
3001                 break;
3002               } // case 80
3003             case 90:
3004               {
3005                 input.readMessage(getGenerateTimeFieldBuilder().getBuilder(), extensionRegistry);
3006                 bitField0_ |= 0x00000040;
3007                 break;
3008               } // case 90
3009             case 114:
3010               {
3011                 importJob_ = input.readStringRequireUtf8();
3012                 bitField0_ |= 0x00000200;
3013                 break;
3014               } // case 114
3015             case 122:
3016               {
3017                 input.readMessage(getImportTimeFieldBuilder().getBuilder(), extensionRegistry);
3018                 bitField0_ |= 0x00000400;
3019                 break;
3020               } // case 122
3021             case 130:
3022               {
3023                 importFailureReason_ = input.readStringRequireUtf8();
3024                 bitField0_ |= 0x00000800;
3025                 break;
3026               } // case 130
3027             case 138:
3028               {
3029                 input.readMessage(
3030                     getExternalProtectionLevelOptionsFieldBuilder().getBuilder(),
3031                     extensionRegistry);
3032                 bitField0_ |= 0x00004000;
3033                 break;
3034               } // case 138
3035             case 144:
3036               {
3037                 reimportEligible_ = input.readBool();
3038                 bitField0_ |= 0x00008000;
3039                 break;
3040               } // case 144
3041             case 154:
3042               {
3043                 generationFailureReason_ = input.readStringRequireUtf8();
3044                 bitField0_ |= 0x00001000;
3045                 break;
3046               } // case 154
3047             case 162:
3048               {
3049                 externalDestructionFailureReason_ = input.readStringRequireUtf8();
3050                 bitField0_ |= 0x00002000;
3051                 break;
3052               } // case 162
3053             default:
3054               {
3055                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
3056                   done = true; // was an endgroup tag
3057                 }
3058                 break;
3059               } // default:
3060           } // switch (tag)
3061         } // while (!done)
3062       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
3063         throw e.unwrapIOException();
3064       } finally {
3065         onChanged();
3066       } // finally
3067       return this;
3068     }
3069 
3070     private int bitField0_;
3071 
3072     private java.lang.Object name_ = "";
3073     /**
3074      *
3075      *
3076      * <pre>
3077      * Output only. The resource name for this
3078      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in the format
3079      * `projects/&#42;&#47;locations/&#42;&#47;keyRings/&#42;&#47;cryptoKeys/&#42;&#47;cryptoKeyVersions/&#42;`.
3080      * </pre>
3081      *
3082      * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
3083      *
3084      * @return The name.
3085      */
getName()3086     public java.lang.String getName() {
3087       java.lang.Object ref = name_;
3088       if (!(ref instanceof java.lang.String)) {
3089         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
3090         java.lang.String s = bs.toStringUtf8();
3091         name_ = s;
3092         return s;
3093       } else {
3094         return (java.lang.String) ref;
3095       }
3096     }
3097     /**
3098      *
3099      *
3100      * <pre>
3101      * Output only. The resource name for this
3102      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in the format
3103      * `projects/&#42;&#47;locations/&#42;&#47;keyRings/&#42;&#47;cryptoKeys/&#42;&#47;cryptoKeyVersions/&#42;`.
3104      * </pre>
3105      *
3106      * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
3107      *
3108      * @return The bytes for name.
3109      */
getNameBytes()3110     public com.google.protobuf.ByteString getNameBytes() {
3111       java.lang.Object ref = name_;
3112       if (ref instanceof String) {
3113         com.google.protobuf.ByteString b =
3114             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
3115         name_ = b;
3116         return b;
3117       } else {
3118         return (com.google.protobuf.ByteString) ref;
3119       }
3120     }
3121     /**
3122      *
3123      *
3124      * <pre>
3125      * Output only. The resource name for this
3126      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in the format
3127      * `projects/&#42;&#47;locations/&#42;&#47;keyRings/&#42;&#47;cryptoKeys/&#42;&#47;cryptoKeyVersions/&#42;`.
3128      * </pre>
3129      *
3130      * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
3131      *
3132      * @param value The name to set.
3133      * @return This builder for chaining.
3134      */
setName(java.lang.String value)3135     public Builder setName(java.lang.String value) {
3136       if (value == null) {
3137         throw new NullPointerException();
3138       }
3139       name_ = value;
3140       bitField0_ |= 0x00000001;
3141       onChanged();
3142       return this;
3143     }
3144     /**
3145      *
3146      *
3147      * <pre>
3148      * Output only. The resource name for this
3149      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in the format
3150      * `projects/&#42;&#47;locations/&#42;&#47;keyRings/&#42;&#47;cryptoKeys/&#42;&#47;cryptoKeyVersions/&#42;`.
3151      * </pre>
3152      *
3153      * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
3154      *
3155      * @return This builder for chaining.
3156      */
clearName()3157     public Builder clearName() {
3158       name_ = getDefaultInstance().getName();
3159       bitField0_ = (bitField0_ & ~0x00000001);
3160       onChanged();
3161       return this;
3162     }
3163     /**
3164      *
3165      *
3166      * <pre>
3167      * Output only. The resource name for this
3168      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in the format
3169      * `projects/&#42;&#47;locations/&#42;&#47;keyRings/&#42;&#47;cryptoKeys/&#42;&#47;cryptoKeyVersions/&#42;`.
3170      * </pre>
3171      *
3172      * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
3173      *
3174      * @param value The bytes for name to set.
3175      * @return This builder for chaining.
3176      */
setNameBytes(com.google.protobuf.ByteString value)3177     public Builder setNameBytes(com.google.protobuf.ByteString value) {
3178       if (value == null) {
3179         throw new NullPointerException();
3180       }
3181       checkByteStringIsUtf8(value);
3182       name_ = value;
3183       bitField0_ |= 0x00000001;
3184       onChanged();
3185       return this;
3186     }
3187 
3188     private int state_ = 0;
3189     /**
3190      *
3191      *
3192      * <pre>
3193      * The current state of the
3194      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion].
3195      * </pre>
3196      *
3197      * <code>.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState state = 3;</code>
3198      *
3199      * @return The enum numeric value on the wire for state.
3200      */
3201     @java.lang.Override
getStateValue()3202     public int getStateValue() {
3203       return state_;
3204     }
3205     /**
3206      *
3207      *
3208      * <pre>
3209      * The current state of the
3210      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion].
3211      * </pre>
3212      *
3213      * <code>.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState state = 3;</code>
3214      *
3215      * @param value The enum numeric value on the wire for state to set.
3216      * @return This builder for chaining.
3217      */
setStateValue(int value)3218     public Builder setStateValue(int value) {
3219       state_ = value;
3220       bitField0_ |= 0x00000002;
3221       onChanged();
3222       return this;
3223     }
3224     /**
3225      *
3226      *
3227      * <pre>
3228      * The current state of the
3229      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion].
3230      * </pre>
3231      *
3232      * <code>.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState state = 3;</code>
3233      *
3234      * @return The state.
3235      */
3236     @java.lang.Override
getState()3237     public com.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState getState() {
3238       com.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState result =
3239           com.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.forNumber(state_);
3240       return result == null
3241           ? com.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.UNRECOGNIZED
3242           : result;
3243     }
3244     /**
3245      *
3246      *
3247      * <pre>
3248      * The current state of the
3249      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion].
3250      * </pre>
3251      *
3252      * <code>.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState state = 3;</code>
3253      *
3254      * @param value The state to set.
3255      * @return This builder for chaining.
3256      */
setState(com.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState value)3257     public Builder setState(com.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState value) {
3258       if (value == null) {
3259         throw new NullPointerException();
3260       }
3261       bitField0_ |= 0x00000002;
3262       state_ = value.getNumber();
3263       onChanged();
3264       return this;
3265     }
3266     /**
3267      *
3268      *
3269      * <pre>
3270      * The current state of the
3271      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion].
3272      * </pre>
3273      *
3274      * <code>.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState state = 3;</code>
3275      *
3276      * @return This builder for chaining.
3277      */
clearState()3278     public Builder clearState() {
3279       bitField0_ = (bitField0_ & ~0x00000002);
3280       state_ = 0;
3281       onChanged();
3282       return this;
3283     }
3284 
3285     private int protectionLevel_ = 0;
3286     /**
3287      *
3288      *
3289      * <pre>
3290      * Output only. The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel]
3291      * describing how crypto operations are performed with this
3292      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion].
3293      * </pre>
3294      *
3295      * <code>
3296      * .google.cloud.kms.v1.ProtectionLevel protection_level = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
3297      * </code>
3298      *
3299      * @return The enum numeric value on the wire for protectionLevel.
3300      */
3301     @java.lang.Override
getProtectionLevelValue()3302     public int getProtectionLevelValue() {
3303       return protectionLevel_;
3304     }
3305     /**
3306      *
3307      *
3308      * <pre>
3309      * Output only. The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel]
3310      * describing how crypto operations are performed with this
3311      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion].
3312      * </pre>
3313      *
3314      * <code>
3315      * .google.cloud.kms.v1.ProtectionLevel protection_level = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
3316      * </code>
3317      *
3318      * @param value The enum numeric value on the wire for protectionLevel to set.
3319      * @return This builder for chaining.
3320      */
setProtectionLevelValue(int value)3321     public Builder setProtectionLevelValue(int value) {
3322       protectionLevel_ = value;
3323       bitField0_ |= 0x00000004;
3324       onChanged();
3325       return this;
3326     }
3327     /**
3328      *
3329      *
3330      * <pre>
3331      * Output only. The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel]
3332      * describing how crypto operations are performed with this
3333      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion].
3334      * </pre>
3335      *
3336      * <code>
3337      * .google.cloud.kms.v1.ProtectionLevel protection_level = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
3338      * </code>
3339      *
3340      * @return The protectionLevel.
3341      */
3342     @java.lang.Override
getProtectionLevel()3343     public com.google.cloud.kms.v1.ProtectionLevel getProtectionLevel() {
3344       com.google.cloud.kms.v1.ProtectionLevel result =
3345           com.google.cloud.kms.v1.ProtectionLevel.forNumber(protectionLevel_);
3346       return result == null ? com.google.cloud.kms.v1.ProtectionLevel.UNRECOGNIZED : result;
3347     }
3348     /**
3349      *
3350      *
3351      * <pre>
3352      * Output only. The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel]
3353      * describing how crypto operations are performed with this
3354      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion].
3355      * </pre>
3356      *
3357      * <code>
3358      * .google.cloud.kms.v1.ProtectionLevel protection_level = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
3359      * </code>
3360      *
3361      * @param value The protectionLevel to set.
3362      * @return This builder for chaining.
3363      */
setProtectionLevel(com.google.cloud.kms.v1.ProtectionLevel value)3364     public Builder setProtectionLevel(com.google.cloud.kms.v1.ProtectionLevel value) {
3365       if (value == null) {
3366         throw new NullPointerException();
3367       }
3368       bitField0_ |= 0x00000004;
3369       protectionLevel_ = value.getNumber();
3370       onChanged();
3371       return this;
3372     }
3373     /**
3374      *
3375      *
3376      * <pre>
3377      * Output only. The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel]
3378      * describing how crypto operations are performed with this
3379      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion].
3380      * </pre>
3381      *
3382      * <code>
3383      * .google.cloud.kms.v1.ProtectionLevel protection_level = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
3384      * </code>
3385      *
3386      * @return This builder for chaining.
3387      */
clearProtectionLevel()3388     public Builder clearProtectionLevel() {
3389       bitField0_ = (bitField0_ & ~0x00000004);
3390       protectionLevel_ = 0;
3391       onChanged();
3392       return this;
3393     }
3394 
3395     private int algorithm_ = 0;
3396     /**
3397      *
3398      *
3399      * <pre>
3400      * Output only. The
3401      * [CryptoKeyVersionAlgorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm]
3402      * that this [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]
3403      * supports.
3404      * </pre>
3405      *
3406      * <code>
3407      * .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
3408      * </code>
3409      *
3410      * @return The enum numeric value on the wire for algorithm.
3411      */
3412     @java.lang.Override
getAlgorithmValue()3413     public int getAlgorithmValue() {
3414       return algorithm_;
3415     }
3416     /**
3417      *
3418      *
3419      * <pre>
3420      * Output only. The
3421      * [CryptoKeyVersionAlgorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm]
3422      * that this [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]
3423      * supports.
3424      * </pre>
3425      *
3426      * <code>
3427      * .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
3428      * </code>
3429      *
3430      * @param value The enum numeric value on the wire for algorithm to set.
3431      * @return This builder for chaining.
3432      */
setAlgorithmValue(int value)3433     public Builder setAlgorithmValue(int value) {
3434       algorithm_ = value;
3435       bitField0_ |= 0x00000008;
3436       onChanged();
3437       return this;
3438     }
3439     /**
3440      *
3441      *
3442      * <pre>
3443      * Output only. The
3444      * [CryptoKeyVersionAlgorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm]
3445      * that this [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]
3446      * supports.
3447      * </pre>
3448      *
3449      * <code>
3450      * .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
3451      * </code>
3452      *
3453      * @return The algorithm.
3454      */
3455     @java.lang.Override
getAlgorithm()3456     public com.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm getAlgorithm() {
3457       com.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm result =
3458           com.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm.forNumber(algorithm_);
3459       return result == null
3460           ? com.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm.UNRECOGNIZED
3461           : result;
3462     }
3463     /**
3464      *
3465      *
3466      * <pre>
3467      * Output only. The
3468      * [CryptoKeyVersionAlgorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm]
3469      * that this [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]
3470      * supports.
3471      * </pre>
3472      *
3473      * <code>
3474      * .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
3475      * </code>
3476      *
3477      * @param value The algorithm to set.
3478      * @return This builder for chaining.
3479      */
setAlgorithm( com.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm value)3480     public Builder setAlgorithm(
3481         com.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm value) {
3482       if (value == null) {
3483         throw new NullPointerException();
3484       }
3485       bitField0_ |= 0x00000008;
3486       algorithm_ = value.getNumber();
3487       onChanged();
3488       return this;
3489     }
3490     /**
3491      *
3492      *
3493      * <pre>
3494      * Output only. The
3495      * [CryptoKeyVersionAlgorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm]
3496      * that this [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]
3497      * supports.
3498      * </pre>
3499      *
3500      * <code>
3501      * .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
3502      * </code>
3503      *
3504      * @return This builder for chaining.
3505      */
clearAlgorithm()3506     public Builder clearAlgorithm() {
3507       bitField0_ = (bitField0_ & ~0x00000008);
3508       algorithm_ = 0;
3509       onChanged();
3510       return this;
3511     }
3512 
3513     private com.google.cloud.kms.v1.KeyOperationAttestation attestation_;
3514     private com.google.protobuf.SingleFieldBuilderV3<
3515             com.google.cloud.kms.v1.KeyOperationAttestation,
3516             com.google.cloud.kms.v1.KeyOperationAttestation.Builder,
3517             com.google.cloud.kms.v1.KeyOperationAttestationOrBuilder>
3518         attestationBuilder_;
3519     /**
3520      *
3521      *
3522      * <pre>
3523      * Output only. Statement that was generated and signed by the HSM at key
3524      * creation time. Use this statement to verify attributes of the key as stored
3525      * on the HSM, independently of Google. Only provided for key versions with
3526      * [protection_level][google.cloud.kms.v1.CryptoKeyVersion.protection_level]
3527      * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM].
3528      * </pre>
3529      *
3530      * <code>
3531      * .google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
3532      * </code>
3533      *
3534      * @return Whether the attestation field is set.
3535      */
hasAttestation()3536     public boolean hasAttestation() {
3537       return ((bitField0_ & 0x00000010) != 0);
3538     }
3539     /**
3540      *
3541      *
3542      * <pre>
3543      * Output only. Statement that was generated and signed by the HSM at key
3544      * creation time. Use this statement to verify attributes of the key as stored
3545      * on the HSM, independently of Google. Only provided for key versions with
3546      * [protection_level][google.cloud.kms.v1.CryptoKeyVersion.protection_level]
3547      * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM].
3548      * </pre>
3549      *
3550      * <code>
3551      * .google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
3552      * </code>
3553      *
3554      * @return The attestation.
3555      */
getAttestation()3556     public com.google.cloud.kms.v1.KeyOperationAttestation getAttestation() {
3557       if (attestationBuilder_ == null) {
3558         return attestation_ == null
3559             ? com.google.cloud.kms.v1.KeyOperationAttestation.getDefaultInstance()
3560             : attestation_;
3561       } else {
3562         return attestationBuilder_.getMessage();
3563       }
3564     }
3565     /**
3566      *
3567      *
3568      * <pre>
3569      * Output only. Statement that was generated and signed by the HSM at key
3570      * creation time. Use this statement to verify attributes of the key as stored
3571      * on the HSM, independently of Google. Only provided for key versions with
3572      * [protection_level][google.cloud.kms.v1.CryptoKeyVersion.protection_level]
3573      * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM].
3574      * </pre>
3575      *
3576      * <code>
3577      * .google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
3578      * </code>
3579      */
setAttestation(com.google.cloud.kms.v1.KeyOperationAttestation value)3580     public Builder setAttestation(com.google.cloud.kms.v1.KeyOperationAttestation value) {
3581       if (attestationBuilder_ == null) {
3582         if (value == null) {
3583           throw new NullPointerException();
3584         }
3585         attestation_ = value;
3586       } else {
3587         attestationBuilder_.setMessage(value);
3588       }
3589       bitField0_ |= 0x00000010;
3590       onChanged();
3591       return this;
3592     }
3593     /**
3594      *
3595      *
3596      * <pre>
3597      * Output only. Statement that was generated and signed by the HSM at key
3598      * creation time. Use this statement to verify attributes of the key as stored
3599      * on the HSM, independently of Google. Only provided for key versions with
3600      * [protection_level][google.cloud.kms.v1.CryptoKeyVersion.protection_level]
3601      * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM].
3602      * </pre>
3603      *
3604      * <code>
3605      * .google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
3606      * </code>
3607      */
setAttestation( com.google.cloud.kms.v1.KeyOperationAttestation.Builder builderForValue)3608     public Builder setAttestation(
3609         com.google.cloud.kms.v1.KeyOperationAttestation.Builder builderForValue) {
3610       if (attestationBuilder_ == null) {
3611         attestation_ = builderForValue.build();
3612       } else {
3613         attestationBuilder_.setMessage(builderForValue.build());
3614       }
3615       bitField0_ |= 0x00000010;
3616       onChanged();
3617       return this;
3618     }
3619     /**
3620      *
3621      *
3622      * <pre>
3623      * Output only. Statement that was generated and signed by the HSM at key
3624      * creation time. Use this statement to verify attributes of the key as stored
3625      * on the HSM, independently of Google. Only provided for key versions with
3626      * [protection_level][google.cloud.kms.v1.CryptoKeyVersion.protection_level]
3627      * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM].
3628      * </pre>
3629      *
3630      * <code>
3631      * .google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
3632      * </code>
3633      */
mergeAttestation(com.google.cloud.kms.v1.KeyOperationAttestation value)3634     public Builder mergeAttestation(com.google.cloud.kms.v1.KeyOperationAttestation value) {
3635       if (attestationBuilder_ == null) {
3636         if (((bitField0_ & 0x00000010) != 0)
3637             && attestation_ != null
3638             && attestation_
3639                 != com.google.cloud.kms.v1.KeyOperationAttestation.getDefaultInstance()) {
3640           getAttestationBuilder().mergeFrom(value);
3641         } else {
3642           attestation_ = value;
3643         }
3644       } else {
3645         attestationBuilder_.mergeFrom(value);
3646       }
3647       bitField0_ |= 0x00000010;
3648       onChanged();
3649       return this;
3650     }
3651     /**
3652      *
3653      *
3654      * <pre>
3655      * Output only. Statement that was generated and signed by the HSM at key
3656      * creation time. Use this statement to verify attributes of the key as stored
3657      * on the HSM, independently of Google. Only provided for key versions with
3658      * [protection_level][google.cloud.kms.v1.CryptoKeyVersion.protection_level]
3659      * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM].
3660      * </pre>
3661      *
3662      * <code>
3663      * .google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
3664      * </code>
3665      */
clearAttestation()3666     public Builder clearAttestation() {
3667       bitField0_ = (bitField0_ & ~0x00000010);
3668       attestation_ = null;
3669       if (attestationBuilder_ != null) {
3670         attestationBuilder_.dispose();
3671         attestationBuilder_ = null;
3672       }
3673       onChanged();
3674       return this;
3675     }
3676     /**
3677      *
3678      *
3679      * <pre>
3680      * Output only. Statement that was generated and signed by the HSM at key
3681      * creation time. Use this statement to verify attributes of the key as stored
3682      * on the HSM, independently of Google. Only provided for key versions with
3683      * [protection_level][google.cloud.kms.v1.CryptoKeyVersion.protection_level]
3684      * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM].
3685      * </pre>
3686      *
3687      * <code>
3688      * .google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
3689      * </code>
3690      */
getAttestationBuilder()3691     public com.google.cloud.kms.v1.KeyOperationAttestation.Builder getAttestationBuilder() {
3692       bitField0_ |= 0x00000010;
3693       onChanged();
3694       return getAttestationFieldBuilder().getBuilder();
3695     }
3696     /**
3697      *
3698      *
3699      * <pre>
3700      * Output only. Statement that was generated and signed by the HSM at key
3701      * creation time. Use this statement to verify attributes of the key as stored
3702      * on the HSM, independently of Google. Only provided for key versions with
3703      * [protection_level][google.cloud.kms.v1.CryptoKeyVersion.protection_level]
3704      * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM].
3705      * </pre>
3706      *
3707      * <code>
3708      * .google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
3709      * </code>
3710      */
getAttestationOrBuilder()3711     public com.google.cloud.kms.v1.KeyOperationAttestationOrBuilder getAttestationOrBuilder() {
3712       if (attestationBuilder_ != null) {
3713         return attestationBuilder_.getMessageOrBuilder();
3714       } else {
3715         return attestation_ == null
3716             ? com.google.cloud.kms.v1.KeyOperationAttestation.getDefaultInstance()
3717             : attestation_;
3718       }
3719     }
3720     /**
3721      *
3722      *
3723      * <pre>
3724      * Output only. Statement that was generated and signed by the HSM at key
3725      * creation time. Use this statement to verify attributes of the key as stored
3726      * on the HSM, independently of Google. Only provided for key versions with
3727      * [protection_level][google.cloud.kms.v1.CryptoKeyVersion.protection_level]
3728      * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM].
3729      * </pre>
3730      *
3731      * <code>
3732      * .google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
3733      * </code>
3734      */
3735     private com.google.protobuf.SingleFieldBuilderV3<
3736             com.google.cloud.kms.v1.KeyOperationAttestation,
3737             com.google.cloud.kms.v1.KeyOperationAttestation.Builder,
3738             com.google.cloud.kms.v1.KeyOperationAttestationOrBuilder>
getAttestationFieldBuilder()3739         getAttestationFieldBuilder() {
3740       if (attestationBuilder_ == null) {
3741         attestationBuilder_ =
3742             new com.google.protobuf.SingleFieldBuilderV3<
3743                 com.google.cloud.kms.v1.KeyOperationAttestation,
3744                 com.google.cloud.kms.v1.KeyOperationAttestation.Builder,
3745                 com.google.cloud.kms.v1.KeyOperationAttestationOrBuilder>(
3746                 getAttestation(), getParentForChildren(), isClean());
3747         attestation_ = null;
3748       }
3749       return attestationBuilder_;
3750     }
3751 
3752     private com.google.protobuf.Timestamp createTime_;
3753     private com.google.protobuf.SingleFieldBuilderV3<
3754             com.google.protobuf.Timestamp,
3755             com.google.protobuf.Timestamp.Builder,
3756             com.google.protobuf.TimestampOrBuilder>
3757         createTimeBuilder_;
3758     /**
3759      *
3760      *
3761      * <pre>
3762      * Output only. The time at which this
3763      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] was created.
3764      * </pre>
3765      *
3766      * <code>
3767      * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
3768      * </code>
3769      *
3770      * @return Whether the createTime field is set.
3771      */
hasCreateTime()3772     public boolean hasCreateTime() {
3773       return ((bitField0_ & 0x00000020) != 0);
3774     }
3775     /**
3776      *
3777      *
3778      * <pre>
3779      * Output only. The time at which this
3780      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] was created.
3781      * </pre>
3782      *
3783      * <code>
3784      * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
3785      * </code>
3786      *
3787      * @return The createTime.
3788      */
getCreateTime()3789     public com.google.protobuf.Timestamp getCreateTime() {
3790       if (createTimeBuilder_ == null) {
3791         return createTime_ == null
3792             ? com.google.protobuf.Timestamp.getDefaultInstance()
3793             : createTime_;
3794       } else {
3795         return createTimeBuilder_.getMessage();
3796       }
3797     }
3798     /**
3799      *
3800      *
3801      * <pre>
3802      * Output only. The time at which this
3803      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] was created.
3804      * </pre>
3805      *
3806      * <code>
3807      * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
3808      * </code>
3809      */
setCreateTime(com.google.protobuf.Timestamp value)3810     public Builder setCreateTime(com.google.protobuf.Timestamp value) {
3811       if (createTimeBuilder_ == null) {
3812         if (value == null) {
3813           throw new NullPointerException();
3814         }
3815         createTime_ = value;
3816       } else {
3817         createTimeBuilder_.setMessage(value);
3818       }
3819       bitField0_ |= 0x00000020;
3820       onChanged();
3821       return this;
3822     }
3823     /**
3824      *
3825      *
3826      * <pre>
3827      * Output only. The time at which this
3828      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] was created.
3829      * </pre>
3830      *
3831      * <code>
3832      * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
3833      * </code>
3834      */
setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue)3835     public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) {
3836       if (createTimeBuilder_ == null) {
3837         createTime_ = builderForValue.build();
3838       } else {
3839         createTimeBuilder_.setMessage(builderForValue.build());
3840       }
3841       bitField0_ |= 0x00000020;
3842       onChanged();
3843       return this;
3844     }
3845     /**
3846      *
3847      *
3848      * <pre>
3849      * Output only. The time at which this
3850      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] was created.
3851      * </pre>
3852      *
3853      * <code>
3854      * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
3855      * </code>
3856      */
mergeCreateTime(com.google.protobuf.Timestamp value)3857     public Builder mergeCreateTime(com.google.protobuf.Timestamp value) {
3858       if (createTimeBuilder_ == null) {
3859         if (((bitField0_ & 0x00000020) != 0)
3860             && createTime_ != null
3861             && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
3862           getCreateTimeBuilder().mergeFrom(value);
3863         } else {
3864           createTime_ = value;
3865         }
3866       } else {
3867         createTimeBuilder_.mergeFrom(value);
3868       }
3869       bitField0_ |= 0x00000020;
3870       onChanged();
3871       return this;
3872     }
3873     /**
3874      *
3875      *
3876      * <pre>
3877      * Output only. The time at which this
3878      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] was created.
3879      * </pre>
3880      *
3881      * <code>
3882      * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
3883      * </code>
3884      */
clearCreateTime()3885     public Builder clearCreateTime() {
3886       bitField0_ = (bitField0_ & ~0x00000020);
3887       createTime_ = null;
3888       if (createTimeBuilder_ != null) {
3889         createTimeBuilder_.dispose();
3890         createTimeBuilder_ = null;
3891       }
3892       onChanged();
3893       return this;
3894     }
3895     /**
3896      *
3897      *
3898      * <pre>
3899      * Output only. The time at which this
3900      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] was created.
3901      * </pre>
3902      *
3903      * <code>
3904      * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
3905      * </code>
3906      */
getCreateTimeBuilder()3907     public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() {
3908       bitField0_ |= 0x00000020;
3909       onChanged();
3910       return getCreateTimeFieldBuilder().getBuilder();
3911     }
3912     /**
3913      *
3914      *
3915      * <pre>
3916      * Output only. The time at which this
3917      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] was created.
3918      * </pre>
3919      *
3920      * <code>
3921      * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
3922      * </code>
3923      */
getCreateTimeOrBuilder()3924     public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() {
3925       if (createTimeBuilder_ != null) {
3926         return createTimeBuilder_.getMessageOrBuilder();
3927       } else {
3928         return createTime_ == null
3929             ? com.google.protobuf.Timestamp.getDefaultInstance()
3930             : createTime_;
3931       }
3932     }
3933     /**
3934      *
3935      *
3936      * <pre>
3937      * Output only. The time at which this
3938      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] was created.
3939      * </pre>
3940      *
3941      * <code>
3942      * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
3943      * </code>
3944      */
3945     private com.google.protobuf.SingleFieldBuilderV3<
3946             com.google.protobuf.Timestamp,
3947             com.google.protobuf.Timestamp.Builder,
3948             com.google.protobuf.TimestampOrBuilder>
getCreateTimeFieldBuilder()3949         getCreateTimeFieldBuilder() {
3950       if (createTimeBuilder_ == null) {
3951         createTimeBuilder_ =
3952             new com.google.protobuf.SingleFieldBuilderV3<
3953                 com.google.protobuf.Timestamp,
3954                 com.google.protobuf.Timestamp.Builder,
3955                 com.google.protobuf.TimestampOrBuilder>(
3956                 getCreateTime(), getParentForChildren(), isClean());
3957         createTime_ = null;
3958       }
3959       return createTimeBuilder_;
3960     }
3961 
3962     private com.google.protobuf.Timestamp generateTime_;
3963     private com.google.protobuf.SingleFieldBuilderV3<
3964             com.google.protobuf.Timestamp,
3965             com.google.protobuf.Timestamp.Builder,
3966             com.google.protobuf.TimestampOrBuilder>
3967         generateTimeBuilder_;
3968     /**
3969      *
3970      *
3971      * <pre>
3972      * Output only. The time this
3973      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was
3974      * generated.
3975      * </pre>
3976      *
3977      * <code>
3978      * .google.protobuf.Timestamp generate_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
3979      * </code>
3980      *
3981      * @return Whether the generateTime field is set.
3982      */
hasGenerateTime()3983     public boolean hasGenerateTime() {
3984       return ((bitField0_ & 0x00000040) != 0);
3985     }
3986     /**
3987      *
3988      *
3989      * <pre>
3990      * Output only. The time this
3991      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was
3992      * generated.
3993      * </pre>
3994      *
3995      * <code>
3996      * .google.protobuf.Timestamp generate_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
3997      * </code>
3998      *
3999      * @return The generateTime.
4000      */
getGenerateTime()4001     public com.google.protobuf.Timestamp getGenerateTime() {
4002       if (generateTimeBuilder_ == null) {
4003         return generateTime_ == null
4004             ? com.google.protobuf.Timestamp.getDefaultInstance()
4005             : generateTime_;
4006       } else {
4007         return generateTimeBuilder_.getMessage();
4008       }
4009     }
4010     /**
4011      *
4012      *
4013      * <pre>
4014      * Output only. The time this
4015      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was
4016      * generated.
4017      * </pre>
4018      *
4019      * <code>
4020      * .google.protobuf.Timestamp generate_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
4021      * </code>
4022      */
setGenerateTime(com.google.protobuf.Timestamp value)4023     public Builder setGenerateTime(com.google.protobuf.Timestamp value) {
4024       if (generateTimeBuilder_ == null) {
4025         if (value == null) {
4026           throw new NullPointerException();
4027         }
4028         generateTime_ = value;
4029       } else {
4030         generateTimeBuilder_.setMessage(value);
4031       }
4032       bitField0_ |= 0x00000040;
4033       onChanged();
4034       return this;
4035     }
4036     /**
4037      *
4038      *
4039      * <pre>
4040      * Output only. The time this
4041      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was
4042      * generated.
4043      * </pre>
4044      *
4045      * <code>
4046      * .google.protobuf.Timestamp generate_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
4047      * </code>
4048      */
setGenerateTime(com.google.protobuf.Timestamp.Builder builderForValue)4049     public Builder setGenerateTime(com.google.protobuf.Timestamp.Builder builderForValue) {
4050       if (generateTimeBuilder_ == null) {
4051         generateTime_ = builderForValue.build();
4052       } else {
4053         generateTimeBuilder_.setMessage(builderForValue.build());
4054       }
4055       bitField0_ |= 0x00000040;
4056       onChanged();
4057       return this;
4058     }
4059     /**
4060      *
4061      *
4062      * <pre>
4063      * Output only. The time this
4064      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was
4065      * generated.
4066      * </pre>
4067      *
4068      * <code>
4069      * .google.protobuf.Timestamp generate_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
4070      * </code>
4071      */
mergeGenerateTime(com.google.protobuf.Timestamp value)4072     public Builder mergeGenerateTime(com.google.protobuf.Timestamp value) {
4073       if (generateTimeBuilder_ == null) {
4074         if (((bitField0_ & 0x00000040) != 0)
4075             && generateTime_ != null
4076             && generateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
4077           getGenerateTimeBuilder().mergeFrom(value);
4078         } else {
4079           generateTime_ = value;
4080         }
4081       } else {
4082         generateTimeBuilder_.mergeFrom(value);
4083       }
4084       bitField0_ |= 0x00000040;
4085       onChanged();
4086       return this;
4087     }
4088     /**
4089      *
4090      *
4091      * <pre>
4092      * Output only. The time this
4093      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was
4094      * generated.
4095      * </pre>
4096      *
4097      * <code>
4098      * .google.protobuf.Timestamp generate_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
4099      * </code>
4100      */
clearGenerateTime()4101     public Builder clearGenerateTime() {
4102       bitField0_ = (bitField0_ & ~0x00000040);
4103       generateTime_ = null;
4104       if (generateTimeBuilder_ != null) {
4105         generateTimeBuilder_.dispose();
4106         generateTimeBuilder_ = null;
4107       }
4108       onChanged();
4109       return this;
4110     }
4111     /**
4112      *
4113      *
4114      * <pre>
4115      * Output only. The time this
4116      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was
4117      * generated.
4118      * </pre>
4119      *
4120      * <code>
4121      * .google.protobuf.Timestamp generate_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
4122      * </code>
4123      */
getGenerateTimeBuilder()4124     public com.google.protobuf.Timestamp.Builder getGenerateTimeBuilder() {
4125       bitField0_ |= 0x00000040;
4126       onChanged();
4127       return getGenerateTimeFieldBuilder().getBuilder();
4128     }
4129     /**
4130      *
4131      *
4132      * <pre>
4133      * Output only. The time this
4134      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was
4135      * generated.
4136      * </pre>
4137      *
4138      * <code>
4139      * .google.protobuf.Timestamp generate_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
4140      * </code>
4141      */
getGenerateTimeOrBuilder()4142     public com.google.protobuf.TimestampOrBuilder getGenerateTimeOrBuilder() {
4143       if (generateTimeBuilder_ != null) {
4144         return generateTimeBuilder_.getMessageOrBuilder();
4145       } else {
4146         return generateTime_ == null
4147             ? com.google.protobuf.Timestamp.getDefaultInstance()
4148             : generateTime_;
4149       }
4150     }
4151     /**
4152      *
4153      *
4154      * <pre>
4155      * Output only. The time this
4156      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was
4157      * generated.
4158      * </pre>
4159      *
4160      * <code>
4161      * .google.protobuf.Timestamp generate_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
4162      * </code>
4163      */
4164     private com.google.protobuf.SingleFieldBuilderV3<
4165             com.google.protobuf.Timestamp,
4166             com.google.protobuf.Timestamp.Builder,
4167             com.google.protobuf.TimestampOrBuilder>
getGenerateTimeFieldBuilder()4168         getGenerateTimeFieldBuilder() {
4169       if (generateTimeBuilder_ == null) {
4170         generateTimeBuilder_ =
4171             new com.google.protobuf.SingleFieldBuilderV3<
4172                 com.google.protobuf.Timestamp,
4173                 com.google.protobuf.Timestamp.Builder,
4174                 com.google.protobuf.TimestampOrBuilder>(
4175                 getGenerateTime(), getParentForChildren(), isClean());
4176         generateTime_ = null;
4177       }
4178       return generateTimeBuilder_;
4179     }
4180 
4181     private com.google.protobuf.Timestamp destroyTime_;
4182     private com.google.protobuf.SingleFieldBuilderV3<
4183             com.google.protobuf.Timestamp,
4184             com.google.protobuf.Timestamp.Builder,
4185             com.google.protobuf.TimestampOrBuilder>
4186         destroyTimeBuilder_;
4187     /**
4188      *
4189      *
4190      * <pre>
4191      * Output only. The time this
4192      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material is
4193      * scheduled for destruction. Only present if
4194      * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is
4195      * [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED].
4196      * </pre>
4197      *
4198      * <code>
4199      * .google.protobuf.Timestamp destroy_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
4200      * </code>
4201      *
4202      * @return Whether the destroyTime field is set.
4203      */
hasDestroyTime()4204     public boolean hasDestroyTime() {
4205       return ((bitField0_ & 0x00000080) != 0);
4206     }
4207     /**
4208      *
4209      *
4210      * <pre>
4211      * Output only. The time this
4212      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material is
4213      * scheduled for destruction. Only present if
4214      * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is
4215      * [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED].
4216      * </pre>
4217      *
4218      * <code>
4219      * .google.protobuf.Timestamp destroy_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
4220      * </code>
4221      *
4222      * @return The destroyTime.
4223      */
getDestroyTime()4224     public com.google.protobuf.Timestamp getDestroyTime() {
4225       if (destroyTimeBuilder_ == null) {
4226         return destroyTime_ == null
4227             ? com.google.protobuf.Timestamp.getDefaultInstance()
4228             : destroyTime_;
4229       } else {
4230         return destroyTimeBuilder_.getMessage();
4231       }
4232     }
4233     /**
4234      *
4235      *
4236      * <pre>
4237      * Output only. The time this
4238      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material is
4239      * scheduled for destruction. Only present if
4240      * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is
4241      * [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED].
4242      * </pre>
4243      *
4244      * <code>
4245      * .google.protobuf.Timestamp destroy_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
4246      * </code>
4247      */
setDestroyTime(com.google.protobuf.Timestamp value)4248     public Builder setDestroyTime(com.google.protobuf.Timestamp value) {
4249       if (destroyTimeBuilder_ == null) {
4250         if (value == null) {
4251           throw new NullPointerException();
4252         }
4253         destroyTime_ = value;
4254       } else {
4255         destroyTimeBuilder_.setMessage(value);
4256       }
4257       bitField0_ |= 0x00000080;
4258       onChanged();
4259       return this;
4260     }
4261     /**
4262      *
4263      *
4264      * <pre>
4265      * Output only. The time this
4266      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material is
4267      * scheduled for destruction. Only present if
4268      * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is
4269      * [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED].
4270      * </pre>
4271      *
4272      * <code>
4273      * .google.protobuf.Timestamp destroy_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
4274      * </code>
4275      */
setDestroyTime(com.google.protobuf.Timestamp.Builder builderForValue)4276     public Builder setDestroyTime(com.google.protobuf.Timestamp.Builder builderForValue) {
4277       if (destroyTimeBuilder_ == null) {
4278         destroyTime_ = builderForValue.build();
4279       } else {
4280         destroyTimeBuilder_.setMessage(builderForValue.build());
4281       }
4282       bitField0_ |= 0x00000080;
4283       onChanged();
4284       return this;
4285     }
4286     /**
4287      *
4288      *
4289      * <pre>
4290      * Output only. The time this
4291      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material is
4292      * scheduled for destruction. Only present if
4293      * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is
4294      * [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED].
4295      * </pre>
4296      *
4297      * <code>
4298      * .google.protobuf.Timestamp destroy_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
4299      * </code>
4300      */
mergeDestroyTime(com.google.protobuf.Timestamp value)4301     public Builder mergeDestroyTime(com.google.protobuf.Timestamp value) {
4302       if (destroyTimeBuilder_ == null) {
4303         if (((bitField0_ & 0x00000080) != 0)
4304             && destroyTime_ != null
4305             && destroyTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
4306           getDestroyTimeBuilder().mergeFrom(value);
4307         } else {
4308           destroyTime_ = value;
4309         }
4310       } else {
4311         destroyTimeBuilder_.mergeFrom(value);
4312       }
4313       bitField0_ |= 0x00000080;
4314       onChanged();
4315       return this;
4316     }
4317     /**
4318      *
4319      *
4320      * <pre>
4321      * Output only. The time this
4322      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material is
4323      * scheduled for destruction. Only present if
4324      * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is
4325      * [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED].
4326      * </pre>
4327      *
4328      * <code>
4329      * .google.protobuf.Timestamp destroy_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
4330      * </code>
4331      */
clearDestroyTime()4332     public Builder clearDestroyTime() {
4333       bitField0_ = (bitField0_ & ~0x00000080);
4334       destroyTime_ = null;
4335       if (destroyTimeBuilder_ != null) {
4336         destroyTimeBuilder_.dispose();
4337         destroyTimeBuilder_ = null;
4338       }
4339       onChanged();
4340       return this;
4341     }
4342     /**
4343      *
4344      *
4345      * <pre>
4346      * Output only. The time this
4347      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material is
4348      * scheduled for destruction. Only present if
4349      * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is
4350      * [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED].
4351      * </pre>
4352      *
4353      * <code>
4354      * .google.protobuf.Timestamp destroy_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
4355      * </code>
4356      */
getDestroyTimeBuilder()4357     public com.google.protobuf.Timestamp.Builder getDestroyTimeBuilder() {
4358       bitField0_ |= 0x00000080;
4359       onChanged();
4360       return getDestroyTimeFieldBuilder().getBuilder();
4361     }
4362     /**
4363      *
4364      *
4365      * <pre>
4366      * Output only. The time this
4367      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material is
4368      * scheduled for destruction. Only present if
4369      * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is
4370      * [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED].
4371      * </pre>
4372      *
4373      * <code>
4374      * .google.protobuf.Timestamp destroy_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
4375      * </code>
4376      */
getDestroyTimeOrBuilder()4377     public com.google.protobuf.TimestampOrBuilder getDestroyTimeOrBuilder() {
4378       if (destroyTimeBuilder_ != null) {
4379         return destroyTimeBuilder_.getMessageOrBuilder();
4380       } else {
4381         return destroyTime_ == null
4382             ? com.google.protobuf.Timestamp.getDefaultInstance()
4383             : destroyTime_;
4384       }
4385     }
4386     /**
4387      *
4388      *
4389      * <pre>
4390      * Output only. The time this
4391      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material is
4392      * scheduled for destruction. Only present if
4393      * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is
4394      * [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED].
4395      * </pre>
4396      *
4397      * <code>
4398      * .google.protobuf.Timestamp destroy_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
4399      * </code>
4400      */
4401     private com.google.protobuf.SingleFieldBuilderV3<
4402             com.google.protobuf.Timestamp,
4403             com.google.protobuf.Timestamp.Builder,
4404             com.google.protobuf.TimestampOrBuilder>
getDestroyTimeFieldBuilder()4405         getDestroyTimeFieldBuilder() {
4406       if (destroyTimeBuilder_ == null) {
4407         destroyTimeBuilder_ =
4408             new com.google.protobuf.SingleFieldBuilderV3<
4409                 com.google.protobuf.Timestamp,
4410                 com.google.protobuf.Timestamp.Builder,
4411                 com.google.protobuf.TimestampOrBuilder>(
4412                 getDestroyTime(), getParentForChildren(), isClean());
4413         destroyTime_ = null;
4414       }
4415       return destroyTimeBuilder_;
4416     }
4417 
4418     private com.google.protobuf.Timestamp destroyEventTime_;
4419     private com.google.protobuf.SingleFieldBuilderV3<
4420             com.google.protobuf.Timestamp,
4421             com.google.protobuf.Timestamp.Builder,
4422             com.google.protobuf.TimestampOrBuilder>
4423         destroyEventTimeBuilder_;
4424     /**
4425      *
4426      *
4427      * <pre>
4428      * Output only. The time this CryptoKeyVersion's key material was
4429      * destroyed. Only present if
4430      * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is
4431      * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED].
4432      * </pre>
4433      *
4434      * <code>
4435      * .google.protobuf.Timestamp destroy_event_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
4436      * </code>
4437      *
4438      * @return Whether the destroyEventTime field is set.
4439      */
hasDestroyEventTime()4440     public boolean hasDestroyEventTime() {
4441       return ((bitField0_ & 0x00000100) != 0);
4442     }
4443     /**
4444      *
4445      *
4446      * <pre>
4447      * Output only. The time this CryptoKeyVersion's key material was
4448      * destroyed. Only present if
4449      * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is
4450      * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED].
4451      * </pre>
4452      *
4453      * <code>
4454      * .google.protobuf.Timestamp destroy_event_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
4455      * </code>
4456      *
4457      * @return The destroyEventTime.
4458      */
getDestroyEventTime()4459     public com.google.protobuf.Timestamp getDestroyEventTime() {
4460       if (destroyEventTimeBuilder_ == null) {
4461         return destroyEventTime_ == null
4462             ? com.google.protobuf.Timestamp.getDefaultInstance()
4463             : destroyEventTime_;
4464       } else {
4465         return destroyEventTimeBuilder_.getMessage();
4466       }
4467     }
4468     /**
4469      *
4470      *
4471      * <pre>
4472      * Output only. The time this CryptoKeyVersion's key material was
4473      * destroyed. Only present if
4474      * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is
4475      * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED].
4476      * </pre>
4477      *
4478      * <code>
4479      * .google.protobuf.Timestamp destroy_event_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
4480      * </code>
4481      */
setDestroyEventTime(com.google.protobuf.Timestamp value)4482     public Builder setDestroyEventTime(com.google.protobuf.Timestamp value) {
4483       if (destroyEventTimeBuilder_ == null) {
4484         if (value == null) {
4485           throw new NullPointerException();
4486         }
4487         destroyEventTime_ = value;
4488       } else {
4489         destroyEventTimeBuilder_.setMessage(value);
4490       }
4491       bitField0_ |= 0x00000100;
4492       onChanged();
4493       return this;
4494     }
4495     /**
4496      *
4497      *
4498      * <pre>
4499      * Output only. The time this CryptoKeyVersion's key material was
4500      * destroyed. Only present if
4501      * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is
4502      * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED].
4503      * </pre>
4504      *
4505      * <code>
4506      * .google.protobuf.Timestamp destroy_event_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
4507      * </code>
4508      */
setDestroyEventTime(com.google.protobuf.Timestamp.Builder builderForValue)4509     public Builder setDestroyEventTime(com.google.protobuf.Timestamp.Builder builderForValue) {
4510       if (destroyEventTimeBuilder_ == null) {
4511         destroyEventTime_ = builderForValue.build();
4512       } else {
4513         destroyEventTimeBuilder_.setMessage(builderForValue.build());
4514       }
4515       bitField0_ |= 0x00000100;
4516       onChanged();
4517       return this;
4518     }
4519     /**
4520      *
4521      *
4522      * <pre>
4523      * Output only. The time this CryptoKeyVersion's key material was
4524      * destroyed. Only present if
4525      * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is
4526      * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED].
4527      * </pre>
4528      *
4529      * <code>
4530      * .google.protobuf.Timestamp destroy_event_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
4531      * </code>
4532      */
mergeDestroyEventTime(com.google.protobuf.Timestamp value)4533     public Builder mergeDestroyEventTime(com.google.protobuf.Timestamp value) {
4534       if (destroyEventTimeBuilder_ == null) {
4535         if (((bitField0_ & 0x00000100) != 0)
4536             && destroyEventTime_ != null
4537             && destroyEventTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
4538           getDestroyEventTimeBuilder().mergeFrom(value);
4539         } else {
4540           destroyEventTime_ = value;
4541         }
4542       } else {
4543         destroyEventTimeBuilder_.mergeFrom(value);
4544       }
4545       bitField0_ |= 0x00000100;
4546       onChanged();
4547       return this;
4548     }
4549     /**
4550      *
4551      *
4552      * <pre>
4553      * Output only. The time this CryptoKeyVersion's key material was
4554      * destroyed. Only present if
4555      * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is
4556      * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED].
4557      * </pre>
4558      *
4559      * <code>
4560      * .google.protobuf.Timestamp destroy_event_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
4561      * </code>
4562      */
clearDestroyEventTime()4563     public Builder clearDestroyEventTime() {
4564       bitField0_ = (bitField0_ & ~0x00000100);
4565       destroyEventTime_ = null;
4566       if (destroyEventTimeBuilder_ != null) {
4567         destroyEventTimeBuilder_.dispose();
4568         destroyEventTimeBuilder_ = null;
4569       }
4570       onChanged();
4571       return this;
4572     }
4573     /**
4574      *
4575      *
4576      * <pre>
4577      * Output only. The time this CryptoKeyVersion's key material was
4578      * destroyed. Only present if
4579      * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is
4580      * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED].
4581      * </pre>
4582      *
4583      * <code>
4584      * .google.protobuf.Timestamp destroy_event_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
4585      * </code>
4586      */
getDestroyEventTimeBuilder()4587     public com.google.protobuf.Timestamp.Builder getDestroyEventTimeBuilder() {
4588       bitField0_ |= 0x00000100;
4589       onChanged();
4590       return getDestroyEventTimeFieldBuilder().getBuilder();
4591     }
4592     /**
4593      *
4594      *
4595      * <pre>
4596      * Output only. The time this CryptoKeyVersion's key material was
4597      * destroyed. Only present if
4598      * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is
4599      * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED].
4600      * </pre>
4601      *
4602      * <code>
4603      * .google.protobuf.Timestamp destroy_event_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
4604      * </code>
4605      */
getDestroyEventTimeOrBuilder()4606     public com.google.protobuf.TimestampOrBuilder getDestroyEventTimeOrBuilder() {
4607       if (destroyEventTimeBuilder_ != null) {
4608         return destroyEventTimeBuilder_.getMessageOrBuilder();
4609       } else {
4610         return destroyEventTime_ == null
4611             ? com.google.protobuf.Timestamp.getDefaultInstance()
4612             : destroyEventTime_;
4613       }
4614     }
4615     /**
4616      *
4617      *
4618      * <pre>
4619      * Output only. The time this CryptoKeyVersion's key material was
4620      * destroyed. Only present if
4621      * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is
4622      * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED].
4623      * </pre>
4624      *
4625      * <code>
4626      * .google.protobuf.Timestamp destroy_event_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
4627      * </code>
4628      */
4629     private com.google.protobuf.SingleFieldBuilderV3<
4630             com.google.protobuf.Timestamp,
4631             com.google.protobuf.Timestamp.Builder,
4632             com.google.protobuf.TimestampOrBuilder>
getDestroyEventTimeFieldBuilder()4633         getDestroyEventTimeFieldBuilder() {
4634       if (destroyEventTimeBuilder_ == null) {
4635         destroyEventTimeBuilder_ =
4636             new com.google.protobuf.SingleFieldBuilderV3<
4637                 com.google.protobuf.Timestamp,
4638                 com.google.protobuf.Timestamp.Builder,
4639                 com.google.protobuf.TimestampOrBuilder>(
4640                 getDestroyEventTime(), getParentForChildren(), isClean());
4641         destroyEventTime_ = null;
4642       }
4643       return destroyEventTimeBuilder_;
4644     }
4645 
4646     private java.lang.Object importJob_ = "";
4647     /**
4648      *
4649      *
4650      * <pre>
4651      * Output only. The name of the [ImportJob][google.cloud.kms.v1.ImportJob]
4652      * used in the most recent import of this
4653      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. Only present if
4654      * the underlying key material was imported.
4655      * </pre>
4656      *
4657      * <code>string import_job = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
4658      *
4659      * @return The importJob.
4660      */
getImportJob()4661     public java.lang.String getImportJob() {
4662       java.lang.Object ref = importJob_;
4663       if (!(ref instanceof java.lang.String)) {
4664         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
4665         java.lang.String s = bs.toStringUtf8();
4666         importJob_ = s;
4667         return s;
4668       } else {
4669         return (java.lang.String) ref;
4670       }
4671     }
4672     /**
4673      *
4674      *
4675      * <pre>
4676      * Output only. The name of the [ImportJob][google.cloud.kms.v1.ImportJob]
4677      * used in the most recent import of this
4678      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. Only present if
4679      * the underlying key material was imported.
4680      * </pre>
4681      *
4682      * <code>string import_job = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
4683      *
4684      * @return The bytes for importJob.
4685      */
getImportJobBytes()4686     public com.google.protobuf.ByteString getImportJobBytes() {
4687       java.lang.Object ref = importJob_;
4688       if (ref instanceof String) {
4689         com.google.protobuf.ByteString b =
4690             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
4691         importJob_ = b;
4692         return b;
4693       } else {
4694         return (com.google.protobuf.ByteString) ref;
4695       }
4696     }
4697     /**
4698      *
4699      *
4700      * <pre>
4701      * Output only. The name of the [ImportJob][google.cloud.kms.v1.ImportJob]
4702      * used in the most recent import of this
4703      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. Only present if
4704      * the underlying key material was imported.
4705      * </pre>
4706      *
4707      * <code>string import_job = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
4708      *
4709      * @param value The importJob to set.
4710      * @return This builder for chaining.
4711      */
setImportJob(java.lang.String value)4712     public Builder setImportJob(java.lang.String value) {
4713       if (value == null) {
4714         throw new NullPointerException();
4715       }
4716       importJob_ = value;
4717       bitField0_ |= 0x00000200;
4718       onChanged();
4719       return this;
4720     }
4721     /**
4722      *
4723      *
4724      * <pre>
4725      * Output only. The name of the [ImportJob][google.cloud.kms.v1.ImportJob]
4726      * used in the most recent import of this
4727      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. Only present if
4728      * the underlying key material was imported.
4729      * </pre>
4730      *
4731      * <code>string import_job = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
4732      *
4733      * @return This builder for chaining.
4734      */
clearImportJob()4735     public Builder clearImportJob() {
4736       importJob_ = getDefaultInstance().getImportJob();
4737       bitField0_ = (bitField0_ & ~0x00000200);
4738       onChanged();
4739       return this;
4740     }
4741     /**
4742      *
4743      *
4744      * <pre>
4745      * Output only. The name of the [ImportJob][google.cloud.kms.v1.ImportJob]
4746      * used in the most recent import of this
4747      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. Only present if
4748      * the underlying key material was imported.
4749      * </pre>
4750      *
4751      * <code>string import_job = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
4752      *
4753      * @param value The bytes for importJob to set.
4754      * @return This builder for chaining.
4755      */
setImportJobBytes(com.google.protobuf.ByteString value)4756     public Builder setImportJobBytes(com.google.protobuf.ByteString value) {
4757       if (value == null) {
4758         throw new NullPointerException();
4759       }
4760       checkByteStringIsUtf8(value);
4761       importJob_ = value;
4762       bitField0_ |= 0x00000200;
4763       onChanged();
4764       return this;
4765     }
4766 
4767     private com.google.protobuf.Timestamp importTime_;
4768     private com.google.protobuf.SingleFieldBuilderV3<
4769             com.google.protobuf.Timestamp,
4770             com.google.protobuf.Timestamp.Builder,
4771             com.google.protobuf.TimestampOrBuilder>
4772         importTimeBuilder_;
4773     /**
4774      *
4775      *
4776      * <pre>
4777      * Output only. The time at which this
4778      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was
4779      * most recently imported.
4780      * </pre>
4781      *
4782      * <code>
4783      * .google.protobuf.Timestamp import_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
4784      * </code>
4785      *
4786      * @return Whether the importTime field is set.
4787      */
hasImportTime()4788     public boolean hasImportTime() {
4789       return ((bitField0_ & 0x00000400) != 0);
4790     }
4791     /**
4792      *
4793      *
4794      * <pre>
4795      * Output only. The time at which this
4796      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was
4797      * most recently imported.
4798      * </pre>
4799      *
4800      * <code>
4801      * .google.protobuf.Timestamp import_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
4802      * </code>
4803      *
4804      * @return The importTime.
4805      */
getImportTime()4806     public com.google.protobuf.Timestamp getImportTime() {
4807       if (importTimeBuilder_ == null) {
4808         return importTime_ == null
4809             ? com.google.protobuf.Timestamp.getDefaultInstance()
4810             : importTime_;
4811       } else {
4812         return importTimeBuilder_.getMessage();
4813       }
4814     }
4815     /**
4816      *
4817      *
4818      * <pre>
4819      * Output only. The time at which this
4820      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was
4821      * most recently imported.
4822      * </pre>
4823      *
4824      * <code>
4825      * .google.protobuf.Timestamp import_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
4826      * </code>
4827      */
setImportTime(com.google.protobuf.Timestamp value)4828     public Builder setImportTime(com.google.protobuf.Timestamp value) {
4829       if (importTimeBuilder_ == null) {
4830         if (value == null) {
4831           throw new NullPointerException();
4832         }
4833         importTime_ = value;
4834       } else {
4835         importTimeBuilder_.setMessage(value);
4836       }
4837       bitField0_ |= 0x00000400;
4838       onChanged();
4839       return this;
4840     }
4841     /**
4842      *
4843      *
4844      * <pre>
4845      * Output only. The time at which this
4846      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was
4847      * most recently imported.
4848      * </pre>
4849      *
4850      * <code>
4851      * .google.protobuf.Timestamp import_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
4852      * </code>
4853      */
setImportTime(com.google.protobuf.Timestamp.Builder builderForValue)4854     public Builder setImportTime(com.google.protobuf.Timestamp.Builder builderForValue) {
4855       if (importTimeBuilder_ == null) {
4856         importTime_ = builderForValue.build();
4857       } else {
4858         importTimeBuilder_.setMessage(builderForValue.build());
4859       }
4860       bitField0_ |= 0x00000400;
4861       onChanged();
4862       return this;
4863     }
4864     /**
4865      *
4866      *
4867      * <pre>
4868      * Output only. The time at which this
4869      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was
4870      * most recently imported.
4871      * </pre>
4872      *
4873      * <code>
4874      * .google.protobuf.Timestamp import_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
4875      * </code>
4876      */
mergeImportTime(com.google.protobuf.Timestamp value)4877     public Builder mergeImportTime(com.google.protobuf.Timestamp value) {
4878       if (importTimeBuilder_ == null) {
4879         if (((bitField0_ & 0x00000400) != 0)
4880             && importTime_ != null
4881             && importTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
4882           getImportTimeBuilder().mergeFrom(value);
4883         } else {
4884           importTime_ = value;
4885         }
4886       } else {
4887         importTimeBuilder_.mergeFrom(value);
4888       }
4889       bitField0_ |= 0x00000400;
4890       onChanged();
4891       return this;
4892     }
4893     /**
4894      *
4895      *
4896      * <pre>
4897      * Output only. The time at which this
4898      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was
4899      * most recently imported.
4900      * </pre>
4901      *
4902      * <code>
4903      * .google.protobuf.Timestamp import_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
4904      * </code>
4905      */
clearImportTime()4906     public Builder clearImportTime() {
4907       bitField0_ = (bitField0_ & ~0x00000400);
4908       importTime_ = null;
4909       if (importTimeBuilder_ != null) {
4910         importTimeBuilder_.dispose();
4911         importTimeBuilder_ = null;
4912       }
4913       onChanged();
4914       return this;
4915     }
4916     /**
4917      *
4918      *
4919      * <pre>
4920      * Output only. The time at which this
4921      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was
4922      * most recently imported.
4923      * </pre>
4924      *
4925      * <code>
4926      * .google.protobuf.Timestamp import_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
4927      * </code>
4928      */
getImportTimeBuilder()4929     public com.google.protobuf.Timestamp.Builder getImportTimeBuilder() {
4930       bitField0_ |= 0x00000400;
4931       onChanged();
4932       return getImportTimeFieldBuilder().getBuilder();
4933     }
4934     /**
4935      *
4936      *
4937      * <pre>
4938      * Output only. The time at which this
4939      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was
4940      * most recently imported.
4941      * </pre>
4942      *
4943      * <code>
4944      * .google.protobuf.Timestamp import_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
4945      * </code>
4946      */
getImportTimeOrBuilder()4947     public com.google.protobuf.TimestampOrBuilder getImportTimeOrBuilder() {
4948       if (importTimeBuilder_ != null) {
4949         return importTimeBuilder_.getMessageOrBuilder();
4950       } else {
4951         return importTime_ == null
4952             ? com.google.protobuf.Timestamp.getDefaultInstance()
4953             : importTime_;
4954       }
4955     }
4956     /**
4957      *
4958      *
4959      * <pre>
4960      * Output only. The time at which this
4961      * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was
4962      * most recently imported.
4963      * </pre>
4964      *
4965      * <code>
4966      * .google.protobuf.Timestamp import_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
4967      * </code>
4968      */
4969     private com.google.protobuf.SingleFieldBuilderV3<
4970             com.google.protobuf.Timestamp,
4971             com.google.protobuf.Timestamp.Builder,
4972             com.google.protobuf.TimestampOrBuilder>
getImportTimeFieldBuilder()4973         getImportTimeFieldBuilder() {
4974       if (importTimeBuilder_ == null) {
4975         importTimeBuilder_ =
4976             new com.google.protobuf.SingleFieldBuilderV3<
4977                 com.google.protobuf.Timestamp,
4978                 com.google.protobuf.Timestamp.Builder,
4979                 com.google.protobuf.TimestampOrBuilder>(
4980                 getImportTime(), getParentForChildren(), isClean());
4981         importTime_ = null;
4982       }
4983       return importTimeBuilder_;
4984     }
4985 
4986     private java.lang.Object importFailureReason_ = "";
4987     /**
4988      *
4989      *
4990      * <pre>
4991      * Output only. The root cause of the most recent import failure. Only present
4992      * if [state][google.cloud.kms.v1.CryptoKeyVersion.state] is
4993      * [IMPORT_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.IMPORT_FAILED].
4994      * </pre>
4995      *
4996      * <code>string import_failure_reason = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
4997      *
4998      * @return The importFailureReason.
4999      */
getImportFailureReason()5000     public java.lang.String getImportFailureReason() {
5001       java.lang.Object ref = importFailureReason_;
5002       if (!(ref instanceof java.lang.String)) {
5003         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
5004         java.lang.String s = bs.toStringUtf8();
5005         importFailureReason_ = s;
5006         return s;
5007       } else {
5008         return (java.lang.String) ref;
5009       }
5010     }
5011     /**
5012      *
5013      *
5014      * <pre>
5015      * Output only. The root cause of the most recent import failure. Only present
5016      * if [state][google.cloud.kms.v1.CryptoKeyVersion.state] is
5017      * [IMPORT_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.IMPORT_FAILED].
5018      * </pre>
5019      *
5020      * <code>string import_failure_reason = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
5021      *
5022      * @return The bytes for importFailureReason.
5023      */
getImportFailureReasonBytes()5024     public com.google.protobuf.ByteString getImportFailureReasonBytes() {
5025       java.lang.Object ref = importFailureReason_;
5026       if (ref instanceof String) {
5027         com.google.protobuf.ByteString b =
5028             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
5029         importFailureReason_ = b;
5030         return b;
5031       } else {
5032         return (com.google.protobuf.ByteString) ref;
5033       }
5034     }
5035     /**
5036      *
5037      *
5038      * <pre>
5039      * Output only. The root cause of the most recent import failure. Only present
5040      * if [state][google.cloud.kms.v1.CryptoKeyVersion.state] is
5041      * [IMPORT_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.IMPORT_FAILED].
5042      * </pre>
5043      *
5044      * <code>string import_failure_reason = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
5045      *
5046      * @param value The importFailureReason to set.
5047      * @return This builder for chaining.
5048      */
setImportFailureReason(java.lang.String value)5049     public Builder setImportFailureReason(java.lang.String value) {
5050       if (value == null) {
5051         throw new NullPointerException();
5052       }
5053       importFailureReason_ = value;
5054       bitField0_ |= 0x00000800;
5055       onChanged();
5056       return this;
5057     }
5058     /**
5059      *
5060      *
5061      * <pre>
5062      * Output only. The root cause of the most recent import failure. Only present
5063      * if [state][google.cloud.kms.v1.CryptoKeyVersion.state] is
5064      * [IMPORT_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.IMPORT_FAILED].
5065      * </pre>
5066      *
5067      * <code>string import_failure_reason = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
5068      *
5069      * @return This builder for chaining.
5070      */
clearImportFailureReason()5071     public Builder clearImportFailureReason() {
5072       importFailureReason_ = getDefaultInstance().getImportFailureReason();
5073       bitField0_ = (bitField0_ & ~0x00000800);
5074       onChanged();
5075       return this;
5076     }
5077     /**
5078      *
5079      *
5080      * <pre>
5081      * Output only. The root cause of the most recent import failure. Only present
5082      * if [state][google.cloud.kms.v1.CryptoKeyVersion.state] is
5083      * [IMPORT_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.IMPORT_FAILED].
5084      * </pre>
5085      *
5086      * <code>string import_failure_reason = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
5087      *
5088      * @param value The bytes for importFailureReason to set.
5089      * @return This builder for chaining.
5090      */
setImportFailureReasonBytes(com.google.protobuf.ByteString value)5091     public Builder setImportFailureReasonBytes(com.google.protobuf.ByteString value) {
5092       if (value == null) {
5093         throw new NullPointerException();
5094       }
5095       checkByteStringIsUtf8(value);
5096       importFailureReason_ = value;
5097       bitField0_ |= 0x00000800;
5098       onChanged();
5099       return this;
5100     }
5101 
5102     private java.lang.Object generationFailureReason_ = "";
5103     /**
5104      *
5105      *
5106      * <pre>
5107      * Output only. The root cause of the most recent generation failure. Only
5108      * present if [state][google.cloud.kms.v1.CryptoKeyVersion.state] is
5109      * [GENERATION_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.GENERATION_FAILED].
5110      * </pre>
5111      *
5112      * <code>string generation_failure_reason = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];
5113      * </code>
5114      *
5115      * @return The generationFailureReason.
5116      */
getGenerationFailureReason()5117     public java.lang.String getGenerationFailureReason() {
5118       java.lang.Object ref = generationFailureReason_;
5119       if (!(ref instanceof java.lang.String)) {
5120         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
5121         java.lang.String s = bs.toStringUtf8();
5122         generationFailureReason_ = s;
5123         return s;
5124       } else {
5125         return (java.lang.String) ref;
5126       }
5127     }
5128     /**
5129      *
5130      *
5131      * <pre>
5132      * Output only. The root cause of the most recent generation failure. Only
5133      * present if [state][google.cloud.kms.v1.CryptoKeyVersion.state] is
5134      * [GENERATION_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.GENERATION_FAILED].
5135      * </pre>
5136      *
5137      * <code>string generation_failure_reason = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];
5138      * </code>
5139      *
5140      * @return The bytes for generationFailureReason.
5141      */
getGenerationFailureReasonBytes()5142     public com.google.protobuf.ByteString getGenerationFailureReasonBytes() {
5143       java.lang.Object ref = generationFailureReason_;
5144       if (ref instanceof String) {
5145         com.google.protobuf.ByteString b =
5146             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
5147         generationFailureReason_ = b;
5148         return b;
5149       } else {
5150         return (com.google.protobuf.ByteString) ref;
5151       }
5152     }
5153     /**
5154      *
5155      *
5156      * <pre>
5157      * Output only. The root cause of the most recent generation failure. Only
5158      * present if [state][google.cloud.kms.v1.CryptoKeyVersion.state] is
5159      * [GENERATION_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.GENERATION_FAILED].
5160      * </pre>
5161      *
5162      * <code>string generation_failure_reason = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];
5163      * </code>
5164      *
5165      * @param value The generationFailureReason to set.
5166      * @return This builder for chaining.
5167      */
setGenerationFailureReason(java.lang.String value)5168     public Builder setGenerationFailureReason(java.lang.String value) {
5169       if (value == null) {
5170         throw new NullPointerException();
5171       }
5172       generationFailureReason_ = value;
5173       bitField0_ |= 0x00001000;
5174       onChanged();
5175       return this;
5176     }
5177     /**
5178      *
5179      *
5180      * <pre>
5181      * Output only. The root cause of the most recent generation failure. Only
5182      * present if [state][google.cloud.kms.v1.CryptoKeyVersion.state] is
5183      * [GENERATION_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.GENERATION_FAILED].
5184      * </pre>
5185      *
5186      * <code>string generation_failure_reason = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];
5187      * </code>
5188      *
5189      * @return This builder for chaining.
5190      */
clearGenerationFailureReason()5191     public Builder clearGenerationFailureReason() {
5192       generationFailureReason_ = getDefaultInstance().getGenerationFailureReason();
5193       bitField0_ = (bitField0_ & ~0x00001000);
5194       onChanged();
5195       return this;
5196     }
5197     /**
5198      *
5199      *
5200      * <pre>
5201      * Output only. The root cause of the most recent generation failure. Only
5202      * present if [state][google.cloud.kms.v1.CryptoKeyVersion.state] is
5203      * [GENERATION_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.GENERATION_FAILED].
5204      * </pre>
5205      *
5206      * <code>string generation_failure_reason = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];
5207      * </code>
5208      *
5209      * @param value The bytes for generationFailureReason to set.
5210      * @return This builder for chaining.
5211      */
setGenerationFailureReasonBytes(com.google.protobuf.ByteString value)5212     public Builder setGenerationFailureReasonBytes(com.google.protobuf.ByteString value) {
5213       if (value == null) {
5214         throw new NullPointerException();
5215       }
5216       checkByteStringIsUtf8(value);
5217       generationFailureReason_ = value;
5218       bitField0_ |= 0x00001000;
5219       onChanged();
5220       return this;
5221     }
5222 
5223     private java.lang.Object externalDestructionFailureReason_ = "";
5224     /**
5225      *
5226      *
5227      * <pre>
5228      * Output only. The root cause of the most recent external destruction
5229      * failure. Only present if
5230      * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is
5231      * [EXTERNAL_DESTRUCTION_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.EXTERNAL_DESTRUCTION_FAILED].
5232      * </pre>
5233      *
5234      * <code>
5235      * string external_destruction_failure_reason = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];
5236      * </code>
5237      *
5238      * @return The externalDestructionFailureReason.
5239      */
getExternalDestructionFailureReason()5240     public java.lang.String getExternalDestructionFailureReason() {
5241       java.lang.Object ref = externalDestructionFailureReason_;
5242       if (!(ref instanceof java.lang.String)) {
5243         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
5244         java.lang.String s = bs.toStringUtf8();
5245         externalDestructionFailureReason_ = s;
5246         return s;
5247       } else {
5248         return (java.lang.String) ref;
5249       }
5250     }
5251     /**
5252      *
5253      *
5254      * <pre>
5255      * Output only. The root cause of the most recent external destruction
5256      * failure. Only present if
5257      * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is
5258      * [EXTERNAL_DESTRUCTION_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.EXTERNAL_DESTRUCTION_FAILED].
5259      * </pre>
5260      *
5261      * <code>
5262      * string external_destruction_failure_reason = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];
5263      * </code>
5264      *
5265      * @return The bytes for externalDestructionFailureReason.
5266      */
getExternalDestructionFailureReasonBytes()5267     public com.google.protobuf.ByteString getExternalDestructionFailureReasonBytes() {
5268       java.lang.Object ref = externalDestructionFailureReason_;
5269       if (ref instanceof String) {
5270         com.google.protobuf.ByteString b =
5271             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
5272         externalDestructionFailureReason_ = b;
5273         return b;
5274       } else {
5275         return (com.google.protobuf.ByteString) ref;
5276       }
5277     }
5278     /**
5279      *
5280      *
5281      * <pre>
5282      * Output only. The root cause of the most recent external destruction
5283      * failure. Only present if
5284      * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is
5285      * [EXTERNAL_DESTRUCTION_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.EXTERNAL_DESTRUCTION_FAILED].
5286      * </pre>
5287      *
5288      * <code>
5289      * string external_destruction_failure_reason = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];
5290      * </code>
5291      *
5292      * @param value The externalDestructionFailureReason to set.
5293      * @return This builder for chaining.
5294      */
setExternalDestructionFailureReason(java.lang.String value)5295     public Builder setExternalDestructionFailureReason(java.lang.String value) {
5296       if (value == null) {
5297         throw new NullPointerException();
5298       }
5299       externalDestructionFailureReason_ = value;
5300       bitField0_ |= 0x00002000;
5301       onChanged();
5302       return this;
5303     }
5304     /**
5305      *
5306      *
5307      * <pre>
5308      * Output only. The root cause of the most recent external destruction
5309      * failure. Only present if
5310      * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is
5311      * [EXTERNAL_DESTRUCTION_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.EXTERNAL_DESTRUCTION_FAILED].
5312      * </pre>
5313      *
5314      * <code>
5315      * string external_destruction_failure_reason = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];
5316      * </code>
5317      *
5318      * @return This builder for chaining.
5319      */
clearExternalDestructionFailureReason()5320     public Builder clearExternalDestructionFailureReason() {
5321       externalDestructionFailureReason_ =
5322           getDefaultInstance().getExternalDestructionFailureReason();
5323       bitField0_ = (bitField0_ & ~0x00002000);
5324       onChanged();
5325       return this;
5326     }
5327     /**
5328      *
5329      *
5330      * <pre>
5331      * Output only. The root cause of the most recent external destruction
5332      * failure. Only present if
5333      * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is
5334      * [EXTERNAL_DESTRUCTION_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.EXTERNAL_DESTRUCTION_FAILED].
5335      * </pre>
5336      *
5337      * <code>
5338      * string external_destruction_failure_reason = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];
5339      * </code>
5340      *
5341      * @param value The bytes for externalDestructionFailureReason to set.
5342      * @return This builder for chaining.
5343      */
setExternalDestructionFailureReasonBytes(com.google.protobuf.ByteString value)5344     public Builder setExternalDestructionFailureReasonBytes(com.google.protobuf.ByteString value) {
5345       if (value == null) {
5346         throw new NullPointerException();
5347       }
5348       checkByteStringIsUtf8(value);
5349       externalDestructionFailureReason_ = value;
5350       bitField0_ |= 0x00002000;
5351       onChanged();
5352       return this;
5353     }
5354 
5355     private com.google.cloud.kms.v1.ExternalProtectionLevelOptions externalProtectionLevelOptions_;
5356     private com.google.protobuf.SingleFieldBuilderV3<
5357             com.google.cloud.kms.v1.ExternalProtectionLevelOptions,
5358             com.google.cloud.kms.v1.ExternalProtectionLevelOptions.Builder,
5359             com.google.cloud.kms.v1.ExternalProtectionLevelOptionsOrBuilder>
5360         externalProtectionLevelOptionsBuilder_;
5361     /**
5362      *
5363      *
5364      * <pre>
5365      * ExternalProtectionLevelOptions stores a group of additional fields for
5366      * configuring a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that
5367      * are specific to the
5368      * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] protection level
5369      * and [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC]
5370      * protection levels.
5371      * </pre>
5372      *
5373      * <code>
5374      * .google.cloud.kms.v1.ExternalProtectionLevelOptions external_protection_level_options = 17;
5375      * </code>
5376      *
5377      * @return Whether the externalProtectionLevelOptions field is set.
5378      */
hasExternalProtectionLevelOptions()5379     public boolean hasExternalProtectionLevelOptions() {
5380       return ((bitField0_ & 0x00004000) != 0);
5381     }
5382     /**
5383      *
5384      *
5385      * <pre>
5386      * ExternalProtectionLevelOptions stores a group of additional fields for
5387      * configuring a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that
5388      * are specific to the
5389      * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] protection level
5390      * and [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC]
5391      * protection levels.
5392      * </pre>
5393      *
5394      * <code>
5395      * .google.cloud.kms.v1.ExternalProtectionLevelOptions external_protection_level_options = 17;
5396      * </code>
5397      *
5398      * @return The externalProtectionLevelOptions.
5399      */
5400     public com.google.cloud.kms.v1.ExternalProtectionLevelOptions
getExternalProtectionLevelOptions()5401         getExternalProtectionLevelOptions() {
5402       if (externalProtectionLevelOptionsBuilder_ == null) {
5403         return externalProtectionLevelOptions_ == null
5404             ? com.google.cloud.kms.v1.ExternalProtectionLevelOptions.getDefaultInstance()
5405             : externalProtectionLevelOptions_;
5406       } else {
5407         return externalProtectionLevelOptionsBuilder_.getMessage();
5408       }
5409     }
5410     /**
5411      *
5412      *
5413      * <pre>
5414      * ExternalProtectionLevelOptions stores a group of additional fields for
5415      * configuring a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that
5416      * are specific to the
5417      * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] protection level
5418      * and [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC]
5419      * protection levels.
5420      * </pre>
5421      *
5422      * <code>
5423      * .google.cloud.kms.v1.ExternalProtectionLevelOptions external_protection_level_options = 17;
5424      * </code>
5425      */
setExternalProtectionLevelOptions( com.google.cloud.kms.v1.ExternalProtectionLevelOptions value)5426     public Builder setExternalProtectionLevelOptions(
5427         com.google.cloud.kms.v1.ExternalProtectionLevelOptions value) {
5428       if (externalProtectionLevelOptionsBuilder_ == null) {
5429         if (value == null) {
5430           throw new NullPointerException();
5431         }
5432         externalProtectionLevelOptions_ = value;
5433       } else {
5434         externalProtectionLevelOptionsBuilder_.setMessage(value);
5435       }
5436       bitField0_ |= 0x00004000;
5437       onChanged();
5438       return this;
5439     }
5440     /**
5441      *
5442      *
5443      * <pre>
5444      * ExternalProtectionLevelOptions stores a group of additional fields for
5445      * configuring a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that
5446      * are specific to the
5447      * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] protection level
5448      * and [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC]
5449      * protection levels.
5450      * </pre>
5451      *
5452      * <code>
5453      * .google.cloud.kms.v1.ExternalProtectionLevelOptions external_protection_level_options = 17;
5454      * </code>
5455      */
setExternalProtectionLevelOptions( com.google.cloud.kms.v1.ExternalProtectionLevelOptions.Builder builderForValue)5456     public Builder setExternalProtectionLevelOptions(
5457         com.google.cloud.kms.v1.ExternalProtectionLevelOptions.Builder builderForValue) {
5458       if (externalProtectionLevelOptionsBuilder_ == null) {
5459         externalProtectionLevelOptions_ = builderForValue.build();
5460       } else {
5461         externalProtectionLevelOptionsBuilder_.setMessage(builderForValue.build());
5462       }
5463       bitField0_ |= 0x00004000;
5464       onChanged();
5465       return this;
5466     }
5467     /**
5468      *
5469      *
5470      * <pre>
5471      * ExternalProtectionLevelOptions stores a group of additional fields for
5472      * configuring a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that
5473      * are specific to the
5474      * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] protection level
5475      * and [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC]
5476      * protection levels.
5477      * </pre>
5478      *
5479      * <code>
5480      * .google.cloud.kms.v1.ExternalProtectionLevelOptions external_protection_level_options = 17;
5481      * </code>
5482      */
mergeExternalProtectionLevelOptions( com.google.cloud.kms.v1.ExternalProtectionLevelOptions value)5483     public Builder mergeExternalProtectionLevelOptions(
5484         com.google.cloud.kms.v1.ExternalProtectionLevelOptions value) {
5485       if (externalProtectionLevelOptionsBuilder_ == null) {
5486         if (((bitField0_ & 0x00004000) != 0)
5487             && externalProtectionLevelOptions_ != null
5488             && externalProtectionLevelOptions_
5489                 != com.google.cloud.kms.v1.ExternalProtectionLevelOptions.getDefaultInstance()) {
5490           getExternalProtectionLevelOptionsBuilder().mergeFrom(value);
5491         } else {
5492           externalProtectionLevelOptions_ = value;
5493         }
5494       } else {
5495         externalProtectionLevelOptionsBuilder_.mergeFrom(value);
5496       }
5497       bitField0_ |= 0x00004000;
5498       onChanged();
5499       return this;
5500     }
5501     /**
5502      *
5503      *
5504      * <pre>
5505      * ExternalProtectionLevelOptions stores a group of additional fields for
5506      * configuring a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that
5507      * are specific to the
5508      * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] protection level
5509      * and [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC]
5510      * protection levels.
5511      * </pre>
5512      *
5513      * <code>
5514      * .google.cloud.kms.v1.ExternalProtectionLevelOptions external_protection_level_options = 17;
5515      * </code>
5516      */
clearExternalProtectionLevelOptions()5517     public Builder clearExternalProtectionLevelOptions() {
5518       bitField0_ = (bitField0_ & ~0x00004000);
5519       externalProtectionLevelOptions_ = null;
5520       if (externalProtectionLevelOptionsBuilder_ != null) {
5521         externalProtectionLevelOptionsBuilder_.dispose();
5522         externalProtectionLevelOptionsBuilder_ = null;
5523       }
5524       onChanged();
5525       return this;
5526     }
5527     /**
5528      *
5529      *
5530      * <pre>
5531      * ExternalProtectionLevelOptions stores a group of additional fields for
5532      * configuring a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that
5533      * are specific to the
5534      * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] protection level
5535      * and [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC]
5536      * protection levels.
5537      * </pre>
5538      *
5539      * <code>
5540      * .google.cloud.kms.v1.ExternalProtectionLevelOptions external_protection_level_options = 17;
5541      * </code>
5542      */
5543     public com.google.cloud.kms.v1.ExternalProtectionLevelOptions.Builder
getExternalProtectionLevelOptionsBuilder()5544         getExternalProtectionLevelOptionsBuilder() {
5545       bitField0_ |= 0x00004000;
5546       onChanged();
5547       return getExternalProtectionLevelOptionsFieldBuilder().getBuilder();
5548     }
5549     /**
5550      *
5551      *
5552      * <pre>
5553      * ExternalProtectionLevelOptions stores a group of additional fields for
5554      * configuring a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that
5555      * are specific to the
5556      * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] protection level
5557      * and [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC]
5558      * protection levels.
5559      * </pre>
5560      *
5561      * <code>
5562      * .google.cloud.kms.v1.ExternalProtectionLevelOptions external_protection_level_options = 17;
5563      * </code>
5564      */
5565     public com.google.cloud.kms.v1.ExternalProtectionLevelOptionsOrBuilder
getExternalProtectionLevelOptionsOrBuilder()5566         getExternalProtectionLevelOptionsOrBuilder() {
5567       if (externalProtectionLevelOptionsBuilder_ != null) {
5568         return externalProtectionLevelOptionsBuilder_.getMessageOrBuilder();
5569       } else {
5570         return externalProtectionLevelOptions_ == null
5571             ? com.google.cloud.kms.v1.ExternalProtectionLevelOptions.getDefaultInstance()
5572             : externalProtectionLevelOptions_;
5573       }
5574     }
5575     /**
5576      *
5577      *
5578      * <pre>
5579      * ExternalProtectionLevelOptions stores a group of additional fields for
5580      * configuring a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that
5581      * are specific to the
5582      * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] protection level
5583      * and [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC]
5584      * protection levels.
5585      * </pre>
5586      *
5587      * <code>
5588      * .google.cloud.kms.v1.ExternalProtectionLevelOptions external_protection_level_options = 17;
5589      * </code>
5590      */
5591     private com.google.protobuf.SingleFieldBuilderV3<
5592             com.google.cloud.kms.v1.ExternalProtectionLevelOptions,
5593             com.google.cloud.kms.v1.ExternalProtectionLevelOptions.Builder,
5594             com.google.cloud.kms.v1.ExternalProtectionLevelOptionsOrBuilder>
getExternalProtectionLevelOptionsFieldBuilder()5595         getExternalProtectionLevelOptionsFieldBuilder() {
5596       if (externalProtectionLevelOptionsBuilder_ == null) {
5597         externalProtectionLevelOptionsBuilder_ =
5598             new com.google.protobuf.SingleFieldBuilderV3<
5599                 com.google.cloud.kms.v1.ExternalProtectionLevelOptions,
5600                 com.google.cloud.kms.v1.ExternalProtectionLevelOptions.Builder,
5601                 com.google.cloud.kms.v1.ExternalProtectionLevelOptionsOrBuilder>(
5602                 getExternalProtectionLevelOptions(), getParentForChildren(), isClean());
5603         externalProtectionLevelOptions_ = null;
5604       }
5605       return externalProtectionLevelOptionsBuilder_;
5606     }
5607 
5608     private boolean reimportEligible_;
5609     /**
5610      *
5611      *
5612      * <pre>
5613      * Output only. Whether or not this key version is eligible for reimport, by
5614      * being specified as a target in
5615      * [ImportCryptoKeyVersionRequest.crypto_key_version][google.cloud.kms.v1.ImportCryptoKeyVersionRequest.crypto_key_version].
5616      * </pre>
5617      *
5618      * <code>bool reimport_eligible = 18 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
5619      *
5620      * @return The reimportEligible.
5621      */
5622     @java.lang.Override
getReimportEligible()5623     public boolean getReimportEligible() {
5624       return reimportEligible_;
5625     }
5626     /**
5627      *
5628      *
5629      * <pre>
5630      * Output only. Whether or not this key version is eligible for reimport, by
5631      * being specified as a target in
5632      * [ImportCryptoKeyVersionRequest.crypto_key_version][google.cloud.kms.v1.ImportCryptoKeyVersionRequest.crypto_key_version].
5633      * </pre>
5634      *
5635      * <code>bool reimport_eligible = 18 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
5636      *
5637      * @param value The reimportEligible to set.
5638      * @return This builder for chaining.
5639      */
setReimportEligible(boolean value)5640     public Builder setReimportEligible(boolean value) {
5641 
5642       reimportEligible_ = value;
5643       bitField0_ |= 0x00008000;
5644       onChanged();
5645       return this;
5646     }
5647     /**
5648      *
5649      *
5650      * <pre>
5651      * Output only. Whether or not this key version is eligible for reimport, by
5652      * being specified as a target in
5653      * [ImportCryptoKeyVersionRequest.crypto_key_version][google.cloud.kms.v1.ImportCryptoKeyVersionRequest.crypto_key_version].
5654      * </pre>
5655      *
5656      * <code>bool reimport_eligible = 18 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
5657      *
5658      * @return This builder for chaining.
5659      */
clearReimportEligible()5660     public Builder clearReimportEligible() {
5661       bitField0_ = (bitField0_ & ~0x00008000);
5662       reimportEligible_ = false;
5663       onChanged();
5664       return this;
5665     }
5666 
5667     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)5668     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
5669       return super.setUnknownFields(unknownFields);
5670     }
5671 
5672     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)5673     public final Builder mergeUnknownFields(
5674         final com.google.protobuf.UnknownFieldSet unknownFields) {
5675       return super.mergeUnknownFields(unknownFields);
5676     }
5677 
5678     // @@protoc_insertion_point(builder_scope:google.cloud.kms.v1.CryptoKeyVersion)
5679   }
5680 
5681   // @@protoc_insertion_point(class_scope:google.cloud.kms.v1.CryptoKeyVersion)
5682   private static final com.google.cloud.kms.v1.CryptoKeyVersion DEFAULT_INSTANCE;
5683 
5684   static {
5685     DEFAULT_INSTANCE = new com.google.cloud.kms.v1.CryptoKeyVersion();
5686   }
5687 
getDefaultInstance()5688   public static com.google.cloud.kms.v1.CryptoKeyVersion getDefaultInstance() {
5689     return DEFAULT_INSTANCE;
5690   }
5691 
5692   private static final com.google.protobuf.Parser<CryptoKeyVersion> PARSER =
5693       new com.google.protobuf.AbstractParser<CryptoKeyVersion>() {
5694         @java.lang.Override
5695         public CryptoKeyVersion parsePartialFrom(
5696             com.google.protobuf.CodedInputStream input,
5697             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5698             throws com.google.protobuf.InvalidProtocolBufferException {
5699           Builder builder = newBuilder();
5700           try {
5701             builder.mergeFrom(input, extensionRegistry);
5702           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
5703             throw e.setUnfinishedMessage(builder.buildPartial());
5704           } catch (com.google.protobuf.UninitializedMessageException e) {
5705             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
5706           } catch (java.io.IOException e) {
5707             throw new com.google.protobuf.InvalidProtocolBufferException(e)
5708                 .setUnfinishedMessage(builder.buildPartial());
5709           }
5710           return builder.buildPartial();
5711         }
5712       };
5713 
parser()5714   public static com.google.protobuf.Parser<CryptoKeyVersion> parser() {
5715     return PARSER;
5716   }
5717 
5718   @java.lang.Override
getParserForType()5719   public com.google.protobuf.Parser<CryptoKeyVersion> getParserForType() {
5720     return PARSER;
5721   }
5722 
5723   @java.lang.Override
getDefaultInstanceForType()5724   public com.google.cloud.kms.v1.CryptoKeyVersion getDefaultInstanceForType() {
5725     return DEFAULT_INSTANCE;
5726   }
5727 }
5728