/*
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/cloud/kms/v1/resources.proto

package com.google.cloud.kms.v1;

/**
 *
 *
 * <pre>
 * An [ImportJob][google.cloud.kms.v1.ImportJob] can be used to create
 * [CryptoKeys][google.cloud.kms.v1.CryptoKey] and
 * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] using pre-existing
 * key material, generated outside of Cloud KMS.
 * When an [ImportJob][google.cloud.kms.v1.ImportJob] is created, Cloud KMS will
 * generate a "wrapping key", which is a public/private key pair. You use the
 * wrapping key to encrypt (also known as wrap) the pre-existing key material to
 * protect it during the import process. The nature of the wrapping key depends
 * on the choice of
 * [import_method][google.cloud.kms.v1.ImportJob.import_method]. When the
 * wrapping key generation is complete, the
 * [state][google.cloud.kms.v1.ImportJob.state] will be set to
 * [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE] and the
 * [public_key][google.cloud.kms.v1.ImportJob.public_key] can be fetched. The
 * fetched public key can then be used to wrap your pre-existing key material.
 * Once the key material is wrapped, it can be imported into a new
 * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in an existing
 * [CryptoKey][google.cloud.kms.v1.CryptoKey] by calling
 * [ImportCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.ImportCryptoKeyVersion].
 * Multiple [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] can be
 * imported with a single [ImportJob][google.cloud.kms.v1.ImportJob]. Cloud KMS
 * uses the private key portion of the wrapping key to unwrap the key material.
 * Only Cloud KMS has access to the private key.
 * An [ImportJob][google.cloud.kms.v1.ImportJob] expires 3 days after it is
 * created. Once expired, Cloud KMS will no longer be able to import or unwrap
 * any key material that was wrapped with the
 * [ImportJob][google.cloud.kms.v1.ImportJob]'s public key.
 * For more information, see
 * [Importing a key](https://cloud.google.com/kms/docs/importing-a-key).
 * </pre>
 *
 * Protobuf type {@code google.cloud.kms.v1.ImportJob}
 */
public final class ImportJob extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:google.cloud.kms.v1.ImportJob)
    ImportJobOrBuilder {
  private static final long serialVersionUID = 0L;
  // Use ImportJob.newBuilder() to construct.
  private ImportJob(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }

  private ImportJob() {
    name_ = "";
    importMethod_ = 0;
    protectionLevel_ = 0;
    state_ = 0;
  }

  @java.lang.Override
  @SuppressWarnings({"unused"})
  protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
    return new ImportJob();
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
    return this.unknownFields;
  }

  public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    return com.google.cloud.kms.v1.KmsResourcesProto
        .internal_static_google_cloud_kms_v1_ImportJob_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.cloud.kms.v1.KmsResourcesProto
        .internal_static_google_cloud_kms_v1_ImportJob_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.cloud.kms.v1.ImportJob.class,
            com.google.cloud.kms.v1.ImportJob.Builder.class);
  }

  /**
   *
   *
   * <pre>
   * [ImportMethod][google.cloud.kms.v1.ImportJob.ImportMethod] describes the
   * key wrapping method chosen for this
   * [ImportJob][google.cloud.kms.v1.ImportJob].
   * </pre>
   *
   * Protobuf enum {@code google.cloud.kms.v1.ImportJob.ImportMethod}
   */
  public enum ImportMethod implements com.google.protobuf.ProtocolMessageEnum {
    /**
     *
     *
     * <pre>
     * Not specified.
     * </pre>
     *
     * <code>IMPORT_METHOD_UNSPECIFIED = 0;</code>
     */
    IMPORT_METHOD_UNSPECIFIED(0),
    /**
     *
     *
     * <pre>
     * This ImportMethod represents the CKM_RSA_AES_KEY_WRAP key wrapping
     * scheme defined in the PKCS #11 standard. In summary, this involves
     * wrapping the raw key with an ephemeral AES key, and wrapping the
     * ephemeral AES key with a 3072 bit RSA key. For more details, see
     * [RSA AES key wrap
     * mechanism](http://docs.oasis-open.org/pkcs11/pkcs11-curr/v2.40/cos01/pkcs11-curr-v2.40-cos01.html#_Toc408226908).
     * </pre>
     *
     * <code>RSA_OAEP_3072_SHA1_AES_256 = 1;</code>
     */
    RSA_OAEP_3072_SHA1_AES_256(1),
    /**
     *
     *
     * <pre>
     * This ImportMethod represents the CKM_RSA_AES_KEY_WRAP key wrapping
     * scheme defined in the PKCS #11 standard. In summary, this involves
     * wrapping the raw key with an ephemeral AES key, and wrapping the
     * ephemeral AES key with a 4096 bit RSA key. For more details, see
     * [RSA AES key wrap
     * mechanism](http://docs.oasis-open.org/pkcs11/pkcs11-curr/v2.40/cos01/pkcs11-curr-v2.40-cos01.html#_Toc408226908).
     * </pre>
     *
     * <code>RSA_OAEP_4096_SHA1_AES_256 = 2;</code>
     */
    RSA_OAEP_4096_SHA1_AES_256(2),
    /**
     *
     *
     * <pre>
     * This ImportMethod represents the CKM_RSA_AES_KEY_WRAP key wrapping
     * scheme defined in the PKCS #11 standard. In summary, this involves
     * wrapping the raw key with an ephemeral AES key, and wrapping the
     * ephemeral AES key with a 3072 bit RSA key. For more details, see
     * [RSA AES key wrap
     * mechanism](http://docs.oasis-open.org/pkcs11/pkcs11-curr/v2.40/cos01/pkcs11-curr-v2.40-cos01.html#_Toc408226908).
     * </pre>
     *
     * <code>RSA_OAEP_3072_SHA256_AES_256 = 3;</code>
     */
    RSA_OAEP_3072_SHA256_AES_256(3),
    /**
     *
     *
     * <pre>
     * This ImportMethod represents the CKM_RSA_AES_KEY_WRAP key wrapping
     * scheme defined in the PKCS #11 standard. In summary, this involves
     * wrapping the raw key with an ephemeral AES key, and wrapping the
     * ephemeral AES key with a 4096 bit RSA key. For more details, see
     * [RSA AES key wrap
     * mechanism](http://docs.oasis-open.org/pkcs11/pkcs11-curr/v2.40/cos01/pkcs11-curr-v2.40-cos01.html#_Toc408226908).
     * </pre>
     *
     * <code>RSA_OAEP_4096_SHA256_AES_256 = 4;</code>
     */
    RSA_OAEP_4096_SHA256_AES_256(4),
    /**
     *
     *
     * <pre>
     * This ImportMethod represents RSAES-OAEP with a 3072 bit RSA key. The
     * key material to be imported is wrapped directly with the RSA key. Due
     * to technical limitations of RSA wrapping, this method cannot be used to
     * wrap RSA keys for import.
     * </pre>
     *
     * <code>RSA_OAEP_3072_SHA256 = 5;</code>
     */
    RSA_OAEP_3072_SHA256(5),
    /**
     *
     *
     * <pre>
     * This ImportMethod represents RSAES-OAEP with a 4096 bit RSA key. The
     * key material to be imported is wrapped directly with the RSA key. Due
     * to technical limitations of RSA wrapping, this method cannot be used to
     * wrap RSA keys for import.
     * </pre>
     *
     * <code>RSA_OAEP_4096_SHA256 = 6;</code>
     */
    RSA_OAEP_4096_SHA256(6),
    UNRECOGNIZED(-1),
    ;

    /**
     *
     *
     * <pre>
     * Not specified.
     * </pre>
     *
     * <code>IMPORT_METHOD_UNSPECIFIED = 0;</code>
     */
    public static final int IMPORT_METHOD_UNSPECIFIED_VALUE = 0;
    /**
     *
     *
     * <pre>
     * This ImportMethod represents the CKM_RSA_AES_KEY_WRAP key wrapping
     * scheme defined in the PKCS #11 standard. In summary, this involves
     * wrapping the raw key with an ephemeral AES key, and wrapping the
     * ephemeral AES key with a 3072 bit RSA key. For more details, see
     * [RSA AES key wrap
     * mechanism](http://docs.oasis-open.org/pkcs11/pkcs11-curr/v2.40/cos01/pkcs11-curr-v2.40-cos01.html#_Toc408226908).
     * </pre>
     *
     * <code>RSA_OAEP_3072_SHA1_AES_256 = 1;</code>
     */
    public static final int RSA_OAEP_3072_SHA1_AES_256_VALUE = 1;
    /**
     *
     *
     * <pre>
     * This ImportMethod represents the CKM_RSA_AES_KEY_WRAP key wrapping
     * scheme defined in the PKCS #11 standard. In summary, this involves
     * wrapping the raw key with an ephemeral AES key, and wrapping the
     * ephemeral AES key with a 4096 bit RSA key. For more details, see
     * [RSA AES key wrap
     * mechanism](http://docs.oasis-open.org/pkcs11/pkcs11-curr/v2.40/cos01/pkcs11-curr-v2.40-cos01.html#_Toc408226908).
     * </pre>
     *
     * <code>RSA_OAEP_4096_SHA1_AES_256 = 2;</code>
     */
    public static final int RSA_OAEP_4096_SHA1_AES_256_VALUE = 2;
    /**
     *
     *
     * <pre>
     * This ImportMethod represents the CKM_RSA_AES_KEY_WRAP key wrapping
     * scheme defined in the PKCS #11 standard. In summary, this involves
     * wrapping the raw key with an ephemeral AES key, and wrapping the
     * ephemeral AES key with a 3072 bit RSA key. For more details, see
     * [RSA AES key wrap
     * mechanism](http://docs.oasis-open.org/pkcs11/pkcs11-curr/v2.40/cos01/pkcs11-curr-v2.40-cos01.html#_Toc408226908).
     * </pre>
     *
     * <code>RSA_OAEP_3072_SHA256_AES_256 = 3;</code>
     */
    public static final int RSA_OAEP_3072_SHA256_AES_256_VALUE = 3;
    /**
     *
     *
     * <pre>
     * This ImportMethod represents the CKM_RSA_AES_KEY_WRAP key wrapping
     * scheme defined in the PKCS #11 standard. In summary, this involves
     * wrapping the raw key with an ephemeral AES key, and wrapping the
     * ephemeral AES key with a 4096 bit RSA key. For more details, see
     * [RSA AES key wrap
     * mechanism](http://docs.oasis-open.org/pkcs11/pkcs11-curr/v2.40/cos01/pkcs11-curr-v2.40-cos01.html#_Toc408226908).
     * </pre>
     *
     * <code>RSA_OAEP_4096_SHA256_AES_256 = 4;</code>
     */
    public static final int RSA_OAEP_4096_SHA256_AES_256_VALUE = 4;
    /**
     *
     *
     * <pre>
     * This ImportMethod represents RSAES-OAEP with a 3072 bit RSA key. The
     * key material to be imported is wrapped directly with the RSA key. Due
     * to technical limitations of RSA wrapping, this method cannot be used to
     * wrap RSA keys for import.
     * </pre>
     *
     * <code>RSA_OAEP_3072_SHA256 = 5;</code>
     */
    public static final int RSA_OAEP_3072_SHA256_VALUE = 5;
    /**
     *
     *
     * <pre>
     * This ImportMethod represents RSAES-OAEP with a 4096 bit RSA key. The
     * key material to be imported is wrapped directly with the RSA key. Due
     * to technical limitations of RSA wrapping, this method cannot be used to
     * wrap RSA keys for import.
     * </pre>
     *
     * <code>RSA_OAEP_4096_SHA256 = 6;</code>
     */
    public static final int RSA_OAEP_4096_SHA256_VALUE = 6;

    public final int getNumber() {
      if (this == UNRECOGNIZED) {
        throw new java.lang.IllegalArgumentException(
            "Can't get the number of an unknown enum value.");
      }
      return value;
    }

    /**
     * @param value The numeric wire value of the corresponding enum entry.
     * @return The enum associated with the given numeric wire value.
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static ImportMethod valueOf(int value) {
      return forNumber(value);
    }

    /**
     * @param value The numeric wire value of the corresponding enum entry.
     * @return The enum associated with the given numeric wire value.
     */
    public static ImportMethod forNumber(int value) {
      switch (value) {
        case 0:
          return IMPORT_METHOD_UNSPECIFIED;
        case 1:
          return RSA_OAEP_3072_SHA1_AES_256;
        case 2:
          return RSA_OAEP_4096_SHA1_AES_256;
        case 3:
          return RSA_OAEP_3072_SHA256_AES_256;
        case 4:
          return RSA_OAEP_4096_SHA256_AES_256;
        case 5:
          return RSA_OAEP_3072_SHA256;
        case 6:
          return RSA_OAEP_4096_SHA256;
        default:
          return null;
      }
    }

    public static com.google.protobuf.Internal.EnumLiteMap<ImportMethod> internalGetValueMap() {
      return internalValueMap;
    }

    private static final com.google.protobuf.Internal.EnumLiteMap<ImportMethod> internalValueMap =
        new com.google.protobuf.Internal.EnumLiteMap<ImportMethod>() {
          public ImportMethod findValueByNumber(int number) {
            return ImportMethod.forNumber(number);
          }
        };

    public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
      if (this == UNRECOGNIZED) {
        throw new java.lang.IllegalStateException(
            "Can't get the descriptor of an unrecognized enum value.");
      }
      return getDescriptor().getValues().get(ordinal());
    }

    public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
      return getDescriptor();
    }

    public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
      return com.google.cloud.kms.v1.ImportJob.getDescriptor().getEnumTypes().get(0);
    }

    private static final ImportMethod[] VALUES = values();

    public static ImportMethod valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
      if (desc.getType() != getDescriptor()) {
        throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
      }
      if (desc.getIndex() == -1) {
        return UNRECOGNIZED;
      }
      return VALUES[desc.getIndex()];
    }

    private final int value;

    private ImportMethod(int value) {
      this.value = value;
    }

    // @@protoc_insertion_point(enum_scope:google.cloud.kms.v1.ImportJob.ImportMethod)
  }

  /**
   *
   *
   * <pre>
   * The state of the [ImportJob][google.cloud.kms.v1.ImportJob], indicating if
   * it can be used.
   * </pre>
   *
   * Protobuf enum {@code google.cloud.kms.v1.ImportJob.ImportJobState}
   */
  public enum ImportJobState implements com.google.protobuf.ProtocolMessageEnum {
    /**
     *
     *
     * <pre>
     * Not specified.
     * </pre>
     *
     * <code>IMPORT_JOB_STATE_UNSPECIFIED = 0;</code>
     */
    IMPORT_JOB_STATE_UNSPECIFIED(0),
    /**
     *
     *
     * <pre>
     * The wrapping key for this job is still being generated. It may not be
     * used. Cloud KMS will automatically mark this job as
     * [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE] as soon as
     * the wrapping key is generated.
     * </pre>
     *
     * <code>PENDING_GENERATION = 1;</code>
     */
    PENDING_GENERATION(1),
    /**
     *
     *
     * <pre>
     * This job may be used in
     * [CreateCryptoKey][google.cloud.kms.v1.KeyManagementService.CreateCryptoKey]
     * and
     * [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion]
     * requests.
     * </pre>
     *
     * <code>ACTIVE = 2;</code>
     */
    ACTIVE(2),
    /**
     *
     *
     * <pre>
     * This job can no longer be used and may not leave this state once entered.
     * </pre>
     *
     * <code>EXPIRED = 3;</code>
     */
    EXPIRED(3),
    UNRECOGNIZED(-1),
    ;

    /**
     *
     *
     * <pre>
     * Not specified.
     * </pre>
     *
     * <code>IMPORT_JOB_STATE_UNSPECIFIED = 0;</code>
     */
    public static final int IMPORT_JOB_STATE_UNSPECIFIED_VALUE = 0;
    /**
     *
     *
     * <pre>
     * The wrapping key for this job is still being generated. It may not be
     * used. Cloud KMS will automatically mark this job as
     * [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE] as soon as
     * the wrapping key is generated.
     * </pre>
     *
     * <code>PENDING_GENERATION = 1;</code>
     */
    public static final int PENDING_GENERATION_VALUE = 1;
    /**
     *
     *
     * <pre>
     * This job may be used in
     * [CreateCryptoKey][google.cloud.kms.v1.KeyManagementService.CreateCryptoKey]
     * and
     * [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion]
     * requests.
     * </pre>
     *
     * <code>ACTIVE = 2;</code>
     */
    public static final int ACTIVE_VALUE = 2;
    /**
     *
     *
     * <pre>
     * This job can no longer be used and may not leave this state once entered.
     * </pre>
     *
     * <code>EXPIRED = 3;</code>
     */
    public static final int EXPIRED_VALUE = 3;

    public final int getNumber() {
      if (this == UNRECOGNIZED) {
        throw new java.lang.IllegalArgumentException(
            "Can't get the number of an unknown enum value.");
      }
      return value;
    }

    /**
     * @param value The numeric wire value of the corresponding enum entry.
     * @return The enum associated with the given numeric wire value.
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static ImportJobState valueOf(int value) {
      return forNumber(value);
    }

    /**
     * @param value The numeric wire value of the corresponding enum entry.
     * @return The enum associated with the given numeric wire value.
     */
    public static ImportJobState forNumber(int value) {
      switch (value) {
        case 0:
          return IMPORT_JOB_STATE_UNSPECIFIED;
        case 1:
          return PENDING_GENERATION;
        case 2:
          return ACTIVE;
        case 3:
          return EXPIRED;
        default:
          return null;
      }
    }

    public static com.google.protobuf.Internal.EnumLiteMap<ImportJobState> internalGetValueMap() {
      return internalValueMap;
    }

    private static final com.google.protobuf.Internal.EnumLiteMap<ImportJobState> internalValueMap =
        new com.google.protobuf.Internal.EnumLiteMap<ImportJobState>() {
          public ImportJobState findValueByNumber(int number) {
            return ImportJobState.forNumber(number);
          }
        };

    public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
      if (this == UNRECOGNIZED) {
        throw new java.lang.IllegalStateException(
            "Can't get the descriptor of an unrecognized enum value.");
      }
      return getDescriptor().getValues().get(ordinal());
    }

    public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
      return getDescriptor();
    }

    public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
      return com.google.cloud.kms.v1.ImportJob.getDescriptor().getEnumTypes().get(1);
    }

    private static final ImportJobState[] VALUES = values();

    public static ImportJobState valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
      if (desc.getType() != getDescriptor()) {
        throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
      }
      if (desc.getIndex() == -1) {
        return UNRECOGNIZED;
      }
      return VALUES[desc.getIndex()];
    }

    private final int value;

    private ImportJobState(int value) {
      this.value = value;
    }

    // @@protoc_insertion_point(enum_scope:google.cloud.kms.v1.ImportJob.ImportJobState)
  }

  public interface WrappingPublicKeyOrBuilder
      extends
      // @@protoc_insertion_point(interface_extends:google.cloud.kms.v1.ImportJob.WrappingPublicKey)
      com.google.protobuf.MessageOrBuilder {

    /**
     *
     *
     * <pre>
     * The public key, encoded in PEM format. For more information, see the [RFC
     * 7468](https://tools.ietf.org/html/rfc7468) sections for [General
     * Considerations](https://tools.ietf.org/html/rfc7468#section-2) and
     * [Textual Encoding of Subject Public Key Info]
     * (https://tools.ietf.org/html/rfc7468#section-13).
     * </pre>
     *
     * <code>string pem = 1;</code>
     *
     * @return The pem.
     */
    java.lang.String getPem();
    /**
     *
     *
     * <pre>
     * The public key, encoded in PEM format. For more information, see the [RFC
     * 7468](https://tools.ietf.org/html/rfc7468) sections for [General
     * Considerations](https://tools.ietf.org/html/rfc7468#section-2) and
     * [Textual Encoding of Subject Public Key Info]
     * (https://tools.ietf.org/html/rfc7468#section-13).
     * </pre>
     *
     * <code>string pem = 1;</code>
     *
     * @return The bytes for pem.
     */
    com.google.protobuf.ByteString getPemBytes();
  }
  /**
   *
   *
   * <pre>
   * The public key component of the wrapping key. For details of the type of
   * key this public key corresponds to, see the
   * [ImportMethod][google.cloud.kms.v1.ImportJob.ImportMethod].
   * </pre>
   *
   * Protobuf type {@code google.cloud.kms.v1.ImportJob.WrappingPublicKey}
   */
  public static final class WrappingPublicKey extends com.google.protobuf.GeneratedMessageV3
      implements
      // @@protoc_insertion_point(message_implements:google.cloud.kms.v1.ImportJob.WrappingPublicKey)
      WrappingPublicKeyOrBuilder {
    private static final long serialVersionUID = 0L;
    // Use WrappingPublicKey.newBuilder() to construct.
    private WrappingPublicKey(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }

    private WrappingPublicKey() {
      pem_ = "";
    }

    @java.lang.Override
    @SuppressWarnings({"unused"})
    protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
      return new WrappingPublicKey();
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
      return this.unknownFields;
    }

    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.cloud.kms.v1.KmsResourcesProto
          .internal_static_google_cloud_kms_v1_ImportJob_WrappingPublicKey_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.cloud.kms.v1.KmsResourcesProto
          .internal_static_google_cloud_kms_v1_ImportJob_WrappingPublicKey_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.cloud.kms.v1.ImportJob.WrappingPublicKey.class,
              com.google.cloud.kms.v1.ImportJob.WrappingPublicKey.Builder.class);
    }

    public static final int PEM_FIELD_NUMBER = 1;

    @SuppressWarnings("serial")
    private volatile java.lang.Object pem_ = "";
    /**
     *
     *
     * <pre>
     * The public key, encoded in PEM format. For more information, see the [RFC
     * 7468](https://tools.ietf.org/html/rfc7468) sections for [General
     * Considerations](https://tools.ietf.org/html/rfc7468#section-2) and
     * [Textual Encoding of Subject Public Key Info]
     * (https://tools.ietf.org/html/rfc7468#section-13).
     * </pre>
     *
     * <code>string pem = 1;</code>
     *
     * @return The pem.
     */
    @java.lang.Override
    public java.lang.String getPem() {
      java.lang.Object ref = pem_;
      if (ref instanceof java.lang.String) {
        return (java.lang.String) ref;
      } else {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        pem_ = s;
        return s;
      }
    }
    /**
     *
     *
     * <pre>
     * The public key, encoded in PEM format. For more information, see the [RFC
     * 7468](https://tools.ietf.org/html/rfc7468) sections for [General
     * Considerations](https://tools.ietf.org/html/rfc7468#section-2) and
     * [Textual Encoding of Subject Public Key Info]
     * (https://tools.ietf.org/html/rfc7468#section-13).
     * </pre>
     *
     * <code>string pem = 1;</code>
     *
     * @return The bytes for pem.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString getPemBytes() {
      java.lang.Object ref = pem_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        pem_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    private byte memoizedIsInitialized = -1;

    @java.lang.Override
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized == 1) return true;
      if (isInitialized == 0) return false;

      memoizedIsInitialized = 1;
      return true;
    }

    @java.lang.Override
    public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pem_)) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, pem_);
      }
      getUnknownFields().writeTo(output);
    }

    @java.lang.Override
    public int getSerializedSize() {
      int size = memoizedSize;
      if (size != -1) return size;

      size = 0;
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pem_)) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, pem_);
      }
      size += getUnknownFields().getSerializedSize();
      memoizedSize = size;
      return size;
    }

    @java.lang.Override
    public boolean equals(final java.lang.Object obj) {
      if (obj == this) {
        return true;
      }
      if (!(obj instanceof com.google.cloud.kms.v1.ImportJob.WrappingPublicKey)) {
        return super.equals(obj);
      }
      com.google.cloud.kms.v1.ImportJob.WrappingPublicKey other =
          (com.google.cloud.kms.v1.ImportJob.WrappingPublicKey) obj;

      if (!getPem().equals(other.getPem())) return false;
      if (!getUnknownFields().equals(other.getUnknownFields())) return false;
      return true;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      hash = (37 * hash) + PEM_FIELD_NUMBER;
      hash = (53 * hash) + getPem().hashCode();
      hash = (29 * hash) + getUnknownFields().hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static com.google.cloud.kms.v1.ImportJob.WrappingPublicKey parseFrom(
        java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.cloud.kms.v1.ImportJob.WrappingPublicKey parseFrom(
        java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }

    public static com.google.cloud.kms.v1.ImportJob.WrappingPublicKey parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.cloud.kms.v1.ImportJob.WrappingPublicKey parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }

    public static com.google.cloud.kms.v1.ImportJob.WrappingPublicKey parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.cloud.kms.v1.ImportJob.WrappingPublicKey parseFrom(
        byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }

    public static com.google.cloud.kms.v1.ImportJob.WrappingPublicKey parseFrom(
        java.io.InputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
    }

    public static com.google.cloud.kms.v1.ImportJob.WrappingPublicKey parseFrom(
        java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
          PARSER, input, extensionRegistry);
    }

    public static com.google.cloud.kms.v1.ImportJob.WrappingPublicKey parseDelimitedFrom(
        java.io.InputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
    }

    public static com.google.cloud.kms.v1.ImportJob.WrappingPublicKey parseDelimitedFrom(
        java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
          PARSER, input, extensionRegistry);
    }

    public static com.google.cloud.kms.v1.ImportJob.WrappingPublicKey parseFrom(
        com.google.protobuf.CodedInputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
    }

    public static com.google.cloud.kms.v1.ImportJob.WrappingPublicKey parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
          PARSER, input, extensionRegistry);
    }

    @java.lang.Override
    public Builder newBuilderForType() {
      return newBuilder();
    }

    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }

    public static Builder newBuilder(
        com.google.cloud.kms.v1.ImportJob.WrappingPublicKey prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }

    @java.lang.Override
    public Builder toBuilder() {
      return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
    }

    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    /**
     *
     *
     * <pre>
     * The public key component of the wrapping key. For details of the type of
     * key this public key corresponds to, see the
     * [ImportMethod][google.cloud.kms.v1.ImportJob.ImportMethod].
     * </pre>
     *
     * Protobuf type {@code google.cloud.kms.v1.ImportJob.WrappingPublicKey}
     */
    public static final class Builder
        extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
        implements
        // @@protoc_insertion_point(builder_implements:google.cloud.kms.v1.ImportJob.WrappingPublicKey)
        com.google.cloud.kms.v1.ImportJob.WrappingPublicKeyOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
        return com.google.cloud.kms.v1.KmsResourcesProto
            .internal_static_google_cloud_kms_v1_ImportJob_WrappingPublicKey_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.google.cloud.kms.v1.KmsResourcesProto
            .internal_static_google_cloud_kms_v1_ImportJob_WrappingPublicKey_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.cloud.kms.v1.ImportJob.WrappingPublicKey.class,
                com.google.cloud.kms.v1.ImportJob.WrappingPublicKey.Builder.class);
      }

      // Construct using com.google.cloud.kms.v1.ImportJob.WrappingPublicKey.newBuilder()
      private Builder() {}

      private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
      }

      @java.lang.Override
      public Builder clear() {
        super.clear();
        bitField0_ = 0;
        pem_ = "";
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
        return com.google.cloud.kms.v1.KmsResourcesProto
            .internal_static_google_cloud_kms_v1_ImportJob_WrappingPublicKey_descriptor;
      }

      @java.lang.Override
      public com.google.cloud.kms.v1.ImportJob.WrappingPublicKey getDefaultInstanceForType() {
        return com.google.cloud.kms.v1.ImportJob.WrappingPublicKey.getDefaultInstance();
      }

      @java.lang.Override
      public com.google.cloud.kms.v1.ImportJob.WrappingPublicKey build() {
        com.google.cloud.kms.v1.ImportJob.WrappingPublicKey result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public com.google.cloud.kms.v1.ImportJob.WrappingPublicKey buildPartial() {
        com.google.cloud.kms.v1.ImportJob.WrappingPublicKey result =
            new com.google.cloud.kms.v1.ImportJob.WrappingPublicKey(this);
        if (bitField0_ != 0) {
          buildPartial0(result);
        }
        onBuilt();
        return result;
      }

      private void buildPartial0(com.google.cloud.kms.v1.ImportJob.WrappingPublicKey result) {
        int from_bitField0_ = bitField0_;
        if (((from_bitField0_ & 0x00000001) != 0)) {
          result.pem_ = pem_;
        }
      }

      @java.lang.Override
      public Builder clone() {
        return super.clone();
      }

      @java.lang.Override
      public Builder setField(
          com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
        return super.setField(field, value);
      }

      @java.lang.Override
      public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
        return super.clearField(field);
      }

      @java.lang.Override
      public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
        return super.clearOneof(oneof);
      }

      @java.lang.Override
      public Builder setRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          int index,
          java.lang.Object value) {
        return super.setRepeatedField(field, index, value);
      }

      @java.lang.Override
      public Builder addRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
        return super.addRepeatedField(field, value);
      }

      @java.lang.Override
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof com.google.cloud.kms.v1.ImportJob.WrappingPublicKey) {
          return mergeFrom((com.google.cloud.kms.v1.ImportJob.WrappingPublicKey) other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(com.google.cloud.kms.v1.ImportJob.WrappingPublicKey other) {
        if (other == com.google.cloud.kms.v1.ImportJob.WrappingPublicKey.getDefaultInstance())
          return this;
        if (!other.getPem().isEmpty()) {
          pem_ = other.pem_;
          bitField0_ |= 0x00000001;
          onChanged();
        }
        this.mergeUnknownFields(other.getUnknownFields());
        onChanged();
        return this;
      }

      @java.lang.Override
      public final boolean isInitialized() {
        return true;
      }

      @java.lang.Override
      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        if (extensionRegistry == null) {
          throw new java.lang.NullPointerException();
        }
        try {
          boolean done = false;
          while (!done) {
            int tag = input.readTag();
            switch (tag) {
              case 0:
                done = true;
                break;
              case 10:
                {
                  pem_ = input.readStringRequireUtf8();
                  bitField0_ |= 0x00000001;
                  break;
                } // case 10
              default:
                {
                  if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                    done = true; // was an endgroup tag
                  }
                  break;
                } // default:
            } // switch (tag)
          } // while (!done)
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          throw e.unwrapIOException();
        } finally {
          onChanged();
        } // finally
        return this;
      }

      private int bitField0_;

      private java.lang.Object pem_ = "";
      /**
       *
       *
       * <pre>
       * The public key, encoded in PEM format. For more information, see the [RFC
       * 7468](https://tools.ietf.org/html/rfc7468) sections for [General
       * Considerations](https://tools.ietf.org/html/rfc7468#section-2) and
       * [Textual Encoding of Subject Public Key Info]
       * (https://tools.ietf.org/html/rfc7468#section-13).
       * </pre>
       *
       * <code>string pem = 1;</code>
       *
       * @return The pem.
       */
      public java.lang.String getPem() {
        java.lang.Object ref = pem_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          pem_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * The public key, encoded in PEM format. For more information, see the [RFC
       * 7468](https://tools.ietf.org/html/rfc7468) sections for [General
       * Considerations](https://tools.ietf.org/html/rfc7468#section-2) and
       * [Textual Encoding of Subject Public Key Info]
       * (https://tools.ietf.org/html/rfc7468#section-13).
       * </pre>
       *
       * <code>string pem = 1;</code>
       *
       * @return The bytes for pem.
       */
      public com.google.protobuf.ByteString getPemBytes() {
        java.lang.Object ref = pem_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b =
              com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
          pem_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * The public key, encoded in PEM format. For more information, see the [RFC
       * 7468](https://tools.ietf.org/html/rfc7468) sections for [General
       * Considerations](https://tools.ietf.org/html/rfc7468#section-2) and
       * [Textual Encoding of Subject Public Key Info]
       * (https://tools.ietf.org/html/rfc7468#section-13).
       * </pre>
       *
       * <code>string pem = 1;</code>
       *
       * @param value The pem to set.
       * @return This builder for chaining.
       */
      public Builder setPem(java.lang.String value) {
        if (value == null) {
          throw new NullPointerException();
        }
        pem_ = value;
        bitField0_ |= 0x00000001;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * The public key, encoded in PEM format. For more information, see the [RFC
       * 7468](https://tools.ietf.org/html/rfc7468) sections for [General
       * Considerations](https://tools.ietf.org/html/rfc7468#section-2) and
       * [Textual Encoding of Subject Public Key Info]
       * (https://tools.ietf.org/html/rfc7468#section-13).
       * </pre>
       *
       * <code>string pem = 1;</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearPem() {
        pem_ = getDefaultInstance().getPem();
        bitField0_ = (bitField0_ & ~0x00000001);
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * The public key, encoded in PEM format. For more information, see the [RFC
       * 7468](https://tools.ietf.org/html/rfc7468) sections for [General
       * Considerations](https://tools.ietf.org/html/rfc7468#section-2) and
       * [Textual Encoding of Subject Public Key Info]
       * (https://tools.ietf.org/html/rfc7468#section-13).
       * </pre>
       *
       * <code>string pem = 1;</code>
       *
       * @param value The bytes for pem to set.
       * @return This builder for chaining.
       */
      public Builder setPemBytes(com.google.protobuf.ByteString value) {
        if (value == null) {
          throw new NullPointerException();
        }
        checkByteStringIsUtf8(value);
        pem_ = value;
        bitField0_ |= 0x00000001;
        onChanged();
        return this;
      }

      @java.lang.Override
      public final Builder setUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.setUnknownFields(unknownFields);
      }

      @java.lang.Override
      public final Builder mergeUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.mergeUnknownFields(unknownFields);
      }

      // @@protoc_insertion_point(builder_scope:google.cloud.kms.v1.ImportJob.WrappingPublicKey)
    }

    // @@protoc_insertion_point(class_scope:google.cloud.kms.v1.ImportJob.WrappingPublicKey)
    private static final com.google.cloud.kms.v1.ImportJob.WrappingPublicKey DEFAULT_INSTANCE;

    static {
      DEFAULT_INSTANCE = new com.google.cloud.kms.v1.ImportJob.WrappingPublicKey();
    }

    public static com.google.cloud.kms.v1.ImportJob.WrappingPublicKey getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    private static final com.google.protobuf.Parser<WrappingPublicKey> PARSER =
        new com.google.protobuf.AbstractParser<WrappingPublicKey>() {
          @java.lang.Override
          public WrappingPublicKey parsePartialFrom(
              com.google.protobuf.CodedInputStream input,
              com.google.protobuf.ExtensionRegistryLite extensionRegistry)
              throws com.google.protobuf.InvalidProtocolBufferException {
            Builder builder = newBuilder();
            try {
              builder.mergeFrom(input, extensionRegistry);
            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
              throw e.setUnfinishedMessage(builder.buildPartial());
            } catch (com.google.protobuf.UninitializedMessageException e) {
              throw e.asInvalidProtocolBufferException()
                  .setUnfinishedMessage(builder.buildPartial());
            } catch (java.io.IOException e) {
              throw new com.google.protobuf.InvalidProtocolBufferException(e)
                  .setUnfinishedMessage(builder.buildPartial());
            }
            return builder.buildPartial();
          }
        };

    public static com.google.protobuf.Parser<WrappingPublicKey> parser() {
      return PARSER;
    }

    @java.lang.Override
    public com.google.protobuf.Parser<WrappingPublicKey> getParserForType() {
      return PARSER;
    }

    @java.lang.Override
    public com.google.cloud.kms.v1.ImportJob.WrappingPublicKey getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }
  }

  public static final int NAME_FIELD_NUMBER = 1;

  @SuppressWarnings("serial")
  private volatile java.lang.Object name_ = "";
  /**
   *
   *
   * <pre>
   * Output only. The resource name for this
   * [ImportJob][google.cloud.kms.v1.ImportJob] in the format
   * `projects/&#42;&#47;locations/&#42;&#47;keyRings/&#42;&#47;importJobs/&#42;`.
   * </pre>
   *
   * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
   *
   * @return The name.
   */
  @java.lang.Override
  public java.lang.String getName() {
    java.lang.Object ref = name_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      name_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * Output only. The resource name for this
   * [ImportJob][google.cloud.kms.v1.ImportJob] in the format
   * `projects/&#42;&#47;locations/&#42;&#47;keyRings/&#42;&#47;importJobs/&#42;`.
   * </pre>
   *
   * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
   *
   * @return The bytes for name.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getNameBytes() {
    java.lang.Object ref = name_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      name_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int IMPORT_METHOD_FIELD_NUMBER = 2;
  private int importMethod_ = 0;
  /**
   *
   *
   * <pre>
   * Required. Immutable. The wrapping method to be used for incoming key
   * material.
   * </pre>
   *
   * <code>
   * .google.cloud.kms.v1.ImportJob.ImportMethod import_method = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
   * </code>
   *
   * @return The enum numeric value on the wire for importMethod.
   */
  @java.lang.Override
  public int getImportMethodValue() {
    return importMethod_;
  }
  /**
   *
   *
   * <pre>
   * Required. Immutable. The wrapping method to be used for incoming key
   * material.
   * </pre>
   *
   * <code>
   * .google.cloud.kms.v1.ImportJob.ImportMethod import_method = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
   * </code>
   *
   * @return The importMethod.
   */
  @java.lang.Override
  public com.google.cloud.kms.v1.ImportJob.ImportMethod getImportMethod() {
    com.google.cloud.kms.v1.ImportJob.ImportMethod result =
        com.google.cloud.kms.v1.ImportJob.ImportMethod.forNumber(importMethod_);
    return result == null ? com.google.cloud.kms.v1.ImportJob.ImportMethod.UNRECOGNIZED : result;
  }

  public static final int PROTECTION_LEVEL_FIELD_NUMBER = 9;
  private int protectionLevel_ = 0;
  /**
   *
   *
   * <pre>
   * Required. Immutable. The protection level of the
   * [ImportJob][google.cloud.kms.v1.ImportJob]. This must match the
   * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]
   * of the [version_template][google.cloud.kms.v1.CryptoKey.version_template]
   * on the [CryptoKey][google.cloud.kms.v1.CryptoKey] you attempt to import
   * into.
   * </pre>
   *
   * <code>
   * .google.cloud.kms.v1.ProtectionLevel protection_level = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
   * </code>
   *
   * @return The enum numeric value on the wire for protectionLevel.
   */
  @java.lang.Override
  public int getProtectionLevelValue() {
    return protectionLevel_;
  }
  /**
   *
   *
   * <pre>
   * Required. Immutable. The protection level of the
   * [ImportJob][google.cloud.kms.v1.ImportJob]. This must match the
   * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]
   * of the [version_template][google.cloud.kms.v1.CryptoKey.version_template]
   * on the [CryptoKey][google.cloud.kms.v1.CryptoKey] you attempt to import
   * into.
   * </pre>
   *
   * <code>
   * .google.cloud.kms.v1.ProtectionLevel protection_level = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
   * </code>
   *
   * @return The protectionLevel.
   */
  @java.lang.Override
  public com.google.cloud.kms.v1.ProtectionLevel getProtectionLevel() {
    com.google.cloud.kms.v1.ProtectionLevel result =
        com.google.cloud.kms.v1.ProtectionLevel.forNumber(protectionLevel_);
    return result == null ? com.google.cloud.kms.v1.ProtectionLevel.UNRECOGNIZED : result;
  }

  public static final int CREATE_TIME_FIELD_NUMBER = 3;
  private com.google.protobuf.Timestamp createTime_;
  /**
   *
   *
   * <pre>
   * Output only. The time at which this
   * [ImportJob][google.cloud.kms.v1.ImportJob] was created.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   *
   * @return Whether the createTime field is set.
   */
  @java.lang.Override
  public boolean hasCreateTime() {
    return createTime_ != null;
  }
  /**
   *
   *
   * <pre>
   * Output only. The time at which this
   * [ImportJob][google.cloud.kms.v1.ImportJob] was created.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   *
   * @return The createTime.
   */
  @java.lang.Override
  public com.google.protobuf.Timestamp getCreateTime() {
    return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;
  }
  /**
   *
   *
   * <pre>
   * Output only. The time at which this
   * [ImportJob][google.cloud.kms.v1.ImportJob] was created.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   */
  @java.lang.Override
  public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() {
    return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;
  }

  public static final int GENERATE_TIME_FIELD_NUMBER = 4;
  private com.google.protobuf.Timestamp generateTime_;
  /**
   *
   *
   * <pre>
   * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]'s key
   * material was generated.
   * </pre>
   *
   * <code>
   * .google.protobuf.Timestamp generate_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   *
   * @return Whether the generateTime field is set.
   */
  @java.lang.Override
  public boolean hasGenerateTime() {
    return generateTime_ != null;
  }
  /**
   *
   *
   * <pre>
   * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]'s key
   * material was generated.
   * </pre>
   *
   * <code>
   * .google.protobuf.Timestamp generate_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   *
   * @return The generateTime.
   */
  @java.lang.Override
  public com.google.protobuf.Timestamp getGenerateTime() {
    return generateTime_ == null
        ? com.google.protobuf.Timestamp.getDefaultInstance()
        : generateTime_;
  }
  /**
   *
   *
   * <pre>
   * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]'s key
   * material was generated.
   * </pre>
   *
   * <code>
   * .google.protobuf.Timestamp generate_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   */
  @java.lang.Override
  public com.google.protobuf.TimestampOrBuilder getGenerateTimeOrBuilder() {
    return generateTime_ == null
        ? com.google.protobuf.Timestamp.getDefaultInstance()
        : generateTime_;
  }

  public static final int EXPIRE_TIME_FIELD_NUMBER = 5;
  private com.google.protobuf.Timestamp expireTime_;
  /**
   *
   *
   * <pre>
   * Output only. The time at which this
   * [ImportJob][google.cloud.kms.v1.ImportJob] is scheduled for expiration and
   * can no longer be used to import key material.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   *
   * @return Whether the expireTime field is set.
   */
  @java.lang.Override
  public boolean hasExpireTime() {
    return expireTime_ != null;
  }
  /**
   *
   *
   * <pre>
   * Output only. The time at which this
   * [ImportJob][google.cloud.kms.v1.ImportJob] is scheduled for expiration and
   * can no longer be used to import key material.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   *
   * @return The expireTime.
   */
  @java.lang.Override
  public com.google.protobuf.Timestamp getExpireTime() {
    return expireTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expireTime_;
  }
  /**
   *
   *
   * <pre>
   * Output only. The time at which this
   * [ImportJob][google.cloud.kms.v1.ImportJob] is scheduled for expiration and
   * can no longer be used to import key material.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   */
  @java.lang.Override
  public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() {
    return expireTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expireTime_;
  }

  public static final int EXPIRE_EVENT_TIME_FIELD_NUMBER = 10;
  private com.google.protobuf.Timestamp expireEventTime_;
  /**
   *
   *
   * <pre>
   * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]
   * expired. Only present if [state][google.cloud.kms.v1.ImportJob.state] is
   * [EXPIRED][google.cloud.kms.v1.ImportJob.ImportJobState.EXPIRED].
   * </pre>
   *
   * <code>
   * .google.protobuf.Timestamp expire_event_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   *
   * @return Whether the expireEventTime field is set.
   */
  @java.lang.Override
  public boolean hasExpireEventTime() {
    return expireEventTime_ != null;
  }
  /**
   *
   *
   * <pre>
   * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]
   * expired. Only present if [state][google.cloud.kms.v1.ImportJob.state] is
   * [EXPIRED][google.cloud.kms.v1.ImportJob.ImportJobState.EXPIRED].
   * </pre>
   *
   * <code>
   * .google.protobuf.Timestamp expire_event_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   *
   * @return The expireEventTime.
   */
  @java.lang.Override
  public com.google.protobuf.Timestamp getExpireEventTime() {
    return expireEventTime_ == null
        ? com.google.protobuf.Timestamp.getDefaultInstance()
        : expireEventTime_;
  }
  /**
   *
   *
   * <pre>
   * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]
   * expired. Only present if [state][google.cloud.kms.v1.ImportJob.state] is
   * [EXPIRED][google.cloud.kms.v1.ImportJob.ImportJobState.EXPIRED].
   * </pre>
   *
   * <code>
   * .google.protobuf.Timestamp expire_event_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   */
  @java.lang.Override
  public com.google.protobuf.TimestampOrBuilder getExpireEventTimeOrBuilder() {
    return expireEventTime_ == null
        ? com.google.protobuf.Timestamp.getDefaultInstance()
        : expireEventTime_;
  }

  public static final int STATE_FIELD_NUMBER = 6;
  private int state_ = 0;
  /**
   *
   *
   * <pre>
   * Output only. The current state of the
   * [ImportJob][google.cloud.kms.v1.ImportJob], indicating if it can be used.
   * </pre>
   *
   * <code>
   * .google.cloud.kms.v1.ImportJob.ImportJobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   *
   * @return The enum numeric value on the wire for state.
   */
  @java.lang.Override
  public int getStateValue() {
    return state_;
  }
  /**
   *
   *
   * <pre>
   * Output only. The current state of the
   * [ImportJob][google.cloud.kms.v1.ImportJob], indicating if it can be used.
   * </pre>
   *
   * <code>
   * .google.cloud.kms.v1.ImportJob.ImportJobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   *
   * @return The state.
   */
  @java.lang.Override
  public com.google.cloud.kms.v1.ImportJob.ImportJobState getState() {
    com.google.cloud.kms.v1.ImportJob.ImportJobState result =
        com.google.cloud.kms.v1.ImportJob.ImportJobState.forNumber(state_);
    return result == null ? com.google.cloud.kms.v1.ImportJob.ImportJobState.UNRECOGNIZED : result;
  }

  public static final int PUBLIC_KEY_FIELD_NUMBER = 7;
  private com.google.cloud.kms.v1.ImportJob.WrappingPublicKey publicKey_;
  /**
   *
   *
   * <pre>
   * Output only. The public key with which to wrap key material prior to
   * import. Only returned if [state][google.cloud.kms.v1.ImportJob.state] is
   * [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE].
   * </pre>
   *
   * <code>
   * .google.cloud.kms.v1.ImportJob.WrappingPublicKey public_key = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   *
   * @return Whether the publicKey field is set.
   */
  @java.lang.Override
  public boolean hasPublicKey() {
    return publicKey_ != null;
  }
  /**
   *
   *
   * <pre>
   * Output only. The public key with which to wrap key material prior to
   * import. Only returned if [state][google.cloud.kms.v1.ImportJob.state] is
   * [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE].
   * </pre>
   *
   * <code>
   * .google.cloud.kms.v1.ImportJob.WrappingPublicKey public_key = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   *
   * @return The publicKey.
   */
  @java.lang.Override
  public com.google.cloud.kms.v1.ImportJob.WrappingPublicKey getPublicKey() {
    return publicKey_ == null
        ? com.google.cloud.kms.v1.ImportJob.WrappingPublicKey.getDefaultInstance()
        : publicKey_;
  }
  /**
   *
   *
   * <pre>
   * Output only. The public key with which to wrap key material prior to
   * import. Only returned if [state][google.cloud.kms.v1.ImportJob.state] is
   * [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE].
   * </pre>
   *
   * <code>
   * .google.cloud.kms.v1.ImportJob.WrappingPublicKey public_key = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   */
  @java.lang.Override
  public com.google.cloud.kms.v1.ImportJob.WrappingPublicKeyOrBuilder getPublicKeyOrBuilder() {
    return publicKey_ == null
        ? com.google.cloud.kms.v1.ImportJob.WrappingPublicKey.getDefaultInstance()
        : publicKey_;
  }

  public static final int ATTESTATION_FIELD_NUMBER = 8;
  private com.google.cloud.kms.v1.KeyOperationAttestation attestation_;
  /**
   *
   *
   * <pre>
   * Output only. Statement that was generated and signed by the key creator
   * (for example, an HSM) at key creation time. Use this statement to verify
   * attributes of the key as stored on the HSM, independently of Google.
   * Only present if the chosen
   * [ImportMethod][google.cloud.kms.v1.ImportJob.ImportMethod] is one with a
   * protection level of [HSM][google.cloud.kms.v1.ProtectionLevel.HSM].
   * </pre>
   *
   * <code>
   * .google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   *
   * @return Whether the attestation field is set.
   */
  @java.lang.Override
  public boolean hasAttestation() {
    return attestation_ != null;
  }
  /**
   *
   *
   * <pre>
   * Output only. Statement that was generated and signed by the key creator
   * (for example, an HSM) at key creation time. Use this statement to verify
   * attributes of the key as stored on the HSM, independently of Google.
   * Only present if the chosen
   * [ImportMethod][google.cloud.kms.v1.ImportJob.ImportMethod] is one with a
   * protection level of [HSM][google.cloud.kms.v1.ProtectionLevel.HSM].
   * </pre>
   *
   * <code>
   * .google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   *
   * @return The attestation.
   */
  @java.lang.Override
  public com.google.cloud.kms.v1.KeyOperationAttestation getAttestation() {
    return attestation_ == null
        ? com.google.cloud.kms.v1.KeyOperationAttestation.getDefaultInstance()
        : attestation_;
  }
  /**
   *
   *
   * <pre>
   * Output only. Statement that was generated and signed by the key creator
   * (for example, an HSM) at key creation time. Use this statement to verify
   * attributes of the key as stored on the HSM, independently of Google.
   * Only present if the chosen
   * [ImportMethod][google.cloud.kms.v1.ImportJob.ImportMethod] is one with a
   * protection level of [HSM][google.cloud.kms.v1.ProtectionLevel.HSM].
   * </pre>
   *
   * <code>
   * .google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   */
  @java.lang.Override
  public com.google.cloud.kms.v1.KeyOperationAttestationOrBuilder getAttestationOrBuilder() {
    return attestation_ == null
        ? com.google.cloud.kms.v1.KeyOperationAttestation.getDefaultInstance()
        : attestation_;
  }

  private byte memoizedIsInitialized = -1;

  @java.lang.Override
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    memoizedIsInitialized = 1;
    return true;
  }

  @java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
    }
    if (importMethod_
        != com.google.cloud.kms.v1.ImportJob.ImportMethod.IMPORT_METHOD_UNSPECIFIED.getNumber()) {
      output.writeEnum(2, importMethod_);
    }
    if (createTime_ != null) {
      output.writeMessage(3, getCreateTime());
    }
    if (generateTime_ != null) {
      output.writeMessage(4, getGenerateTime());
    }
    if (expireTime_ != null) {
      output.writeMessage(5, getExpireTime());
    }
    if (state_
        != com.google.cloud.kms.v1.ImportJob.ImportJobState.IMPORT_JOB_STATE_UNSPECIFIED
            .getNumber()) {
      output.writeEnum(6, state_);
    }
    if (publicKey_ != null) {
      output.writeMessage(7, getPublicKey());
    }
    if (attestation_ != null) {
      output.writeMessage(8, getAttestation());
    }
    if (protectionLevel_
        != com.google.cloud.kms.v1.ProtectionLevel.PROTECTION_LEVEL_UNSPECIFIED.getNumber()) {
      output.writeEnum(9, protectionLevel_);
    }
    if (expireEventTime_ != null) {
      output.writeMessage(10, getExpireEventTime());
    }
    getUnknownFields().writeTo(output);
  }

  @java.lang.Override
  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
    }
    if (importMethod_
        != com.google.cloud.kms.v1.ImportJob.ImportMethod.IMPORT_METHOD_UNSPECIFIED.getNumber()) {
      size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, importMethod_);
    }
    if (createTime_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCreateTime());
    }
    if (generateTime_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getGenerateTime());
    }
    if (expireTime_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getExpireTime());
    }
    if (state_
        != com.google.cloud.kms.v1.ImportJob.ImportJobState.IMPORT_JOB_STATE_UNSPECIFIED
            .getNumber()) {
      size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, state_);
    }
    if (publicKey_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getPublicKey());
    }
    if (attestation_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getAttestation());
    }
    if (protectionLevel_
        != com.google.cloud.kms.v1.ProtectionLevel.PROTECTION_LEVEL_UNSPECIFIED.getNumber()) {
      size += com.google.protobuf.CodedOutputStream.computeEnumSize(9, protectionLevel_);
    }
    if (expireEventTime_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getExpireEventTime());
    }
    size += getUnknownFields().getSerializedSize();
    memoizedSize = size;
    return size;
  }

  @java.lang.Override
  public boolean equals(final java.lang.Object obj) {
    if (obj == this) {
      return true;
    }
    if (!(obj instanceof com.google.cloud.kms.v1.ImportJob)) {
      return super.equals(obj);
    }
    com.google.cloud.kms.v1.ImportJob other = (com.google.cloud.kms.v1.ImportJob) obj;

    if (!getName().equals(other.getName())) return false;
    if (importMethod_ != other.importMethod_) return false;
    if (protectionLevel_ != other.protectionLevel_) return false;
    if (hasCreateTime() != other.hasCreateTime()) return false;
    if (hasCreateTime()) {
      if (!getCreateTime().equals(other.getCreateTime())) return false;
    }
    if (hasGenerateTime() != other.hasGenerateTime()) return false;
    if (hasGenerateTime()) {
      if (!getGenerateTime().equals(other.getGenerateTime())) return false;
    }
    if (hasExpireTime() != other.hasExpireTime()) return false;
    if (hasExpireTime()) {
      if (!getExpireTime().equals(other.getExpireTime())) return false;
    }
    if (hasExpireEventTime() != other.hasExpireEventTime()) return false;
    if (hasExpireEventTime()) {
      if (!getExpireEventTime().equals(other.getExpireEventTime())) return false;
    }
    if (state_ != other.state_) return false;
    if (hasPublicKey() != other.hasPublicKey()) return false;
    if (hasPublicKey()) {
      if (!getPublicKey().equals(other.getPublicKey())) return false;
    }
    if (hasAttestation() != other.hasAttestation()) return false;
    if (hasAttestation()) {
      if (!getAttestation().equals(other.getAttestation())) return false;
    }
    if (!getUnknownFields().equals(other.getUnknownFields())) return false;
    return true;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + NAME_FIELD_NUMBER;
    hash = (53 * hash) + getName().hashCode();
    hash = (37 * hash) + IMPORT_METHOD_FIELD_NUMBER;
    hash = (53 * hash) + importMethod_;
    hash = (37 * hash) + PROTECTION_LEVEL_FIELD_NUMBER;
    hash = (53 * hash) + protectionLevel_;
    if (hasCreateTime()) {
      hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER;
      hash = (53 * hash) + getCreateTime().hashCode();
    }
    if (hasGenerateTime()) {
      hash = (37 * hash) + GENERATE_TIME_FIELD_NUMBER;
      hash = (53 * hash) + getGenerateTime().hashCode();
    }
    if (hasExpireTime()) {
      hash = (37 * hash) + EXPIRE_TIME_FIELD_NUMBER;
      hash = (53 * hash) + getExpireTime().hashCode();
    }
    if (hasExpireEventTime()) {
      hash = (37 * hash) + EXPIRE_EVENT_TIME_FIELD_NUMBER;
      hash = (53 * hash) + getExpireEventTime().hashCode();
    }
    hash = (37 * hash) + STATE_FIELD_NUMBER;
    hash = (53 * hash) + state_;
    if (hasPublicKey()) {
      hash = (37 * hash) + PUBLIC_KEY_FIELD_NUMBER;
      hash = (53 * hash) + getPublicKey().hashCode();
    }
    if (hasAttestation()) {
      hash = (37 * hash) + ATTESTATION_FIELD_NUMBER;
      hash = (53 * hash) + getAttestation().hashCode();
    }
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.cloud.kms.v1.ImportJob parseFrom(java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.kms.v1.ImportJob parseFrom(
      java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.cloud.kms.v1.ImportJob parseFrom(com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.kms.v1.ImportJob parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.cloud.kms.v1.ImportJob parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.kms.v1.ImportJob parseFrom(
      byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.cloud.kms.v1.ImportJob parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

  public static com.google.cloud.kms.v1.ImportJob parseFrom(
      java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
        PARSER, input, extensionRegistry);
  }

  public static com.google.cloud.kms.v1.ImportJob parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
  }

  public static com.google.cloud.kms.v1.ImportJob parseDelimitedFrom(
      java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
        PARSER, input, extensionRegistry);
  }

  public static com.google.cloud.kms.v1.ImportJob parseFrom(
      com.google.protobuf.CodedInputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

  public static com.google.cloud.kms.v1.ImportJob parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
        PARSER, input, extensionRegistry);
  }

  @java.lang.Override
  public Builder newBuilderForType() {
    return newBuilder();
  }

  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }

  public static Builder newBuilder(com.google.cloud.kms.v1.ImportJob prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }

  @java.lang.Override
  public Builder toBuilder() {
    return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
  }

  @java.lang.Override
  protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   *
   *
   * <pre>
   * An [ImportJob][google.cloud.kms.v1.ImportJob] can be used to create
   * [CryptoKeys][google.cloud.kms.v1.CryptoKey] and
   * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] using pre-existing
   * key material, generated outside of Cloud KMS.
   * When an [ImportJob][google.cloud.kms.v1.ImportJob] is created, Cloud KMS will
   * generate a "wrapping key", which is a public/private key pair. You use the
   * wrapping key to encrypt (also known as wrap) the pre-existing key material to
   * protect it during the import process. The nature of the wrapping key depends
   * on the choice of
   * [import_method][google.cloud.kms.v1.ImportJob.import_method]. When the
   * wrapping key generation is complete, the
   * [state][google.cloud.kms.v1.ImportJob.state] will be set to
   * [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE] and the
   * [public_key][google.cloud.kms.v1.ImportJob.public_key] can be fetched. The
   * fetched public key can then be used to wrap your pre-existing key material.
   * Once the key material is wrapped, it can be imported into a new
   * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in an existing
   * [CryptoKey][google.cloud.kms.v1.CryptoKey] by calling
   * [ImportCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.ImportCryptoKeyVersion].
   * Multiple [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] can be
   * imported with a single [ImportJob][google.cloud.kms.v1.ImportJob]. Cloud KMS
   * uses the private key portion of the wrapping key to unwrap the key material.
   * Only Cloud KMS has access to the private key.
   * An [ImportJob][google.cloud.kms.v1.ImportJob] expires 3 days after it is
   * created. Once expired, Cloud KMS will no longer be able to import or unwrap
   * any key material that was wrapped with the
   * [ImportJob][google.cloud.kms.v1.ImportJob]'s public key.
   * For more information, see
   * [Importing a key](https://cloud.google.com/kms/docs/importing-a-key).
   * </pre>
   *
   * Protobuf type {@code google.cloud.kms.v1.ImportJob}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.cloud.kms.v1.ImportJob)
      com.google.cloud.kms.v1.ImportJobOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.cloud.kms.v1.KmsResourcesProto
          .internal_static_google_cloud_kms_v1_ImportJob_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.cloud.kms.v1.KmsResourcesProto
          .internal_static_google_cloud_kms_v1_ImportJob_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.cloud.kms.v1.ImportJob.class,
              com.google.cloud.kms.v1.ImportJob.Builder.class);
    }

    // Construct using com.google.cloud.kms.v1.ImportJob.newBuilder()
    private Builder() {}

    private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
    }

    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      name_ = "";
      importMethod_ = 0;
      protectionLevel_ = 0;
      createTime_ = null;
      if (createTimeBuilder_ != null) {
        createTimeBuilder_.dispose();
        createTimeBuilder_ = null;
      }
      generateTime_ = null;
      if (generateTimeBuilder_ != null) {
        generateTimeBuilder_.dispose();
        generateTimeBuilder_ = null;
      }
      expireTime_ = null;
      if (expireTimeBuilder_ != null) {
        expireTimeBuilder_.dispose();
        expireTimeBuilder_ = null;
      }
      expireEventTime_ = null;
      if (expireEventTimeBuilder_ != null) {
        expireEventTimeBuilder_.dispose();
        expireEventTimeBuilder_ = null;
      }
      state_ = 0;
      publicKey_ = null;
      if (publicKeyBuilder_ != null) {
        publicKeyBuilder_.dispose();
        publicKeyBuilder_ = null;
      }
      attestation_ = null;
      if (attestationBuilder_ != null) {
        attestationBuilder_.dispose();
        attestationBuilder_ = null;
      }
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
      return com.google.cloud.kms.v1.KmsResourcesProto
          .internal_static_google_cloud_kms_v1_ImportJob_descriptor;
    }

    @java.lang.Override
    public com.google.cloud.kms.v1.ImportJob getDefaultInstanceForType() {
      return com.google.cloud.kms.v1.ImportJob.getDefaultInstance();
    }

    @java.lang.Override
    public com.google.cloud.kms.v1.ImportJob build() {
      com.google.cloud.kms.v1.ImportJob result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public com.google.cloud.kms.v1.ImportJob buildPartial() {
      com.google.cloud.kms.v1.ImportJob result = new com.google.cloud.kms.v1.ImportJob(this);
      if (bitField0_ != 0) {
        buildPartial0(result);
      }
      onBuilt();
      return result;
    }

    private void buildPartial0(com.google.cloud.kms.v1.ImportJob result) {
      int from_bitField0_ = bitField0_;
      if (((from_bitField0_ & 0x00000001) != 0)) {
        result.name_ = name_;
      }
      if (((from_bitField0_ & 0x00000002) != 0)) {
        result.importMethod_ = importMethod_;
      }
      if (((from_bitField0_ & 0x00000004) != 0)) {
        result.protectionLevel_ = protectionLevel_;
      }
      if (((from_bitField0_ & 0x00000008) != 0)) {
        result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build();
      }
      if (((from_bitField0_ & 0x00000010) != 0)) {
        result.generateTime_ =
            generateTimeBuilder_ == null ? generateTime_ : generateTimeBuilder_.build();
      }
      if (((from_bitField0_ & 0x00000020) != 0)) {
        result.expireTime_ = expireTimeBuilder_ == null ? expireTime_ : expireTimeBuilder_.build();
      }
      if (((from_bitField0_ & 0x00000040) != 0)) {
        result.expireEventTime_ =
            expireEventTimeBuilder_ == null ? expireEventTime_ : expireEventTimeBuilder_.build();
      }
      if (((from_bitField0_ & 0x00000080) != 0)) {
        result.state_ = state_;
      }
      if (((from_bitField0_ & 0x00000100) != 0)) {
        result.publicKey_ = publicKeyBuilder_ == null ? publicKey_ : publicKeyBuilder_.build();
      }
      if (((from_bitField0_ & 0x00000200) != 0)) {
        result.attestation_ =
            attestationBuilder_ == null ? attestation_ : attestationBuilder_.build();
      }
    }

    @java.lang.Override
    public Builder clone() {
      return super.clone();
    }

    @java.lang.Override
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
      return super.setField(field, value);
    }

    @java.lang.Override
    public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
      return super.clearField(field);
    }

    @java.lang.Override
    public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return super.clearOneof(oneof);
    }

    @java.lang.Override
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
      return super.setRepeatedField(field, index, value);
    }

    @java.lang.Override
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
      return super.addRepeatedField(field, value);
    }

    @java.lang.Override
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof com.google.cloud.kms.v1.ImportJob) {
        return mergeFrom((com.google.cloud.kms.v1.ImportJob) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.cloud.kms.v1.ImportJob other) {
      if (other == com.google.cloud.kms.v1.ImportJob.getDefaultInstance()) return this;
      if (!other.getName().isEmpty()) {
        name_ = other.name_;
        bitField0_ |= 0x00000001;
        onChanged();
      }
      if (other.importMethod_ != 0) {
        setImportMethodValue(other.getImportMethodValue());
      }
      if (other.protectionLevel_ != 0) {
        setProtectionLevelValue(other.getProtectionLevelValue());
      }
      if (other.hasCreateTime()) {
        mergeCreateTime(other.getCreateTime());
      }
      if (other.hasGenerateTime()) {
        mergeGenerateTime(other.getGenerateTime());
      }
      if (other.hasExpireTime()) {
        mergeExpireTime(other.getExpireTime());
      }
      if (other.hasExpireEventTime()) {
        mergeExpireEventTime(other.getExpireEventTime());
      }
      if (other.state_ != 0) {
        setStateValue(other.getStateValue());
      }
      if (other.hasPublicKey()) {
        mergePublicKey(other.getPublicKey());
      }
      if (other.hasAttestation()) {
        mergeAttestation(other.getAttestation());
      }
      this.mergeUnknownFields(other.getUnknownFields());
      onChanged();
      return this;
    }

    @java.lang.Override
    public final boolean isInitialized() {
      return true;
    }

    @java.lang.Override
    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 10:
              {
                name_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000001;
                break;
              } // case 10
            case 16:
              {
                importMethod_ = input.readEnum();
                bitField0_ |= 0x00000002;
                break;
              } // case 16
            case 26:
              {
                input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000008;
                break;
              } // case 26
            case 34:
              {
                input.readMessage(getGenerateTimeFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000010;
                break;
              } // case 34
            case 42:
              {
                input.readMessage(getExpireTimeFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000020;
                break;
              } // case 42
            case 48:
              {
                state_ = input.readEnum();
                bitField0_ |= 0x00000080;
                break;
              } // case 48
            case 58:
              {
                input.readMessage(getPublicKeyFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000100;
                break;
              } // case 58
            case 66:
              {
                input.readMessage(getAttestationFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000200;
                break;
              } // case 66
            case 72:
              {
                protectionLevel_ = input.readEnum();
                bitField0_ |= 0x00000004;
                break;
              } // case 72
            case 82:
              {
                input.readMessage(getExpireEventTimeFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000040;
                break;
              } // case 82
            default:
              {
                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                  done = true; // was an endgroup tag
                }
                break;
              } // default:
          } // switch (tag)
        } // while (!done)
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.unwrapIOException();
      } finally {
        onChanged();
      } // finally
      return this;
    }

    private int bitField0_;

    private java.lang.Object name_ = "";
    /**
     *
     *
     * <pre>
     * Output only. The resource name for this
     * [ImportJob][google.cloud.kms.v1.ImportJob] in the format
     * `projects/&#42;&#47;locations/&#42;&#47;keyRings/&#42;&#47;importJobs/&#42;`.
     * </pre>
     *
     * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @return The name.
     */
    public java.lang.String getName() {
      java.lang.Object ref = name_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        name_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. The resource name for this
     * [ImportJob][google.cloud.kms.v1.ImportJob] in the format
     * `projects/&#42;&#47;locations/&#42;&#47;keyRings/&#42;&#47;importJobs/&#42;`.
     * </pre>
     *
     * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @return The bytes for name.
     */
    public com.google.protobuf.ByteString getNameBytes() {
      java.lang.Object ref = name_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        name_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. The resource name for this
     * [ImportJob][google.cloud.kms.v1.ImportJob] in the format
     * `projects/&#42;&#47;locations/&#42;&#47;keyRings/&#42;&#47;importJobs/&#42;`.
     * </pre>
     *
     * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @param value The name to set.
     * @return This builder for chaining.
     */
    public Builder setName(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      name_ = value;
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The resource name for this
     * [ImportJob][google.cloud.kms.v1.ImportJob] in the format
     * `projects/&#42;&#47;locations/&#42;&#47;keyRings/&#42;&#47;importJobs/&#42;`.
     * </pre>
     *
     * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearName() {
      name_ = getDefaultInstance().getName();
      bitField0_ = (bitField0_ & ~0x00000001);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The resource name for this
     * [ImportJob][google.cloud.kms.v1.ImportJob] in the format
     * `projects/&#42;&#47;locations/&#42;&#47;keyRings/&#42;&#47;importJobs/&#42;`.
     * </pre>
     *
     * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @param value The bytes for name to set.
     * @return This builder for chaining.
     */
    public Builder setNameBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      name_ = value;
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }

    private int importMethod_ = 0;
    /**
     *
     *
     * <pre>
     * Required. Immutable. The wrapping method to be used for incoming key
     * material.
     * </pre>
     *
     * <code>
     * .google.cloud.kms.v1.ImportJob.ImportMethod import_method = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
     * </code>
     *
     * @return The enum numeric value on the wire for importMethod.
     */
    @java.lang.Override
    public int getImportMethodValue() {
      return importMethod_;
    }
    /**
     *
     *
     * <pre>
     * Required. Immutable. The wrapping method to be used for incoming key
     * material.
     * </pre>
     *
     * <code>
     * .google.cloud.kms.v1.ImportJob.ImportMethod import_method = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
     * </code>
     *
     * @param value The enum numeric value on the wire for importMethod to set.
     * @return This builder for chaining.
     */
    public Builder setImportMethodValue(int value) {
      importMethod_ = value;
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. Immutable. The wrapping method to be used for incoming key
     * material.
     * </pre>
     *
     * <code>
     * .google.cloud.kms.v1.ImportJob.ImportMethod import_method = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
     * </code>
     *
     * @return The importMethod.
     */
    @java.lang.Override
    public com.google.cloud.kms.v1.ImportJob.ImportMethod getImportMethod() {
      com.google.cloud.kms.v1.ImportJob.ImportMethod result =
          com.google.cloud.kms.v1.ImportJob.ImportMethod.forNumber(importMethod_);
      return result == null ? com.google.cloud.kms.v1.ImportJob.ImportMethod.UNRECOGNIZED : result;
    }
    /**
     *
     *
     * <pre>
     * Required. Immutable. The wrapping method to be used for incoming key
     * material.
     * </pre>
     *
     * <code>
     * .google.cloud.kms.v1.ImportJob.ImportMethod import_method = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
     * </code>
     *
     * @param value The importMethod to set.
     * @return This builder for chaining.
     */
    public Builder setImportMethod(com.google.cloud.kms.v1.ImportJob.ImportMethod value) {
      if (value == null) {
        throw new NullPointerException();
      }
      bitField0_ |= 0x00000002;
      importMethod_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. Immutable. The wrapping method to be used for incoming key
     * material.
     * </pre>
     *
     * <code>
     * .google.cloud.kms.v1.ImportJob.ImportMethod import_method = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
     * </code>
     *
     * @return This builder for chaining.
     */
    public Builder clearImportMethod() {
      bitField0_ = (bitField0_ & ~0x00000002);
      importMethod_ = 0;
      onChanged();
      return this;
    }

    private int protectionLevel_ = 0;
    /**
     *
     *
     * <pre>
     * Required. Immutable. The protection level of the
     * [ImportJob][google.cloud.kms.v1.ImportJob]. This must match the
     * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]
     * of the [version_template][google.cloud.kms.v1.CryptoKey.version_template]
     * on the [CryptoKey][google.cloud.kms.v1.CryptoKey] you attempt to import
     * into.
     * </pre>
     *
     * <code>
     * .google.cloud.kms.v1.ProtectionLevel protection_level = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
     * </code>
     *
     * @return The enum numeric value on the wire for protectionLevel.
     */
    @java.lang.Override
    public int getProtectionLevelValue() {
      return protectionLevel_;
    }
    /**
     *
     *
     * <pre>
     * Required. Immutable. The protection level of the
     * [ImportJob][google.cloud.kms.v1.ImportJob]. This must match the
     * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]
     * of the [version_template][google.cloud.kms.v1.CryptoKey.version_template]
     * on the [CryptoKey][google.cloud.kms.v1.CryptoKey] you attempt to import
     * into.
     * </pre>
     *
     * <code>
     * .google.cloud.kms.v1.ProtectionLevel protection_level = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
     * </code>
     *
     * @param value The enum numeric value on the wire for protectionLevel to set.
     * @return This builder for chaining.
     */
    public Builder setProtectionLevelValue(int value) {
      protectionLevel_ = value;
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. Immutable. The protection level of the
     * [ImportJob][google.cloud.kms.v1.ImportJob]. This must match the
     * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]
     * of the [version_template][google.cloud.kms.v1.CryptoKey.version_template]
     * on the [CryptoKey][google.cloud.kms.v1.CryptoKey] you attempt to import
     * into.
     * </pre>
     *
     * <code>
     * .google.cloud.kms.v1.ProtectionLevel protection_level = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
     * </code>
     *
     * @return The protectionLevel.
     */
    @java.lang.Override
    public com.google.cloud.kms.v1.ProtectionLevel getProtectionLevel() {
      com.google.cloud.kms.v1.ProtectionLevel result =
          com.google.cloud.kms.v1.ProtectionLevel.forNumber(protectionLevel_);
      return result == null ? com.google.cloud.kms.v1.ProtectionLevel.UNRECOGNIZED : result;
    }
    /**
     *
     *
     * <pre>
     * Required. Immutable. The protection level of the
     * [ImportJob][google.cloud.kms.v1.ImportJob]. This must match the
     * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]
     * of the [version_template][google.cloud.kms.v1.CryptoKey.version_template]
     * on the [CryptoKey][google.cloud.kms.v1.CryptoKey] you attempt to import
     * into.
     * </pre>
     *
     * <code>
     * .google.cloud.kms.v1.ProtectionLevel protection_level = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
     * </code>
     *
     * @param value The protectionLevel to set.
     * @return This builder for chaining.
     */
    public Builder setProtectionLevel(com.google.cloud.kms.v1.ProtectionLevel value) {
      if (value == null) {
        throw new NullPointerException();
      }
      bitField0_ |= 0x00000004;
      protectionLevel_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. Immutable. The protection level of the
     * [ImportJob][google.cloud.kms.v1.ImportJob]. This must match the
     * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]
     * of the [version_template][google.cloud.kms.v1.CryptoKey.version_template]
     * on the [CryptoKey][google.cloud.kms.v1.CryptoKey] you attempt to import
     * into.
     * </pre>
     *
     * <code>
     * .google.cloud.kms.v1.ProtectionLevel protection_level = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
     * </code>
     *
     * @return This builder for chaining.
     */
    public Builder clearProtectionLevel() {
      bitField0_ = (bitField0_ & ~0x00000004);
      protectionLevel_ = 0;
      onChanged();
      return this;
    }

    private com.google.protobuf.Timestamp createTime_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        createTimeBuilder_;
    /**
     *
     *
     * <pre>
     * Output only. The time at which this
     * [ImportJob][google.cloud.kms.v1.ImportJob] was created.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return Whether the createTime field is set.
     */
    public boolean hasCreateTime() {
      return ((bitField0_ & 0x00000008) != 0);
    }
    /**
     *
     *
     * <pre>
     * Output only. The time at which this
     * [ImportJob][google.cloud.kms.v1.ImportJob] was created.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return The createTime.
     */
    public com.google.protobuf.Timestamp getCreateTime() {
      if (createTimeBuilder_ == null) {
        return createTime_ == null
            ? com.google.protobuf.Timestamp.getDefaultInstance()
            : createTime_;
      } else {
        return createTimeBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. The time at which this
     * [ImportJob][google.cloud.kms.v1.ImportJob] was created.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder setCreateTime(com.google.protobuf.Timestamp value) {
      if (createTimeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        createTime_ = value;
      } else {
        createTimeBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The time at which this
     * [ImportJob][google.cloud.kms.v1.ImportJob] was created.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) {
      if (createTimeBuilder_ == null) {
        createTime_ = builderForValue.build();
      } else {
        createTimeBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The time at which this
     * [ImportJob][google.cloud.kms.v1.ImportJob] was created.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder mergeCreateTime(com.google.protobuf.Timestamp value) {
      if (createTimeBuilder_ == null) {
        if (((bitField0_ & 0x00000008) != 0)
            && createTime_ != null
            && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
          getCreateTimeBuilder().mergeFrom(value);
        } else {
          createTime_ = value;
        }
      } else {
        createTimeBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The time at which this
     * [ImportJob][google.cloud.kms.v1.ImportJob] was created.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder clearCreateTime() {
      bitField0_ = (bitField0_ & ~0x00000008);
      createTime_ = null;
      if (createTimeBuilder_ != null) {
        createTimeBuilder_.dispose();
        createTimeBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The time at which this
     * [ImportJob][google.cloud.kms.v1.ImportJob] was created.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() {
      bitField0_ |= 0x00000008;
      onChanged();
      return getCreateTimeFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Output only. The time at which this
     * [ImportJob][google.cloud.kms.v1.ImportJob] was created.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() {
      if (createTimeBuilder_ != null) {
        return createTimeBuilder_.getMessageOrBuilder();
      } else {
        return createTime_ == null
            ? com.google.protobuf.Timestamp.getDefaultInstance()
            : createTime_;
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. The time at which this
     * [ImportJob][google.cloud.kms.v1.ImportJob] was created.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        getCreateTimeFieldBuilder() {
      if (createTimeBuilder_ == null) {
        createTimeBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.protobuf.Timestamp,
                com.google.protobuf.Timestamp.Builder,
                com.google.protobuf.TimestampOrBuilder>(
                getCreateTime(), getParentForChildren(), isClean());
        createTime_ = null;
      }
      return createTimeBuilder_;
    }

    private com.google.protobuf.Timestamp generateTime_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        generateTimeBuilder_;
    /**
     *
     *
     * <pre>
     * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]'s key
     * material was generated.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp generate_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return Whether the generateTime field is set.
     */
    public boolean hasGenerateTime() {
      return ((bitField0_ & 0x00000010) != 0);
    }
    /**
     *
     *
     * <pre>
     * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]'s key
     * material was generated.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp generate_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return The generateTime.
     */
    public com.google.protobuf.Timestamp getGenerateTime() {
      if (generateTimeBuilder_ == null) {
        return generateTime_ == null
            ? com.google.protobuf.Timestamp.getDefaultInstance()
            : generateTime_;
      } else {
        return generateTimeBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]'s key
     * material was generated.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp generate_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder setGenerateTime(com.google.protobuf.Timestamp value) {
      if (generateTimeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        generateTime_ = value;
      } else {
        generateTimeBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]'s key
     * material was generated.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp generate_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder setGenerateTime(com.google.protobuf.Timestamp.Builder builderForValue) {
      if (generateTimeBuilder_ == null) {
        generateTime_ = builderForValue.build();
      } else {
        generateTimeBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]'s key
     * material was generated.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp generate_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder mergeGenerateTime(com.google.protobuf.Timestamp value) {
      if (generateTimeBuilder_ == null) {
        if (((bitField0_ & 0x00000010) != 0)
            && generateTime_ != null
            && generateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
          getGenerateTimeBuilder().mergeFrom(value);
        } else {
          generateTime_ = value;
        }
      } else {
        generateTimeBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]'s key
     * material was generated.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp generate_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder clearGenerateTime() {
      bitField0_ = (bitField0_ & ~0x00000010);
      generateTime_ = null;
      if (generateTimeBuilder_ != null) {
        generateTimeBuilder_.dispose();
        generateTimeBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]'s key
     * material was generated.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp generate_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.protobuf.Timestamp.Builder getGenerateTimeBuilder() {
      bitField0_ |= 0x00000010;
      onChanged();
      return getGenerateTimeFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]'s key
     * material was generated.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp generate_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.protobuf.TimestampOrBuilder getGenerateTimeOrBuilder() {
      if (generateTimeBuilder_ != null) {
        return generateTimeBuilder_.getMessageOrBuilder();
      } else {
        return generateTime_ == null
            ? com.google.protobuf.Timestamp.getDefaultInstance()
            : generateTime_;
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]'s key
     * material was generated.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp generate_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        getGenerateTimeFieldBuilder() {
      if (generateTimeBuilder_ == null) {
        generateTimeBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.protobuf.Timestamp,
                com.google.protobuf.Timestamp.Builder,
                com.google.protobuf.TimestampOrBuilder>(
                getGenerateTime(), getParentForChildren(), isClean());
        generateTime_ = null;
      }
      return generateTimeBuilder_;
    }

    private com.google.protobuf.Timestamp expireTime_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        expireTimeBuilder_;
    /**
     *
     *
     * <pre>
     * Output only. The time at which this
     * [ImportJob][google.cloud.kms.v1.ImportJob] is scheduled for expiration and
     * can no longer be used to import key material.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return Whether the expireTime field is set.
     */
    public boolean hasExpireTime() {
      return ((bitField0_ & 0x00000020) != 0);
    }
    /**
     *
     *
     * <pre>
     * Output only. The time at which this
     * [ImportJob][google.cloud.kms.v1.ImportJob] is scheduled for expiration and
     * can no longer be used to import key material.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return The expireTime.
     */
    public com.google.protobuf.Timestamp getExpireTime() {
      if (expireTimeBuilder_ == null) {
        return expireTime_ == null
            ? com.google.protobuf.Timestamp.getDefaultInstance()
            : expireTime_;
      } else {
        return expireTimeBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. The time at which this
     * [ImportJob][google.cloud.kms.v1.ImportJob] is scheduled for expiration and
     * can no longer be used to import key material.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder setExpireTime(com.google.protobuf.Timestamp value) {
      if (expireTimeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        expireTime_ = value;
      } else {
        expireTimeBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000020;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The time at which this
     * [ImportJob][google.cloud.kms.v1.ImportJob] is scheduled for expiration and
     * can no longer be used to import key material.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder setExpireTime(com.google.protobuf.Timestamp.Builder builderForValue) {
      if (expireTimeBuilder_ == null) {
        expireTime_ = builderForValue.build();
      } else {
        expireTimeBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000020;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The time at which this
     * [ImportJob][google.cloud.kms.v1.ImportJob] is scheduled for expiration and
     * can no longer be used to import key material.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder mergeExpireTime(com.google.protobuf.Timestamp value) {
      if (expireTimeBuilder_ == null) {
        if (((bitField0_ & 0x00000020) != 0)
            && expireTime_ != null
            && expireTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
          getExpireTimeBuilder().mergeFrom(value);
        } else {
          expireTime_ = value;
        }
      } else {
        expireTimeBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000020;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The time at which this
     * [ImportJob][google.cloud.kms.v1.ImportJob] is scheduled for expiration and
     * can no longer be used to import key material.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder clearExpireTime() {
      bitField0_ = (bitField0_ & ~0x00000020);
      expireTime_ = null;
      if (expireTimeBuilder_ != null) {
        expireTimeBuilder_.dispose();
        expireTimeBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The time at which this
     * [ImportJob][google.cloud.kms.v1.ImportJob] is scheduled for expiration and
     * can no longer be used to import key material.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.protobuf.Timestamp.Builder getExpireTimeBuilder() {
      bitField0_ |= 0x00000020;
      onChanged();
      return getExpireTimeFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Output only. The time at which this
     * [ImportJob][google.cloud.kms.v1.ImportJob] is scheduled for expiration and
     * can no longer be used to import key material.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() {
      if (expireTimeBuilder_ != null) {
        return expireTimeBuilder_.getMessageOrBuilder();
      } else {
        return expireTime_ == null
            ? com.google.protobuf.Timestamp.getDefaultInstance()
            : expireTime_;
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. The time at which this
     * [ImportJob][google.cloud.kms.v1.ImportJob] is scheduled for expiration and
     * can no longer be used to import key material.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        getExpireTimeFieldBuilder() {
      if (expireTimeBuilder_ == null) {
        expireTimeBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.protobuf.Timestamp,
                com.google.protobuf.Timestamp.Builder,
                com.google.protobuf.TimestampOrBuilder>(
                getExpireTime(), getParentForChildren(), isClean());
        expireTime_ = null;
      }
      return expireTimeBuilder_;
    }

    private com.google.protobuf.Timestamp expireEventTime_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        expireEventTimeBuilder_;
    /**
     *
     *
     * <pre>
     * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]
     * expired. Only present if [state][google.cloud.kms.v1.ImportJob.state] is
     * [EXPIRED][google.cloud.kms.v1.ImportJob.ImportJobState.EXPIRED].
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp expire_event_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return Whether the expireEventTime field is set.
     */
    public boolean hasExpireEventTime() {
      return ((bitField0_ & 0x00000040) != 0);
    }
    /**
     *
     *
     * <pre>
     * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]
     * expired. Only present if [state][google.cloud.kms.v1.ImportJob.state] is
     * [EXPIRED][google.cloud.kms.v1.ImportJob.ImportJobState.EXPIRED].
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp expire_event_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return The expireEventTime.
     */
    public com.google.protobuf.Timestamp getExpireEventTime() {
      if (expireEventTimeBuilder_ == null) {
        return expireEventTime_ == null
            ? com.google.protobuf.Timestamp.getDefaultInstance()
            : expireEventTime_;
      } else {
        return expireEventTimeBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]
     * expired. Only present if [state][google.cloud.kms.v1.ImportJob.state] is
     * [EXPIRED][google.cloud.kms.v1.ImportJob.ImportJobState.EXPIRED].
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp expire_event_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder setExpireEventTime(com.google.protobuf.Timestamp value) {
      if (expireEventTimeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        expireEventTime_ = value;
      } else {
        expireEventTimeBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000040;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]
     * expired. Only present if [state][google.cloud.kms.v1.ImportJob.state] is
     * [EXPIRED][google.cloud.kms.v1.ImportJob.ImportJobState.EXPIRED].
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp expire_event_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder setExpireEventTime(com.google.protobuf.Timestamp.Builder builderForValue) {
      if (expireEventTimeBuilder_ == null) {
        expireEventTime_ = builderForValue.build();
      } else {
        expireEventTimeBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000040;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]
     * expired. Only present if [state][google.cloud.kms.v1.ImportJob.state] is
     * [EXPIRED][google.cloud.kms.v1.ImportJob.ImportJobState.EXPIRED].
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp expire_event_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder mergeExpireEventTime(com.google.protobuf.Timestamp value) {
      if (expireEventTimeBuilder_ == null) {
        if (((bitField0_ & 0x00000040) != 0)
            && expireEventTime_ != null
            && expireEventTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
          getExpireEventTimeBuilder().mergeFrom(value);
        } else {
          expireEventTime_ = value;
        }
      } else {
        expireEventTimeBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000040;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]
     * expired. Only present if [state][google.cloud.kms.v1.ImportJob.state] is
     * [EXPIRED][google.cloud.kms.v1.ImportJob.ImportJobState.EXPIRED].
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp expire_event_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder clearExpireEventTime() {
      bitField0_ = (bitField0_ & ~0x00000040);
      expireEventTime_ = null;
      if (expireEventTimeBuilder_ != null) {
        expireEventTimeBuilder_.dispose();
        expireEventTimeBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]
     * expired. Only present if [state][google.cloud.kms.v1.ImportJob.state] is
     * [EXPIRED][google.cloud.kms.v1.ImportJob.ImportJobState.EXPIRED].
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp expire_event_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.protobuf.Timestamp.Builder getExpireEventTimeBuilder() {
      bitField0_ |= 0x00000040;
      onChanged();
      return getExpireEventTimeFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]
     * expired. Only present if [state][google.cloud.kms.v1.ImportJob.state] is
     * [EXPIRED][google.cloud.kms.v1.ImportJob.ImportJobState.EXPIRED].
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp expire_event_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.protobuf.TimestampOrBuilder getExpireEventTimeOrBuilder() {
      if (expireEventTimeBuilder_ != null) {
        return expireEventTimeBuilder_.getMessageOrBuilder();
      } else {
        return expireEventTime_ == null
            ? com.google.protobuf.Timestamp.getDefaultInstance()
            : expireEventTime_;
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]
     * expired. Only present if [state][google.cloud.kms.v1.ImportJob.state] is
     * [EXPIRED][google.cloud.kms.v1.ImportJob.ImportJobState.EXPIRED].
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp expire_event_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        getExpireEventTimeFieldBuilder() {
      if (expireEventTimeBuilder_ == null) {
        expireEventTimeBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.protobuf.Timestamp,
                com.google.protobuf.Timestamp.Builder,
                com.google.protobuf.TimestampOrBuilder>(
                getExpireEventTime(), getParentForChildren(), isClean());
        expireEventTime_ = null;
      }
      return expireEventTimeBuilder_;
    }

    private int state_ = 0;
    /**
     *
     *
     * <pre>
     * Output only. The current state of the
     * [ImportJob][google.cloud.kms.v1.ImportJob], indicating if it can be used.
     * </pre>
     *
     * <code>
     * .google.cloud.kms.v1.ImportJob.ImportJobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return The enum numeric value on the wire for state.
     */
    @java.lang.Override
    public int getStateValue() {
      return state_;
    }
    /**
     *
     *
     * <pre>
     * Output only. The current state of the
     * [ImportJob][google.cloud.kms.v1.ImportJob], indicating if it can be used.
     * </pre>
     *
     * <code>
     * .google.cloud.kms.v1.ImportJob.ImportJobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @param value The enum numeric value on the wire for state to set.
     * @return This builder for chaining.
     */
    public Builder setStateValue(int value) {
      state_ = value;
      bitField0_ |= 0x00000080;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The current state of the
     * [ImportJob][google.cloud.kms.v1.ImportJob], indicating if it can be used.
     * </pre>
     *
     * <code>
     * .google.cloud.kms.v1.ImportJob.ImportJobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return The state.
     */
    @java.lang.Override
    public com.google.cloud.kms.v1.ImportJob.ImportJobState getState() {
      com.google.cloud.kms.v1.ImportJob.ImportJobState result =
          com.google.cloud.kms.v1.ImportJob.ImportJobState.forNumber(state_);
      return result == null
          ? com.google.cloud.kms.v1.ImportJob.ImportJobState.UNRECOGNIZED
          : result;
    }
    /**
     *
     *
     * <pre>
     * Output only. The current state of the
     * [ImportJob][google.cloud.kms.v1.ImportJob], indicating if it can be used.
     * </pre>
     *
     * <code>
     * .google.cloud.kms.v1.ImportJob.ImportJobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @param value The state to set.
     * @return This builder for chaining.
     */
    public Builder setState(com.google.cloud.kms.v1.ImportJob.ImportJobState value) {
      if (value == null) {
        throw new NullPointerException();
      }
      bitField0_ |= 0x00000080;
      state_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The current state of the
     * [ImportJob][google.cloud.kms.v1.ImportJob], indicating if it can be used.
     * </pre>
     *
     * <code>
     * .google.cloud.kms.v1.ImportJob.ImportJobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return This builder for chaining.
     */
    public Builder clearState() {
      bitField0_ = (bitField0_ & ~0x00000080);
      state_ = 0;
      onChanged();
      return this;
    }

    private com.google.cloud.kms.v1.ImportJob.WrappingPublicKey publicKey_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.kms.v1.ImportJob.WrappingPublicKey,
            com.google.cloud.kms.v1.ImportJob.WrappingPublicKey.Builder,
            com.google.cloud.kms.v1.ImportJob.WrappingPublicKeyOrBuilder>
        publicKeyBuilder_;
    /**
     *
     *
     * <pre>
     * Output only. The public key with which to wrap key material prior to
     * import. Only returned if [state][google.cloud.kms.v1.ImportJob.state] is
     * [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE].
     * </pre>
     *
     * <code>
     * .google.cloud.kms.v1.ImportJob.WrappingPublicKey public_key = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return Whether the publicKey field is set.
     */
    public boolean hasPublicKey() {
      return ((bitField0_ & 0x00000100) != 0);
    }
    /**
     *
     *
     * <pre>
     * Output only. The public key with which to wrap key material prior to
     * import. Only returned if [state][google.cloud.kms.v1.ImportJob.state] is
     * [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE].
     * </pre>
     *
     * <code>
     * .google.cloud.kms.v1.ImportJob.WrappingPublicKey public_key = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return The publicKey.
     */
    public com.google.cloud.kms.v1.ImportJob.WrappingPublicKey getPublicKey() {
      if (publicKeyBuilder_ == null) {
        return publicKey_ == null
            ? com.google.cloud.kms.v1.ImportJob.WrappingPublicKey.getDefaultInstance()
            : publicKey_;
      } else {
        return publicKeyBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. The public key with which to wrap key material prior to
     * import. Only returned if [state][google.cloud.kms.v1.ImportJob.state] is
     * [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE].
     * </pre>
     *
     * <code>
     * .google.cloud.kms.v1.ImportJob.WrappingPublicKey public_key = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder setPublicKey(com.google.cloud.kms.v1.ImportJob.WrappingPublicKey value) {
      if (publicKeyBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        publicKey_ = value;
      } else {
        publicKeyBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000100;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The public key with which to wrap key material prior to
     * import. Only returned if [state][google.cloud.kms.v1.ImportJob.state] is
     * [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE].
     * </pre>
     *
     * <code>
     * .google.cloud.kms.v1.ImportJob.WrappingPublicKey public_key = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder setPublicKey(
        com.google.cloud.kms.v1.ImportJob.WrappingPublicKey.Builder builderForValue) {
      if (publicKeyBuilder_ == null) {
        publicKey_ = builderForValue.build();
      } else {
        publicKeyBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000100;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The public key with which to wrap key material prior to
     * import. Only returned if [state][google.cloud.kms.v1.ImportJob.state] is
     * [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE].
     * </pre>
     *
     * <code>
     * .google.cloud.kms.v1.ImportJob.WrappingPublicKey public_key = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder mergePublicKey(com.google.cloud.kms.v1.ImportJob.WrappingPublicKey value) {
      if (publicKeyBuilder_ == null) {
        if (((bitField0_ & 0x00000100) != 0)
            && publicKey_ != null
            && publicKey_
                != com.google.cloud.kms.v1.ImportJob.WrappingPublicKey.getDefaultInstance()) {
          getPublicKeyBuilder().mergeFrom(value);
        } else {
          publicKey_ = value;
        }
      } else {
        publicKeyBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000100;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The public key with which to wrap key material prior to
     * import. Only returned if [state][google.cloud.kms.v1.ImportJob.state] is
     * [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE].
     * </pre>
     *
     * <code>
     * .google.cloud.kms.v1.ImportJob.WrappingPublicKey public_key = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder clearPublicKey() {
      bitField0_ = (bitField0_ & ~0x00000100);
      publicKey_ = null;
      if (publicKeyBuilder_ != null) {
        publicKeyBuilder_.dispose();
        publicKeyBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The public key with which to wrap key material prior to
     * import. Only returned if [state][google.cloud.kms.v1.ImportJob.state] is
     * [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE].
     * </pre>
     *
     * <code>
     * .google.cloud.kms.v1.ImportJob.WrappingPublicKey public_key = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.cloud.kms.v1.ImportJob.WrappingPublicKey.Builder getPublicKeyBuilder() {
      bitField0_ |= 0x00000100;
      onChanged();
      return getPublicKeyFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Output only. The public key with which to wrap key material prior to
     * import. Only returned if [state][google.cloud.kms.v1.ImportJob.state] is
     * [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE].
     * </pre>
     *
     * <code>
     * .google.cloud.kms.v1.ImportJob.WrappingPublicKey public_key = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.cloud.kms.v1.ImportJob.WrappingPublicKeyOrBuilder getPublicKeyOrBuilder() {
      if (publicKeyBuilder_ != null) {
        return publicKeyBuilder_.getMessageOrBuilder();
      } else {
        return publicKey_ == null
            ? com.google.cloud.kms.v1.ImportJob.WrappingPublicKey.getDefaultInstance()
            : publicKey_;
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. The public key with which to wrap key material prior to
     * import. Only returned if [state][google.cloud.kms.v1.ImportJob.state] is
     * [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE].
     * </pre>
     *
     * <code>
     * .google.cloud.kms.v1.ImportJob.WrappingPublicKey public_key = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.kms.v1.ImportJob.WrappingPublicKey,
            com.google.cloud.kms.v1.ImportJob.WrappingPublicKey.Builder,
            com.google.cloud.kms.v1.ImportJob.WrappingPublicKeyOrBuilder>
        getPublicKeyFieldBuilder() {
      if (publicKeyBuilder_ == null) {
        publicKeyBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.cloud.kms.v1.ImportJob.WrappingPublicKey,
                com.google.cloud.kms.v1.ImportJob.WrappingPublicKey.Builder,
                com.google.cloud.kms.v1.ImportJob.WrappingPublicKeyOrBuilder>(
                getPublicKey(), getParentForChildren(), isClean());
        publicKey_ = null;
      }
      return publicKeyBuilder_;
    }

    private com.google.cloud.kms.v1.KeyOperationAttestation attestation_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.kms.v1.KeyOperationAttestation,
            com.google.cloud.kms.v1.KeyOperationAttestation.Builder,
            com.google.cloud.kms.v1.KeyOperationAttestationOrBuilder>
        attestationBuilder_;
    /**
     *
     *
     * <pre>
     * Output only. Statement that was generated and signed by the key creator
     * (for example, an HSM) at key creation time. Use this statement to verify
     * attributes of the key as stored on the HSM, independently of Google.
     * Only present if the chosen
     * [ImportMethod][google.cloud.kms.v1.ImportJob.ImportMethod] is one with a
     * protection level of [HSM][google.cloud.kms.v1.ProtectionLevel.HSM].
     * </pre>
     *
     * <code>
     * .google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return Whether the attestation field is set.
     */
    public boolean hasAttestation() {
      return ((bitField0_ & 0x00000200) != 0);
    }
    /**
     *
     *
     * <pre>
     * Output only. Statement that was generated and signed by the key creator
     * (for example, an HSM) at key creation time. Use this statement to verify
     * attributes of the key as stored on the HSM, independently of Google.
     * Only present if the chosen
     * [ImportMethod][google.cloud.kms.v1.ImportJob.ImportMethod] is one with a
     * protection level of [HSM][google.cloud.kms.v1.ProtectionLevel.HSM].
     * </pre>
     *
     * <code>
     * .google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return The attestation.
     */
    public com.google.cloud.kms.v1.KeyOperationAttestation getAttestation() {
      if (attestationBuilder_ == null) {
        return attestation_ == null
            ? com.google.cloud.kms.v1.KeyOperationAttestation.getDefaultInstance()
            : attestation_;
      } else {
        return attestationBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. Statement that was generated and signed by the key creator
     * (for example, an HSM) at key creation time. Use this statement to verify
     * attributes of the key as stored on the HSM, independently of Google.
     * Only present if the chosen
     * [ImportMethod][google.cloud.kms.v1.ImportJob.ImportMethod] is one with a
     * protection level of [HSM][google.cloud.kms.v1.ProtectionLevel.HSM].
     * </pre>
     *
     * <code>
     * .google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder setAttestation(com.google.cloud.kms.v1.KeyOperationAttestation value) {
      if (attestationBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        attestation_ = value;
      } else {
        attestationBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000200;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. Statement that was generated and signed by the key creator
     * (for example, an HSM) at key creation time. Use this statement to verify
     * attributes of the key as stored on the HSM, independently of Google.
     * Only present if the chosen
     * [ImportMethod][google.cloud.kms.v1.ImportJob.ImportMethod] is one with a
     * protection level of [HSM][google.cloud.kms.v1.ProtectionLevel.HSM].
     * </pre>
     *
     * <code>
     * .google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder setAttestation(
        com.google.cloud.kms.v1.KeyOperationAttestation.Builder builderForValue) {
      if (attestationBuilder_ == null) {
        attestation_ = builderForValue.build();
      } else {
        attestationBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000200;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. Statement that was generated and signed by the key creator
     * (for example, an HSM) at key creation time. Use this statement to verify
     * attributes of the key as stored on the HSM, independently of Google.
     * Only present if the chosen
     * [ImportMethod][google.cloud.kms.v1.ImportJob.ImportMethod] is one with a
     * protection level of [HSM][google.cloud.kms.v1.ProtectionLevel.HSM].
     * </pre>
     *
     * <code>
     * .google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder mergeAttestation(com.google.cloud.kms.v1.KeyOperationAttestation value) {
      if (attestationBuilder_ == null) {
        if (((bitField0_ & 0x00000200) != 0)
            && attestation_ != null
            && attestation_
                != com.google.cloud.kms.v1.KeyOperationAttestation.getDefaultInstance()) {
          getAttestationBuilder().mergeFrom(value);
        } else {
          attestation_ = value;
        }
      } else {
        attestationBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000200;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. Statement that was generated and signed by the key creator
     * (for example, an HSM) at key creation time. Use this statement to verify
     * attributes of the key as stored on the HSM, independently of Google.
     * Only present if the chosen
     * [ImportMethod][google.cloud.kms.v1.ImportJob.ImportMethod] is one with a
     * protection level of [HSM][google.cloud.kms.v1.ProtectionLevel.HSM].
     * </pre>
     *
     * <code>
     * .google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder clearAttestation() {
      bitField0_ = (bitField0_ & ~0x00000200);
      attestation_ = null;
      if (attestationBuilder_ != null) {
        attestationBuilder_.dispose();
        attestationBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. Statement that was generated and signed by the key creator
     * (for example, an HSM) at key creation time. Use this statement to verify
     * attributes of the key as stored on the HSM, independently of Google.
     * Only present if the chosen
     * [ImportMethod][google.cloud.kms.v1.ImportJob.ImportMethod] is one with a
     * protection level of [HSM][google.cloud.kms.v1.ProtectionLevel.HSM].
     * </pre>
     *
     * <code>
     * .google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.cloud.kms.v1.KeyOperationAttestation.Builder getAttestationBuilder() {
      bitField0_ |= 0x00000200;
      onChanged();
      return getAttestationFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Output only. Statement that was generated and signed by the key creator
     * (for example, an HSM) at key creation time. Use this statement to verify
     * attributes of the key as stored on the HSM, independently of Google.
     * Only present if the chosen
     * [ImportMethod][google.cloud.kms.v1.ImportJob.ImportMethod] is one with a
     * protection level of [HSM][google.cloud.kms.v1.ProtectionLevel.HSM].
     * </pre>
     *
     * <code>
     * .google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.cloud.kms.v1.KeyOperationAttestationOrBuilder getAttestationOrBuilder() {
      if (attestationBuilder_ != null) {
        return attestationBuilder_.getMessageOrBuilder();
      } else {
        return attestation_ == null
            ? com.google.cloud.kms.v1.KeyOperationAttestation.getDefaultInstance()
            : attestation_;
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. Statement that was generated and signed by the key creator
     * (for example, an HSM) at key creation time. Use this statement to verify
     * attributes of the key as stored on the HSM, independently of Google.
     * Only present if the chosen
     * [ImportMethod][google.cloud.kms.v1.ImportJob.ImportMethod] is one with a
     * protection level of [HSM][google.cloud.kms.v1.ProtectionLevel.HSM].
     * </pre>
     *
     * <code>
     * .google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.kms.v1.KeyOperationAttestation,
            com.google.cloud.kms.v1.KeyOperationAttestation.Builder,
            com.google.cloud.kms.v1.KeyOperationAttestationOrBuilder>
        getAttestationFieldBuilder() {
      if (attestationBuilder_ == null) {
        attestationBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.cloud.kms.v1.KeyOperationAttestation,
                com.google.cloud.kms.v1.KeyOperationAttestation.Builder,
                com.google.cloud.kms.v1.KeyOperationAttestationOrBuilder>(
                getAttestation(), getParentForChildren(), isClean());
        attestation_ = null;
      }
      return attestationBuilder_;
    }

    @java.lang.Override
    public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFields(unknownFields);
    }

    @java.lang.Override
    public final Builder mergeUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.mergeUnknownFields(unknownFields);
    }

    // @@protoc_insertion_point(builder_scope:google.cloud.kms.v1.ImportJob)
  }

  // @@protoc_insertion_point(class_scope:google.cloud.kms.v1.ImportJob)
  private static final com.google.cloud.kms.v1.ImportJob DEFAULT_INSTANCE;

  static {
    DEFAULT_INSTANCE = new com.google.cloud.kms.v1.ImportJob();
  }

  public static com.google.cloud.kms.v1.ImportJob getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<ImportJob> PARSER =
      new com.google.protobuf.AbstractParser<ImportJob>() {
        @java.lang.Override
        public ImportJob parsePartialFrom(
            com.google.protobuf.CodedInputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws com.google.protobuf.InvalidProtocolBufferException {
          Builder builder = newBuilder();
          try {
            builder.mergeFrom(input, extensionRegistry);
          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
            throw e.setUnfinishedMessage(builder.buildPartial());
          } catch (com.google.protobuf.UninitializedMessageException e) {
            throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
          } catch (java.io.IOException e) {
            throw new com.google.protobuf.InvalidProtocolBufferException(e)
                .setUnfinishedMessage(builder.buildPartial());
          }
          return builder.buildPartial();
        }
      };

  public static com.google.protobuf.Parser<ImportJob> parser() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.protobuf.Parser<ImportJob> getParserForType() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.cloud.kms.v1.ImportJob getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }
}
