• 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  * An [ImportJob][google.cloud.kms.v1.ImportJob] can be used to create
26  * [CryptoKeys][google.cloud.kms.v1.CryptoKey] and
27  * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] using pre-existing
28  * key material, generated outside of Cloud KMS.
29  * When an [ImportJob][google.cloud.kms.v1.ImportJob] is created, Cloud KMS will
30  * generate a "wrapping key", which is a public/private key pair. You use the
31  * wrapping key to encrypt (also known as wrap) the pre-existing key material to
32  * protect it during the import process. The nature of the wrapping key depends
33  * on the choice of
34  * [import_method][google.cloud.kms.v1.ImportJob.import_method]. When the
35  * wrapping key generation is complete, the
36  * [state][google.cloud.kms.v1.ImportJob.state] will be set to
37  * [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE] and the
38  * [public_key][google.cloud.kms.v1.ImportJob.public_key] can be fetched. The
39  * fetched public key can then be used to wrap your pre-existing key material.
40  * Once the key material is wrapped, it can be imported into a new
41  * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in an existing
42  * [CryptoKey][google.cloud.kms.v1.CryptoKey] by calling
43  * [ImportCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.ImportCryptoKeyVersion].
44  * Multiple [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] can be
45  * imported with a single [ImportJob][google.cloud.kms.v1.ImportJob]. Cloud KMS
46  * uses the private key portion of the wrapping key to unwrap the key material.
47  * Only Cloud KMS has access to the private key.
48  * An [ImportJob][google.cloud.kms.v1.ImportJob] expires 3 days after it is
49  * created. Once expired, Cloud KMS will no longer be able to import or unwrap
50  * any key material that was wrapped with the
51  * [ImportJob][google.cloud.kms.v1.ImportJob]'s public key.
52  * For more information, see
53  * [Importing a key](https://cloud.google.com/kms/docs/importing-a-key).
54  * </pre>
55  *
56  * Protobuf type {@code google.cloud.kms.v1.ImportJob}
57  */
58 public final class ImportJob extends com.google.protobuf.GeneratedMessageV3
59     implements
60     // @@protoc_insertion_point(message_implements:google.cloud.kms.v1.ImportJob)
61     ImportJobOrBuilder {
62   private static final long serialVersionUID = 0L;
63   // Use ImportJob.newBuilder() to construct.
ImportJob(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)64   private ImportJob(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
65     super(builder);
66   }
67 
ImportJob()68   private ImportJob() {
69     name_ = "";
70     importMethod_ = 0;
71     protectionLevel_ = 0;
72     state_ = 0;
73   }
74 
75   @java.lang.Override
76   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)77   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
78     return new ImportJob();
79   }
80 
81   @java.lang.Override
getUnknownFields()82   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
83     return this.unknownFields;
84   }
85 
getDescriptor()86   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
87     return com.google.cloud.kms.v1.KmsResourcesProto
88         .internal_static_google_cloud_kms_v1_ImportJob_descriptor;
89   }
90 
91   @java.lang.Override
92   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()93       internalGetFieldAccessorTable() {
94     return com.google.cloud.kms.v1.KmsResourcesProto
95         .internal_static_google_cloud_kms_v1_ImportJob_fieldAccessorTable
96         .ensureFieldAccessorsInitialized(
97             com.google.cloud.kms.v1.ImportJob.class,
98             com.google.cloud.kms.v1.ImportJob.Builder.class);
99   }
100 
101   /**
102    *
103    *
104    * <pre>
105    * [ImportMethod][google.cloud.kms.v1.ImportJob.ImportMethod] describes the
106    * key wrapping method chosen for this
107    * [ImportJob][google.cloud.kms.v1.ImportJob].
108    * </pre>
109    *
110    * Protobuf enum {@code google.cloud.kms.v1.ImportJob.ImportMethod}
111    */
112   public enum ImportMethod implements com.google.protobuf.ProtocolMessageEnum {
113     /**
114      *
115      *
116      * <pre>
117      * Not specified.
118      * </pre>
119      *
120      * <code>IMPORT_METHOD_UNSPECIFIED = 0;</code>
121      */
122     IMPORT_METHOD_UNSPECIFIED(0),
123     /**
124      *
125      *
126      * <pre>
127      * This ImportMethod represents the CKM_RSA_AES_KEY_WRAP key wrapping
128      * scheme defined in the PKCS #11 standard. In summary, this involves
129      * wrapping the raw key with an ephemeral AES key, and wrapping the
130      * ephemeral AES key with a 3072 bit RSA key. For more details, see
131      * [RSA AES key wrap
132      * mechanism](http://docs.oasis-open.org/pkcs11/pkcs11-curr/v2.40/cos01/pkcs11-curr-v2.40-cos01.html#_Toc408226908).
133      * </pre>
134      *
135      * <code>RSA_OAEP_3072_SHA1_AES_256 = 1;</code>
136      */
137     RSA_OAEP_3072_SHA1_AES_256(1),
138     /**
139      *
140      *
141      * <pre>
142      * This ImportMethod represents the CKM_RSA_AES_KEY_WRAP key wrapping
143      * scheme defined in the PKCS #11 standard. In summary, this involves
144      * wrapping the raw key with an ephemeral AES key, and wrapping the
145      * ephemeral AES key with a 4096 bit RSA key. For more details, see
146      * [RSA AES key wrap
147      * mechanism](http://docs.oasis-open.org/pkcs11/pkcs11-curr/v2.40/cos01/pkcs11-curr-v2.40-cos01.html#_Toc408226908).
148      * </pre>
149      *
150      * <code>RSA_OAEP_4096_SHA1_AES_256 = 2;</code>
151      */
152     RSA_OAEP_4096_SHA1_AES_256(2),
153     /**
154      *
155      *
156      * <pre>
157      * This ImportMethod represents the CKM_RSA_AES_KEY_WRAP key wrapping
158      * scheme defined in the PKCS #11 standard. In summary, this involves
159      * wrapping the raw key with an ephemeral AES key, and wrapping the
160      * ephemeral AES key with a 3072 bit RSA key. For more details, see
161      * [RSA AES key wrap
162      * mechanism](http://docs.oasis-open.org/pkcs11/pkcs11-curr/v2.40/cos01/pkcs11-curr-v2.40-cos01.html#_Toc408226908).
163      * </pre>
164      *
165      * <code>RSA_OAEP_3072_SHA256_AES_256 = 3;</code>
166      */
167     RSA_OAEP_3072_SHA256_AES_256(3),
168     /**
169      *
170      *
171      * <pre>
172      * This ImportMethod represents the CKM_RSA_AES_KEY_WRAP key wrapping
173      * scheme defined in the PKCS #11 standard. In summary, this involves
174      * wrapping the raw key with an ephemeral AES key, and wrapping the
175      * ephemeral AES key with a 4096 bit RSA key. For more details, see
176      * [RSA AES key wrap
177      * mechanism](http://docs.oasis-open.org/pkcs11/pkcs11-curr/v2.40/cos01/pkcs11-curr-v2.40-cos01.html#_Toc408226908).
178      * </pre>
179      *
180      * <code>RSA_OAEP_4096_SHA256_AES_256 = 4;</code>
181      */
182     RSA_OAEP_4096_SHA256_AES_256(4),
183     /**
184      *
185      *
186      * <pre>
187      * This ImportMethod represents RSAES-OAEP with a 3072 bit RSA key. The
188      * key material to be imported is wrapped directly with the RSA key. Due
189      * to technical limitations of RSA wrapping, this method cannot be used to
190      * wrap RSA keys for import.
191      * </pre>
192      *
193      * <code>RSA_OAEP_3072_SHA256 = 5;</code>
194      */
195     RSA_OAEP_3072_SHA256(5),
196     /**
197      *
198      *
199      * <pre>
200      * This ImportMethod represents RSAES-OAEP with a 4096 bit RSA key. The
201      * key material to be imported is wrapped directly with the RSA key. Due
202      * to technical limitations of RSA wrapping, this method cannot be used to
203      * wrap RSA keys for import.
204      * </pre>
205      *
206      * <code>RSA_OAEP_4096_SHA256 = 6;</code>
207      */
208     RSA_OAEP_4096_SHA256(6),
209     UNRECOGNIZED(-1),
210     ;
211 
212     /**
213      *
214      *
215      * <pre>
216      * Not specified.
217      * </pre>
218      *
219      * <code>IMPORT_METHOD_UNSPECIFIED = 0;</code>
220      */
221     public static final int IMPORT_METHOD_UNSPECIFIED_VALUE = 0;
222     /**
223      *
224      *
225      * <pre>
226      * This ImportMethod represents the CKM_RSA_AES_KEY_WRAP key wrapping
227      * scheme defined in the PKCS #11 standard. In summary, this involves
228      * wrapping the raw key with an ephemeral AES key, and wrapping the
229      * ephemeral AES key with a 3072 bit RSA key. For more details, see
230      * [RSA AES key wrap
231      * mechanism](http://docs.oasis-open.org/pkcs11/pkcs11-curr/v2.40/cos01/pkcs11-curr-v2.40-cos01.html#_Toc408226908).
232      * </pre>
233      *
234      * <code>RSA_OAEP_3072_SHA1_AES_256 = 1;</code>
235      */
236     public static final int RSA_OAEP_3072_SHA1_AES_256_VALUE = 1;
237     /**
238      *
239      *
240      * <pre>
241      * This ImportMethod represents the CKM_RSA_AES_KEY_WRAP key wrapping
242      * scheme defined in the PKCS #11 standard. In summary, this involves
243      * wrapping the raw key with an ephemeral AES key, and wrapping the
244      * ephemeral AES key with a 4096 bit RSA key. For more details, see
245      * [RSA AES key wrap
246      * mechanism](http://docs.oasis-open.org/pkcs11/pkcs11-curr/v2.40/cos01/pkcs11-curr-v2.40-cos01.html#_Toc408226908).
247      * </pre>
248      *
249      * <code>RSA_OAEP_4096_SHA1_AES_256 = 2;</code>
250      */
251     public static final int RSA_OAEP_4096_SHA1_AES_256_VALUE = 2;
252     /**
253      *
254      *
255      * <pre>
256      * This ImportMethod represents the CKM_RSA_AES_KEY_WRAP key wrapping
257      * scheme defined in the PKCS #11 standard. In summary, this involves
258      * wrapping the raw key with an ephemeral AES key, and wrapping the
259      * ephemeral AES key with a 3072 bit RSA key. For more details, see
260      * [RSA AES key wrap
261      * mechanism](http://docs.oasis-open.org/pkcs11/pkcs11-curr/v2.40/cos01/pkcs11-curr-v2.40-cos01.html#_Toc408226908).
262      * </pre>
263      *
264      * <code>RSA_OAEP_3072_SHA256_AES_256 = 3;</code>
265      */
266     public static final int RSA_OAEP_3072_SHA256_AES_256_VALUE = 3;
267     /**
268      *
269      *
270      * <pre>
271      * This ImportMethod represents the CKM_RSA_AES_KEY_WRAP key wrapping
272      * scheme defined in the PKCS #11 standard. In summary, this involves
273      * wrapping the raw key with an ephemeral AES key, and wrapping the
274      * ephemeral AES key with a 4096 bit RSA key. For more details, see
275      * [RSA AES key wrap
276      * mechanism](http://docs.oasis-open.org/pkcs11/pkcs11-curr/v2.40/cos01/pkcs11-curr-v2.40-cos01.html#_Toc408226908).
277      * </pre>
278      *
279      * <code>RSA_OAEP_4096_SHA256_AES_256 = 4;</code>
280      */
281     public static final int RSA_OAEP_4096_SHA256_AES_256_VALUE = 4;
282     /**
283      *
284      *
285      * <pre>
286      * This ImportMethod represents RSAES-OAEP with a 3072 bit RSA key. The
287      * key material to be imported is wrapped directly with the RSA key. Due
288      * to technical limitations of RSA wrapping, this method cannot be used to
289      * wrap RSA keys for import.
290      * </pre>
291      *
292      * <code>RSA_OAEP_3072_SHA256 = 5;</code>
293      */
294     public static final int RSA_OAEP_3072_SHA256_VALUE = 5;
295     /**
296      *
297      *
298      * <pre>
299      * This ImportMethod represents RSAES-OAEP with a 4096 bit RSA key. The
300      * key material to be imported is wrapped directly with the RSA key. Due
301      * to technical limitations of RSA wrapping, this method cannot be used to
302      * wrap RSA keys for import.
303      * </pre>
304      *
305      * <code>RSA_OAEP_4096_SHA256 = 6;</code>
306      */
307     public static final int RSA_OAEP_4096_SHA256_VALUE = 6;
308 
getNumber()309     public final int getNumber() {
310       if (this == UNRECOGNIZED) {
311         throw new java.lang.IllegalArgumentException(
312             "Can't get the number of an unknown enum value.");
313       }
314       return value;
315     }
316 
317     /**
318      * @param value The numeric wire value of the corresponding enum entry.
319      * @return The enum associated with the given numeric wire value.
320      * @deprecated Use {@link #forNumber(int)} instead.
321      */
322     @java.lang.Deprecated
valueOf(int value)323     public static ImportMethod valueOf(int value) {
324       return forNumber(value);
325     }
326 
327     /**
328      * @param value The numeric wire value of the corresponding enum entry.
329      * @return The enum associated with the given numeric wire value.
330      */
forNumber(int value)331     public static ImportMethod forNumber(int value) {
332       switch (value) {
333         case 0:
334           return IMPORT_METHOD_UNSPECIFIED;
335         case 1:
336           return RSA_OAEP_3072_SHA1_AES_256;
337         case 2:
338           return RSA_OAEP_4096_SHA1_AES_256;
339         case 3:
340           return RSA_OAEP_3072_SHA256_AES_256;
341         case 4:
342           return RSA_OAEP_4096_SHA256_AES_256;
343         case 5:
344           return RSA_OAEP_3072_SHA256;
345         case 6:
346           return RSA_OAEP_4096_SHA256;
347         default:
348           return null;
349       }
350     }
351 
internalGetValueMap()352     public static com.google.protobuf.Internal.EnumLiteMap<ImportMethod> internalGetValueMap() {
353       return internalValueMap;
354     }
355 
356     private static final com.google.protobuf.Internal.EnumLiteMap<ImportMethod> internalValueMap =
357         new com.google.protobuf.Internal.EnumLiteMap<ImportMethod>() {
358           public ImportMethod findValueByNumber(int number) {
359             return ImportMethod.forNumber(number);
360           }
361         };
362 
getValueDescriptor()363     public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
364       if (this == UNRECOGNIZED) {
365         throw new java.lang.IllegalStateException(
366             "Can't get the descriptor of an unrecognized enum value.");
367       }
368       return getDescriptor().getValues().get(ordinal());
369     }
370 
getDescriptorForType()371     public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
372       return getDescriptor();
373     }
374 
getDescriptor()375     public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
376       return com.google.cloud.kms.v1.ImportJob.getDescriptor().getEnumTypes().get(0);
377     }
378 
379     private static final ImportMethod[] VALUES = values();
380 
valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)381     public static ImportMethod valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
382       if (desc.getType() != getDescriptor()) {
383         throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
384       }
385       if (desc.getIndex() == -1) {
386         return UNRECOGNIZED;
387       }
388       return VALUES[desc.getIndex()];
389     }
390 
391     private final int value;
392 
ImportMethod(int value)393     private ImportMethod(int value) {
394       this.value = value;
395     }
396 
397     // @@protoc_insertion_point(enum_scope:google.cloud.kms.v1.ImportJob.ImportMethod)
398   }
399 
400   /**
401    *
402    *
403    * <pre>
404    * The state of the [ImportJob][google.cloud.kms.v1.ImportJob], indicating if
405    * it can be used.
406    * </pre>
407    *
408    * Protobuf enum {@code google.cloud.kms.v1.ImportJob.ImportJobState}
409    */
410   public enum ImportJobState implements com.google.protobuf.ProtocolMessageEnum {
411     /**
412      *
413      *
414      * <pre>
415      * Not specified.
416      * </pre>
417      *
418      * <code>IMPORT_JOB_STATE_UNSPECIFIED = 0;</code>
419      */
420     IMPORT_JOB_STATE_UNSPECIFIED(0),
421     /**
422      *
423      *
424      * <pre>
425      * The wrapping key for this job is still being generated. It may not be
426      * used. Cloud KMS will automatically mark this job as
427      * [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE] as soon as
428      * the wrapping key is generated.
429      * </pre>
430      *
431      * <code>PENDING_GENERATION = 1;</code>
432      */
433     PENDING_GENERATION(1),
434     /**
435      *
436      *
437      * <pre>
438      * This job may be used in
439      * [CreateCryptoKey][google.cloud.kms.v1.KeyManagementService.CreateCryptoKey]
440      * and
441      * [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion]
442      * requests.
443      * </pre>
444      *
445      * <code>ACTIVE = 2;</code>
446      */
447     ACTIVE(2),
448     /**
449      *
450      *
451      * <pre>
452      * This job can no longer be used and may not leave this state once entered.
453      * </pre>
454      *
455      * <code>EXPIRED = 3;</code>
456      */
457     EXPIRED(3),
458     UNRECOGNIZED(-1),
459     ;
460 
461     /**
462      *
463      *
464      * <pre>
465      * Not specified.
466      * </pre>
467      *
468      * <code>IMPORT_JOB_STATE_UNSPECIFIED = 0;</code>
469      */
470     public static final int IMPORT_JOB_STATE_UNSPECIFIED_VALUE = 0;
471     /**
472      *
473      *
474      * <pre>
475      * The wrapping key for this job is still being generated. It may not be
476      * used. Cloud KMS will automatically mark this job as
477      * [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE] as soon as
478      * the wrapping key is generated.
479      * </pre>
480      *
481      * <code>PENDING_GENERATION = 1;</code>
482      */
483     public static final int PENDING_GENERATION_VALUE = 1;
484     /**
485      *
486      *
487      * <pre>
488      * This job may be used in
489      * [CreateCryptoKey][google.cloud.kms.v1.KeyManagementService.CreateCryptoKey]
490      * and
491      * [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion]
492      * requests.
493      * </pre>
494      *
495      * <code>ACTIVE = 2;</code>
496      */
497     public static final int ACTIVE_VALUE = 2;
498     /**
499      *
500      *
501      * <pre>
502      * This job can no longer be used and may not leave this state once entered.
503      * </pre>
504      *
505      * <code>EXPIRED = 3;</code>
506      */
507     public static final int EXPIRED_VALUE = 3;
508 
getNumber()509     public final int getNumber() {
510       if (this == UNRECOGNIZED) {
511         throw new java.lang.IllegalArgumentException(
512             "Can't get the number of an unknown enum value.");
513       }
514       return value;
515     }
516 
517     /**
518      * @param value The numeric wire value of the corresponding enum entry.
519      * @return The enum associated with the given numeric wire value.
520      * @deprecated Use {@link #forNumber(int)} instead.
521      */
522     @java.lang.Deprecated
valueOf(int value)523     public static ImportJobState valueOf(int value) {
524       return forNumber(value);
525     }
526 
527     /**
528      * @param value The numeric wire value of the corresponding enum entry.
529      * @return The enum associated with the given numeric wire value.
530      */
forNumber(int value)531     public static ImportJobState forNumber(int value) {
532       switch (value) {
533         case 0:
534           return IMPORT_JOB_STATE_UNSPECIFIED;
535         case 1:
536           return PENDING_GENERATION;
537         case 2:
538           return ACTIVE;
539         case 3:
540           return EXPIRED;
541         default:
542           return null;
543       }
544     }
545 
internalGetValueMap()546     public static com.google.protobuf.Internal.EnumLiteMap<ImportJobState> internalGetValueMap() {
547       return internalValueMap;
548     }
549 
550     private static final com.google.protobuf.Internal.EnumLiteMap<ImportJobState> internalValueMap =
551         new com.google.protobuf.Internal.EnumLiteMap<ImportJobState>() {
552           public ImportJobState findValueByNumber(int number) {
553             return ImportJobState.forNumber(number);
554           }
555         };
556 
getValueDescriptor()557     public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
558       if (this == UNRECOGNIZED) {
559         throw new java.lang.IllegalStateException(
560             "Can't get the descriptor of an unrecognized enum value.");
561       }
562       return getDescriptor().getValues().get(ordinal());
563     }
564 
getDescriptorForType()565     public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
566       return getDescriptor();
567     }
568 
getDescriptor()569     public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
570       return com.google.cloud.kms.v1.ImportJob.getDescriptor().getEnumTypes().get(1);
571     }
572 
573     private static final ImportJobState[] VALUES = values();
574 
valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)575     public static ImportJobState valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
576       if (desc.getType() != getDescriptor()) {
577         throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
578       }
579       if (desc.getIndex() == -1) {
580         return UNRECOGNIZED;
581       }
582       return VALUES[desc.getIndex()];
583     }
584 
585     private final int value;
586 
ImportJobState(int value)587     private ImportJobState(int value) {
588       this.value = value;
589     }
590 
591     // @@protoc_insertion_point(enum_scope:google.cloud.kms.v1.ImportJob.ImportJobState)
592   }
593 
594   public interface WrappingPublicKeyOrBuilder
595       extends
596       // @@protoc_insertion_point(interface_extends:google.cloud.kms.v1.ImportJob.WrappingPublicKey)
597       com.google.protobuf.MessageOrBuilder {
598 
599     /**
600      *
601      *
602      * <pre>
603      * The public key, encoded in PEM format. For more information, see the [RFC
604      * 7468](https://tools.ietf.org/html/rfc7468) sections for [General
605      * Considerations](https://tools.ietf.org/html/rfc7468#section-2) and
606      * [Textual Encoding of Subject Public Key Info]
607      * (https://tools.ietf.org/html/rfc7468#section-13).
608      * </pre>
609      *
610      * <code>string pem = 1;</code>
611      *
612      * @return The pem.
613      */
getPem()614     java.lang.String getPem();
615     /**
616      *
617      *
618      * <pre>
619      * The public key, encoded in PEM format. For more information, see the [RFC
620      * 7468](https://tools.ietf.org/html/rfc7468) sections for [General
621      * Considerations](https://tools.ietf.org/html/rfc7468#section-2) and
622      * [Textual Encoding of Subject Public Key Info]
623      * (https://tools.ietf.org/html/rfc7468#section-13).
624      * </pre>
625      *
626      * <code>string pem = 1;</code>
627      *
628      * @return The bytes for pem.
629      */
getPemBytes()630     com.google.protobuf.ByteString getPemBytes();
631   }
632   /**
633    *
634    *
635    * <pre>
636    * The public key component of the wrapping key. For details of the type of
637    * key this public key corresponds to, see the
638    * [ImportMethod][google.cloud.kms.v1.ImportJob.ImportMethod].
639    * </pre>
640    *
641    * Protobuf type {@code google.cloud.kms.v1.ImportJob.WrappingPublicKey}
642    */
643   public static final class WrappingPublicKey extends com.google.protobuf.GeneratedMessageV3
644       implements
645       // @@protoc_insertion_point(message_implements:google.cloud.kms.v1.ImportJob.WrappingPublicKey)
646       WrappingPublicKeyOrBuilder {
647     private static final long serialVersionUID = 0L;
648     // Use WrappingPublicKey.newBuilder() to construct.
WrappingPublicKey(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)649     private WrappingPublicKey(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
650       super(builder);
651     }
652 
WrappingPublicKey()653     private WrappingPublicKey() {
654       pem_ = "";
655     }
656 
657     @java.lang.Override
658     @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)659     protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
660       return new WrappingPublicKey();
661     }
662 
663     @java.lang.Override
getUnknownFields()664     public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
665       return this.unknownFields;
666     }
667 
getDescriptor()668     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
669       return com.google.cloud.kms.v1.KmsResourcesProto
670           .internal_static_google_cloud_kms_v1_ImportJob_WrappingPublicKey_descriptor;
671     }
672 
673     @java.lang.Override
674     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()675         internalGetFieldAccessorTable() {
676       return com.google.cloud.kms.v1.KmsResourcesProto
677           .internal_static_google_cloud_kms_v1_ImportJob_WrappingPublicKey_fieldAccessorTable
678           .ensureFieldAccessorsInitialized(
679               com.google.cloud.kms.v1.ImportJob.WrappingPublicKey.class,
680               com.google.cloud.kms.v1.ImportJob.WrappingPublicKey.Builder.class);
681     }
682 
683     public static final int PEM_FIELD_NUMBER = 1;
684 
685     @SuppressWarnings("serial")
686     private volatile java.lang.Object pem_ = "";
687     /**
688      *
689      *
690      * <pre>
691      * The public key, encoded in PEM format. For more information, see the [RFC
692      * 7468](https://tools.ietf.org/html/rfc7468) sections for [General
693      * Considerations](https://tools.ietf.org/html/rfc7468#section-2) and
694      * [Textual Encoding of Subject Public Key Info]
695      * (https://tools.ietf.org/html/rfc7468#section-13).
696      * </pre>
697      *
698      * <code>string pem = 1;</code>
699      *
700      * @return The pem.
701      */
702     @java.lang.Override
getPem()703     public java.lang.String getPem() {
704       java.lang.Object ref = pem_;
705       if (ref instanceof java.lang.String) {
706         return (java.lang.String) ref;
707       } else {
708         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
709         java.lang.String s = bs.toStringUtf8();
710         pem_ = s;
711         return s;
712       }
713     }
714     /**
715      *
716      *
717      * <pre>
718      * The public key, encoded in PEM format. For more information, see the [RFC
719      * 7468](https://tools.ietf.org/html/rfc7468) sections for [General
720      * Considerations](https://tools.ietf.org/html/rfc7468#section-2) and
721      * [Textual Encoding of Subject Public Key Info]
722      * (https://tools.ietf.org/html/rfc7468#section-13).
723      * </pre>
724      *
725      * <code>string pem = 1;</code>
726      *
727      * @return The bytes for pem.
728      */
729     @java.lang.Override
getPemBytes()730     public com.google.protobuf.ByteString getPemBytes() {
731       java.lang.Object ref = pem_;
732       if (ref instanceof java.lang.String) {
733         com.google.protobuf.ByteString b =
734             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
735         pem_ = b;
736         return b;
737       } else {
738         return (com.google.protobuf.ByteString) ref;
739       }
740     }
741 
742     private byte memoizedIsInitialized = -1;
743 
744     @java.lang.Override
isInitialized()745     public final boolean isInitialized() {
746       byte isInitialized = memoizedIsInitialized;
747       if (isInitialized == 1) return true;
748       if (isInitialized == 0) return false;
749 
750       memoizedIsInitialized = 1;
751       return true;
752     }
753 
754     @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)755     public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
756       if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pem_)) {
757         com.google.protobuf.GeneratedMessageV3.writeString(output, 1, pem_);
758       }
759       getUnknownFields().writeTo(output);
760     }
761 
762     @java.lang.Override
getSerializedSize()763     public int getSerializedSize() {
764       int size = memoizedSize;
765       if (size != -1) return size;
766 
767       size = 0;
768       if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pem_)) {
769         size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, pem_);
770       }
771       size += getUnknownFields().getSerializedSize();
772       memoizedSize = size;
773       return size;
774     }
775 
776     @java.lang.Override
equals(final java.lang.Object obj)777     public boolean equals(final java.lang.Object obj) {
778       if (obj == this) {
779         return true;
780       }
781       if (!(obj instanceof com.google.cloud.kms.v1.ImportJob.WrappingPublicKey)) {
782         return super.equals(obj);
783       }
784       com.google.cloud.kms.v1.ImportJob.WrappingPublicKey other =
785           (com.google.cloud.kms.v1.ImportJob.WrappingPublicKey) obj;
786 
787       if (!getPem().equals(other.getPem())) return false;
788       if (!getUnknownFields().equals(other.getUnknownFields())) return false;
789       return true;
790     }
791 
792     @java.lang.Override
hashCode()793     public int hashCode() {
794       if (memoizedHashCode != 0) {
795         return memoizedHashCode;
796       }
797       int hash = 41;
798       hash = (19 * hash) + getDescriptor().hashCode();
799       hash = (37 * hash) + PEM_FIELD_NUMBER;
800       hash = (53 * hash) + getPem().hashCode();
801       hash = (29 * hash) + getUnknownFields().hashCode();
802       memoizedHashCode = hash;
803       return hash;
804     }
805 
parseFrom( java.nio.ByteBuffer data)806     public static com.google.cloud.kms.v1.ImportJob.WrappingPublicKey parseFrom(
807         java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
808       return PARSER.parseFrom(data);
809     }
810 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)811     public static com.google.cloud.kms.v1.ImportJob.WrappingPublicKey parseFrom(
812         java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
813         throws com.google.protobuf.InvalidProtocolBufferException {
814       return PARSER.parseFrom(data, extensionRegistry);
815     }
816 
parseFrom( com.google.protobuf.ByteString data)817     public static com.google.cloud.kms.v1.ImportJob.WrappingPublicKey parseFrom(
818         com.google.protobuf.ByteString data)
819         throws com.google.protobuf.InvalidProtocolBufferException {
820       return PARSER.parseFrom(data);
821     }
822 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)823     public static com.google.cloud.kms.v1.ImportJob.WrappingPublicKey parseFrom(
824         com.google.protobuf.ByteString data,
825         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
826         throws com.google.protobuf.InvalidProtocolBufferException {
827       return PARSER.parseFrom(data, extensionRegistry);
828     }
829 
parseFrom(byte[] data)830     public static com.google.cloud.kms.v1.ImportJob.WrappingPublicKey parseFrom(byte[] data)
831         throws com.google.protobuf.InvalidProtocolBufferException {
832       return PARSER.parseFrom(data);
833     }
834 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)835     public static com.google.cloud.kms.v1.ImportJob.WrappingPublicKey parseFrom(
836         byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
837         throws com.google.protobuf.InvalidProtocolBufferException {
838       return PARSER.parseFrom(data, extensionRegistry);
839     }
840 
parseFrom( java.io.InputStream input)841     public static com.google.cloud.kms.v1.ImportJob.WrappingPublicKey parseFrom(
842         java.io.InputStream input) throws java.io.IOException {
843       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
844     }
845 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)846     public static com.google.cloud.kms.v1.ImportJob.WrappingPublicKey parseFrom(
847         java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
848         throws java.io.IOException {
849       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
850           PARSER, input, extensionRegistry);
851     }
852 
parseDelimitedFrom( java.io.InputStream input)853     public static com.google.cloud.kms.v1.ImportJob.WrappingPublicKey parseDelimitedFrom(
854         java.io.InputStream input) throws java.io.IOException {
855       return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
856     }
857 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)858     public static com.google.cloud.kms.v1.ImportJob.WrappingPublicKey parseDelimitedFrom(
859         java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
860         throws java.io.IOException {
861       return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
862           PARSER, input, extensionRegistry);
863     }
864 
parseFrom( com.google.protobuf.CodedInputStream input)865     public static com.google.cloud.kms.v1.ImportJob.WrappingPublicKey parseFrom(
866         com.google.protobuf.CodedInputStream input) throws java.io.IOException {
867       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
868     }
869 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)870     public static com.google.cloud.kms.v1.ImportJob.WrappingPublicKey parseFrom(
871         com.google.protobuf.CodedInputStream input,
872         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
873         throws java.io.IOException {
874       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
875           PARSER, input, extensionRegistry);
876     }
877 
878     @java.lang.Override
newBuilderForType()879     public Builder newBuilderForType() {
880       return newBuilder();
881     }
882 
newBuilder()883     public static Builder newBuilder() {
884       return DEFAULT_INSTANCE.toBuilder();
885     }
886 
newBuilder( com.google.cloud.kms.v1.ImportJob.WrappingPublicKey prototype)887     public static Builder newBuilder(
888         com.google.cloud.kms.v1.ImportJob.WrappingPublicKey prototype) {
889       return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
890     }
891 
892     @java.lang.Override
toBuilder()893     public Builder toBuilder() {
894       return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
895     }
896 
897     @java.lang.Override
newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent)898     protected Builder newBuilderForType(
899         com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
900       Builder builder = new Builder(parent);
901       return builder;
902     }
903     /**
904      *
905      *
906      * <pre>
907      * The public key component of the wrapping key. For details of the type of
908      * key this public key corresponds to, see the
909      * [ImportMethod][google.cloud.kms.v1.ImportJob.ImportMethod].
910      * </pre>
911      *
912      * Protobuf type {@code google.cloud.kms.v1.ImportJob.WrappingPublicKey}
913      */
914     public static final class Builder
915         extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
916         implements
917         // @@protoc_insertion_point(builder_implements:google.cloud.kms.v1.ImportJob.WrappingPublicKey)
918         com.google.cloud.kms.v1.ImportJob.WrappingPublicKeyOrBuilder {
getDescriptor()919       public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
920         return com.google.cloud.kms.v1.KmsResourcesProto
921             .internal_static_google_cloud_kms_v1_ImportJob_WrappingPublicKey_descriptor;
922       }
923 
924       @java.lang.Override
925       protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()926           internalGetFieldAccessorTable() {
927         return com.google.cloud.kms.v1.KmsResourcesProto
928             .internal_static_google_cloud_kms_v1_ImportJob_WrappingPublicKey_fieldAccessorTable
929             .ensureFieldAccessorsInitialized(
930                 com.google.cloud.kms.v1.ImportJob.WrappingPublicKey.class,
931                 com.google.cloud.kms.v1.ImportJob.WrappingPublicKey.Builder.class);
932       }
933 
934       // Construct using com.google.cloud.kms.v1.ImportJob.WrappingPublicKey.newBuilder()
Builder()935       private Builder() {}
936 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)937       private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
938         super(parent);
939       }
940 
941       @java.lang.Override
clear()942       public Builder clear() {
943         super.clear();
944         bitField0_ = 0;
945         pem_ = "";
946         return this;
947       }
948 
949       @java.lang.Override
getDescriptorForType()950       public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
951         return com.google.cloud.kms.v1.KmsResourcesProto
952             .internal_static_google_cloud_kms_v1_ImportJob_WrappingPublicKey_descriptor;
953       }
954 
955       @java.lang.Override
getDefaultInstanceForType()956       public com.google.cloud.kms.v1.ImportJob.WrappingPublicKey getDefaultInstanceForType() {
957         return com.google.cloud.kms.v1.ImportJob.WrappingPublicKey.getDefaultInstance();
958       }
959 
960       @java.lang.Override
build()961       public com.google.cloud.kms.v1.ImportJob.WrappingPublicKey build() {
962         com.google.cloud.kms.v1.ImportJob.WrappingPublicKey result = buildPartial();
963         if (!result.isInitialized()) {
964           throw newUninitializedMessageException(result);
965         }
966         return result;
967       }
968 
969       @java.lang.Override
buildPartial()970       public com.google.cloud.kms.v1.ImportJob.WrappingPublicKey buildPartial() {
971         com.google.cloud.kms.v1.ImportJob.WrappingPublicKey result =
972             new com.google.cloud.kms.v1.ImportJob.WrappingPublicKey(this);
973         if (bitField0_ != 0) {
974           buildPartial0(result);
975         }
976         onBuilt();
977         return result;
978       }
979 
buildPartial0(com.google.cloud.kms.v1.ImportJob.WrappingPublicKey result)980       private void buildPartial0(com.google.cloud.kms.v1.ImportJob.WrappingPublicKey result) {
981         int from_bitField0_ = bitField0_;
982         if (((from_bitField0_ & 0x00000001) != 0)) {
983           result.pem_ = pem_;
984         }
985       }
986 
987       @java.lang.Override
clone()988       public Builder clone() {
989         return super.clone();
990       }
991 
992       @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)993       public Builder setField(
994           com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
995         return super.setField(field, value);
996       }
997 
998       @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)999       public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
1000         return super.clearField(field);
1001       }
1002 
1003       @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)1004       public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
1005         return super.clearOneof(oneof);
1006       }
1007 
1008       @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)1009       public Builder setRepeatedField(
1010           com.google.protobuf.Descriptors.FieldDescriptor field,
1011           int index,
1012           java.lang.Object value) {
1013         return super.setRepeatedField(field, index, value);
1014       }
1015 
1016       @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1017       public Builder addRepeatedField(
1018           com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
1019         return super.addRepeatedField(field, value);
1020       }
1021 
1022       @java.lang.Override
mergeFrom(com.google.protobuf.Message other)1023       public Builder mergeFrom(com.google.protobuf.Message other) {
1024         if (other instanceof com.google.cloud.kms.v1.ImportJob.WrappingPublicKey) {
1025           return mergeFrom((com.google.cloud.kms.v1.ImportJob.WrappingPublicKey) other);
1026         } else {
1027           super.mergeFrom(other);
1028           return this;
1029         }
1030       }
1031 
mergeFrom(com.google.cloud.kms.v1.ImportJob.WrappingPublicKey other)1032       public Builder mergeFrom(com.google.cloud.kms.v1.ImportJob.WrappingPublicKey other) {
1033         if (other == com.google.cloud.kms.v1.ImportJob.WrappingPublicKey.getDefaultInstance())
1034           return this;
1035         if (!other.getPem().isEmpty()) {
1036           pem_ = other.pem_;
1037           bitField0_ |= 0x00000001;
1038           onChanged();
1039         }
1040         this.mergeUnknownFields(other.getUnknownFields());
1041         onChanged();
1042         return this;
1043       }
1044 
1045       @java.lang.Override
isInitialized()1046       public final boolean isInitialized() {
1047         return true;
1048       }
1049 
1050       @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1051       public Builder mergeFrom(
1052           com.google.protobuf.CodedInputStream input,
1053           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1054           throws java.io.IOException {
1055         if (extensionRegistry == null) {
1056           throw new java.lang.NullPointerException();
1057         }
1058         try {
1059           boolean done = false;
1060           while (!done) {
1061             int tag = input.readTag();
1062             switch (tag) {
1063               case 0:
1064                 done = true;
1065                 break;
1066               case 10:
1067                 {
1068                   pem_ = input.readStringRequireUtf8();
1069                   bitField0_ |= 0x00000001;
1070                   break;
1071                 } // case 10
1072               default:
1073                 {
1074                   if (!super.parseUnknownField(input, extensionRegistry, tag)) {
1075                     done = true; // was an endgroup tag
1076                   }
1077                   break;
1078                 } // default:
1079             } // switch (tag)
1080           } // while (!done)
1081         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1082           throw e.unwrapIOException();
1083         } finally {
1084           onChanged();
1085         } // finally
1086         return this;
1087       }
1088 
1089       private int bitField0_;
1090 
1091       private java.lang.Object pem_ = "";
1092       /**
1093        *
1094        *
1095        * <pre>
1096        * The public key, encoded in PEM format. For more information, see the [RFC
1097        * 7468](https://tools.ietf.org/html/rfc7468) sections for [General
1098        * Considerations](https://tools.ietf.org/html/rfc7468#section-2) and
1099        * [Textual Encoding of Subject Public Key Info]
1100        * (https://tools.ietf.org/html/rfc7468#section-13).
1101        * </pre>
1102        *
1103        * <code>string pem = 1;</code>
1104        *
1105        * @return The pem.
1106        */
getPem()1107       public java.lang.String getPem() {
1108         java.lang.Object ref = pem_;
1109         if (!(ref instanceof java.lang.String)) {
1110           com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1111           java.lang.String s = bs.toStringUtf8();
1112           pem_ = s;
1113           return s;
1114         } else {
1115           return (java.lang.String) ref;
1116         }
1117       }
1118       /**
1119        *
1120        *
1121        * <pre>
1122        * The public key, encoded in PEM format. For more information, see the [RFC
1123        * 7468](https://tools.ietf.org/html/rfc7468) sections for [General
1124        * Considerations](https://tools.ietf.org/html/rfc7468#section-2) and
1125        * [Textual Encoding of Subject Public Key Info]
1126        * (https://tools.ietf.org/html/rfc7468#section-13).
1127        * </pre>
1128        *
1129        * <code>string pem = 1;</code>
1130        *
1131        * @return The bytes for pem.
1132        */
getPemBytes()1133       public com.google.protobuf.ByteString getPemBytes() {
1134         java.lang.Object ref = pem_;
1135         if (ref instanceof String) {
1136           com.google.protobuf.ByteString b =
1137               com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1138           pem_ = b;
1139           return b;
1140         } else {
1141           return (com.google.protobuf.ByteString) ref;
1142         }
1143       }
1144       /**
1145        *
1146        *
1147        * <pre>
1148        * The public key, encoded in PEM format. For more information, see the [RFC
1149        * 7468](https://tools.ietf.org/html/rfc7468) sections for [General
1150        * Considerations](https://tools.ietf.org/html/rfc7468#section-2) and
1151        * [Textual Encoding of Subject Public Key Info]
1152        * (https://tools.ietf.org/html/rfc7468#section-13).
1153        * </pre>
1154        *
1155        * <code>string pem = 1;</code>
1156        *
1157        * @param value The pem to set.
1158        * @return This builder for chaining.
1159        */
setPem(java.lang.String value)1160       public Builder setPem(java.lang.String value) {
1161         if (value == null) {
1162           throw new NullPointerException();
1163         }
1164         pem_ = value;
1165         bitField0_ |= 0x00000001;
1166         onChanged();
1167         return this;
1168       }
1169       /**
1170        *
1171        *
1172        * <pre>
1173        * The public key, encoded in PEM format. For more information, see the [RFC
1174        * 7468](https://tools.ietf.org/html/rfc7468) sections for [General
1175        * Considerations](https://tools.ietf.org/html/rfc7468#section-2) and
1176        * [Textual Encoding of Subject Public Key Info]
1177        * (https://tools.ietf.org/html/rfc7468#section-13).
1178        * </pre>
1179        *
1180        * <code>string pem = 1;</code>
1181        *
1182        * @return This builder for chaining.
1183        */
clearPem()1184       public Builder clearPem() {
1185         pem_ = getDefaultInstance().getPem();
1186         bitField0_ = (bitField0_ & ~0x00000001);
1187         onChanged();
1188         return this;
1189       }
1190       /**
1191        *
1192        *
1193        * <pre>
1194        * The public key, encoded in PEM format. For more information, see the [RFC
1195        * 7468](https://tools.ietf.org/html/rfc7468) sections for [General
1196        * Considerations](https://tools.ietf.org/html/rfc7468#section-2) and
1197        * [Textual Encoding of Subject Public Key Info]
1198        * (https://tools.ietf.org/html/rfc7468#section-13).
1199        * </pre>
1200        *
1201        * <code>string pem = 1;</code>
1202        *
1203        * @param value The bytes for pem to set.
1204        * @return This builder for chaining.
1205        */
setPemBytes(com.google.protobuf.ByteString value)1206       public Builder setPemBytes(com.google.protobuf.ByteString value) {
1207         if (value == null) {
1208           throw new NullPointerException();
1209         }
1210         checkByteStringIsUtf8(value);
1211         pem_ = value;
1212         bitField0_ |= 0x00000001;
1213         onChanged();
1214         return this;
1215       }
1216 
1217       @java.lang.Override
setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1218       public final Builder setUnknownFields(
1219           final com.google.protobuf.UnknownFieldSet unknownFields) {
1220         return super.setUnknownFields(unknownFields);
1221       }
1222 
1223       @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1224       public final Builder mergeUnknownFields(
1225           final com.google.protobuf.UnknownFieldSet unknownFields) {
1226         return super.mergeUnknownFields(unknownFields);
1227       }
1228 
1229       // @@protoc_insertion_point(builder_scope:google.cloud.kms.v1.ImportJob.WrappingPublicKey)
1230     }
1231 
1232     // @@protoc_insertion_point(class_scope:google.cloud.kms.v1.ImportJob.WrappingPublicKey)
1233     private static final com.google.cloud.kms.v1.ImportJob.WrappingPublicKey DEFAULT_INSTANCE;
1234 
1235     static {
1236       DEFAULT_INSTANCE = new com.google.cloud.kms.v1.ImportJob.WrappingPublicKey();
1237     }
1238 
getDefaultInstance()1239     public static com.google.cloud.kms.v1.ImportJob.WrappingPublicKey getDefaultInstance() {
1240       return DEFAULT_INSTANCE;
1241     }
1242 
1243     private static final com.google.protobuf.Parser<WrappingPublicKey> PARSER =
1244         new com.google.protobuf.AbstractParser<WrappingPublicKey>() {
1245           @java.lang.Override
1246           public WrappingPublicKey parsePartialFrom(
1247               com.google.protobuf.CodedInputStream input,
1248               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1249               throws com.google.protobuf.InvalidProtocolBufferException {
1250             Builder builder = newBuilder();
1251             try {
1252               builder.mergeFrom(input, extensionRegistry);
1253             } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1254               throw e.setUnfinishedMessage(builder.buildPartial());
1255             } catch (com.google.protobuf.UninitializedMessageException e) {
1256               throw e.asInvalidProtocolBufferException()
1257                   .setUnfinishedMessage(builder.buildPartial());
1258             } catch (java.io.IOException e) {
1259               throw new com.google.protobuf.InvalidProtocolBufferException(e)
1260                   .setUnfinishedMessage(builder.buildPartial());
1261             }
1262             return builder.buildPartial();
1263           }
1264         };
1265 
parser()1266     public static com.google.protobuf.Parser<WrappingPublicKey> parser() {
1267       return PARSER;
1268     }
1269 
1270     @java.lang.Override
getParserForType()1271     public com.google.protobuf.Parser<WrappingPublicKey> getParserForType() {
1272       return PARSER;
1273     }
1274 
1275     @java.lang.Override
getDefaultInstanceForType()1276     public com.google.cloud.kms.v1.ImportJob.WrappingPublicKey getDefaultInstanceForType() {
1277       return DEFAULT_INSTANCE;
1278     }
1279   }
1280 
1281   public static final int NAME_FIELD_NUMBER = 1;
1282 
1283   @SuppressWarnings("serial")
1284   private volatile java.lang.Object name_ = "";
1285   /**
1286    *
1287    *
1288    * <pre>
1289    * Output only. The resource name for this
1290    * [ImportJob][google.cloud.kms.v1.ImportJob] in the format
1291    * `projects/&#42;&#47;locations/&#42;&#47;keyRings/&#42;&#47;importJobs/&#42;`.
1292    * </pre>
1293    *
1294    * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1295    *
1296    * @return The name.
1297    */
1298   @java.lang.Override
getName()1299   public java.lang.String getName() {
1300     java.lang.Object ref = name_;
1301     if (ref instanceof java.lang.String) {
1302       return (java.lang.String) ref;
1303     } else {
1304       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1305       java.lang.String s = bs.toStringUtf8();
1306       name_ = s;
1307       return s;
1308     }
1309   }
1310   /**
1311    *
1312    *
1313    * <pre>
1314    * Output only. The resource name for this
1315    * [ImportJob][google.cloud.kms.v1.ImportJob] in the format
1316    * `projects/&#42;&#47;locations/&#42;&#47;keyRings/&#42;&#47;importJobs/&#42;`.
1317    * </pre>
1318    *
1319    * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1320    *
1321    * @return The bytes for name.
1322    */
1323   @java.lang.Override
getNameBytes()1324   public com.google.protobuf.ByteString getNameBytes() {
1325     java.lang.Object ref = name_;
1326     if (ref instanceof java.lang.String) {
1327       com.google.protobuf.ByteString b =
1328           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1329       name_ = b;
1330       return b;
1331     } else {
1332       return (com.google.protobuf.ByteString) ref;
1333     }
1334   }
1335 
1336   public static final int IMPORT_METHOD_FIELD_NUMBER = 2;
1337   private int importMethod_ = 0;
1338   /**
1339    *
1340    *
1341    * <pre>
1342    * Required. Immutable. The wrapping method to be used for incoming key
1343    * material.
1344    * </pre>
1345    *
1346    * <code>
1347    * .google.cloud.kms.v1.ImportJob.ImportMethod import_method = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
1348    * </code>
1349    *
1350    * @return The enum numeric value on the wire for importMethod.
1351    */
1352   @java.lang.Override
getImportMethodValue()1353   public int getImportMethodValue() {
1354     return importMethod_;
1355   }
1356   /**
1357    *
1358    *
1359    * <pre>
1360    * Required. Immutable. The wrapping method to be used for incoming key
1361    * material.
1362    * </pre>
1363    *
1364    * <code>
1365    * .google.cloud.kms.v1.ImportJob.ImportMethod import_method = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
1366    * </code>
1367    *
1368    * @return The importMethod.
1369    */
1370   @java.lang.Override
getImportMethod()1371   public com.google.cloud.kms.v1.ImportJob.ImportMethod getImportMethod() {
1372     com.google.cloud.kms.v1.ImportJob.ImportMethod result =
1373         com.google.cloud.kms.v1.ImportJob.ImportMethod.forNumber(importMethod_);
1374     return result == null ? com.google.cloud.kms.v1.ImportJob.ImportMethod.UNRECOGNIZED : result;
1375   }
1376 
1377   public static final int PROTECTION_LEVEL_FIELD_NUMBER = 9;
1378   private int protectionLevel_ = 0;
1379   /**
1380    *
1381    *
1382    * <pre>
1383    * Required. Immutable. The protection level of the
1384    * [ImportJob][google.cloud.kms.v1.ImportJob]. This must match the
1385    * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]
1386    * of the [version_template][google.cloud.kms.v1.CryptoKey.version_template]
1387    * on the [CryptoKey][google.cloud.kms.v1.CryptoKey] you attempt to import
1388    * into.
1389    * </pre>
1390    *
1391    * <code>
1392    * .google.cloud.kms.v1.ProtectionLevel protection_level = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
1393    * </code>
1394    *
1395    * @return The enum numeric value on the wire for protectionLevel.
1396    */
1397   @java.lang.Override
getProtectionLevelValue()1398   public int getProtectionLevelValue() {
1399     return protectionLevel_;
1400   }
1401   /**
1402    *
1403    *
1404    * <pre>
1405    * Required. Immutable. The protection level of the
1406    * [ImportJob][google.cloud.kms.v1.ImportJob]. This must match the
1407    * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]
1408    * of the [version_template][google.cloud.kms.v1.CryptoKey.version_template]
1409    * on the [CryptoKey][google.cloud.kms.v1.CryptoKey] you attempt to import
1410    * into.
1411    * </pre>
1412    *
1413    * <code>
1414    * .google.cloud.kms.v1.ProtectionLevel protection_level = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
1415    * </code>
1416    *
1417    * @return The protectionLevel.
1418    */
1419   @java.lang.Override
getProtectionLevel()1420   public com.google.cloud.kms.v1.ProtectionLevel getProtectionLevel() {
1421     com.google.cloud.kms.v1.ProtectionLevel result =
1422         com.google.cloud.kms.v1.ProtectionLevel.forNumber(protectionLevel_);
1423     return result == null ? com.google.cloud.kms.v1.ProtectionLevel.UNRECOGNIZED : result;
1424   }
1425 
1426   public static final int CREATE_TIME_FIELD_NUMBER = 3;
1427   private com.google.protobuf.Timestamp createTime_;
1428   /**
1429    *
1430    *
1431    * <pre>
1432    * Output only. The time at which this
1433    * [ImportJob][google.cloud.kms.v1.ImportJob] was created.
1434    * </pre>
1435    *
1436    * <code>.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
1437    * </code>
1438    *
1439    * @return Whether the createTime field is set.
1440    */
1441   @java.lang.Override
hasCreateTime()1442   public boolean hasCreateTime() {
1443     return createTime_ != null;
1444   }
1445   /**
1446    *
1447    *
1448    * <pre>
1449    * Output only. The time at which this
1450    * [ImportJob][google.cloud.kms.v1.ImportJob] was created.
1451    * </pre>
1452    *
1453    * <code>.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
1454    * </code>
1455    *
1456    * @return The createTime.
1457    */
1458   @java.lang.Override
getCreateTime()1459   public com.google.protobuf.Timestamp getCreateTime() {
1460     return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;
1461   }
1462   /**
1463    *
1464    *
1465    * <pre>
1466    * Output only. The time at which this
1467    * [ImportJob][google.cloud.kms.v1.ImportJob] was created.
1468    * </pre>
1469    *
1470    * <code>.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
1471    * </code>
1472    */
1473   @java.lang.Override
getCreateTimeOrBuilder()1474   public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() {
1475     return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;
1476   }
1477 
1478   public static final int GENERATE_TIME_FIELD_NUMBER = 4;
1479   private com.google.protobuf.Timestamp generateTime_;
1480   /**
1481    *
1482    *
1483    * <pre>
1484    * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]'s key
1485    * material was generated.
1486    * </pre>
1487    *
1488    * <code>
1489    * .google.protobuf.Timestamp generate_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
1490    * </code>
1491    *
1492    * @return Whether the generateTime field is set.
1493    */
1494   @java.lang.Override
hasGenerateTime()1495   public boolean hasGenerateTime() {
1496     return generateTime_ != null;
1497   }
1498   /**
1499    *
1500    *
1501    * <pre>
1502    * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]'s key
1503    * material was generated.
1504    * </pre>
1505    *
1506    * <code>
1507    * .google.protobuf.Timestamp generate_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
1508    * </code>
1509    *
1510    * @return The generateTime.
1511    */
1512   @java.lang.Override
getGenerateTime()1513   public com.google.protobuf.Timestamp getGenerateTime() {
1514     return generateTime_ == null
1515         ? com.google.protobuf.Timestamp.getDefaultInstance()
1516         : generateTime_;
1517   }
1518   /**
1519    *
1520    *
1521    * <pre>
1522    * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]'s key
1523    * material was generated.
1524    * </pre>
1525    *
1526    * <code>
1527    * .google.protobuf.Timestamp generate_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
1528    * </code>
1529    */
1530   @java.lang.Override
getGenerateTimeOrBuilder()1531   public com.google.protobuf.TimestampOrBuilder getGenerateTimeOrBuilder() {
1532     return generateTime_ == null
1533         ? com.google.protobuf.Timestamp.getDefaultInstance()
1534         : generateTime_;
1535   }
1536 
1537   public static final int EXPIRE_TIME_FIELD_NUMBER = 5;
1538   private com.google.protobuf.Timestamp expireTime_;
1539   /**
1540    *
1541    *
1542    * <pre>
1543    * Output only. The time at which this
1544    * [ImportJob][google.cloud.kms.v1.ImportJob] is scheduled for expiration and
1545    * can no longer be used to import key material.
1546    * </pre>
1547    *
1548    * <code>.google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
1549    * </code>
1550    *
1551    * @return Whether the expireTime field is set.
1552    */
1553   @java.lang.Override
hasExpireTime()1554   public boolean hasExpireTime() {
1555     return expireTime_ != null;
1556   }
1557   /**
1558    *
1559    *
1560    * <pre>
1561    * Output only. The time at which this
1562    * [ImportJob][google.cloud.kms.v1.ImportJob] is scheduled for expiration and
1563    * can no longer be used to import key material.
1564    * </pre>
1565    *
1566    * <code>.google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
1567    * </code>
1568    *
1569    * @return The expireTime.
1570    */
1571   @java.lang.Override
getExpireTime()1572   public com.google.protobuf.Timestamp getExpireTime() {
1573     return expireTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expireTime_;
1574   }
1575   /**
1576    *
1577    *
1578    * <pre>
1579    * Output only. The time at which this
1580    * [ImportJob][google.cloud.kms.v1.ImportJob] is scheduled for expiration and
1581    * can no longer be used to import key material.
1582    * </pre>
1583    *
1584    * <code>.google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
1585    * </code>
1586    */
1587   @java.lang.Override
getExpireTimeOrBuilder()1588   public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() {
1589     return expireTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expireTime_;
1590   }
1591 
1592   public static final int EXPIRE_EVENT_TIME_FIELD_NUMBER = 10;
1593   private com.google.protobuf.Timestamp expireEventTime_;
1594   /**
1595    *
1596    *
1597    * <pre>
1598    * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]
1599    * expired. Only present if [state][google.cloud.kms.v1.ImportJob.state] is
1600    * [EXPIRED][google.cloud.kms.v1.ImportJob.ImportJobState.EXPIRED].
1601    * </pre>
1602    *
1603    * <code>
1604    * .google.protobuf.Timestamp expire_event_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
1605    * </code>
1606    *
1607    * @return Whether the expireEventTime field is set.
1608    */
1609   @java.lang.Override
hasExpireEventTime()1610   public boolean hasExpireEventTime() {
1611     return expireEventTime_ != null;
1612   }
1613   /**
1614    *
1615    *
1616    * <pre>
1617    * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]
1618    * expired. Only present if [state][google.cloud.kms.v1.ImportJob.state] is
1619    * [EXPIRED][google.cloud.kms.v1.ImportJob.ImportJobState.EXPIRED].
1620    * </pre>
1621    *
1622    * <code>
1623    * .google.protobuf.Timestamp expire_event_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
1624    * </code>
1625    *
1626    * @return The expireEventTime.
1627    */
1628   @java.lang.Override
getExpireEventTime()1629   public com.google.protobuf.Timestamp getExpireEventTime() {
1630     return expireEventTime_ == null
1631         ? com.google.protobuf.Timestamp.getDefaultInstance()
1632         : expireEventTime_;
1633   }
1634   /**
1635    *
1636    *
1637    * <pre>
1638    * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]
1639    * expired. Only present if [state][google.cloud.kms.v1.ImportJob.state] is
1640    * [EXPIRED][google.cloud.kms.v1.ImportJob.ImportJobState.EXPIRED].
1641    * </pre>
1642    *
1643    * <code>
1644    * .google.protobuf.Timestamp expire_event_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
1645    * </code>
1646    */
1647   @java.lang.Override
getExpireEventTimeOrBuilder()1648   public com.google.protobuf.TimestampOrBuilder getExpireEventTimeOrBuilder() {
1649     return expireEventTime_ == null
1650         ? com.google.protobuf.Timestamp.getDefaultInstance()
1651         : expireEventTime_;
1652   }
1653 
1654   public static final int STATE_FIELD_NUMBER = 6;
1655   private int state_ = 0;
1656   /**
1657    *
1658    *
1659    * <pre>
1660    * Output only. The current state of the
1661    * [ImportJob][google.cloud.kms.v1.ImportJob], indicating if it can be used.
1662    * </pre>
1663    *
1664    * <code>
1665    * .google.cloud.kms.v1.ImportJob.ImportJobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
1666    * </code>
1667    *
1668    * @return The enum numeric value on the wire for state.
1669    */
1670   @java.lang.Override
getStateValue()1671   public int getStateValue() {
1672     return state_;
1673   }
1674   /**
1675    *
1676    *
1677    * <pre>
1678    * Output only. The current state of the
1679    * [ImportJob][google.cloud.kms.v1.ImportJob], indicating if it can be used.
1680    * </pre>
1681    *
1682    * <code>
1683    * .google.cloud.kms.v1.ImportJob.ImportJobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
1684    * </code>
1685    *
1686    * @return The state.
1687    */
1688   @java.lang.Override
getState()1689   public com.google.cloud.kms.v1.ImportJob.ImportJobState getState() {
1690     com.google.cloud.kms.v1.ImportJob.ImportJobState result =
1691         com.google.cloud.kms.v1.ImportJob.ImportJobState.forNumber(state_);
1692     return result == null ? com.google.cloud.kms.v1.ImportJob.ImportJobState.UNRECOGNIZED : result;
1693   }
1694 
1695   public static final int PUBLIC_KEY_FIELD_NUMBER = 7;
1696   private com.google.cloud.kms.v1.ImportJob.WrappingPublicKey publicKey_;
1697   /**
1698    *
1699    *
1700    * <pre>
1701    * Output only. The public key with which to wrap key material prior to
1702    * import. Only returned if [state][google.cloud.kms.v1.ImportJob.state] is
1703    * [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE].
1704    * </pre>
1705    *
1706    * <code>
1707    * .google.cloud.kms.v1.ImportJob.WrappingPublicKey public_key = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
1708    * </code>
1709    *
1710    * @return Whether the publicKey field is set.
1711    */
1712   @java.lang.Override
hasPublicKey()1713   public boolean hasPublicKey() {
1714     return publicKey_ != null;
1715   }
1716   /**
1717    *
1718    *
1719    * <pre>
1720    * Output only. The public key with which to wrap key material prior to
1721    * import. Only returned if [state][google.cloud.kms.v1.ImportJob.state] is
1722    * [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE].
1723    * </pre>
1724    *
1725    * <code>
1726    * .google.cloud.kms.v1.ImportJob.WrappingPublicKey public_key = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
1727    * </code>
1728    *
1729    * @return The publicKey.
1730    */
1731   @java.lang.Override
getPublicKey()1732   public com.google.cloud.kms.v1.ImportJob.WrappingPublicKey getPublicKey() {
1733     return publicKey_ == null
1734         ? com.google.cloud.kms.v1.ImportJob.WrappingPublicKey.getDefaultInstance()
1735         : publicKey_;
1736   }
1737   /**
1738    *
1739    *
1740    * <pre>
1741    * Output only. The public key with which to wrap key material prior to
1742    * import. Only returned if [state][google.cloud.kms.v1.ImportJob.state] is
1743    * [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE].
1744    * </pre>
1745    *
1746    * <code>
1747    * .google.cloud.kms.v1.ImportJob.WrappingPublicKey public_key = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
1748    * </code>
1749    */
1750   @java.lang.Override
getPublicKeyOrBuilder()1751   public com.google.cloud.kms.v1.ImportJob.WrappingPublicKeyOrBuilder getPublicKeyOrBuilder() {
1752     return publicKey_ == null
1753         ? com.google.cloud.kms.v1.ImportJob.WrappingPublicKey.getDefaultInstance()
1754         : publicKey_;
1755   }
1756 
1757   public static final int ATTESTATION_FIELD_NUMBER = 8;
1758   private com.google.cloud.kms.v1.KeyOperationAttestation attestation_;
1759   /**
1760    *
1761    *
1762    * <pre>
1763    * Output only. Statement that was generated and signed by the key creator
1764    * (for example, an HSM) at key creation time. Use this statement to verify
1765    * attributes of the key as stored on the HSM, independently of Google.
1766    * Only present if the chosen
1767    * [ImportMethod][google.cloud.kms.v1.ImportJob.ImportMethod] is one with a
1768    * protection level of [HSM][google.cloud.kms.v1.ProtectionLevel.HSM].
1769    * </pre>
1770    *
1771    * <code>
1772    * .google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
1773    * </code>
1774    *
1775    * @return Whether the attestation field is set.
1776    */
1777   @java.lang.Override
hasAttestation()1778   public boolean hasAttestation() {
1779     return attestation_ != null;
1780   }
1781   /**
1782    *
1783    *
1784    * <pre>
1785    * Output only. Statement that was generated and signed by the key creator
1786    * (for example, an HSM) at key creation time. Use this statement to verify
1787    * attributes of the key as stored on the HSM, independently of Google.
1788    * Only present if the chosen
1789    * [ImportMethod][google.cloud.kms.v1.ImportJob.ImportMethod] is one with a
1790    * protection level of [HSM][google.cloud.kms.v1.ProtectionLevel.HSM].
1791    * </pre>
1792    *
1793    * <code>
1794    * .google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
1795    * </code>
1796    *
1797    * @return The attestation.
1798    */
1799   @java.lang.Override
getAttestation()1800   public com.google.cloud.kms.v1.KeyOperationAttestation getAttestation() {
1801     return attestation_ == null
1802         ? com.google.cloud.kms.v1.KeyOperationAttestation.getDefaultInstance()
1803         : attestation_;
1804   }
1805   /**
1806    *
1807    *
1808    * <pre>
1809    * Output only. Statement that was generated and signed by the key creator
1810    * (for example, an HSM) at key creation time. Use this statement to verify
1811    * attributes of the key as stored on the HSM, independently of Google.
1812    * Only present if the chosen
1813    * [ImportMethod][google.cloud.kms.v1.ImportJob.ImportMethod] is one with a
1814    * protection level of [HSM][google.cloud.kms.v1.ProtectionLevel.HSM].
1815    * </pre>
1816    *
1817    * <code>
1818    * .google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
1819    * </code>
1820    */
1821   @java.lang.Override
getAttestationOrBuilder()1822   public com.google.cloud.kms.v1.KeyOperationAttestationOrBuilder getAttestationOrBuilder() {
1823     return attestation_ == null
1824         ? com.google.cloud.kms.v1.KeyOperationAttestation.getDefaultInstance()
1825         : attestation_;
1826   }
1827 
1828   private byte memoizedIsInitialized = -1;
1829 
1830   @java.lang.Override
isInitialized()1831   public final boolean isInitialized() {
1832     byte isInitialized = memoizedIsInitialized;
1833     if (isInitialized == 1) return true;
1834     if (isInitialized == 0) return false;
1835 
1836     memoizedIsInitialized = 1;
1837     return true;
1838   }
1839 
1840   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)1841   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
1842     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
1843       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
1844     }
1845     if (importMethod_
1846         != com.google.cloud.kms.v1.ImportJob.ImportMethod.IMPORT_METHOD_UNSPECIFIED.getNumber()) {
1847       output.writeEnum(2, importMethod_);
1848     }
1849     if (createTime_ != null) {
1850       output.writeMessage(3, getCreateTime());
1851     }
1852     if (generateTime_ != null) {
1853       output.writeMessage(4, getGenerateTime());
1854     }
1855     if (expireTime_ != null) {
1856       output.writeMessage(5, getExpireTime());
1857     }
1858     if (state_
1859         != com.google.cloud.kms.v1.ImportJob.ImportJobState.IMPORT_JOB_STATE_UNSPECIFIED
1860             .getNumber()) {
1861       output.writeEnum(6, state_);
1862     }
1863     if (publicKey_ != null) {
1864       output.writeMessage(7, getPublicKey());
1865     }
1866     if (attestation_ != null) {
1867       output.writeMessage(8, getAttestation());
1868     }
1869     if (protectionLevel_
1870         != com.google.cloud.kms.v1.ProtectionLevel.PROTECTION_LEVEL_UNSPECIFIED.getNumber()) {
1871       output.writeEnum(9, protectionLevel_);
1872     }
1873     if (expireEventTime_ != null) {
1874       output.writeMessage(10, getExpireEventTime());
1875     }
1876     getUnknownFields().writeTo(output);
1877   }
1878 
1879   @java.lang.Override
getSerializedSize()1880   public int getSerializedSize() {
1881     int size = memoizedSize;
1882     if (size != -1) return size;
1883 
1884     size = 0;
1885     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
1886       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
1887     }
1888     if (importMethod_
1889         != com.google.cloud.kms.v1.ImportJob.ImportMethod.IMPORT_METHOD_UNSPECIFIED.getNumber()) {
1890       size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, importMethod_);
1891     }
1892     if (createTime_ != null) {
1893       size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCreateTime());
1894     }
1895     if (generateTime_ != null) {
1896       size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getGenerateTime());
1897     }
1898     if (expireTime_ != null) {
1899       size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getExpireTime());
1900     }
1901     if (state_
1902         != com.google.cloud.kms.v1.ImportJob.ImportJobState.IMPORT_JOB_STATE_UNSPECIFIED
1903             .getNumber()) {
1904       size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, state_);
1905     }
1906     if (publicKey_ != null) {
1907       size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getPublicKey());
1908     }
1909     if (attestation_ != null) {
1910       size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getAttestation());
1911     }
1912     if (protectionLevel_
1913         != com.google.cloud.kms.v1.ProtectionLevel.PROTECTION_LEVEL_UNSPECIFIED.getNumber()) {
1914       size += com.google.protobuf.CodedOutputStream.computeEnumSize(9, protectionLevel_);
1915     }
1916     if (expireEventTime_ != null) {
1917       size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getExpireEventTime());
1918     }
1919     size += getUnknownFields().getSerializedSize();
1920     memoizedSize = size;
1921     return size;
1922   }
1923 
1924   @java.lang.Override
equals(final java.lang.Object obj)1925   public boolean equals(final java.lang.Object obj) {
1926     if (obj == this) {
1927       return true;
1928     }
1929     if (!(obj instanceof com.google.cloud.kms.v1.ImportJob)) {
1930       return super.equals(obj);
1931     }
1932     com.google.cloud.kms.v1.ImportJob other = (com.google.cloud.kms.v1.ImportJob) obj;
1933 
1934     if (!getName().equals(other.getName())) return false;
1935     if (importMethod_ != other.importMethod_) return false;
1936     if (protectionLevel_ != other.protectionLevel_) return false;
1937     if (hasCreateTime() != other.hasCreateTime()) return false;
1938     if (hasCreateTime()) {
1939       if (!getCreateTime().equals(other.getCreateTime())) return false;
1940     }
1941     if (hasGenerateTime() != other.hasGenerateTime()) return false;
1942     if (hasGenerateTime()) {
1943       if (!getGenerateTime().equals(other.getGenerateTime())) return false;
1944     }
1945     if (hasExpireTime() != other.hasExpireTime()) return false;
1946     if (hasExpireTime()) {
1947       if (!getExpireTime().equals(other.getExpireTime())) return false;
1948     }
1949     if (hasExpireEventTime() != other.hasExpireEventTime()) return false;
1950     if (hasExpireEventTime()) {
1951       if (!getExpireEventTime().equals(other.getExpireEventTime())) return false;
1952     }
1953     if (state_ != other.state_) return false;
1954     if (hasPublicKey() != other.hasPublicKey()) return false;
1955     if (hasPublicKey()) {
1956       if (!getPublicKey().equals(other.getPublicKey())) return false;
1957     }
1958     if (hasAttestation() != other.hasAttestation()) return false;
1959     if (hasAttestation()) {
1960       if (!getAttestation().equals(other.getAttestation())) return false;
1961     }
1962     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
1963     return true;
1964   }
1965 
1966   @java.lang.Override
hashCode()1967   public int hashCode() {
1968     if (memoizedHashCode != 0) {
1969       return memoizedHashCode;
1970     }
1971     int hash = 41;
1972     hash = (19 * hash) + getDescriptor().hashCode();
1973     hash = (37 * hash) + NAME_FIELD_NUMBER;
1974     hash = (53 * hash) + getName().hashCode();
1975     hash = (37 * hash) + IMPORT_METHOD_FIELD_NUMBER;
1976     hash = (53 * hash) + importMethod_;
1977     hash = (37 * hash) + PROTECTION_LEVEL_FIELD_NUMBER;
1978     hash = (53 * hash) + protectionLevel_;
1979     if (hasCreateTime()) {
1980       hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER;
1981       hash = (53 * hash) + getCreateTime().hashCode();
1982     }
1983     if (hasGenerateTime()) {
1984       hash = (37 * hash) + GENERATE_TIME_FIELD_NUMBER;
1985       hash = (53 * hash) + getGenerateTime().hashCode();
1986     }
1987     if (hasExpireTime()) {
1988       hash = (37 * hash) + EXPIRE_TIME_FIELD_NUMBER;
1989       hash = (53 * hash) + getExpireTime().hashCode();
1990     }
1991     if (hasExpireEventTime()) {
1992       hash = (37 * hash) + EXPIRE_EVENT_TIME_FIELD_NUMBER;
1993       hash = (53 * hash) + getExpireEventTime().hashCode();
1994     }
1995     hash = (37 * hash) + STATE_FIELD_NUMBER;
1996     hash = (53 * hash) + state_;
1997     if (hasPublicKey()) {
1998       hash = (37 * hash) + PUBLIC_KEY_FIELD_NUMBER;
1999       hash = (53 * hash) + getPublicKey().hashCode();
2000     }
2001     if (hasAttestation()) {
2002       hash = (37 * hash) + ATTESTATION_FIELD_NUMBER;
2003       hash = (53 * hash) + getAttestation().hashCode();
2004     }
2005     hash = (29 * hash) + getUnknownFields().hashCode();
2006     memoizedHashCode = hash;
2007     return hash;
2008   }
2009 
parseFrom(java.nio.ByteBuffer data)2010   public static com.google.cloud.kms.v1.ImportJob parseFrom(java.nio.ByteBuffer data)
2011       throws com.google.protobuf.InvalidProtocolBufferException {
2012     return PARSER.parseFrom(data);
2013   }
2014 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2015   public static com.google.cloud.kms.v1.ImportJob parseFrom(
2016       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2017       throws com.google.protobuf.InvalidProtocolBufferException {
2018     return PARSER.parseFrom(data, extensionRegistry);
2019   }
2020 
parseFrom(com.google.protobuf.ByteString data)2021   public static com.google.cloud.kms.v1.ImportJob parseFrom(com.google.protobuf.ByteString data)
2022       throws com.google.protobuf.InvalidProtocolBufferException {
2023     return PARSER.parseFrom(data);
2024   }
2025 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2026   public static com.google.cloud.kms.v1.ImportJob parseFrom(
2027       com.google.protobuf.ByteString data,
2028       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2029       throws com.google.protobuf.InvalidProtocolBufferException {
2030     return PARSER.parseFrom(data, extensionRegistry);
2031   }
2032 
parseFrom(byte[] data)2033   public static com.google.cloud.kms.v1.ImportJob parseFrom(byte[] data)
2034       throws com.google.protobuf.InvalidProtocolBufferException {
2035     return PARSER.parseFrom(data);
2036   }
2037 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2038   public static com.google.cloud.kms.v1.ImportJob parseFrom(
2039       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2040       throws com.google.protobuf.InvalidProtocolBufferException {
2041     return PARSER.parseFrom(data, extensionRegistry);
2042   }
2043 
parseFrom(java.io.InputStream input)2044   public static com.google.cloud.kms.v1.ImportJob parseFrom(java.io.InputStream input)
2045       throws java.io.IOException {
2046     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
2047   }
2048 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2049   public static com.google.cloud.kms.v1.ImportJob parseFrom(
2050       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2051       throws java.io.IOException {
2052     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
2053         PARSER, input, extensionRegistry);
2054   }
2055 
parseDelimitedFrom(java.io.InputStream input)2056   public static com.google.cloud.kms.v1.ImportJob parseDelimitedFrom(java.io.InputStream input)
2057       throws java.io.IOException {
2058     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
2059   }
2060 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2061   public static com.google.cloud.kms.v1.ImportJob parseDelimitedFrom(
2062       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2063       throws java.io.IOException {
2064     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
2065         PARSER, input, extensionRegistry);
2066   }
2067 
parseFrom( com.google.protobuf.CodedInputStream input)2068   public static com.google.cloud.kms.v1.ImportJob parseFrom(
2069       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
2070     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
2071   }
2072 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2073   public static com.google.cloud.kms.v1.ImportJob parseFrom(
2074       com.google.protobuf.CodedInputStream input,
2075       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2076       throws java.io.IOException {
2077     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
2078         PARSER, input, extensionRegistry);
2079   }
2080 
2081   @java.lang.Override
newBuilderForType()2082   public Builder newBuilderForType() {
2083     return newBuilder();
2084   }
2085 
newBuilder()2086   public static Builder newBuilder() {
2087     return DEFAULT_INSTANCE.toBuilder();
2088   }
2089 
newBuilder(com.google.cloud.kms.v1.ImportJob prototype)2090   public static Builder newBuilder(com.google.cloud.kms.v1.ImportJob prototype) {
2091     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
2092   }
2093 
2094   @java.lang.Override
toBuilder()2095   public Builder toBuilder() {
2096     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
2097   }
2098 
2099   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)2100   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
2101     Builder builder = new Builder(parent);
2102     return builder;
2103   }
2104   /**
2105    *
2106    *
2107    * <pre>
2108    * An [ImportJob][google.cloud.kms.v1.ImportJob] can be used to create
2109    * [CryptoKeys][google.cloud.kms.v1.CryptoKey] and
2110    * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] using pre-existing
2111    * key material, generated outside of Cloud KMS.
2112    * When an [ImportJob][google.cloud.kms.v1.ImportJob] is created, Cloud KMS will
2113    * generate a "wrapping key", which is a public/private key pair. You use the
2114    * wrapping key to encrypt (also known as wrap) the pre-existing key material to
2115    * protect it during the import process. The nature of the wrapping key depends
2116    * on the choice of
2117    * [import_method][google.cloud.kms.v1.ImportJob.import_method]. When the
2118    * wrapping key generation is complete, the
2119    * [state][google.cloud.kms.v1.ImportJob.state] will be set to
2120    * [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE] and the
2121    * [public_key][google.cloud.kms.v1.ImportJob.public_key] can be fetched. The
2122    * fetched public key can then be used to wrap your pre-existing key material.
2123    * Once the key material is wrapped, it can be imported into a new
2124    * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in an existing
2125    * [CryptoKey][google.cloud.kms.v1.CryptoKey] by calling
2126    * [ImportCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.ImportCryptoKeyVersion].
2127    * Multiple [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] can be
2128    * imported with a single [ImportJob][google.cloud.kms.v1.ImportJob]. Cloud KMS
2129    * uses the private key portion of the wrapping key to unwrap the key material.
2130    * Only Cloud KMS has access to the private key.
2131    * An [ImportJob][google.cloud.kms.v1.ImportJob] expires 3 days after it is
2132    * created. Once expired, Cloud KMS will no longer be able to import or unwrap
2133    * any key material that was wrapped with the
2134    * [ImportJob][google.cloud.kms.v1.ImportJob]'s public key.
2135    * For more information, see
2136    * [Importing a key](https://cloud.google.com/kms/docs/importing-a-key).
2137    * </pre>
2138    *
2139    * Protobuf type {@code google.cloud.kms.v1.ImportJob}
2140    */
2141   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
2142       implements
2143       // @@protoc_insertion_point(builder_implements:google.cloud.kms.v1.ImportJob)
2144       com.google.cloud.kms.v1.ImportJobOrBuilder {
getDescriptor()2145     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
2146       return com.google.cloud.kms.v1.KmsResourcesProto
2147           .internal_static_google_cloud_kms_v1_ImportJob_descriptor;
2148     }
2149 
2150     @java.lang.Override
2151     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()2152         internalGetFieldAccessorTable() {
2153       return com.google.cloud.kms.v1.KmsResourcesProto
2154           .internal_static_google_cloud_kms_v1_ImportJob_fieldAccessorTable
2155           .ensureFieldAccessorsInitialized(
2156               com.google.cloud.kms.v1.ImportJob.class,
2157               com.google.cloud.kms.v1.ImportJob.Builder.class);
2158     }
2159 
2160     // Construct using com.google.cloud.kms.v1.ImportJob.newBuilder()
Builder()2161     private Builder() {}
2162 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)2163     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
2164       super(parent);
2165     }
2166 
2167     @java.lang.Override
clear()2168     public Builder clear() {
2169       super.clear();
2170       bitField0_ = 0;
2171       name_ = "";
2172       importMethod_ = 0;
2173       protectionLevel_ = 0;
2174       createTime_ = null;
2175       if (createTimeBuilder_ != null) {
2176         createTimeBuilder_.dispose();
2177         createTimeBuilder_ = null;
2178       }
2179       generateTime_ = null;
2180       if (generateTimeBuilder_ != null) {
2181         generateTimeBuilder_.dispose();
2182         generateTimeBuilder_ = null;
2183       }
2184       expireTime_ = null;
2185       if (expireTimeBuilder_ != null) {
2186         expireTimeBuilder_.dispose();
2187         expireTimeBuilder_ = null;
2188       }
2189       expireEventTime_ = null;
2190       if (expireEventTimeBuilder_ != null) {
2191         expireEventTimeBuilder_.dispose();
2192         expireEventTimeBuilder_ = null;
2193       }
2194       state_ = 0;
2195       publicKey_ = null;
2196       if (publicKeyBuilder_ != null) {
2197         publicKeyBuilder_.dispose();
2198         publicKeyBuilder_ = null;
2199       }
2200       attestation_ = null;
2201       if (attestationBuilder_ != null) {
2202         attestationBuilder_.dispose();
2203         attestationBuilder_ = null;
2204       }
2205       return this;
2206     }
2207 
2208     @java.lang.Override
getDescriptorForType()2209     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
2210       return com.google.cloud.kms.v1.KmsResourcesProto
2211           .internal_static_google_cloud_kms_v1_ImportJob_descriptor;
2212     }
2213 
2214     @java.lang.Override
getDefaultInstanceForType()2215     public com.google.cloud.kms.v1.ImportJob getDefaultInstanceForType() {
2216       return com.google.cloud.kms.v1.ImportJob.getDefaultInstance();
2217     }
2218 
2219     @java.lang.Override
build()2220     public com.google.cloud.kms.v1.ImportJob build() {
2221       com.google.cloud.kms.v1.ImportJob result = buildPartial();
2222       if (!result.isInitialized()) {
2223         throw newUninitializedMessageException(result);
2224       }
2225       return result;
2226     }
2227 
2228     @java.lang.Override
buildPartial()2229     public com.google.cloud.kms.v1.ImportJob buildPartial() {
2230       com.google.cloud.kms.v1.ImportJob result = new com.google.cloud.kms.v1.ImportJob(this);
2231       if (bitField0_ != 0) {
2232         buildPartial0(result);
2233       }
2234       onBuilt();
2235       return result;
2236     }
2237 
buildPartial0(com.google.cloud.kms.v1.ImportJob result)2238     private void buildPartial0(com.google.cloud.kms.v1.ImportJob result) {
2239       int from_bitField0_ = bitField0_;
2240       if (((from_bitField0_ & 0x00000001) != 0)) {
2241         result.name_ = name_;
2242       }
2243       if (((from_bitField0_ & 0x00000002) != 0)) {
2244         result.importMethod_ = importMethod_;
2245       }
2246       if (((from_bitField0_ & 0x00000004) != 0)) {
2247         result.protectionLevel_ = protectionLevel_;
2248       }
2249       if (((from_bitField0_ & 0x00000008) != 0)) {
2250         result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build();
2251       }
2252       if (((from_bitField0_ & 0x00000010) != 0)) {
2253         result.generateTime_ =
2254             generateTimeBuilder_ == null ? generateTime_ : generateTimeBuilder_.build();
2255       }
2256       if (((from_bitField0_ & 0x00000020) != 0)) {
2257         result.expireTime_ = expireTimeBuilder_ == null ? expireTime_ : expireTimeBuilder_.build();
2258       }
2259       if (((from_bitField0_ & 0x00000040) != 0)) {
2260         result.expireEventTime_ =
2261             expireEventTimeBuilder_ == null ? expireEventTime_ : expireEventTimeBuilder_.build();
2262       }
2263       if (((from_bitField0_ & 0x00000080) != 0)) {
2264         result.state_ = state_;
2265       }
2266       if (((from_bitField0_ & 0x00000100) != 0)) {
2267         result.publicKey_ = publicKeyBuilder_ == null ? publicKey_ : publicKeyBuilder_.build();
2268       }
2269       if (((from_bitField0_ & 0x00000200) != 0)) {
2270         result.attestation_ =
2271             attestationBuilder_ == null ? attestation_ : attestationBuilder_.build();
2272       }
2273     }
2274 
2275     @java.lang.Override
clone()2276     public Builder clone() {
2277       return super.clone();
2278     }
2279 
2280     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)2281     public Builder setField(
2282         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
2283       return super.setField(field, value);
2284     }
2285 
2286     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)2287     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
2288       return super.clearField(field);
2289     }
2290 
2291     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)2292     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
2293       return super.clearOneof(oneof);
2294     }
2295 
2296     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)2297     public Builder setRepeatedField(
2298         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
2299       return super.setRepeatedField(field, index, value);
2300     }
2301 
2302     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)2303     public Builder addRepeatedField(
2304         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
2305       return super.addRepeatedField(field, value);
2306     }
2307 
2308     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)2309     public Builder mergeFrom(com.google.protobuf.Message other) {
2310       if (other instanceof com.google.cloud.kms.v1.ImportJob) {
2311         return mergeFrom((com.google.cloud.kms.v1.ImportJob) other);
2312       } else {
2313         super.mergeFrom(other);
2314         return this;
2315       }
2316     }
2317 
mergeFrom(com.google.cloud.kms.v1.ImportJob other)2318     public Builder mergeFrom(com.google.cloud.kms.v1.ImportJob other) {
2319       if (other == com.google.cloud.kms.v1.ImportJob.getDefaultInstance()) return this;
2320       if (!other.getName().isEmpty()) {
2321         name_ = other.name_;
2322         bitField0_ |= 0x00000001;
2323         onChanged();
2324       }
2325       if (other.importMethod_ != 0) {
2326         setImportMethodValue(other.getImportMethodValue());
2327       }
2328       if (other.protectionLevel_ != 0) {
2329         setProtectionLevelValue(other.getProtectionLevelValue());
2330       }
2331       if (other.hasCreateTime()) {
2332         mergeCreateTime(other.getCreateTime());
2333       }
2334       if (other.hasGenerateTime()) {
2335         mergeGenerateTime(other.getGenerateTime());
2336       }
2337       if (other.hasExpireTime()) {
2338         mergeExpireTime(other.getExpireTime());
2339       }
2340       if (other.hasExpireEventTime()) {
2341         mergeExpireEventTime(other.getExpireEventTime());
2342       }
2343       if (other.state_ != 0) {
2344         setStateValue(other.getStateValue());
2345       }
2346       if (other.hasPublicKey()) {
2347         mergePublicKey(other.getPublicKey());
2348       }
2349       if (other.hasAttestation()) {
2350         mergeAttestation(other.getAttestation());
2351       }
2352       this.mergeUnknownFields(other.getUnknownFields());
2353       onChanged();
2354       return this;
2355     }
2356 
2357     @java.lang.Override
isInitialized()2358     public final boolean isInitialized() {
2359       return true;
2360     }
2361 
2362     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2363     public Builder mergeFrom(
2364         com.google.protobuf.CodedInputStream input,
2365         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2366         throws java.io.IOException {
2367       if (extensionRegistry == null) {
2368         throw new java.lang.NullPointerException();
2369       }
2370       try {
2371         boolean done = false;
2372         while (!done) {
2373           int tag = input.readTag();
2374           switch (tag) {
2375             case 0:
2376               done = true;
2377               break;
2378             case 10:
2379               {
2380                 name_ = input.readStringRequireUtf8();
2381                 bitField0_ |= 0x00000001;
2382                 break;
2383               } // case 10
2384             case 16:
2385               {
2386                 importMethod_ = input.readEnum();
2387                 bitField0_ |= 0x00000002;
2388                 break;
2389               } // case 16
2390             case 26:
2391               {
2392                 input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry);
2393                 bitField0_ |= 0x00000008;
2394                 break;
2395               } // case 26
2396             case 34:
2397               {
2398                 input.readMessage(getGenerateTimeFieldBuilder().getBuilder(), extensionRegistry);
2399                 bitField0_ |= 0x00000010;
2400                 break;
2401               } // case 34
2402             case 42:
2403               {
2404                 input.readMessage(getExpireTimeFieldBuilder().getBuilder(), extensionRegistry);
2405                 bitField0_ |= 0x00000020;
2406                 break;
2407               } // case 42
2408             case 48:
2409               {
2410                 state_ = input.readEnum();
2411                 bitField0_ |= 0x00000080;
2412                 break;
2413               } // case 48
2414             case 58:
2415               {
2416                 input.readMessage(getPublicKeyFieldBuilder().getBuilder(), extensionRegistry);
2417                 bitField0_ |= 0x00000100;
2418                 break;
2419               } // case 58
2420             case 66:
2421               {
2422                 input.readMessage(getAttestationFieldBuilder().getBuilder(), extensionRegistry);
2423                 bitField0_ |= 0x00000200;
2424                 break;
2425               } // case 66
2426             case 72:
2427               {
2428                 protectionLevel_ = input.readEnum();
2429                 bitField0_ |= 0x00000004;
2430                 break;
2431               } // case 72
2432             case 82:
2433               {
2434                 input.readMessage(getExpireEventTimeFieldBuilder().getBuilder(), extensionRegistry);
2435                 bitField0_ |= 0x00000040;
2436                 break;
2437               } // case 82
2438             default:
2439               {
2440                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
2441                   done = true; // was an endgroup tag
2442                 }
2443                 break;
2444               } // default:
2445           } // switch (tag)
2446         } // while (!done)
2447       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
2448         throw e.unwrapIOException();
2449       } finally {
2450         onChanged();
2451       } // finally
2452       return this;
2453     }
2454 
2455     private int bitField0_;
2456 
2457     private java.lang.Object name_ = "";
2458     /**
2459      *
2460      *
2461      * <pre>
2462      * Output only. The resource name for this
2463      * [ImportJob][google.cloud.kms.v1.ImportJob] in the format
2464      * `projects/&#42;&#47;locations/&#42;&#47;keyRings/&#42;&#47;importJobs/&#42;`.
2465      * </pre>
2466      *
2467      * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
2468      *
2469      * @return The name.
2470      */
getName()2471     public java.lang.String getName() {
2472       java.lang.Object ref = name_;
2473       if (!(ref instanceof java.lang.String)) {
2474         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
2475         java.lang.String s = bs.toStringUtf8();
2476         name_ = s;
2477         return s;
2478       } else {
2479         return (java.lang.String) ref;
2480       }
2481     }
2482     /**
2483      *
2484      *
2485      * <pre>
2486      * Output only. The resource name for this
2487      * [ImportJob][google.cloud.kms.v1.ImportJob] in the format
2488      * `projects/&#42;&#47;locations/&#42;&#47;keyRings/&#42;&#47;importJobs/&#42;`.
2489      * </pre>
2490      *
2491      * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
2492      *
2493      * @return The bytes for name.
2494      */
getNameBytes()2495     public com.google.protobuf.ByteString getNameBytes() {
2496       java.lang.Object ref = name_;
2497       if (ref instanceof String) {
2498         com.google.protobuf.ByteString b =
2499             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
2500         name_ = b;
2501         return b;
2502       } else {
2503         return (com.google.protobuf.ByteString) ref;
2504       }
2505     }
2506     /**
2507      *
2508      *
2509      * <pre>
2510      * Output only. The resource name for this
2511      * [ImportJob][google.cloud.kms.v1.ImportJob] in the format
2512      * `projects/&#42;&#47;locations/&#42;&#47;keyRings/&#42;&#47;importJobs/&#42;`.
2513      * </pre>
2514      *
2515      * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
2516      *
2517      * @param value The name to set.
2518      * @return This builder for chaining.
2519      */
setName(java.lang.String value)2520     public Builder setName(java.lang.String value) {
2521       if (value == null) {
2522         throw new NullPointerException();
2523       }
2524       name_ = value;
2525       bitField0_ |= 0x00000001;
2526       onChanged();
2527       return this;
2528     }
2529     /**
2530      *
2531      *
2532      * <pre>
2533      * Output only. The resource name for this
2534      * [ImportJob][google.cloud.kms.v1.ImportJob] in the format
2535      * `projects/&#42;&#47;locations/&#42;&#47;keyRings/&#42;&#47;importJobs/&#42;`.
2536      * </pre>
2537      *
2538      * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
2539      *
2540      * @return This builder for chaining.
2541      */
clearName()2542     public Builder clearName() {
2543       name_ = getDefaultInstance().getName();
2544       bitField0_ = (bitField0_ & ~0x00000001);
2545       onChanged();
2546       return this;
2547     }
2548     /**
2549      *
2550      *
2551      * <pre>
2552      * Output only. The resource name for this
2553      * [ImportJob][google.cloud.kms.v1.ImportJob] in the format
2554      * `projects/&#42;&#47;locations/&#42;&#47;keyRings/&#42;&#47;importJobs/&#42;`.
2555      * </pre>
2556      *
2557      * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
2558      *
2559      * @param value The bytes for name to set.
2560      * @return This builder for chaining.
2561      */
setNameBytes(com.google.protobuf.ByteString value)2562     public Builder setNameBytes(com.google.protobuf.ByteString value) {
2563       if (value == null) {
2564         throw new NullPointerException();
2565       }
2566       checkByteStringIsUtf8(value);
2567       name_ = value;
2568       bitField0_ |= 0x00000001;
2569       onChanged();
2570       return this;
2571     }
2572 
2573     private int importMethod_ = 0;
2574     /**
2575      *
2576      *
2577      * <pre>
2578      * Required. Immutable. The wrapping method to be used for incoming key
2579      * material.
2580      * </pre>
2581      *
2582      * <code>
2583      * .google.cloud.kms.v1.ImportJob.ImportMethod import_method = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
2584      * </code>
2585      *
2586      * @return The enum numeric value on the wire for importMethod.
2587      */
2588     @java.lang.Override
getImportMethodValue()2589     public int getImportMethodValue() {
2590       return importMethod_;
2591     }
2592     /**
2593      *
2594      *
2595      * <pre>
2596      * Required. Immutable. The wrapping method to be used for incoming key
2597      * material.
2598      * </pre>
2599      *
2600      * <code>
2601      * .google.cloud.kms.v1.ImportJob.ImportMethod import_method = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
2602      * </code>
2603      *
2604      * @param value The enum numeric value on the wire for importMethod to set.
2605      * @return This builder for chaining.
2606      */
setImportMethodValue(int value)2607     public Builder setImportMethodValue(int value) {
2608       importMethod_ = value;
2609       bitField0_ |= 0x00000002;
2610       onChanged();
2611       return this;
2612     }
2613     /**
2614      *
2615      *
2616      * <pre>
2617      * Required. Immutable. The wrapping method to be used for incoming key
2618      * material.
2619      * </pre>
2620      *
2621      * <code>
2622      * .google.cloud.kms.v1.ImportJob.ImportMethod import_method = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
2623      * </code>
2624      *
2625      * @return The importMethod.
2626      */
2627     @java.lang.Override
getImportMethod()2628     public com.google.cloud.kms.v1.ImportJob.ImportMethod getImportMethod() {
2629       com.google.cloud.kms.v1.ImportJob.ImportMethod result =
2630           com.google.cloud.kms.v1.ImportJob.ImportMethod.forNumber(importMethod_);
2631       return result == null ? com.google.cloud.kms.v1.ImportJob.ImportMethod.UNRECOGNIZED : result;
2632     }
2633     /**
2634      *
2635      *
2636      * <pre>
2637      * Required. Immutable. The wrapping method to be used for incoming key
2638      * material.
2639      * </pre>
2640      *
2641      * <code>
2642      * .google.cloud.kms.v1.ImportJob.ImportMethod import_method = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
2643      * </code>
2644      *
2645      * @param value The importMethod to set.
2646      * @return This builder for chaining.
2647      */
setImportMethod(com.google.cloud.kms.v1.ImportJob.ImportMethod value)2648     public Builder setImportMethod(com.google.cloud.kms.v1.ImportJob.ImportMethod value) {
2649       if (value == null) {
2650         throw new NullPointerException();
2651       }
2652       bitField0_ |= 0x00000002;
2653       importMethod_ = value.getNumber();
2654       onChanged();
2655       return this;
2656     }
2657     /**
2658      *
2659      *
2660      * <pre>
2661      * Required. Immutable. The wrapping method to be used for incoming key
2662      * material.
2663      * </pre>
2664      *
2665      * <code>
2666      * .google.cloud.kms.v1.ImportJob.ImportMethod import_method = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
2667      * </code>
2668      *
2669      * @return This builder for chaining.
2670      */
clearImportMethod()2671     public Builder clearImportMethod() {
2672       bitField0_ = (bitField0_ & ~0x00000002);
2673       importMethod_ = 0;
2674       onChanged();
2675       return this;
2676     }
2677 
2678     private int protectionLevel_ = 0;
2679     /**
2680      *
2681      *
2682      * <pre>
2683      * Required. Immutable. The protection level of the
2684      * [ImportJob][google.cloud.kms.v1.ImportJob]. This must match the
2685      * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]
2686      * of the [version_template][google.cloud.kms.v1.CryptoKey.version_template]
2687      * on the [CryptoKey][google.cloud.kms.v1.CryptoKey] you attempt to import
2688      * into.
2689      * </pre>
2690      *
2691      * <code>
2692      * .google.cloud.kms.v1.ProtectionLevel protection_level = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
2693      * </code>
2694      *
2695      * @return The enum numeric value on the wire for protectionLevel.
2696      */
2697     @java.lang.Override
getProtectionLevelValue()2698     public int getProtectionLevelValue() {
2699       return protectionLevel_;
2700     }
2701     /**
2702      *
2703      *
2704      * <pre>
2705      * Required. Immutable. The protection level of the
2706      * [ImportJob][google.cloud.kms.v1.ImportJob]. This must match the
2707      * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]
2708      * of the [version_template][google.cloud.kms.v1.CryptoKey.version_template]
2709      * on the [CryptoKey][google.cloud.kms.v1.CryptoKey] you attempt to import
2710      * into.
2711      * </pre>
2712      *
2713      * <code>
2714      * .google.cloud.kms.v1.ProtectionLevel protection_level = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
2715      * </code>
2716      *
2717      * @param value The enum numeric value on the wire for protectionLevel to set.
2718      * @return This builder for chaining.
2719      */
setProtectionLevelValue(int value)2720     public Builder setProtectionLevelValue(int value) {
2721       protectionLevel_ = value;
2722       bitField0_ |= 0x00000004;
2723       onChanged();
2724       return this;
2725     }
2726     /**
2727      *
2728      *
2729      * <pre>
2730      * Required. Immutable. The protection level of the
2731      * [ImportJob][google.cloud.kms.v1.ImportJob]. This must match the
2732      * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]
2733      * of the [version_template][google.cloud.kms.v1.CryptoKey.version_template]
2734      * on the [CryptoKey][google.cloud.kms.v1.CryptoKey] you attempt to import
2735      * into.
2736      * </pre>
2737      *
2738      * <code>
2739      * .google.cloud.kms.v1.ProtectionLevel protection_level = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
2740      * </code>
2741      *
2742      * @return The protectionLevel.
2743      */
2744     @java.lang.Override
getProtectionLevel()2745     public com.google.cloud.kms.v1.ProtectionLevel getProtectionLevel() {
2746       com.google.cloud.kms.v1.ProtectionLevel result =
2747           com.google.cloud.kms.v1.ProtectionLevel.forNumber(protectionLevel_);
2748       return result == null ? com.google.cloud.kms.v1.ProtectionLevel.UNRECOGNIZED : result;
2749     }
2750     /**
2751      *
2752      *
2753      * <pre>
2754      * Required. Immutable. The protection level of the
2755      * [ImportJob][google.cloud.kms.v1.ImportJob]. This must match the
2756      * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]
2757      * of the [version_template][google.cloud.kms.v1.CryptoKey.version_template]
2758      * on the [CryptoKey][google.cloud.kms.v1.CryptoKey] you attempt to import
2759      * into.
2760      * </pre>
2761      *
2762      * <code>
2763      * .google.cloud.kms.v1.ProtectionLevel protection_level = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
2764      * </code>
2765      *
2766      * @param value The protectionLevel to set.
2767      * @return This builder for chaining.
2768      */
setProtectionLevel(com.google.cloud.kms.v1.ProtectionLevel value)2769     public Builder setProtectionLevel(com.google.cloud.kms.v1.ProtectionLevel value) {
2770       if (value == null) {
2771         throw new NullPointerException();
2772       }
2773       bitField0_ |= 0x00000004;
2774       protectionLevel_ = value.getNumber();
2775       onChanged();
2776       return this;
2777     }
2778     /**
2779      *
2780      *
2781      * <pre>
2782      * Required. Immutable. The protection level of the
2783      * [ImportJob][google.cloud.kms.v1.ImportJob]. This must match the
2784      * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]
2785      * of the [version_template][google.cloud.kms.v1.CryptoKey.version_template]
2786      * on the [CryptoKey][google.cloud.kms.v1.CryptoKey] you attempt to import
2787      * into.
2788      * </pre>
2789      *
2790      * <code>
2791      * .google.cloud.kms.v1.ProtectionLevel protection_level = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
2792      * </code>
2793      *
2794      * @return This builder for chaining.
2795      */
clearProtectionLevel()2796     public Builder clearProtectionLevel() {
2797       bitField0_ = (bitField0_ & ~0x00000004);
2798       protectionLevel_ = 0;
2799       onChanged();
2800       return this;
2801     }
2802 
2803     private com.google.protobuf.Timestamp createTime_;
2804     private com.google.protobuf.SingleFieldBuilderV3<
2805             com.google.protobuf.Timestamp,
2806             com.google.protobuf.Timestamp.Builder,
2807             com.google.protobuf.TimestampOrBuilder>
2808         createTimeBuilder_;
2809     /**
2810      *
2811      *
2812      * <pre>
2813      * Output only. The time at which this
2814      * [ImportJob][google.cloud.kms.v1.ImportJob] was created.
2815      * </pre>
2816      *
2817      * <code>
2818      * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
2819      * </code>
2820      *
2821      * @return Whether the createTime field is set.
2822      */
hasCreateTime()2823     public boolean hasCreateTime() {
2824       return ((bitField0_ & 0x00000008) != 0);
2825     }
2826     /**
2827      *
2828      *
2829      * <pre>
2830      * Output only. The time at which this
2831      * [ImportJob][google.cloud.kms.v1.ImportJob] was created.
2832      * </pre>
2833      *
2834      * <code>
2835      * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
2836      * </code>
2837      *
2838      * @return The createTime.
2839      */
getCreateTime()2840     public com.google.protobuf.Timestamp getCreateTime() {
2841       if (createTimeBuilder_ == null) {
2842         return createTime_ == null
2843             ? com.google.protobuf.Timestamp.getDefaultInstance()
2844             : createTime_;
2845       } else {
2846         return createTimeBuilder_.getMessage();
2847       }
2848     }
2849     /**
2850      *
2851      *
2852      * <pre>
2853      * Output only. The time at which this
2854      * [ImportJob][google.cloud.kms.v1.ImportJob] was created.
2855      * </pre>
2856      *
2857      * <code>
2858      * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
2859      * </code>
2860      */
setCreateTime(com.google.protobuf.Timestamp value)2861     public Builder setCreateTime(com.google.protobuf.Timestamp value) {
2862       if (createTimeBuilder_ == null) {
2863         if (value == null) {
2864           throw new NullPointerException();
2865         }
2866         createTime_ = value;
2867       } else {
2868         createTimeBuilder_.setMessage(value);
2869       }
2870       bitField0_ |= 0x00000008;
2871       onChanged();
2872       return this;
2873     }
2874     /**
2875      *
2876      *
2877      * <pre>
2878      * Output only. The time at which this
2879      * [ImportJob][google.cloud.kms.v1.ImportJob] was created.
2880      * </pre>
2881      *
2882      * <code>
2883      * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
2884      * </code>
2885      */
setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue)2886     public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) {
2887       if (createTimeBuilder_ == null) {
2888         createTime_ = builderForValue.build();
2889       } else {
2890         createTimeBuilder_.setMessage(builderForValue.build());
2891       }
2892       bitField0_ |= 0x00000008;
2893       onChanged();
2894       return this;
2895     }
2896     /**
2897      *
2898      *
2899      * <pre>
2900      * Output only. The time at which this
2901      * [ImportJob][google.cloud.kms.v1.ImportJob] was created.
2902      * </pre>
2903      *
2904      * <code>
2905      * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
2906      * </code>
2907      */
mergeCreateTime(com.google.protobuf.Timestamp value)2908     public Builder mergeCreateTime(com.google.protobuf.Timestamp value) {
2909       if (createTimeBuilder_ == null) {
2910         if (((bitField0_ & 0x00000008) != 0)
2911             && createTime_ != null
2912             && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
2913           getCreateTimeBuilder().mergeFrom(value);
2914         } else {
2915           createTime_ = value;
2916         }
2917       } else {
2918         createTimeBuilder_.mergeFrom(value);
2919       }
2920       bitField0_ |= 0x00000008;
2921       onChanged();
2922       return this;
2923     }
2924     /**
2925      *
2926      *
2927      * <pre>
2928      * Output only. The time at which this
2929      * [ImportJob][google.cloud.kms.v1.ImportJob] was created.
2930      * </pre>
2931      *
2932      * <code>
2933      * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
2934      * </code>
2935      */
clearCreateTime()2936     public Builder clearCreateTime() {
2937       bitField0_ = (bitField0_ & ~0x00000008);
2938       createTime_ = null;
2939       if (createTimeBuilder_ != null) {
2940         createTimeBuilder_.dispose();
2941         createTimeBuilder_ = null;
2942       }
2943       onChanged();
2944       return this;
2945     }
2946     /**
2947      *
2948      *
2949      * <pre>
2950      * Output only. The time at which this
2951      * [ImportJob][google.cloud.kms.v1.ImportJob] was created.
2952      * </pre>
2953      *
2954      * <code>
2955      * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
2956      * </code>
2957      */
getCreateTimeBuilder()2958     public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() {
2959       bitField0_ |= 0x00000008;
2960       onChanged();
2961       return getCreateTimeFieldBuilder().getBuilder();
2962     }
2963     /**
2964      *
2965      *
2966      * <pre>
2967      * Output only. The time at which this
2968      * [ImportJob][google.cloud.kms.v1.ImportJob] was created.
2969      * </pre>
2970      *
2971      * <code>
2972      * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
2973      * </code>
2974      */
getCreateTimeOrBuilder()2975     public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() {
2976       if (createTimeBuilder_ != null) {
2977         return createTimeBuilder_.getMessageOrBuilder();
2978       } else {
2979         return createTime_ == null
2980             ? com.google.protobuf.Timestamp.getDefaultInstance()
2981             : createTime_;
2982       }
2983     }
2984     /**
2985      *
2986      *
2987      * <pre>
2988      * Output only. The time at which this
2989      * [ImportJob][google.cloud.kms.v1.ImportJob] was created.
2990      * </pre>
2991      *
2992      * <code>
2993      * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
2994      * </code>
2995      */
2996     private com.google.protobuf.SingleFieldBuilderV3<
2997             com.google.protobuf.Timestamp,
2998             com.google.protobuf.Timestamp.Builder,
2999             com.google.protobuf.TimestampOrBuilder>
getCreateTimeFieldBuilder()3000         getCreateTimeFieldBuilder() {
3001       if (createTimeBuilder_ == null) {
3002         createTimeBuilder_ =
3003             new com.google.protobuf.SingleFieldBuilderV3<
3004                 com.google.protobuf.Timestamp,
3005                 com.google.protobuf.Timestamp.Builder,
3006                 com.google.protobuf.TimestampOrBuilder>(
3007                 getCreateTime(), getParentForChildren(), isClean());
3008         createTime_ = null;
3009       }
3010       return createTimeBuilder_;
3011     }
3012 
3013     private com.google.protobuf.Timestamp generateTime_;
3014     private com.google.protobuf.SingleFieldBuilderV3<
3015             com.google.protobuf.Timestamp,
3016             com.google.protobuf.Timestamp.Builder,
3017             com.google.protobuf.TimestampOrBuilder>
3018         generateTimeBuilder_;
3019     /**
3020      *
3021      *
3022      * <pre>
3023      * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]'s key
3024      * material was generated.
3025      * </pre>
3026      *
3027      * <code>
3028      * .google.protobuf.Timestamp generate_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
3029      * </code>
3030      *
3031      * @return Whether the generateTime field is set.
3032      */
hasGenerateTime()3033     public boolean hasGenerateTime() {
3034       return ((bitField0_ & 0x00000010) != 0);
3035     }
3036     /**
3037      *
3038      *
3039      * <pre>
3040      * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]'s key
3041      * material was generated.
3042      * </pre>
3043      *
3044      * <code>
3045      * .google.protobuf.Timestamp generate_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
3046      * </code>
3047      *
3048      * @return The generateTime.
3049      */
getGenerateTime()3050     public com.google.protobuf.Timestamp getGenerateTime() {
3051       if (generateTimeBuilder_ == null) {
3052         return generateTime_ == null
3053             ? com.google.protobuf.Timestamp.getDefaultInstance()
3054             : generateTime_;
3055       } else {
3056         return generateTimeBuilder_.getMessage();
3057       }
3058     }
3059     /**
3060      *
3061      *
3062      * <pre>
3063      * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]'s key
3064      * material was generated.
3065      * </pre>
3066      *
3067      * <code>
3068      * .google.protobuf.Timestamp generate_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
3069      * </code>
3070      */
setGenerateTime(com.google.protobuf.Timestamp value)3071     public Builder setGenerateTime(com.google.protobuf.Timestamp value) {
3072       if (generateTimeBuilder_ == null) {
3073         if (value == null) {
3074           throw new NullPointerException();
3075         }
3076         generateTime_ = value;
3077       } else {
3078         generateTimeBuilder_.setMessage(value);
3079       }
3080       bitField0_ |= 0x00000010;
3081       onChanged();
3082       return this;
3083     }
3084     /**
3085      *
3086      *
3087      * <pre>
3088      * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]'s key
3089      * material was generated.
3090      * </pre>
3091      *
3092      * <code>
3093      * .google.protobuf.Timestamp generate_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
3094      * </code>
3095      */
setGenerateTime(com.google.protobuf.Timestamp.Builder builderForValue)3096     public Builder setGenerateTime(com.google.protobuf.Timestamp.Builder builderForValue) {
3097       if (generateTimeBuilder_ == null) {
3098         generateTime_ = builderForValue.build();
3099       } else {
3100         generateTimeBuilder_.setMessage(builderForValue.build());
3101       }
3102       bitField0_ |= 0x00000010;
3103       onChanged();
3104       return this;
3105     }
3106     /**
3107      *
3108      *
3109      * <pre>
3110      * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]'s key
3111      * material was generated.
3112      * </pre>
3113      *
3114      * <code>
3115      * .google.protobuf.Timestamp generate_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
3116      * </code>
3117      */
mergeGenerateTime(com.google.protobuf.Timestamp value)3118     public Builder mergeGenerateTime(com.google.protobuf.Timestamp value) {
3119       if (generateTimeBuilder_ == null) {
3120         if (((bitField0_ & 0x00000010) != 0)
3121             && generateTime_ != null
3122             && generateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
3123           getGenerateTimeBuilder().mergeFrom(value);
3124         } else {
3125           generateTime_ = value;
3126         }
3127       } else {
3128         generateTimeBuilder_.mergeFrom(value);
3129       }
3130       bitField0_ |= 0x00000010;
3131       onChanged();
3132       return this;
3133     }
3134     /**
3135      *
3136      *
3137      * <pre>
3138      * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]'s key
3139      * material was generated.
3140      * </pre>
3141      *
3142      * <code>
3143      * .google.protobuf.Timestamp generate_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
3144      * </code>
3145      */
clearGenerateTime()3146     public Builder clearGenerateTime() {
3147       bitField0_ = (bitField0_ & ~0x00000010);
3148       generateTime_ = null;
3149       if (generateTimeBuilder_ != null) {
3150         generateTimeBuilder_.dispose();
3151         generateTimeBuilder_ = null;
3152       }
3153       onChanged();
3154       return this;
3155     }
3156     /**
3157      *
3158      *
3159      * <pre>
3160      * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]'s key
3161      * material was generated.
3162      * </pre>
3163      *
3164      * <code>
3165      * .google.protobuf.Timestamp generate_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
3166      * </code>
3167      */
getGenerateTimeBuilder()3168     public com.google.protobuf.Timestamp.Builder getGenerateTimeBuilder() {
3169       bitField0_ |= 0x00000010;
3170       onChanged();
3171       return getGenerateTimeFieldBuilder().getBuilder();
3172     }
3173     /**
3174      *
3175      *
3176      * <pre>
3177      * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]'s key
3178      * material was generated.
3179      * </pre>
3180      *
3181      * <code>
3182      * .google.protobuf.Timestamp generate_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
3183      * </code>
3184      */
getGenerateTimeOrBuilder()3185     public com.google.protobuf.TimestampOrBuilder getGenerateTimeOrBuilder() {
3186       if (generateTimeBuilder_ != null) {
3187         return generateTimeBuilder_.getMessageOrBuilder();
3188       } else {
3189         return generateTime_ == null
3190             ? com.google.protobuf.Timestamp.getDefaultInstance()
3191             : generateTime_;
3192       }
3193     }
3194     /**
3195      *
3196      *
3197      * <pre>
3198      * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]'s key
3199      * material was generated.
3200      * </pre>
3201      *
3202      * <code>
3203      * .google.protobuf.Timestamp generate_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
3204      * </code>
3205      */
3206     private com.google.protobuf.SingleFieldBuilderV3<
3207             com.google.protobuf.Timestamp,
3208             com.google.protobuf.Timestamp.Builder,
3209             com.google.protobuf.TimestampOrBuilder>
getGenerateTimeFieldBuilder()3210         getGenerateTimeFieldBuilder() {
3211       if (generateTimeBuilder_ == null) {
3212         generateTimeBuilder_ =
3213             new com.google.protobuf.SingleFieldBuilderV3<
3214                 com.google.protobuf.Timestamp,
3215                 com.google.protobuf.Timestamp.Builder,
3216                 com.google.protobuf.TimestampOrBuilder>(
3217                 getGenerateTime(), getParentForChildren(), isClean());
3218         generateTime_ = null;
3219       }
3220       return generateTimeBuilder_;
3221     }
3222 
3223     private com.google.protobuf.Timestamp expireTime_;
3224     private com.google.protobuf.SingleFieldBuilderV3<
3225             com.google.protobuf.Timestamp,
3226             com.google.protobuf.Timestamp.Builder,
3227             com.google.protobuf.TimestampOrBuilder>
3228         expireTimeBuilder_;
3229     /**
3230      *
3231      *
3232      * <pre>
3233      * Output only. The time at which this
3234      * [ImportJob][google.cloud.kms.v1.ImportJob] is scheduled for expiration and
3235      * can no longer be used to import key material.
3236      * </pre>
3237      *
3238      * <code>
3239      * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
3240      * </code>
3241      *
3242      * @return Whether the expireTime field is set.
3243      */
hasExpireTime()3244     public boolean hasExpireTime() {
3245       return ((bitField0_ & 0x00000020) != 0);
3246     }
3247     /**
3248      *
3249      *
3250      * <pre>
3251      * Output only. The time at which this
3252      * [ImportJob][google.cloud.kms.v1.ImportJob] is scheduled for expiration and
3253      * can no longer be used to import key material.
3254      * </pre>
3255      *
3256      * <code>
3257      * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
3258      * </code>
3259      *
3260      * @return The expireTime.
3261      */
getExpireTime()3262     public com.google.protobuf.Timestamp getExpireTime() {
3263       if (expireTimeBuilder_ == null) {
3264         return expireTime_ == null
3265             ? com.google.protobuf.Timestamp.getDefaultInstance()
3266             : expireTime_;
3267       } else {
3268         return expireTimeBuilder_.getMessage();
3269       }
3270     }
3271     /**
3272      *
3273      *
3274      * <pre>
3275      * Output only. The time at which this
3276      * [ImportJob][google.cloud.kms.v1.ImportJob] is scheduled for expiration and
3277      * can no longer be used to import key material.
3278      * </pre>
3279      *
3280      * <code>
3281      * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
3282      * </code>
3283      */
setExpireTime(com.google.protobuf.Timestamp value)3284     public Builder setExpireTime(com.google.protobuf.Timestamp value) {
3285       if (expireTimeBuilder_ == null) {
3286         if (value == null) {
3287           throw new NullPointerException();
3288         }
3289         expireTime_ = value;
3290       } else {
3291         expireTimeBuilder_.setMessage(value);
3292       }
3293       bitField0_ |= 0x00000020;
3294       onChanged();
3295       return this;
3296     }
3297     /**
3298      *
3299      *
3300      * <pre>
3301      * Output only. The time at which this
3302      * [ImportJob][google.cloud.kms.v1.ImportJob] is scheduled for expiration and
3303      * can no longer be used to import key material.
3304      * </pre>
3305      *
3306      * <code>
3307      * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
3308      * </code>
3309      */
setExpireTime(com.google.protobuf.Timestamp.Builder builderForValue)3310     public Builder setExpireTime(com.google.protobuf.Timestamp.Builder builderForValue) {
3311       if (expireTimeBuilder_ == null) {
3312         expireTime_ = builderForValue.build();
3313       } else {
3314         expireTimeBuilder_.setMessage(builderForValue.build());
3315       }
3316       bitField0_ |= 0x00000020;
3317       onChanged();
3318       return this;
3319     }
3320     /**
3321      *
3322      *
3323      * <pre>
3324      * Output only. The time at which this
3325      * [ImportJob][google.cloud.kms.v1.ImportJob] is scheduled for expiration and
3326      * can no longer be used to import key material.
3327      * </pre>
3328      *
3329      * <code>
3330      * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
3331      * </code>
3332      */
mergeExpireTime(com.google.protobuf.Timestamp value)3333     public Builder mergeExpireTime(com.google.protobuf.Timestamp value) {
3334       if (expireTimeBuilder_ == null) {
3335         if (((bitField0_ & 0x00000020) != 0)
3336             && expireTime_ != null
3337             && expireTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
3338           getExpireTimeBuilder().mergeFrom(value);
3339         } else {
3340           expireTime_ = value;
3341         }
3342       } else {
3343         expireTimeBuilder_.mergeFrom(value);
3344       }
3345       bitField0_ |= 0x00000020;
3346       onChanged();
3347       return this;
3348     }
3349     /**
3350      *
3351      *
3352      * <pre>
3353      * Output only. The time at which this
3354      * [ImportJob][google.cloud.kms.v1.ImportJob] is scheduled for expiration and
3355      * can no longer be used to import key material.
3356      * </pre>
3357      *
3358      * <code>
3359      * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
3360      * </code>
3361      */
clearExpireTime()3362     public Builder clearExpireTime() {
3363       bitField0_ = (bitField0_ & ~0x00000020);
3364       expireTime_ = null;
3365       if (expireTimeBuilder_ != null) {
3366         expireTimeBuilder_.dispose();
3367         expireTimeBuilder_ = null;
3368       }
3369       onChanged();
3370       return this;
3371     }
3372     /**
3373      *
3374      *
3375      * <pre>
3376      * Output only. The time at which this
3377      * [ImportJob][google.cloud.kms.v1.ImportJob] is scheduled for expiration and
3378      * can no longer be used to import key material.
3379      * </pre>
3380      *
3381      * <code>
3382      * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
3383      * </code>
3384      */
getExpireTimeBuilder()3385     public com.google.protobuf.Timestamp.Builder getExpireTimeBuilder() {
3386       bitField0_ |= 0x00000020;
3387       onChanged();
3388       return getExpireTimeFieldBuilder().getBuilder();
3389     }
3390     /**
3391      *
3392      *
3393      * <pre>
3394      * Output only. The time at which this
3395      * [ImportJob][google.cloud.kms.v1.ImportJob] is scheduled for expiration and
3396      * can no longer be used to import key material.
3397      * </pre>
3398      *
3399      * <code>
3400      * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
3401      * </code>
3402      */
getExpireTimeOrBuilder()3403     public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() {
3404       if (expireTimeBuilder_ != null) {
3405         return expireTimeBuilder_.getMessageOrBuilder();
3406       } else {
3407         return expireTime_ == null
3408             ? com.google.protobuf.Timestamp.getDefaultInstance()
3409             : expireTime_;
3410       }
3411     }
3412     /**
3413      *
3414      *
3415      * <pre>
3416      * Output only. The time at which this
3417      * [ImportJob][google.cloud.kms.v1.ImportJob] is scheduled for expiration and
3418      * can no longer be used to import key material.
3419      * </pre>
3420      *
3421      * <code>
3422      * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
3423      * </code>
3424      */
3425     private com.google.protobuf.SingleFieldBuilderV3<
3426             com.google.protobuf.Timestamp,
3427             com.google.protobuf.Timestamp.Builder,
3428             com.google.protobuf.TimestampOrBuilder>
getExpireTimeFieldBuilder()3429         getExpireTimeFieldBuilder() {
3430       if (expireTimeBuilder_ == null) {
3431         expireTimeBuilder_ =
3432             new com.google.protobuf.SingleFieldBuilderV3<
3433                 com.google.protobuf.Timestamp,
3434                 com.google.protobuf.Timestamp.Builder,
3435                 com.google.protobuf.TimestampOrBuilder>(
3436                 getExpireTime(), getParentForChildren(), isClean());
3437         expireTime_ = null;
3438       }
3439       return expireTimeBuilder_;
3440     }
3441 
3442     private com.google.protobuf.Timestamp expireEventTime_;
3443     private com.google.protobuf.SingleFieldBuilderV3<
3444             com.google.protobuf.Timestamp,
3445             com.google.protobuf.Timestamp.Builder,
3446             com.google.protobuf.TimestampOrBuilder>
3447         expireEventTimeBuilder_;
3448     /**
3449      *
3450      *
3451      * <pre>
3452      * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]
3453      * expired. Only present if [state][google.cloud.kms.v1.ImportJob.state] is
3454      * [EXPIRED][google.cloud.kms.v1.ImportJob.ImportJobState.EXPIRED].
3455      * </pre>
3456      *
3457      * <code>
3458      * .google.protobuf.Timestamp expire_event_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
3459      * </code>
3460      *
3461      * @return Whether the expireEventTime field is set.
3462      */
hasExpireEventTime()3463     public boolean hasExpireEventTime() {
3464       return ((bitField0_ & 0x00000040) != 0);
3465     }
3466     /**
3467      *
3468      *
3469      * <pre>
3470      * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]
3471      * expired. Only present if [state][google.cloud.kms.v1.ImportJob.state] is
3472      * [EXPIRED][google.cloud.kms.v1.ImportJob.ImportJobState.EXPIRED].
3473      * </pre>
3474      *
3475      * <code>
3476      * .google.protobuf.Timestamp expire_event_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
3477      * </code>
3478      *
3479      * @return The expireEventTime.
3480      */
getExpireEventTime()3481     public com.google.protobuf.Timestamp getExpireEventTime() {
3482       if (expireEventTimeBuilder_ == null) {
3483         return expireEventTime_ == null
3484             ? com.google.protobuf.Timestamp.getDefaultInstance()
3485             : expireEventTime_;
3486       } else {
3487         return expireEventTimeBuilder_.getMessage();
3488       }
3489     }
3490     /**
3491      *
3492      *
3493      * <pre>
3494      * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]
3495      * expired. Only present if [state][google.cloud.kms.v1.ImportJob.state] is
3496      * [EXPIRED][google.cloud.kms.v1.ImportJob.ImportJobState.EXPIRED].
3497      * </pre>
3498      *
3499      * <code>
3500      * .google.protobuf.Timestamp expire_event_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
3501      * </code>
3502      */
setExpireEventTime(com.google.protobuf.Timestamp value)3503     public Builder setExpireEventTime(com.google.protobuf.Timestamp value) {
3504       if (expireEventTimeBuilder_ == null) {
3505         if (value == null) {
3506           throw new NullPointerException();
3507         }
3508         expireEventTime_ = value;
3509       } else {
3510         expireEventTimeBuilder_.setMessage(value);
3511       }
3512       bitField0_ |= 0x00000040;
3513       onChanged();
3514       return this;
3515     }
3516     /**
3517      *
3518      *
3519      * <pre>
3520      * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]
3521      * expired. Only present if [state][google.cloud.kms.v1.ImportJob.state] is
3522      * [EXPIRED][google.cloud.kms.v1.ImportJob.ImportJobState.EXPIRED].
3523      * </pre>
3524      *
3525      * <code>
3526      * .google.protobuf.Timestamp expire_event_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
3527      * </code>
3528      */
setExpireEventTime(com.google.protobuf.Timestamp.Builder builderForValue)3529     public Builder setExpireEventTime(com.google.protobuf.Timestamp.Builder builderForValue) {
3530       if (expireEventTimeBuilder_ == null) {
3531         expireEventTime_ = builderForValue.build();
3532       } else {
3533         expireEventTimeBuilder_.setMessage(builderForValue.build());
3534       }
3535       bitField0_ |= 0x00000040;
3536       onChanged();
3537       return this;
3538     }
3539     /**
3540      *
3541      *
3542      * <pre>
3543      * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]
3544      * expired. Only present if [state][google.cloud.kms.v1.ImportJob.state] is
3545      * [EXPIRED][google.cloud.kms.v1.ImportJob.ImportJobState.EXPIRED].
3546      * </pre>
3547      *
3548      * <code>
3549      * .google.protobuf.Timestamp expire_event_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
3550      * </code>
3551      */
mergeExpireEventTime(com.google.protobuf.Timestamp value)3552     public Builder mergeExpireEventTime(com.google.protobuf.Timestamp value) {
3553       if (expireEventTimeBuilder_ == null) {
3554         if (((bitField0_ & 0x00000040) != 0)
3555             && expireEventTime_ != null
3556             && expireEventTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
3557           getExpireEventTimeBuilder().mergeFrom(value);
3558         } else {
3559           expireEventTime_ = value;
3560         }
3561       } else {
3562         expireEventTimeBuilder_.mergeFrom(value);
3563       }
3564       bitField0_ |= 0x00000040;
3565       onChanged();
3566       return this;
3567     }
3568     /**
3569      *
3570      *
3571      * <pre>
3572      * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]
3573      * expired. Only present if [state][google.cloud.kms.v1.ImportJob.state] is
3574      * [EXPIRED][google.cloud.kms.v1.ImportJob.ImportJobState.EXPIRED].
3575      * </pre>
3576      *
3577      * <code>
3578      * .google.protobuf.Timestamp expire_event_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
3579      * </code>
3580      */
clearExpireEventTime()3581     public Builder clearExpireEventTime() {
3582       bitField0_ = (bitField0_ & ~0x00000040);
3583       expireEventTime_ = null;
3584       if (expireEventTimeBuilder_ != null) {
3585         expireEventTimeBuilder_.dispose();
3586         expireEventTimeBuilder_ = null;
3587       }
3588       onChanged();
3589       return this;
3590     }
3591     /**
3592      *
3593      *
3594      * <pre>
3595      * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]
3596      * expired. Only present if [state][google.cloud.kms.v1.ImportJob.state] is
3597      * [EXPIRED][google.cloud.kms.v1.ImportJob.ImportJobState.EXPIRED].
3598      * </pre>
3599      *
3600      * <code>
3601      * .google.protobuf.Timestamp expire_event_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
3602      * </code>
3603      */
getExpireEventTimeBuilder()3604     public com.google.protobuf.Timestamp.Builder getExpireEventTimeBuilder() {
3605       bitField0_ |= 0x00000040;
3606       onChanged();
3607       return getExpireEventTimeFieldBuilder().getBuilder();
3608     }
3609     /**
3610      *
3611      *
3612      * <pre>
3613      * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]
3614      * expired. Only present if [state][google.cloud.kms.v1.ImportJob.state] is
3615      * [EXPIRED][google.cloud.kms.v1.ImportJob.ImportJobState.EXPIRED].
3616      * </pre>
3617      *
3618      * <code>
3619      * .google.protobuf.Timestamp expire_event_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
3620      * </code>
3621      */
getExpireEventTimeOrBuilder()3622     public com.google.protobuf.TimestampOrBuilder getExpireEventTimeOrBuilder() {
3623       if (expireEventTimeBuilder_ != null) {
3624         return expireEventTimeBuilder_.getMessageOrBuilder();
3625       } else {
3626         return expireEventTime_ == null
3627             ? com.google.protobuf.Timestamp.getDefaultInstance()
3628             : expireEventTime_;
3629       }
3630     }
3631     /**
3632      *
3633      *
3634      * <pre>
3635      * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]
3636      * expired. Only present if [state][google.cloud.kms.v1.ImportJob.state] is
3637      * [EXPIRED][google.cloud.kms.v1.ImportJob.ImportJobState.EXPIRED].
3638      * </pre>
3639      *
3640      * <code>
3641      * .google.protobuf.Timestamp expire_event_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
3642      * </code>
3643      */
3644     private com.google.protobuf.SingleFieldBuilderV3<
3645             com.google.protobuf.Timestamp,
3646             com.google.protobuf.Timestamp.Builder,
3647             com.google.protobuf.TimestampOrBuilder>
getExpireEventTimeFieldBuilder()3648         getExpireEventTimeFieldBuilder() {
3649       if (expireEventTimeBuilder_ == null) {
3650         expireEventTimeBuilder_ =
3651             new com.google.protobuf.SingleFieldBuilderV3<
3652                 com.google.protobuf.Timestamp,
3653                 com.google.protobuf.Timestamp.Builder,
3654                 com.google.protobuf.TimestampOrBuilder>(
3655                 getExpireEventTime(), getParentForChildren(), isClean());
3656         expireEventTime_ = null;
3657       }
3658       return expireEventTimeBuilder_;
3659     }
3660 
3661     private int state_ = 0;
3662     /**
3663      *
3664      *
3665      * <pre>
3666      * Output only. The current state of the
3667      * [ImportJob][google.cloud.kms.v1.ImportJob], indicating if it can be used.
3668      * </pre>
3669      *
3670      * <code>
3671      * .google.cloud.kms.v1.ImportJob.ImportJobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
3672      * </code>
3673      *
3674      * @return The enum numeric value on the wire for state.
3675      */
3676     @java.lang.Override
getStateValue()3677     public int getStateValue() {
3678       return state_;
3679     }
3680     /**
3681      *
3682      *
3683      * <pre>
3684      * Output only. The current state of the
3685      * [ImportJob][google.cloud.kms.v1.ImportJob], indicating if it can be used.
3686      * </pre>
3687      *
3688      * <code>
3689      * .google.cloud.kms.v1.ImportJob.ImportJobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
3690      * </code>
3691      *
3692      * @param value The enum numeric value on the wire for state to set.
3693      * @return This builder for chaining.
3694      */
setStateValue(int value)3695     public Builder setStateValue(int value) {
3696       state_ = value;
3697       bitField0_ |= 0x00000080;
3698       onChanged();
3699       return this;
3700     }
3701     /**
3702      *
3703      *
3704      * <pre>
3705      * Output only. The current state of the
3706      * [ImportJob][google.cloud.kms.v1.ImportJob], indicating if it can be used.
3707      * </pre>
3708      *
3709      * <code>
3710      * .google.cloud.kms.v1.ImportJob.ImportJobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
3711      * </code>
3712      *
3713      * @return The state.
3714      */
3715     @java.lang.Override
getState()3716     public com.google.cloud.kms.v1.ImportJob.ImportJobState getState() {
3717       com.google.cloud.kms.v1.ImportJob.ImportJobState result =
3718           com.google.cloud.kms.v1.ImportJob.ImportJobState.forNumber(state_);
3719       return result == null
3720           ? com.google.cloud.kms.v1.ImportJob.ImportJobState.UNRECOGNIZED
3721           : result;
3722     }
3723     /**
3724      *
3725      *
3726      * <pre>
3727      * Output only. The current state of the
3728      * [ImportJob][google.cloud.kms.v1.ImportJob], indicating if it can be used.
3729      * </pre>
3730      *
3731      * <code>
3732      * .google.cloud.kms.v1.ImportJob.ImportJobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
3733      * </code>
3734      *
3735      * @param value The state to set.
3736      * @return This builder for chaining.
3737      */
setState(com.google.cloud.kms.v1.ImportJob.ImportJobState value)3738     public Builder setState(com.google.cloud.kms.v1.ImportJob.ImportJobState value) {
3739       if (value == null) {
3740         throw new NullPointerException();
3741       }
3742       bitField0_ |= 0x00000080;
3743       state_ = value.getNumber();
3744       onChanged();
3745       return this;
3746     }
3747     /**
3748      *
3749      *
3750      * <pre>
3751      * Output only. The current state of the
3752      * [ImportJob][google.cloud.kms.v1.ImportJob], indicating if it can be used.
3753      * </pre>
3754      *
3755      * <code>
3756      * .google.cloud.kms.v1.ImportJob.ImportJobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
3757      * </code>
3758      *
3759      * @return This builder for chaining.
3760      */
clearState()3761     public Builder clearState() {
3762       bitField0_ = (bitField0_ & ~0x00000080);
3763       state_ = 0;
3764       onChanged();
3765       return this;
3766     }
3767 
3768     private com.google.cloud.kms.v1.ImportJob.WrappingPublicKey publicKey_;
3769     private com.google.protobuf.SingleFieldBuilderV3<
3770             com.google.cloud.kms.v1.ImportJob.WrappingPublicKey,
3771             com.google.cloud.kms.v1.ImportJob.WrappingPublicKey.Builder,
3772             com.google.cloud.kms.v1.ImportJob.WrappingPublicKeyOrBuilder>
3773         publicKeyBuilder_;
3774     /**
3775      *
3776      *
3777      * <pre>
3778      * Output only. The public key with which to wrap key material prior to
3779      * import. Only returned if [state][google.cloud.kms.v1.ImportJob.state] is
3780      * [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE].
3781      * </pre>
3782      *
3783      * <code>
3784      * .google.cloud.kms.v1.ImportJob.WrappingPublicKey public_key = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
3785      * </code>
3786      *
3787      * @return Whether the publicKey field is set.
3788      */
hasPublicKey()3789     public boolean hasPublicKey() {
3790       return ((bitField0_ & 0x00000100) != 0);
3791     }
3792     /**
3793      *
3794      *
3795      * <pre>
3796      * Output only. The public key with which to wrap key material prior to
3797      * import. Only returned if [state][google.cloud.kms.v1.ImportJob.state] is
3798      * [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE].
3799      * </pre>
3800      *
3801      * <code>
3802      * .google.cloud.kms.v1.ImportJob.WrappingPublicKey public_key = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
3803      * </code>
3804      *
3805      * @return The publicKey.
3806      */
getPublicKey()3807     public com.google.cloud.kms.v1.ImportJob.WrappingPublicKey getPublicKey() {
3808       if (publicKeyBuilder_ == null) {
3809         return publicKey_ == null
3810             ? com.google.cloud.kms.v1.ImportJob.WrappingPublicKey.getDefaultInstance()
3811             : publicKey_;
3812       } else {
3813         return publicKeyBuilder_.getMessage();
3814       }
3815     }
3816     /**
3817      *
3818      *
3819      * <pre>
3820      * Output only. The public key with which to wrap key material prior to
3821      * import. Only returned if [state][google.cloud.kms.v1.ImportJob.state] is
3822      * [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE].
3823      * </pre>
3824      *
3825      * <code>
3826      * .google.cloud.kms.v1.ImportJob.WrappingPublicKey public_key = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
3827      * </code>
3828      */
setPublicKey(com.google.cloud.kms.v1.ImportJob.WrappingPublicKey value)3829     public Builder setPublicKey(com.google.cloud.kms.v1.ImportJob.WrappingPublicKey value) {
3830       if (publicKeyBuilder_ == null) {
3831         if (value == null) {
3832           throw new NullPointerException();
3833         }
3834         publicKey_ = value;
3835       } else {
3836         publicKeyBuilder_.setMessage(value);
3837       }
3838       bitField0_ |= 0x00000100;
3839       onChanged();
3840       return this;
3841     }
3842     /**
3843      *
3844      *
3845      * <pre>
3846      * Output only. The public key with which to wrap key material prior to
3847      * import. Only returned if [state][google.cloud.kms.v1.ImportJob.state] is
3848      * [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE].
3849      * </pre>
3850      *
3851      * <code>
3852      * .google.cloud.kms.v1.ImportJob.WrappingPublicKey public_key = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
3853      * </code>
3854      */
setPublicKey( com.google.cloud.kms.v1.ImportJob.WrappingPublicKey.Builder builderForValue)3855     public Builder setPublicKey(
3856         com.google.cloud.kms.v1.ImportJob.WrappingPublicKey.Builder builderForValue) {
3857       if (publicKeyBuilder_ == null) {
3858         publicKey_ = builderForValue.build();
3859       } else {
3860         publicKeyBuilder_.setMessage(builderForValue.build());
3861       }
3862       bitField0_ |= 0x00000100;
3863       onChanged();
3864       return this;
3865     }
3866     /**
3867      *
3868      *
3869      * <pre>
3870      * Output only. The public key with which to wrap key material prior to
3871      * import. Only returned if [state][google.cloud.kms.v1.ImportJob.state] is
3872      * [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE].
3873      * </pre>
3874      *
3875      * <code>
3876      * .google.cloud.kms.v1.ImportJob.WrappingPublicKey public_key = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
3877      * </code>
3878      */
mergePublicKey(com.google.cloud.kms.v1.ImportJob.WrappingPublicKey value)3879     public Builder mergePublicKey(com.google.cloud.kms.v1.ImportJob.WrappingPublicKey value) {
3880       if (publicKeyBuilder_ == null) {
3881         if (((bitField0_ & 0x00000100) != 0)
3882             && publicKey_ != null
3883             && publicKey_
3884                 != com.google.cloud.kms.v1.ImportJob.WrappingPublicKey.getDefaultInstance()) {
3885           getPublicKeyBuilder().mergeFrom(value);
3886         } else {
3887           publicKey_ = value;
3888         }
3889       } else {
3890         publicKeyBuilder_.mergeFrom(value);
3891       }
3892       bitField0_ |= 0x00000100;
3893       onChanged();
3894       return this;
3895     }
3896     /**
3897      *
3898      *
3899      * <pre>
3900      * Output only. The public key with which to wrap key material prior to
3901      * import. Only returned if [state][google.cloud.kms.v1.ImportJob.state] is
3902      * [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE].
3903      * </pre>
3904      *
3905      * <code>
3906      * .google.cloud.kms.v1.ImportJob.WrappingPublicKey public_key = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
3907      * </code>
3908      */
clearPublicKey()3909     public Builder clearPublicKey() {
3910       bitField0_ = (bitField0_ & ~0x00000100);
3911       publicKey_ = null;
3912       if (publicKeyBuilder_ != null) {
3913         publicKeyBuilder_.dispose();
3914         publicKeyBuilder_ = null;
3915       }
3916       onChanged();
3917       return this;
3918     }
3919     /**
3920      *
3921      *
3922      * <pre>
3923      * Output only. The public key with which to wrap key material prior to
3924      * import. Only returned if [state][google.cloud.kms.v1.ImportJob.state] is
3925      * [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE].
3926      * </pre>
3927      *
3928      * <code>
3929      * .google.cloud.kms.v1.ImportJob.WrappingPublicKey public_key = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
3930      * </code>
3931      */
getPublicKeyBuilder()3932     public com.google.cloud.kms.v1.ImportJob.WrappingPublicKey.Builder getPublicKeyBuilder() {
3933       bitField0_ |= 0x00000100;
3934       onChanged();
3935       return getPublicKeyFieldBuilder().getBuilder();
3936     }
3937     /**
3938      *
3939      *
3940      * <pre>
3941      * Output only. The public key with which to wrap key material prior to
3942      * import. Only returned if [state][google.cloud.kms.v1.ImportJob.state] is
3943      * [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE].
3944      * </pre>
3945      *
3946      * <code>
3947      * .google.cloud.kms.v1.ImportJob.WrappingPublicKey public_key = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
3948      * </code>
3949      */
getPublicKeyOrBuilder()3950     public com.google.cloud.kms.v1.ImportJob.WrappingPublicKeyOrBuilder getPublicKeyOrBuilder() {
3951       if (publicKeyBuilder_ != null) {
3952         return publicKeyBuilder_.getMessageOrBuilder();
3953       } else {
3954         return publicKey_ == null
3955             ? com.google.cloud.kms.v1.ImportJob.WrappingPublicKey.getDefaultInstance()
3956             : publicKey_;
3957       }
3958     }
3959     /**
3960      *
3961      *
3962      * <pre>
3963      * Output only. The public key with which to wrap key material prior to
3964      * import. Only returned if [state][google.cloud.kms.v1.ImportJob.state] is
3965      * [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE].
3966      * </pre>
3967      *
3968      * <code>
3969      * .google.cloud.kms.v1.ImportJob.WrappingPublicKey public_key = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
3970      * </code>
3971      */
3972     private com.google.protobuf.SingleFieldBuilderV3<
3973             com.google.cloud.kms.v1.ImportJob.WrappingPublicKey,
3974             com.google.cloud.kms.v1.ImportJob.WrappingPublicKey.Builder,
3975             com.google.cloud.kms.v1.ImportJob.WrappingPublicKeyOrBuilder>
getPublicKeyFieldBuilder()3976         getPublicKeyFieldBuilder() {
3977       if (publicKeyBuilder_ == null) {
3978         publicKeyBuilder_ =
3979             new com.google.protobuf.SingleFieldBuilderV3<
3980                 com.google.cloud.kms.v1.ImportJob.WrappingPublicKey,
3981                 com.google.cloud.kms.v1.ImportJob.WrappingPublicKey.Builder,
3982                 com.google.cloud.kms.v1.ImportJob.WrappingPublicKeyOrBuilder>(
3983                 getPublicKey(), getParentForChildren(), isClean());
3984         publicKey_ = null;
3985       }
3986       return publicKeyBuilder_;
3987     }
3988 
3989     private com.google.cloud.kms.v1.KeyOperationAttestation attestation_;
3990     private com.google.protobuf.SingleFieldBuilderV3<
3991             com.google.cloud.kms.v1.KeyOperationAttestation,
3992             com.google.cloud.kms.v1.KeyOperationAttestation.Builder,
3993             com.google.cloud.kms.v1.KeyOperationAttestationOrBuilder>
3994         attestationBuilder_;
3995     /**
3996      *
3997      *
3998      * <pre>
3999      * Output only. Statement that was generated and signed by the key creator
4000      * (for example, an HSM) at key creation time. Use this statement to verify
4001      * attributes of the key as stored on the HSM, independently of Google.
4002      * Only present if the chosen
4003      * [ImportMethod][google.cloud.kms.v1.ImportJob.ImportMethod] is one with a
4004      * protection level of [HSM][google.cloud.kms.v1.ProtectionLevel.HSM].
4005      * </pre>
4006      *
4007      * <code>
4008      * .google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
4009      * </code>
4010      *
4011      * @return Whether the attestation field is set.
4012      */
hasAttestation()4013     public boolean hasAttestation() {
4014       return ((bitField0_ & 0x00000200) != 0);
4015     }
4016     /**
4017      *
4018      *
4019      * <pre>
4020      * Output only. Statement that was generated and signed by the key creator
4021      * (for example, an HSM) at key creation time. Use this statement to verify
4022      * attributes of the key as stored on the HSM, independently of Google.
4023      * Only present if the chosen
4024      * [ImportMethod][google.cloud.kms.v1.ImportJob.ImportMethod] is one with a
4025      * protection level of [HSM][google.cloud.kms.v1.ProtectionLevel.HSM].
4026      * </pre>
4027      *
4028      * <code>
4029      * .google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
4030      * </code>
4031      *
4032      * @return The attestation.
4033      */
getAttestation()4034     public com.google.cloud.kms.v1.KeyOperationAttestation getAttestation() {
4035       if (attestationBuilder_ == null) {
4036         return attestation_ == null
4037             ? com.google.cloud.kms.v1.KeyOperationAttestation.getDefaultInstance()
4038             : attestation_;
4039       } else {
4040         return attestationBuilder_.getMessage();
4041       }
4042     }
4043     /**
4044      *
4045      *
4046      * <pre>
4047      * Output only. Statement that was generated and signed by the key creator
4048      * (for example, an HSM) at key creation time. Use this statement to verify
4049      * attributes of the key as stored on the HSM, independently of Google.
4050      * Only present if the chosen
4051      * [ImportMethod][google.cloud.kms.v1.ImportJob.ImportMethod] is one with a
4052      * protection level of [HSM][google.cloud.kms.v1.ProtectionLevel.HSM].
4053      * </pre>
4054      *
4055      * <code>
4056      * .google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
4057      * </code>
4058      */
setAttestation(com.google.cloud.kms.v1.KeyOperationAttestation value)4059     public Builder setAttestation(com.google.cloud.kms.v1.KeyOperationAttestation value) {
4060       if (attestationBuilder_ == null) {
4061         if (value == null) {
4062           throw new NullPointerException();
4063         }
4064         attestation_ = value;
4065       } else {
4066         attestationBuilder_.setMessage(value);
4067       }
4068       bitField0_ |= 0x00000200;
4069       onChanged();
4070       return this;
4071     }
4072     /**
4073      *
4074      *
4075      * <pre>
4076      * Output only. Statement that was generated and signed by the key creator
4077      * (for example, an HSM) at key creation time. Use this statement to verify
4078      * attributes of the key as stored on the HSM, independently of Google.
4079      * Only present if the chosen
4080      * [ImportMethod][google.cloud.kms.v1.ImportJob.ImportMethod] is one with a
4081      * protection level of [HSM][google.cloud.kms.v1.ProtectionLevel.HSM].
4082      * </pre>
4083      *
4084      * <code>
4085      * .google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
4086      * </code>
4087      */
setAttestation( com.google.cloud.kms.v1.KeyOperationAttestation.Builder builderForValue)4088     public Builder setAttestation(
4089         com.google.cloud.kms.v1.KeyOperationAttestation.Builder builderForValue) {
4090       if (attestationBuilder_ == null) {
4091         attestation_ = builderForValue.build();
4092       } else {
4093         attestationBuilder_.setMessage(builderForValue.build());
4094       }
4095       bitField0_ |= 0x00000200;
4096       onChanged();
4097       return this;
4098     }
4099     /**
4100      *
4101      *
4102      * <pre>
4103      * Output only. Statement that was generated and signed by the key creator
4104      * (for example, an HSM) at key creation time. Use this statement to verify
4105      * attributes of the key as stored on the HSM, independently of Google.
4106      * Only present if the chosen
4107      * [ImportMethod][google.cloud.kms.v1.ImportJob.ImportMethod] is one with a
4108      * protection level of [HSM][google.cloud.kms.v1.ProtectionLevel.HSM].
4109      * </pre>
4110      *
4111      * <code>
4112      * .google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
4113      * </code>
4114      */
mergeAttestation(com.google.cloud.kms.v1.KeyOperationAttestation value)4115     public Builder mergeAttestation(com.google.cloud.kms.v1.KeyOperationAttestation value) {
4116       if (attestationBuilder_ == null) {
4117         if (((bitField0_ & 0x00000200) != 0)
4118             && attestation_ != null
4119             && attestation_
4120                 != com.google.cloud.kms.v1.KeyOperationAttestation.getDefaultInstance()) {
4121           getAttestationBuilder().mergeFrom(value);
4122         } else {
4123           attestation_ = value;
4124         }
4125       } else {
4126         attestationBuilder_.mergeFrom(value);
4127       }
4128       bitField0_ |= 0x00000200;
4129       onChanged();
4130       return this;
4131     }
4132     /**
4133      *
4134      *
4135      * <pre>
4136      * Output only. Statement that was generated and signed by the key creator
4137      * (for example, an HSM) at key creation time. Use this statement to verify
4138      * attributes of the key as stored on the HSM, independently of Google.
4139      * Only present if the chosen
4140      * [ImportMethod][google.cloud.kms.v1.ImportJob.ImportMethod] is one with a
4141      * protection level of [HSM][google.cloud.kms.v1.ProtectionLevel.HSM].
4142      * </pre>
4143      *
4144      * <code>
4145      * .google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
4146      * </code>
4147      */
clearAttestation()4148     public Builder clearAttestation() {
4149       bitField0_ = (bitField0_ & ~0x00000200);
4150       attestation_ = null;
4151       if (attestationBuilder_ != null) {
4152         attestationBuilder_.dispose();
4153         attestationBuilder_ = null;
4154       }
4155       onChanged();
4156       return this;
4157     }
4158     /**
4159      *
4160      *
4161      * <pre>
4162      * Output only. Statement that was generated and signed by the key creator
4163      * (for example, an HSM) at key creation time. Use this statement to verify
4164      * attributes of the key as stored on the HSM, independently of Google.
4165      * Only present if the chosen
4166      * [ImportMethod][google.cloud.kms.v1.ImportJob.ImportMethod] is one with a
4167      * protection level of [HSM][google.cloud.kms.v1.ProtectionLevel.HSM].
4168      * </pre>
4169      *
4170      * <code>
4171      * .google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
4172      * </code>
4173      */
getAttestationBuilder()4174     public com.google.cloud.kms.v1.KeyOperationAttestation.Builder getAttestationBuilder() {
4175       bitField0_ |= 0x00000200;
4176       onChanged();
4177       return getAttestationFieldBuilder().getBuilder();
4178     }
4179     /**
4180      *
4181      *
4182      * <pre>
4183      * Output only. Statement that was generated and signed by the key creator
4184      * (for example, an HSM) at key creation time. Use this statement to verify
4185      * attributes of the key as stored on the HSM, independently of Google.
4186      * Only present if the chosen
4187      * [ImportMethod][google.cloud.kms.v1.ImportJob.ImportMethod] is one with a
4188      * protection level of [HSM][google.cloud.kms.v1.ProtectionLevel.HSM].
4189      * </pre>
4190      *
4191      * <code>
4192      * .google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
4193      * </code>
4194      */
getAttestationOrBuilder()4195     public com.google.cloud.kms.v1.KeyOperationAttestationOrBuilder getAttestationOrBuilder() {
4196       if (attestationBuilder_ != null) {
4197         return attestationBuilder_.getMessageOrBuilder();
4198       } else {
4199         return attestation_ == null
4200             ? com.google.cloud.kms.v1.KeyOperationAttestation.getDefaultInstance()
4201             : attestation_;
4202       }
4203     }
4204     /**
4205      *
4206      *
4207      * <pre>
4208      * Output only. Statement that was generated and signed by the key creator
4209      * (for example, an HSM) at key creation time. Use this statement to verify
4210      * attributes of the key as stored on the HSM, independently of Google.
4211      * Only present if the chosen
4212      * [ImportMethod][google.cloud.kms.v1.ImportJob.ImportMethod] is one with a
4213      * protection level of [HSM][google.cloud.kms.v1.ProtectionLevel.HSM].
4214      * </pre>
4215      *
4216      * <code>
4217      * .google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
4218      * </code>
4219      */
4220     private com.google.protobuf.SingleFieldBuilderV3<
4221             com.google.cloud.kms.v1.KeyOperationAttestation,
4222             com.google.cloud.kms.v1.KeyOperationAttestation.Builder,
4223             com.google.cloud.kms.v1.KeyOperationAttestationOrBuilder>
getAttestationFieldBuilder()4224         getAttestationFieldBuilder() {
4225       if (attestationBuilder_ == null) {
4226         attestationBuilder_ =
4227             new com.google.protobuf.SingleFieldBuilderV3<
4228                 com.google.cloud.kms.v1.KeyOperationAttestation,
4229                 com.google.cloud.kms.v1.KeyOperationAttestation.Builder,
4230                 com.google.cloud.kms.v1.KeyOperationAttestationOrBuilder>(
4231                 getAttestation(), getParentForChildren(), isClean());
4232         attestation_ = null;
4233       }
4234       return attestationBuilder_;
4235     }
4236 
4237     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)4238     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
4239       return super.setUnknownFields(unknownFields);
4240     }
4241 
4242     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)4243     public final Builder mergeUnknownFields(
4244         final com.google.protobuf.UnknownFieldSet unknownFields) {
4245       return super.mergeUnknownFields(unknownFields);
4246     }
4247 
4248     // @@protoc_insertion_point(builder_scope:google.cloud.kms.v1.ImportJob)
4249   }
4250 
4251   // @@protoc_insertion_point(class_scope:google.cloud.kms.v1.ImportJob)
4252   private static final com.google.cloud.kms.v1.ImportJob DEFAULT_INSTANCE;
4253 
4254   static {
4255     DEFAULT_INSTANCE = new com.google.cloud.kms.v1.ImportJob();
4256   }
4257 
getDefaultInstance()4258   public static com.google.cloud.kms.v1.ImportJob getDefaultInstance() {
4259     return DEFAULT_INSTANCE;
4260   }
4261 
4262   private static final com.google.protobuf.Parser<ImportJob> PARSER =
4263       new com.google.protobuf.AbstractParser<ImportJob>() {
4264         @java.lang.Override
4265         public ImportJob parsePartialFrom(
4266             com.google.protobuf.CodedInputStream input,
4267             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4268             throws com.google.protobuf.InvalidProtocolBufferException {
4269           Builder builder = newBuilder();
4270           try {
4271             builder.mergeFrom(input, extensionRegistry);
4272           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
4273             throw e.setUnfinishedMessage(builder.buildPartial());
4274           } catch (com.google.protobuf.UninitializedMessageException e) {
4275             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
4276           } catch (java.io.IOException e) {
4277             throw new com.google.protobuf.InvalidProtocolBufferException(e)
4278                 .setUnfinishedMessage(builder.buildPartial());
4279           }
4280           return builder.buildPartial();
4281         }
4282       };
4283 
parser()4284   public static com.google.protobuf.Parser<ImportJob> parser() {
4285     return PARSER;
4286   }
4287 
4288   @java.lang.Override
getParserForType()4289   public com.google.protobuf.Parser<ImportJob> getParserForType() {
4290     return PARSER;
4291   }
4292 
4293   @java.lang.Override
getDefaultInstanceForType()4294   public com.google.cloud.kms.v1.ImportJob getDefaultInstanceForType() {
4295     return DEFAULT_INSTANCE;
4296   }
4297 }
4298