/*
 * Copyright 2023 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/security/privateca/v1/resources.proto

package com.google.cloud.security.privateca.v1;

/**
 *
 *
 * <pre>
 * A
 * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
 * represents an individual Certificate Authority. A
 * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
 * can be used to create
 * [Certificates][google.cloud.security.privateca.v1.Certificate].
 * </pre>
 *
 * Protobuf type {@code google.cloud.security.privateca.v1.CertificateAuthority}
 */
public final class CertificateAuthority extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1.CertificateAuthority)
    CertificateAuthorityOrBuilder {
  private static final long serialVersionUID = 0L;
  // Use CertificateAuthority.newBuilder() to construct.
  private CertificateAuthority(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }

  private CertificateAuthority() {
    name_ = "";
    type_ = 0;
    tier_ = 0;
    state_ = 0;
    pemCaCertificates_ = com.google.protobuf.LazyStringArrayList.emptyList();
    caCertificateDescriptions_ = java.util.Collections.emptyList();
    gcsBucket_ = "";
  }

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

  public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    return com.google.cloud.security.privateca.v1.PrivateCaResourcesProto
        .internal_static_google_cloud_security_privateca_v1_CertificateAuthority_descriptor;
  }

  @SuppressWarnings({"rawtypes"})
  @java.lang.Override
  protected com.google.protobuf.MapField internalGetMapField(int number) {
    switch (number) {
      case 17:
        return internalGetLabels();
      default:
        throw new RuntimeException("Invalid map field number: " + number);
    }
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.cloud.security.privateca.v1.PrivateCaResourcesProto
        .internal_static_google_cloud_security_privateca_v1_CertificateAuthority_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.cloud.security.privateca.v1.CertificateAuthority.class,
            com.google.cloud.security.privateca.v1.CertificateAuthority.Builder.class);
  }

  /**
   *
   *
   * <pre>
   * The type of a
   * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority],
   * indicating its issuing chain.
   * </pre>
   *
   * Protobuf enum {@code google.cloud.security.privateca.v1.CertificateAuthority.Type}
   */
  public enum Type implements com.google.protobuf.ProtocolMessageEnum {
    /**
     *
     *
     * <pre>
     * Not specified.
     * </pre>
     *
     * <code>TYPE_UNSPECIFIED = 0;</code>
     */
    TYPE_UNSPECIFIED(0),
    /**
     *
     *
     * <pre>
     * Self-signed CA.
     * </pre>
     *
     * <code>SELF_SIGNED = 1;</code>
     */
    SELF_SIGNED(1),
    /**
     *
     *
     * <pre>
     * Subordinate CA. Could be issued by a Private CA
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * or an unmanaged CA.
     * </pre>
     *
     * <code>SUBORDINATE = 2;</code>
     */
    SUBORDINATE(2),
    UNRECOGNIZED(-1),
    ;

    /**
     *
     *
     * <pre>
     * Not specified.
     * </pre>
     *
     * <code>TYPE_UNSPECIFIED = 0;</code>
     */
    public static final int TYPE_UNSPECIFIED_VALUE = 0;
    /**
     *
     *
     * <pre>
     * Self-signed CA.
     * </pre>
     *
     * <code>SELF_SIGNED = 1;</code>
     */
    public static final int SELF_SIGNED_VALUE = 1;
    /**
     *
     *
     * <pre>
     * Subordinate CA. Could be issued by a Private CA
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * or an unmanaged CA.
     * </pre>
     *
     * <code>SUBORDINATE = 2;</code>
     */
    public static final int SUBORDINATE_VALUE = 2;

    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 Type 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 Type forNumber(int value) {
      switch (value) {
        case 0:
          return TYPE_UNSPECIFIED;
        case 1:
          return SELF_SIGNED;
        case 2:
          return SUBORDINATE;
        default:
          return null;
      }
    }

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

    private static final com.google.protobuf.Internal.EnumLiteMap<Type> internalValueMap =
        new com.google.protobuf.Internal.EnumLiteMap<Type>() {
          public Type findValueByNumber(int number) {
            return Type.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.security.privateca.v1.CertificateAuthority.getDescriptor()
          .getEnumTypes()
          .get(0);
    }

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

    public static Type 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 Type(int value) {
      this.value = value;
    }

    // @@protoc_insertion_point(enum_scope:google.cloud.security.privateca.v1.CertificateAuthority.Type)
  }

  /**
   *
   *
   * <pre>
   * The state of a
   * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority],
   * indicating if it can be used.
   * </pre>
   *
   * Protobuf enum {@code google.cloud.security.privateca.v1.CertificateAuthority.State}
   */
  public enum State implements com.google.protobuf.ProtocolMessageEnum {
    /**
     *
     *
     * <pre>
     * Not specified.
     * </pre>
     *
     * <code>STATE_UNSPECIFIED = 0;</code>
     */
    STATE_UNSPECIFIED(0),
    /**
     *
     *
     * <pre>
     * Certificates can be issued from this CA. CRLs will be generated for this
     * CA. The CA will be part of the
     * [CaPool][google.cloud.security.privateca.v1.CaPool]'s trust anchor, and
     * will be used to issue certificates from the
     * [CaPool][google.cloud.security.privateca.v1.CaPool].
     * </pre>
     *
     * <code>ENABLED = 1;</code>
     */
    ENABLED(1),
    /**
     *
     *
     * <pre>
     * Certificates cannot be issued from this CA. CRLs will still be generated.
     * The CA will be part of the
     * [CaPool][google.cloud.security.privateca.v1.CaPool]'s trust anchor, but
     * will not be used to issue certificates from the
     * [CaPool][google.cloud.security.privateca.v1.CaPool].
     * </pre>
     *
     * <code>DISABLED = 2;</code>
     */
    DISABLED(2),
    /**
     *
     *
     * <pre>
     * Certificates can be issued from this CA. CRLs will be generated for this
     * CA. The CA will be part of the
     * [CaPool][google.cloud.security.privateca.v1.CaPool]'s trust anchor, but
     * will not be used to issue certificates from the
     * [CaPool][google.cloud.security.privateca.v1.CaPool].
     * </pre>
     *
     * <code>STAGED = 3;</code>
     */
    STAGED(3),
    /**
     *
     *
     * <pre>
     * Certificates cannot be issued from this CA. CRLs will not be generated.
     * The CA will not be part of the
     * [CaPool][google.cloud.security.privateca.v1.CaPool]'s trust anchor, and
     * will not be used to issue certificates from the
     * [CaPool][google.cloud.security.privateca.v1.CaPool].
     * </pre>
     *
     * <code>AWAITING_USER_ACTIVATION = 4;</code>
     */
    AWAITING_USER_ACTIVATION(4),
    /**
     *
     *
     * <pre>
     * Certificates cannot be issued from this CA. CRLs will not be generated.
     * The CA may still be recovered by calling
     * [CertificateAuthorityService.UndeleteCertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthorityService.UndeleteCertificateAuthority]
     * before
     * [expire_time][google.cloud.security.privateca.v1.CertificateAuthority.expire_time].
     * The CA will not be part of the
     * [CaPool][google.cloud.security.privateca.v1.CaPool]'s trust anchor, and
     * will not be used to issue certificates from the
     * [CaPool][google.cloud.security.privateca.v1.CaPool].
     * </pre>
     *
     * <code>DELETED = 5;</code>
     */
    DELETED(5),
    UNRECOGNIZED(-1),
    ;

    /**
     *
     *
     * <pre>
     * Not specified.
     * </pre>
     *
     * <code>STATE_UNSPECIFIED = 0;</code>
     */
    public static final int STATE_UNSPECIFIED_VALUE = 0;
    /**
     *
     *
     * <pre>
     * Certificates can be issued from this CA. CRLs will be generated for this
     * CA. The CA will be part of the
     * [CaPool][google.cloud.security.privateca.v1.CaPool]'s trust anchor, and
     * will be used to issue certificates from the
     * [CaPool][google.cloud.security.privateca.v1.CaPool].
     * </pre>
     *
     * <code>ENABLED = 1;</code>
     */
    public static final int ENABLED_VALUE = 1;
    /**
     *
     *
     * <pre>
     * Certificates cannot be issued from this CA. CRLs will still be generated.
     * The CA will be part of the
     * [CaPool][google.cloud.security.privateca.v1.CaPool]'s trust anchor, but
     * will not be used to issue certificates from the
     * [CaPool][google.cloud.security.privateca.v1.CaPool].
     * </pre>
     *
     * <code>DISABLED = 2;</code>
     */
    public static final int DISABLED_VALUE = 2;
    /**
     *
     *
     * <pre>
     * Certificates can be issued from this CA. CRLs will be generated for this
     * CA. The CA will be part of the
     * [CaPool][google.cloud.security.privateca.v1.CaPool]'s trust anchor, but
     * will not be used to issue certificates from the
     * [CaPool][google.cloud.security.privateca.v1.CaPool].
     * </pre>
     *
     * <code>STAGED = 3;</code>
     */
    public static final int STAGED_VALUE = 3;
    /**
     *
     *
     * <pre>
     * Certificates cannot be issued from this CA. CRLs will not be generated.
     * The CA will not be part of the
     * [CaPool][google.cloud.security.privateca.v1.CaPool]'s trust anchor, and
     * will not be used to issue certificates from the
     * [CaPool][google.cloud.security.privateca.v1.CaPool].
     * </pre>
     *
     * <code>AWAITING_USER_ACTIVATION = 4;</code>
     */
    public static final int AWAITING_USER_ACTIVATION_VALUE = 4;
    /**
     *
     *
     * <pre>
     * Certificates cannot be issued from this CA. CRLs will not be generated.
     * The CA may still be recovered by calling
     * [CertificateAuthorityService.UndeleteCertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthorityService.UndeleteCertificateAuthority]
     * before
     * [expire_time][google.cloud.security.privateca.v1.CertificateAuthority.expire_time].
     * The CA will not be part of the
     * [CaPool][google.cloud.security.privateca.v1.CaPool]'s trust anchor, and
     * will not be used to issue certificates from the
     * [CaPool][google.cloud.security.privateca.v1.CaPool].
     * </pre>
     *
     * <code>DELETED = 5;</code>
     */
    public static final int DELETED_VALUE = 5;

    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 State 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 State forNumber(int value) {
      switch (value) {
        case 0:
          return STATE_UNSPECIFIED;
        case 1:
          return ENABLED;
        case 2:
          return DISABLED;
        case 3:
          return STAGED;
        case 4:
          return AWAITING_USER_ACTIVATION;
        case 5:
          return DELETED;
        default:
          return null;
      }
    }

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

    private static final com.google.protobuf.Internal.EnumLiteMap<State> internalValueMap =
        new com.google.protobuf.Internal.EnumLiteMap<State>() {
          public State findValueByNumber(int number) {
            return State.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.security.privateca.v1.CertificateAuthority.getDescriptor()
          .getEnumTypes()
          .get(1);
    }

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

    public static State 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 State(int value) {
      this.value = value;
    }

    // @@protoc_insertion_point(enum_scope:google.cloud.security.privateca.v1.CertificateAuthority.State)
  }

  /**
   *
   *
   * <pre>
   * The algorithm of a Cloud KMS CryptoKeyVersion of a
   * [CryptoKey][google.cloud.kms.v1.CryptoKey] with the
   * [CryptoKeyPurpose][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose] value
   * `ASYMMETRIC_SIGN`. These values correspond to the
   * [CryptoKeyVersionAlgorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm]
   * values. For RSA signing algorithms, the PSS algorithms should be preferred,
   * use PKCS1 algorithms if required for compatibility. For further
   * recommendations, see
   * https://cloud.google.com/kms/docs/algorithms#algorithm_recommendations.
   * </pre>
   *
   * Protobuf enum {@code google.cloud.security.privateca.v1.CertificateAuthority.SignHashAlgorithm}
   */
  public enum SignHashAlgorithm implements com.google.protobuf.ProtocolMessageEnum {
    /**
     *
     *
     * <pre>
     * Not specified.
     * </pre>
     *
     * <code>SIGN_HASH_ALGORITHM_UNSPECIFIED = 0;</code>
     */
    SIGN_HASH_ALGORITHM_UNSPECIFIED(0),
    /**
     *
     *
     * <pre>
     * maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PSS_2048_SHA256
     * </pre>
     *
     * <code>RSA_PSS_2048_SHA256 = 1;</code>
     */
    RSA_PSS_2048_SHA256(1),
    /**
     *
     *
     * <pre>
     * maps to CryptoKeyVersionAlgorithm. RSA_SIGN_PSS_3072_SHA256
     * </pre>
     *
     * <code>RSA_PSS_3072_SHA256 = 2;</code>
     */
    RSA_PSS_3072_SHA256(2),
    /**
     *
     *
     * <pre>
     * maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PSS_4096_SHA256
     * </pre>
     *
     * <code>RSA_PSS_4096_SHA256 = 3;</code>
     */
    RSA_PSS_4096_SHA256(3),
    /**
     *
     *
     * <pre>
     * maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PKCS1_2048_SHA256
     * </pre>
     *
     * <code>RSA_PKCS1_2048_SHA256 = 6;</code>
     */
    RSA_PKCS1_2048_SHA256(6),
    /**
     *
     *
     * <pre>
     * maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PKCS1_3072_SHA256
     * </pre>
     *
     * <code>RSA_PKCS1_3072_SHA256 = 7;</code>
     */
    RSA_PKCS1_3072_SHA256(7),
    /**
     *
     *
     * <pre>
     * maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PKCS1_4096_SHA256
     * </pre>
     *
     * <code>RSA_PKCS1_4096_SHA256 = 8;</code>
     */
    RSA_PKCS1_4096_SHA256(8),
    /**
     *
     *
     * <pre>
     * maps to CryptoKeyVersionAlgorithm.EC_SIGN_P256_SHA256
     * </pre>
     *
     * <code>EC_P256_SHA256 = 4;</code>
     */
    EC_P256_SHA256(4),
    /**
     *
     *
     * <pre>
     * maps to CryptoKeyVersionAlgorithm.EC_SIGN_P384_SHA384
     * </pre>
     *
     * <code>EC_P384_SHA384 = 5;</code>
     */
    EC_P384_SHA384(5),
    UNRECOGNIZED(-1),
    ;

    /**
     *
     *
     * <pre>
     * Not specified.
     * </pre>
     *
     * <code>SIGN_HASH_ALGORITHM_UNSPECIFIED = 0;</code>
     */
    public static final int SIGN_HASH_ALGORITHM_UNSPECIFIED_VALUE = 0;
    /**
     *
     *
     * <pre>
     * maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PSS_2048_SHA256
     * </pre>
     *
     * <code>RSA_PSS_2048_SHA256 = 1;</code>
     */
    public static final int RSA_PSS_2048_SHA256_VALUE = 1;
    /**
     *
     *
     * <pre>
     * maps to CryptoKeyVersionAlgorithm. RSA_SIGN_PSS_3072_SHA256
     * </pre>
     *
     * <code>RSA_PSS_3072_SHA256 = 2;</code>
     */
    public static final int RSA_PSS_3072_SHA256_VALUE = 2;
    /**
     *
     *
     * <pre>
     * maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PSS_4096_SHA256
     * </pre>
     *
     * <code>RSA_PSS_4096_SHA256 = 3;</code>
     */
    public static final int RSA_PSS_4096_SHA256_VALUE = 3;
    /**
     *
     *
     * <pre>
     * maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PKCS1_2048_SHA256
     * </pre>
     *
     * <code>RSA_PKCS1_2048_SHA256 = 6;</code>
     */
    public static final int RSA_PKCS1_2048_SHA256_VALUE = 6;
    /**
     *
     *
     * <pre>
     * maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PKCS1_3072_SHA256
     * </pre>
     *
     * <code>RSA_PKCS1_3072_SHA256 = 7;</code>
     */
    public static final int RSA_PKCS1_3072_SHA256_VALUE = 7;
    /**
     *
     *
     * <pre>
     * maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PKCS1_4096_SHA256
     * </pre>
     *
     * <code>RSA_PKCS1_4096_SHA256 = 8;</code>
     */
    public static final int RSA_PKCS1_4096_SHA256_VALUE = 8;
    /**
     *
     *
     * <pre>
     * maps to CryptoKeyVersionAlgorithm.EC_SIGN_P256_SHA256
     * </pre>
     *
     * <code>EC_P256_SHA256 = 4;</code>
     */
    public static final int EC_P256_SHA256_VALUE = 4;
    /**
     *
     *
     * <pre>
     * maps to CryptoKeyVersionAlgorithm.EC_SIGN_P384_SHA384
     * </pre>
     *
     * <code>EC_P384_SHA384 = 5;</code>
     */
    public static final int EC_P384_SHA384_VALUE = 5;

    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 SignHashAlgorithm 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 SignHashAlgorithm forNumber(int value) {
      switch (value) {
        case 0:
          return SIGN_HASH_ALGORITHM_UNSPECIFIED;
        case 1:
          return RSA_PSS_2048_SHA256;
        case 2:
          return RSA_PSS_3072_SHA256;
        case 3:
          return RSA_PSS_4096_SHA256;
        case 6:
          return RSA_PKCS1_2048_SHA256;
        case 7:
          return RSA_PKCS1_3072_SHA256;
        case 8:
          return RSA_PKCS1_4096_SHA256;
        case 4:
          return EC_P256_SHA256;
        case 5:
          return EC_P384_SHA384;
        default:
          return null;
      }
    }

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

    private static final com.google.protobuf.Internal.EnumLiteMap<SignHashAlgorithm>
        internalValueMap =
            new com.google.protobuf.Internal.EnumLiteMap<SignHashAlgorithm>() {
              public SignHashAlgorithm findValueByNumber(int number) {
                return SignHashAlgorithm.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.security.privateca.v1.CertificateAuthority.getDescriptor()
          .getEnumTypes()
          .get(2);
    }

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

    public static SignHashAlgorithm 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 SignHashAlgorithm(int value) {
      this.value = value;
    }

    // @@protoc_insertion_point(enum_scope:google.cloud.security.privateca.v1.CertificateAuthority.SignHashAlgorithm)
  }

  public interface AccessUrlsOrBuilder
      extends
      // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls)
      com.google.protobuf.MessageOrBuilder {

    /**
     *
     *
     * <pre>
     * The URL where this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
     * CA certificate is published. This will only be set for CAs that have been
     * activated.
     * </pre>
     *
     * <code>string ca_certificate_access_url = 1;</code>
     *
     * @return The caCertificateAccessUrl.
     */
    java.lang.String getCaCertificateAccessUrl();
    /**
     *
     *
     * <pre>
     * The URL where this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
     * CA certificate is published. This will only be set for CAs that have been
     * activated.
     * </pre>
     *
     * <code>string ca_certificate_access_url = 1;</code>
     *
     * @return The bytes for caCertificateAccessUrl.
     */
    com.google.protobuf.ByteString getCaCertificateAccessUrlBytes();

    /**
     *
     *
     * <pre>
     * The URLs where this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
     * CRLs are published. This will only be set for CAs that have been
     * activated.
     * </pre>
     *
     * <code>repeated string crl_access_urls = 2;</code>
     *
     * @return A list containing the crlAccessUrls.
     */
    java.util.List<java.lang.String> getCrlAccessUrlsList();
    /**
     *
     *
     * <pre>
     * The URLs where this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
     * CRLs are published. This will only be set for CAs that have been
     * activated.
     * </pre>
     *
     * <code>repeated string crl_access_urls = 2;</code>
     *
     * @return The count of crlAccessUrls.
     */
    int getCrlAccessUrlsCount();
    /**
     *
     *
     * <pre>
     * The URLs where this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
     * CRLs are published. This will only be set for CAs that have been
     * activated.
     * </pre>
     *
     * <code>repeated string crl_access_urls = 2;</code>
     *
     * @param index The index of the element to return.
     * @return The crlAccessUrls at the given index.
     */
    java.lang.String getCrlAccessUrls(int index);
    /**
     *
     *
     * <pre>
     * The URLs where this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
     * CRLs are published. This will only be set for CAs that have been
     * activated.
     * </pre>
     *
     * <code>repeated string crl_access_urls = 2;</code>
     *
     * @param index The index of the value to return.
     * @return The bytes of the crlAccessUrls at the given index.
     */
    com.google.protobuf.ByteString getCrlAccessUrlsBytes(int index);
  }
  /**
   *
   *
   * <pre>
   * URLs where a
   * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
   * will publish content.
   * </pre>
   *
   * Protobuf type {@code google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls}
   */
  public static final class AccessUrls extends com.google.protobuf.GeneratedMessageV3
      implements
      // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls)
      AccessUrlsOrBuilder {
    private static final long serialVersionUID = 0L;
    // Use AccessUrls.newBuilder() to construct.
    private AccessUrls(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }

    private AccessUrls() {
      caCertificateAccessUrl_ = "";
      crlAccessUrls_ = com.google.protobuf.LazyStringArrayList.emptyList();
    }

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

    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.cloud.security.privateca.v1.PrivateCaResourcesProto
          .internal_static_google_cloud_security_privateca_v1_CertificateAuthority_AccessUrls_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.cloud.security.privateca.v1.PrivateCaResourcesProto
          .internal_static_google_cloud_security_privateca_v1_CertificateAuthority_AccessUrls_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls.class,
              com.google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls.Builder.class);
    }

    public static final int CA_CERTIFICATE_ACCESS_URL_FIELD_NUMBER = 1;

    @SuppressWarnings("serial")
    private volatile java.lang.Object caCertificateAccessUrl_ = "";
    /**
     *
     *
     * <pre>
     * The URL where this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
     * CA certificate is published. This will only be set for CAs that have been
     * activated.
     * </pre>
     *
     * <code>string ca_certificate_access_url = 1;</code>
     *
     * @return The caCertificateAccessUrl.
     */
    @java.lang.Override
    public java.lang.String getCaCertificateAccessUrl() {
      java.lang.Object ref = caCertificateAccessUrl_;
      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();
        caCertificateAccessUrl_ = s;
        return s;
      }
    }
    /**
     *
     *
     * <pre>
     * The URL where this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
     * CA certificate is published. This will only be set for CAs that have been
     * activated.
     * </pre>
     *
     * <code>string ca_certificate_access_url = 1;</code>
     *
     * @return The bytes for caCertificateAccessUrl.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString getCaCertificateAccessUrlBytes() {
      java.lang.Object ref = caCertificateAccessUrl_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        caCertificateAccessUrl_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int CRL_ACCESS_URLS_FIELD_NUMBER = 2;

    @SuppressWarnings("serial")
    private com.google.protobuf.LazyStringArrayList crlAccessUrls_ =
        com.google.protobuf.LazyStringArrayList.emptyList();
    /**
     *
     *
     * <pre>
     * The URLs where this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
     * CRLs are published. This will only be set for CAs that have been
     * activated.
     * </pre>
     *
     * <code>repeated string crl_access_urls = 2;</code>
     *
     * @return A list containing the crlAccessUrls.
     */
    public com.google.protobuf.ProtocolStringList getCrlAccessUrlsList() {
      return crlAccessUrls_;
    }
    /**
     *
     *
     * <pre>
     * The URLs where this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
     * CRLs are published. This will only be set for CAs that have been
     * activated.
     * </pre>
     *
     * <code>repeated string crl_access_urls = 2;</code>
     *
     * @return The count of crlAccessUrls.
     */
    public int getCrlAccessUrlsCount() {
      return crlAccessUrls_.size();
    }
    /**
     *
     *
     * <pre>
     * The URLs where this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
     * CRLs are published. This will only be set for CAs that have been
     * activated.
     * </pre>
     *
     * <code>repeated string crl_access_urls = 2;</code>
     *
     * @param index The index of the element to return.
     * @return The crlAccessUrls at the given index.
     */
    public java.lang.String getCrlAccessUrls(int index) {
      return crlAccessUrls_.get(index);
    }
    /**
     *
     *
     * <pre>
     * The URLs where this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
     * CRLs are published. This will only be set for CAs that have been
     * activated.
     * </pre>
     *
     * <code>repeated string crl_access_urls = 2;</code>
     *
     * @param index The index of the value to return.
     * @return The bytes of the crlAccessUrls at the given index.
     */
    public com.google.protobuf.ByteString getCrlAccessUrlsBytes(int index) {
      return crlAccessUrls_.getByteString(index);
    }

    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(caCertificateAccessUrl_)) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, caCertificateAccessUrl_);
      }
      for (int i = 0; i < crlAccessUrls_.size(); i++) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, crlAccessUrls_.getRaw(i));
      }
      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(caCertificateAccessUrl_)) {
        size +=
            com.google.protobuf.GeneratedMessageV3.computeStringSize(1, caCertificateAccessUrl_);
      }
      {
        int dataSize = 0;
        for (int i = 0; i < crlAccessUrls_.size(); i++) {
          dataSize += computeStringSizeNoTag(crlAccessUrls_.getRaw(i));
        }
        size += dataSize;
        size += 1 * getCrlAccessUrlsList().size();
      }
      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.security.privateca.v1.CertificateAuthority.AccessUrls)) {
        return super.equals(obj);
      }
      com.google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls other =
          (com.google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls) obj;

      if (!getCaCertificateAccessUrl().equals(other.getCaCertificateAccessUrl())) return false;
      if (!getCrlAccessUrlsList().equals(other.getCrlAccessUrlsList())) 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) + CA_CERTIFICATE_ACCESS_URL_FIELD_NUMBER;
      hash = (53 * hash) + getCaCertificateAccessUrl().hashCode();
      if (getCrlAccessUrlsCount() > 0) {
        hash = (37 * hash) + CRL_ACCESS_URLS_FIELD_NUMBER;
        hash = (53 * hash) + getCrlAccessUrlsList().hashCode();
      }
      hash = (29 * hash) + getUnknownFields().hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static com.google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls parseFrom(
        java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls 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.security.privateca.v1.CertificateAuthority.AccessUrls parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls 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.security.privateca.v1.CertificateAuthority.AccessUrls parseFrom(
        byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

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

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

    public static com.google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls 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.security.privateca.v1.CertificateAuthority.AccessUrls
        parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
    }

    public static com.google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls
        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.security.privateca.v1.CertificateAuthority.AccessUrls parseFrom(
        com.google.protobuf.CodedInputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
    }

    public static com.google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls 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.security.privateca.v1.CertificateAuthority.AccessUrls 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>
     * URLs where a
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * will publish content.
     * </pre>
     *
     * Protobuf type {@code google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls}
     */
    public static final class Builder
        extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
        implements
        // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls)
        com.google.cloud.security.privateca.v1.CertificateAuthority.AccessUrlsOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
        return com.google.cloud.security.privateca.v1.PrivateCaResourcesProto
            .internal_static_google_cloud_security_privateca_v1_CertificateAuthority_AccessUrls_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.google.cloud.security.privateca.v1.PrivateCaResourcesProto
            .internal_static_google_cloud_security_privateca_v1_CertificateAuthority_AccessUrls_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls.class,
                com.google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls.Builder
                    .class);
      }

      // Construct using
      // com.google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls.newBuilder()
      private Builder() {}

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

      @java.lang.Override
      public Builder clear() {
        super.clear();
        bitField0_ = 0;
        caCertificateAccessUrl_ = "";
        crlAccessUrls_ = com.google.protobuf.LazyStringArrayList.emptyList();
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
        return com.google.cloud.security.privateca.v1.PrivateCaResourcesProto
            .internal_static_google_cloud_security_privateca_v1_CertificateAuthority_AccessUrls_descriptor;
      }

      @java.lang.Override
      public com.google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls
          getDefaultInstanceForType() {
        return com.google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls
            .getDefaultInstance();
      }

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

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

      private void buildPartial0(
          com.google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls result) {
        int from_bitField0_ = bitField0_;
        if (((from_bitField0_ & 0x00000001) != 0)) {
          result.caCertificateAccessUrl_ = caCertificateAccessUrl_;
        }
        if (((from_bitField0_ & 0x00000002) != 0)) {
          crlAccessUrls_.makeImmutable();
          result.crlAccessUrls_ = crlAccessUrls_;
        }
      }

      @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.security.privateca.v1.CertificateAuthority.AccessUrls) {
          return mergeFrom(
              (com.google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls) other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(
          com.google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls other) {
        if (other
            == com.google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls
                .getDefaultInstance()) return this;
        if (!other.getCaCertificateAccessUrl().isEmpty()) {
          caCertificateAccessUrl_ = other.caCertificateAccessUrl_;
          bitField0_ |= 0x00000001;
          onChanged();
        }
        if (!other.crlAccessUrls_.isEmpty()) {
          if (crlAccessUrls_.isEmpty()) {
            crlAccessUrls_ = other.crlAccessUrls_;
            bitField0_ |= 0x00000002;
          } else {
            ensureCrlAccessUrlsIsMutable();
            crlAccessUrls_.addAll(other.crlAccessUrls_);
          }
          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:
                {
                  caCertificateAccessUrl_ = input.readStringRequireUtf8();
                  bitField0_ |= 0x00000001;
                  break;
                } // case 10
              case 18:
                {
                  java.lang.String s = input.readStringRequireUtf8();
                  ensureCrlAccessUrlsIsMutable();
                  crlAccessUrls_.add(s);
                  break;
                } // case 18
              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 caCertificateAccessUrl_ = "";
      /**
       *
       *
       * <pre>
       * The URL where this
       * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
       * CA certificate is published. This will only be set for CAs that have been
       * activated.
       * </pre>
       *
       * <code>string ca_certificate_access_url = 1;</code>
       *
       * @return The caCertificateAccessUrl.
       */
      public java.lang.String getCaCertificateAccessUrl() {
        java.lang.Object ref = caCertificateAccessUrl_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          caCertificateAccessUrl_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * The URL where this
       * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
       * CA certificate is published. This will only be set for CAs that have been
       * activated.
       * </pre>
       *
       * <code>string ca_certificate_access_url = 1;</code>
       *
       * @return The bytes for caCertificateAccessUrl.
       */
      public com.google.protobuf.ByteString getCaCertificateAccessUrlBytes() {
        java.lang.Object ref = caCertificateAccessUrl_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b =
              com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
          caCertificateAccessUrl_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * The URL where this
       * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
       * CA certificate is published. This will only be set for CAs that have been
       * activated.
       * </pre>
       *
       * <code>string ca_certificate_access_url = 1;</code>
       *
       * @param value The caCertificateAccessUrl to set.
       * @return This builder for chaining.
       */
      public Builder setCaCertificateAccessUrl(java.lang.String value) {
        if (value == null) {
          throw new NullPointerException();
        }
        caCertificateAccessUrl_ = value;
        bitField0_ |= 0x00000001;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * The URL where this
       * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
       * CA certificate is published. This will only be set for CAs that have been
       * activated.
       * </pre>
       *
       * <code>string ca_certificate_access_url = 1;</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearCaCertificateAccessUrl() {
        caCertificateAccessUrl_ = getDefaultInstance().getCaCertificateAccessUrl();
        bitField0_ = (bitField0_ & ~0x00000001);
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * The URL where this
       * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
       * CA certificate is published. This will only be set for CAs that have been
       * activated.
       * </pre>
       *
       * <code>string ca_certificate_access_url = 1;</code>
       *
       * @param value The bytes for caCertificateAccessUrl to set.
       * @return This builder for chaining.
       */
      public Builder setCaCertificateAccessUrlBytes(com.google.protobuf.ByteString value) {
        if (value == null) {
          throw new NullPointerException();
        }
        checkByteStringIsUtf8(value);
        caCertificateAccessUrl_ = value;
        bitField0_ |= 0x00000001;
        onChanged();
        return this;
      }

      private com.google.protobuf.LazyStringArrayList crlAccessUrls_ =
          com.google.protobuf.LazyStringArrayList.emptyList();

      private void ensureCrlAccessUrlsIsMutable() {
        if (!crlAccessUrls_.isModifiable()) {
          crlAccessUrls_ = new com.google.protobuf.LazyStringArrayList(crlAccessUrls_);
        }
        bitField0_ |= 0x00000002;
      }
      /**
       *
       *
       * <pre>
       * The URLs where this
       * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
       * CRLs are published. This will only be set for CAs that have been
       * activated.
       * </pre>
       *
       * <code>repeated string crl_access_urls = 2;</code>
       *
       * @return A list containing the crlAccessUrls.
       */
      public com.google.protobuf.ProtocolStringList getCrlAccessUrlsList() {
        crlAccessUrls_.makeImmutable();
        return crlAccessUrls_;
      }
      /**
       *
       *
       * <pre>
       * The URLs where this
       * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
       * CRLs are published. This will only be set for CAs that have been
       * activated.
       * </pre>
       *
       * <code>repeated string crl_access_urls = 2;</code>
       *
       * @return The count of crlAccessUrls.
       */
      public int getCrlAccessUrlsCount() {
        return crlAccessUrls_.size();
      }
      /**
       *
       *
       * <pre>
       * The URLs where this
       * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
       * CRLs are published. This will only be set for CAs that have been
       * activated.
       * </pre>
       *
       * <code>repeated string crl_access_urls = 2;</code>
       *
       * @param index The index of the element to return.
       * @return The crlAccessUrls at the given index.
       */
      public java.lang.String getCrlAccessUrls(int index) {
        return crlAccessUrls_.get(index);
      }
      /**
       *
       *
       * <pre>
       * The URLs where this
       * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
       * CRLs are published. This will only be set for CAs that have been
       * activated.
       * </pre>
       *
       * <code>repeated string crl_access_urls = 2;</code>
       *
       * @param index The index of the value to return.
       * @return The bytes of the crlAccessUrls at the given index.
       */
      public com.google.protobuf.ByteString getCrlAccessUrlsBytes(int index) {
        return crlAccessUrls_.getByteString(index);
      }
      /**
       *
       *
       * <pre>
       * The URLs where this
       * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
       * CRLs are published. This will only be set for CAs that have been
       * activated.
       * </pre>
       *
       * <code>repeated string crl_access_urls = 2;</code>
       *
       * @param index The index to set the value at.
       * @param value The crlAccessUrls to set.
       * @return This builder for chaining.
       */
      public Builder setCrlAccessUrls(int index, java.lang.String value) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureCrlAccessUrlsIsMutable();
        crlAccessUrls_.set(index, value);
        bitField0_ |= 0x00000002;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * The URLs where this
       * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
       * CRLs are published. This will only be set for CAs that have been
       * activated.
       * </pre>
       *
       * <code>repeated string crl_access_urls = 2;</code>
       *
       * @param value The crlAccessUrls to add.
       * @return This builder for chaining.
       */
      public Builder addCrlAccessUrls(java.lang.String value) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureCrlAccessUrlsIsMutable();
        crlAccessUrls_.add(value);
        bitField0_ |= 0x00000002;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * The URLs where this
       * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
       * CRLs are published. This will only be set for CAs that have been
       * activated.
       * </pre>
       *
       * <code>repeated string crl_access_urls = 2;</code>
       *
       * @param values The crlAccessUrls to add.
       * @return This builder for chaining.
       */
      public Builder addAllCrlAccessUrls(java.lang.Iterable<java.lang.String> values) {
        ensureCrlAccessUrlsIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(values, crlAccessUrls_);
        bitField0_ |= 0x00000002;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * The URLs where this
       * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
       * CRLs are published. This will only be set for CAs that have been
       * activated.
       * </pre>
       *
       * <code>repeated string crl_access_urls = 2;</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearCrlAccessUrls() {
        crlAccessUrls_ = com.google.protobuf.LazyStringArrayList.emptyList();
        bitField0_ = (bitField0_ & ~0x00000002);
        ;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * The URLs where this
       * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
       * CRLs are published. This will only be set for CAs that have been
       * activated.
       * </pre>
       *
       * <code>repeated string crl_access_urls = 2;</code>
       *
       * @param value The bytes of the crlAccessUrls to add.
       * @return This builder for chaining.
       */
      public Builder addCrlAccessUrlsBytes(com.google.protobuf.ByteString value) {
        if (value == null) {
          throw new NullPointerException();
        }
        checkByteStringIsUtf8(value);
        ensureCrlAccessUrlsIsMutable();
        crlAccessUrls_.add(value);
        bitField0_ |= 0x00000002;
        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.security.privateca.v1.CertificateAuthority.AccessUrls)
    }

    // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls)
    private static final com.google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls
        DEFAULT_INSTANCE;

    static {
      DEFAULT_INSTANCE =
          new com.google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls();
    }

    public static com.google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls
        getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    private static final com.google.protobuf.Parser<AccessUrls> PARSER =
        new com.google.protobuf.AbstractParser<AccessUrls>() {
          @java.lang.Override
          public AccessUrls 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<AccessUrls> parser() {
      return PARSER;
    }

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

    @java.lang.Override
    public com.google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls
        getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }
  }

  public interface KeyVersionSpecOrBuilder
      extends
      // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec)
      com.google.protobuf.MessageOrBuilder {

    /**
     *
     *
     * <pre>
     * The resource name for an existing Cloud KMS CryptoKeyVersion in the
     * format
     * `projects/&#42;&#47;locations/&#42;&#47;keyRings/&#42;&#47;cryptoKeys/&#42;&#47;cryptoKeyVersions/&#42;`.
     * This option enables full flexibility in the key's capabilities and
     * properties.
     * </pre>
     *
     * <code>string cloud_kms_key_version = 1;</code>
     *
     * @return Whether the cloudKmsKeyVersion field is set.
     */
    boolean hasCloudKmsKeyVersion();
    /**
     *
     *
     * <pre>
     * The resource name for an existing Cloud KMS CryptoKeyVersion in the
     * format
     * `projects/&#42;&#47;locations/&#42;&#47;keyRings/&#42;&#47;cryptoKeys/&#42;&#47;cryptoKeyVersions/&#42;`.
     * This option enables full flexibility in the key's capabilities and
     * properties.
     * </pre>
     *
     * <code>string cloud_kms_key_version = 1;</code>
     *
     * @return The cloudKmsKeyVersion.
     */
    java.lang.String getCloudKmsKeyVersion();
    /**
     *
     *
     * <pre>
     * The resource name for an existing Cloud KMS CryptoKeyVersion in the
     * format
     * `projects/&#42;&#47;locations/&#42;&#47;keyRings/&#42;&#47;cryptoKeys/&#42;&#47;cryptoKeyVersions/&#42;`.
     * This option enables full flexibility in the key's capabilities and
     * properties.
     * </pre>
     *
     * <code>string cloud_kms_key_version = 1;</code>
     *
     * @return The bytes for cloudKmsKeyVersion.
     */
    com.google.protobuf.ByteString getCloudKmsKeyVersionBytes();

    /**
     *
     *
     * <pre>
     * The algorithm to use for creating a managed Cloud KMS key for a for a
     * simplified experience. All managed keys will be have their
     * [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] as `HSM`.
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CertificateAuthority.SignHashAlgorithm algorithm = 2;
     * </code>
     *
     * @return Whether the algorithm field is set.
     */
    boolean hasAlgorithm();
    /**
     *
     *
     * <pre>
     * The algorithm to use for creating a managed Cloud KMS key for a for a
     * simplified experience. All managed keys will be have their
     * [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] as `HSM`.
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CertificateAuthority.SignHashAlgorithm algorithm = 2;
     * </code>
     *
     * @return The enum numeric value on the wire for algorithm.
     */
    int getAlgorithmValue();
    /**
     *
     *
     * <pre>
     * The algorithm to use for creating a managed Cloud KMS key for a for a
     * simplified experience. All managed keys will be have their
     * [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] as `HSM`.
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CertificateAuthority.SignHashAlgorithm algorithm = 2;
     * </code>
     *
     * @return The algorithm.
     */
    com.google.cloud.security.privateca.v1.CertificateAuthority.SignHashAlgorithm getAlgorithm();

    com.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec.KeyVersionCase
        getKeyVersionCase();
  }
  /**
   *
   *
   * <pre>
   * A Cloud KMS key configuration that a
   * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
   * will use.
   * </pre>
   *
   * Protobuf type {@code google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec}
   */
  public static final class KeyVersionSpec extends com.google.protobuf.GeneratedMessageV3
      implements
      // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec)
      KeyVersionSpecOrBuilder {
    private static final long serialVersionUID = 0L;
    // Use KeyVersionSpec.newBuilder() to construct.
    private KeyVersionSpec(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }

    private KeyVersionSpec() {}

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

    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.cloud.security.privateca.v1.PrivateCaResourcesProto
          .internal_static_google_cloud_security_privateca_v1_CertificateAuthority_KeyVersionSpec_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.cloud.security.privateca.v1.PrivateCaResourcesProto
          .internal_static_google_cloud_security_privateca_v1_CertificateAuthority_KeyVersionSpec_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec.class,
              com.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec.Builder
                  .class);
    }

    private int keyVersionCase_ = 0;

    @SuppressWarnings("serial")
    private java.lang.Object keyVersion_;

    public enum KeyVersionCase
        implements
            com.google.protobuf.Internal.EnumLite,
            com.google.protobuf.AbstractMessage.InternalOneOfEnum {
      CLOUD_KMS_KEY_VERSION(1),
      ALGORITHM(2),
      KEYVERSION_NOT_SET(0);
      private final int value;

      private KeyVersionCase(int value) {
        this.value = value;
      }
      /**
       * @param value The number of the enum to look for.
       * @return The enum associated with the given number.
       * @deprecated Use {@link #forNumber(int)} instead.
       */
      @java.lang.Deprecated
      public static KeyVersionCase valueOf(int value) {
        return forNumber(value);
      }

      public static KeyVersionCase forNumber(int value) {
        switch (value) {
          case 1:
            return CLOUD_KMS_KEY_VERSION;
          case 2:
            return ALGORITHM;
          case 0:
            return KEYVERSION_NOT_SET;
          default:
            return null;
        }
      }

      public int getNumber() {
        return this.value;
      }
    };

    public KeyVersionCase getKeyVersionCase() {
      return KeyVersionCase.forNumber(keyVersionCase_);
    }

    public static final int CLOUD_KMS_KEY_VERSION_FIELD_NUMBER = 1;
    /**
     *
     *
     * <pre>
     * The resource name for an existing Cloud KMS CryptoKeyVersion in the
     * format
     * `projects/&#42;&#47;locations/&#42;&#47;keyRings/&#42;&#47;cryptoKeys/&#42;&#47;cryptoKeyVersions/&#42;`.
     * This option enables full flexibility in the key's capabilities and
     * properties.
     * </pre>
     *
     * <code>string cloud_kms_key_version = 1;</code>
     *
     * @return Whether the cloudKmsKeyVersion field is set.
     */
    public boolean hasCloudKmsKeyVersion() {
      return keyVersionCase_ == 1;
    }
    /**
     *
     *
     * <pre>
     * The resource name for an existing Cloud KMS CryptoKeyVersion in the
     * format
     * `projects/&#42;&#47;locations/&#42;&#47;keyRings/&#42;&#47;cryptoKeys/&#42;&#47;cryptoKeyVersions/&#42;`.
     * This option enables full flexibility in the key's capabilities and
     * properties.
     * </pre>
     *
     * <code>string cloud_kms_key_version = 1;</code>
     *
     * @return The cloudKmsKeyVersion.
     */
    public java.lang.String getCloudKmsKeyVersion() {
      java.lang.Object ref = "";
      if (keyVersionCase_ == 1) {
        ref = keyVersion_;
      }
      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();
        if (keyVersionCase_ == 1) {
          keyVersion_ = s;
        }
        return s;
      }
    }
    /**
     *
     *
     * <pre>
     * The resource name for an existing Cloud KMS CryptoKeyVersion in the
     * format
     * `projects/&#42;&#47;locations/&#42;&#47;keyRings/&#42;&#47;cryptoKeys/&#42;&#47;cryptoKeyVersions/&#42;`.
     * This option enables full flexibility in the key's capabilities and
     * properties.
     * </pre>
     *
     * <code>string cloud_kms_key_version = 1;</code>
     *
     * @return The bytes for cloudKmsKeyVersion.
     */
    public com.google.protobuf.ByteString getCloudKmsKeyVersionBytes() {
      java.lang.Object ref = "";
      if (keyVersionCase_ == 1) {
        ref = keyVersion_;
      }
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        if (keyVersionCase_ == 1) {
          keyVersion_ = b;
        }
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int ALGORITHM_FIELD_NUMBER = 2;
    /**
     *
     *
     * <pre>
     * The algorithm to use for creating a managed Cloud KMS key for a for a
     * simplified experience. All managed keys will be have their
     * [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] as `HSM`.
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CertificateAuthority.SignHashAlgorithm algorithm = 2;
     * </code>
     *
     * @return Whether the algorithm field is set.
     */
    public boolean hasAlgorithm() {
      return keyVersionCase_ == 2;
    }
    /**
     *
     *
     * <pre>
     * The algorithm to use for creating a managed Cloud KMS key for a for a
     * simplified experience. All managed keys will be have their
     * [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] as `HSM`.
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CertificateAuthority.SignHashAlgorithm algorithm = 2;
     * </code>
     *
     * @return The enum numeric value on the wire for algorithm.
     */
    public int getAlgorithmValue() {
      if (keyVersionCase_ == 2) {
        return (java.lang.Integer) keyVersion_;
      }
      return 0;
    }
    /**
     *
     *
     * <pre>
     * The algorithm to use for creating a managed Cloud KMS key for a for a
     * simplified experience. All managed keys will be have their
     * [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] as `HSM`.
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CertificateAuthority.SignHashAlgorithm algorithm = 2;
     * </code>
     *
     * @return The algorithm.
     */
    public com.google.cloud.security.privateca.v1.CertificateAuthority.SignHashAlgorithm
        getAlgorithm() {
      if (keyVersionCase_ == 2) {
        com.google.cloud.security.privateca.v1.CertificateAuthority.SignHashAlgorithm result =
            com.google.cloud.security.privateca.v1.CertificateAuthority.SignHashAlgorithm.forNumber(
                (java.lang.Integer) keyVersion_);
        return result == null
            ? com.google.cloud.security.privateca.v1.CertificateAuthority.SignHashAlgorithm
                .UNRECOGNIZED
            : result;
      }
      return com.google.cloud.security.privateca.v1.CertificateAuthority.SignHashAlgorithm
          .SIGN_HASH_ALGORITHM_UNSPECIFIED;
    }

    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 (keyVersionCase_ == 1) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, keyVersion_);
      }
      if (keyVersionCase_ == 2) {
        output.writeEnum(2, ((java.lang.Integer) keyVersion_));
      }
      getUnknownFields().writeTo(output);
    }

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

      size = 0;
      if (keyVersionCase_ == 1) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, keyVersion_);
      }
      if (keyVersionCase_ == 2) {
        size +=
            com.google.protobuf.CodedOutputStream.computeEnumSize(
                2, ((java.lang.Integer) keyVersion_));
      }
      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.security.privateca.v1.CertificateAuthority.KeyVersionSpec)) {
        return super.equals(obj);
      }
      com.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec other =
          (com.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec) obj;

      if (!getKeyVersionCase().equals(other.getKeyVersionCase())) return false;
      switch (keyVersionCase_) {
        case 1:
          if (!getCloudKmsKeyVersion().equals(other.getCloudKmsKeyVersion())) return false;
          break;
        case 2:
          if (getAlgorithmValue() != other.getAlgorithmValue()) return false;
          break;
        case 0:
        default:
      }
      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();
      switch (keyVersionCase_) {
        case 1:
          hash = (37 * hash) + CLOUD_KMS_KEY_VERSION_FIELD_NUMBER;
          hash = (53 * hash) + getCloudKmsKeyVersion().hashCode();
          break;
        case 2:
          hash = (37 * hash) + ALGORITHM_FIELD_NUMBER;
          hash = (53 * hash) + getAlgorithmValue();
          break;
        case 0:
        default:
      }
      hash = (29 * hash) + getUnknownFields().hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static com.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec
        parseFrom(java.nio.ByteBuffer data)
            throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec
        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.security.privateca.v1.CertificateAuthority.KeyVersionSpec
        parseFrom(com.google.protobuf.ByteString data)
            throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec
        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.security.privateca.v1.CertificateAuthority.KeyVersionSpec
        parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

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

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

    public static com.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec
        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.security.privateca.v1.CertificateAuthority.KeyVersionSpec
        parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
    }

    public static com.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec
        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.security.privateca.v1.CertificateAuthority.KeyVersionSpec
        parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
    }

    public static com.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec
        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.security.privateca.v1.CertificateAuthority.KeyVersionSpec 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>
     * A Cloud KMS key configuration that a
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * will use.
     * </pre>
     *
     * Protobuf type {@code google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec}
     */
    public static final class Builder
        extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
        implements
        // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec)
        com.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpecOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
        return com.google.cloud.security.privateca.v1.PrivateCaResourcesProto
            .internal_static_google_cloud_security_privateca_v1_CertificateAuthority_KeyVersionSpec_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.google.cloud.security.privateca.v1.PrivateCaResourcesProto
            .internal_static_google_cloud_security_privateca_v1_CertificateAuthority_KeyVersionSpec_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec.class,
                com.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec.Builder
                    .class);
      }

      // Construct using
      // com.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec.newBuilder()
      private Builder() {}

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

      @java.lang.Override
      public Builder clear() {
        super.clear();
        bitField0_ = 0;
        keyVersionCase_ = 0;
        keyVersion_ = null;
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
        return com.google.cloud.security.privateca.v1.PrivateCaResourcesProto
            .internal_static_google_cloud_security_privateca_v1_CertificateAuthority_KeyVersionSpec_descriptor;
      }

      @java.lang.Override
      public com.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec
          getDefaultInstanceForType() {
        return com.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec
            .getDefaultInstance();
      }

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

      @java.lang.Override
      public com.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec
          buildPartial() {
        com.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec result =
            new com.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec(this);
        if (bitField0_ != 0) {
          buildPartial0(result);
        }
        buildPartialOneofs(result);
        onBuilt();
        return result;
      }

      private void buildPartial0(
          com.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec result) {
        int from_bitField0_ = bitField0_;
      }

      private void buildPartialOneofs(
          com.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec result) {
        result.keyVersionCase_ = keyVersionCase_;
        result.keyVersion_ = this.keyVersion_;
      }

      @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.security.privateca.v1.CertificateAuthority.KeyVersionSpec) {
          return mergeFrom(
              (com.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec) other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(
          com.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec other) {
        if (other
            == com.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec
                .getDefaultInstance()) return this;
        switch (other.getKeyVersionCase()) {
          case CLOUD_KMS_KEY_VERSION:
            {
              keyVersionCase_ = 1;
              keyVersion_ = other.keyVersion_;
              onChanged();
              break;
            }
          case ALGORITHM:
            {
              setAlgorithmValue(other.getAlgorithmValue());
              break;
            }
          case KEYVERSION_NOT_SET:
            {
              break;
            }
        }
        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:
                {
                  java.lang.String s = input.readStringRequireUtf8();
                  keyVersionCase_ = 1;
                  keyVersion_ = s;
                  break;
                } // case 10
              case 16:
                {
                  int rawValue = input.readEnum();
                  keyVersionCase_ = 2;
                  keyVersion_ = rawValue;
                  break;
                } // case 16
              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 keyVersionCase_ = 0;
      private java.lang.Object keyVersion_;

      public KeyVersionCase getKeyVersionCase() {
        return KeyVersionCase.forNumber(keyVersionCase_);
      }

      public Builder clearKeyVersion() {
        keyVersionCase_ = 0;
        keyVersion_ = null;
        onChanged();
        return this;
      }

      private int bitField0_;

      /**
       *
       *
       * <pre>
       * The resource name for an existing Cloud KMS CryptoKeyVersion in the
       * format
       * `projects/&#42;&#47;locations/&#42;&#47;keyRings/&#42;&#47;cryptoKeys/&#42;&#47;cryptoKeyVersions/&#42;`.
       * This option enables full flexibility in the key's capabilities and
       * properties.
       * </pre>
       *
       * <code>string cloud_kms_key_version = 1;</code>
       *
       * @return Whether the cloudKmsKeyVersion field is set.
       */
      @java.lang.Override
      public boolean hasCloudKmsKeyVersion() {
        return keyVersionCase_ == 1;
      }
      /**
       *
       *
       * <pre>
       * The resource name for an existing Cloud KMS CryptoKeyVersion in the
       * format
       * `projects/&#42;&#47;locations/&#42;&#47;keyRings/&#42;&#47;cryptoKeys/&#42;&#47;cryptoKeyVersions/&#42;`.
       * This option enables full flexibility in the key's capabilities and
       * properties.
       * </pre>
       *
       * <code>string cloud_kms_key_version = 1;</code>
       *
       * @return The cloudKmsKeyVersion.
       */
      @java.lang.Override
      public java.lang.String getCloudKmsKeyVersion() {
        java.lang.Object ref = "";
        if (keyVersionCase_ == 1) {
          ref = keyVersion_;
        }
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          if (keyVersionCase_ == 1) {
            keyVersion_ = s;
          }
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * The resource name for an existing Cloud KMS CryptoKeyVersion in the
       * format
       * `projects/&#42;&#47;locations/&#42;&#47;keyRings/&#42;&#47;cryptoKeys/&#42;&#47;cryptoKeyVersions/&#42;`.
       * This option enables full flexibility in the key's capabilities and
       * properties.
       * </pre>
       *
       * <code>string cloud_kms_key_version = 1;</code>
       *
       * @return The bytes for cloudKmsKeyVersion.
       */
      @java.lang.Override
      public com.google.protobuf.ByteString getCloudKmsKeyVersionBytes() {
        java.lang.Object ref = "";
        if (keyVersionCase_ == 1) {
          ref = keyVersion_;
        }
        if (ref instanceof String) {
          com.google.protobuf.ByteString b =
              com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
          if (keyVersionCase_ == 1) {
            keyVersion_ = b;
          }
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * The resource name for an existing Cloud KMS CryptoKeyVersion in the
       * format
       * `projects/&#42;&#47;locations/&#42;&#47;keyRings/&#42;&#47;cryptoKeys/&#42;&#47;cryptoKeyVersions/&#42;`.
       * This option enables full flexibility in the key's capabilities and
       * properties.
       * </pre>
       *
       * <code>string cloud_kms_key_version = 1;</code>
       *
       * @param value The cloudKmsKeyVersion to set.
       * @return This builder for chaining.
       */
      public Builder setCloudKmsKeyVersion(java.lang.String value) {
        if (value == null) {
          throw new NullPointerException();
        }
        keyVersionCase_ = 1;
        keyVersion_ = value;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * The resource name for an existing Cloud KMS CryptoKeyVersion in the
       * format
       * `projects/&#42;&#47;locations/&#42;&#47;keyRings/&#42;&#47;cryptoKeys/&#42;&#47;cryptoKeyVersions/&#42;`.
       * This option enables full flexibility in the key's capabilities and
       * properties.
       * </pre>
       *
       * <code>string cloud_kms_key_version = 1;</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearCloudKmsKeyVersion() {
        if (keyVersionCase_ == 1) {
          keyVersionCase_ = 0;
          keyVersion_ = null;
          onChanged();
        }
        return this;
      }
      /**
       *
       *
       * <pre>
       * The resource name for an existing Cloud KMS CryptoKeyVersion in the
       * format
       * `projects/&#42;&#47;locations/&#42;&#47;keyRings/&#42;&#47;cryptoKeys/&#42;&#47;cryptoKeyVersions/&#42;`.
       * This option enables full flexibility in the key's capabilities and
       * properties.
       * </pre>
       *
       * <code>string cloud_kms_key_version = 1;</code>
       *
       * @param value The bytes for cloudKmsKeyVersion to set.
       * @return This builder for chaining.
       */
      public Builder setCloudKmsKeyVersionBytes(com.google.protobuf.ByteString value) {
        if (value == null) {
          throw new NullPointerException();
        }
        checkByteStringIsUtf8(value);
        keyVersionCase_ = 1;
        keyVersion_ = value;
        onChanged();
        return this;
      }

      /**
       *
       *
       * <pre>
       * The algorithm to use for creating a managed Cloud KMS key for a for a
       * simplified experience. All managed keys will be have their
       * [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] as `HSM`.
       * </pre>
       *
       * <code>
       * .google.cloud.security.privateca.v1.CertificateAuthority.SignHashAlgorithm algorithm = 2;
       * </code>
       *
       * @return Whether the algorithm field is set.
       */
      @java.lang.Override
      public boolean hasAlgorithm() {
        return keyVersionCase_ == 2;
      }
      /**
       *
       *
       * <pre>
       * The algorithm to use for creating a managed Cloud KMS key for a for a
       * simplified experience. All managed keys will be have their
       * [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] as `HSM`.
       * </pre>
       *
       * <code>
       * .google.cloud.security.privateca.v1.CertificateAuthority.SignHashAlgorithm algorithm = 2;
       * </code>
       *
       * @return The enum numeric value on the wire for algorithm.
       */
      @java.lang.Override
      public int getAlgorithmValue() {
        if (keyVersionCase_ == 2) {
          return ((java.lang.Integer) keyVersion_).intValue();
        }
        return 0;
      }
      /**
       *
       *
       * <pre>
       * The algorithm to use for creating a managed Cloud KMS key for a for a
       * simplified experience. All managed keys will be have their
       * [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] as `HSM`.
       * </pre>
       *
       * <code>
       * .google.cloud.security.privateca.v1.CertificateAuthority.SignHashAlgorithm algorithm = 2;
       * </code>
       *
       * @param value The enum numeric value on the wire for algorithm to set.
       * @return This builder for chaining.
       */
      public Builder setAlgorithmValue(int value) {
        keyVersionCase_ = 2;
        keyVersion_ = value;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * The algorithm to use for creating a managed Cloud KMS key for a for a
       * simplified experience. All managed keys will be have their
       * [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] as `HSM`.
       * </pre>
       *
       * <code>
       * .google.cloud.security.privateca.v1.CertificateAuthority.SignHashAlgorithm algorithm = 2;
       * </code>
       *
       * @return The algorithm.
       */
      @java.lang.Override
      public com.google.cloud.security.privateca.v1.CertificateAuthority.SignHashAlgorithm
          getAlgorithm() {
        if (keyVersionCase_ == 2) {
          com.google.cloud.security.privateca.v1.CertificateAuthority.SignHashAlgorithm result =
              com.google.cloud.security.privateca.v1.CertificateAuthority.SignHashAlgorithm
                  .forNumber((java.lang.Integer) keyVersion_);
          return result == null
              ? com.google.cloud.security.privateca.v1.CertificateAuthority.SignHashAlgorithm
                  .UNRECOGNIZED
              : result;
        }
        return com.google.cloud.security.privateca.v1.CertificateAuthority.SignHashAlgorithm
            .SIGN_HASH_ALGORITHM_UNSPECIFIED;
      }
      /**
       *
       *
       * <pre>
       * The algorithm to use for creating a managed Cloud KMS key for a for a
       * simplified experience. All managed keys will be have their
       * [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] as `HSM`.
       * </pre>
       *
       * <code>
       * .google.cloud.security.privateca.v1.CertificateAuthority.SignHashAlgorithm algorithm = 2;
       * </code>
       *
       * @param value The algorithm to set.
       * @return This builder for chaining.
       */
      public Builder setAlgorithm(
          com.google.cloud.security.privateca.v1.CertificateAuthority.SignHashAlgorithm value) {
        if (value == null) {
          throw new NullPointerException();
        }
        keyVersionCase_ = 2;
        keyVersion_ = value.getNumber();
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * The algorithm to use for creating a managed Cloud KMS key for a for a
       * simplified experience. All managed keys will be have their
       * [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] as `HSM`.
       * </pre>
       *
       * <code>
       * .google.cloud.security.privateca.v1.CertificateAuthority.SignHashAlgorithm algorithm = 2;
       * </code>
       *
       * @return This builder for chaining.
       */
      public Builder clearAlgorithm() {
        if (keyVersionCase_ == 2) {
          keyVersionCase_ = 0;
          keyVersion_ = null;
          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.security.privateca.v1.CertificateAuthority.KeyVersionSpec)
    }

    // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec)
    private static final com.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec
        DEFAULT_INSTANCE;

    static {
      DEFAULT_INSTANCE =
          new com.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec();
    }

    public static com.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec
        getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    private static final com.google.protobuf.Parser<KeyVersionSpec> PARSER =
        new com.google.protobuf.AbstractParser<KeyVersionSpec>() {
          @java.lang.Override
          public KeyVersionSpec 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<KeyVersionSpec> parser() {
      return PARSER;
    }

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

    @java.lang.Override
    public com.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec
        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
   * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
   * in the format `projects/&#42;&#47;locations/&#42;&#47;caPools/&#42;&#47;certificateAuthorities/&#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
   * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
   * in the format `projects/&#42;&#47;locations/&#42;&#47;caPools/&#42;&#47;certificateAuthorities/&#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 TYPE_FIELD_NUMBER = 2;
  private int type_ = 0;
  /**
   *
   *
   * <pre>
   * Required. Immutable. The
   * [Type][google.cloud.security.privateca.v1.CertificateAuthority.Type] of
   * this
   * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
   * </pre>
   *
   * <code>
   * .google.cloud.security.privateca.v1.CertificateAuthority.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
   * </code>
   *
   * @return The enum numeric value on the wire for type.
   */
  @java.lang.Override
  public int getTypeValue() {
    return type_;
  }
  /**
   *
   *
   * <pre>
   * Required. Immutable. The
   * [Type][google.cloud.security.privateca.v1.CertificateAuthority.Type] of
   * this
   * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
   * </pre>
   *
   * <code>
   * .google.cloud.security.privateca.v1.CertificateAuthority.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
   * </code>
   *
   * @return The type.
   */
  @java.lang.Override
  public com.google.cloud.security.privateca.v1.CertificateAuthority.Type getType() {
    com.google.cloud.security.privateca.v1.CertificateAuthority.Type result =
        com.google.cloud.security.privateca.v1.CertificateAuthority.Type.forNumber(type_);
    return result == null
        ? com.google.cloud.security.privateca.v1.CertificateAuthority.Type.UNRECOGNIZED
        : result;
  }

  public static final int CONFIG_FIELD_NUMBER = 3;
  private com.google.cloud.security.privateca.v1.CertificateConfig config_;
  /**
   *
   *
   * <pre>
   * Required. Immutable. The config used to create a self-signed X.509
   * certificate or CSR.
   * </pre>
   *
   * <code>
   * .google.cloud.security.privateca.v1.CertificateConfig config = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
   * </code>
   *
   * @return Whether the config field is set.
   */
  @java.lang.Override
  public boolean hasConfig() {
    return config_ != null;
  }
  /**
   *
   *
   * <pre>
   * Required. Immutable. The config used to create a self-signed X.509
   * certificate or CSR.
   * </pre>
   *
   * <code>
   * .google.cloud.security.privateca.v1.CertificateConfig config = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
   * </code>
   *
   * @return The config.
   */
  @java.lang.Override
  public com.google.cloud.security.privateca.v1.CertificateConfig getConfig() {
    return config_ == null
        ? com.google.cloud.security.privateca.v1.CertificateConfig.getDefaultInstance()
        : config_;
  }
  /**
   *
   *
   * <pre>
   * Required. Immutable. The config used to create a self-signed X.509
   * certificate or CSR.
   * </pre>
   *
   * <code>
   * .google.cloud.security.privateca.v1.CertificateConfig config = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
   * </code>
   */
  @java.lang.Override
  public com.google.cloud.security.privateca.v1.CertificateConfigOrBuilder getConfigOrBuilder() {
    return config_ == null
        ? com.google.cloud.security.privateca.v1.CertificateConfig.getDefaultInstance()
        : config_;
  }

  public static final int LIFETIME_FIELD_NUMBER = 4;
  private com.google.protobuf.Duration lifetime_;
  /**
   *
   *
   * <pre>
   * Required. Immutable. The desired lifetime of the CA certificate. Used to
   * create the "not_before_time" and "not_after_time" fields inside an X.509
   * certificate.
   * </pre>
   *
   * <code>
   * .google.protobuf.Duration lifetime = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
   * </code>
   *
   * @return Whether the lifetime field is set.
   */
  @java.lang.Override
  public boolean hasLifetime() {
    return lifetime_ != null;
  }
  /**
   *
   *
   * <pre>
   * Required. Immutable. The desired lifetime of the CA certificate. Used to
   * create the "not_before_time" and "not_after_time" fields inside an X.509
   * certificate.
   * </pre>
   *
   * <code>
   * .google.protobuf.Duration lifetime = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
   * </code>
   *
   * @return The lifetime.
   */
  @java.lang.Override
  public com.google.protobuf.Duration getLifetime() {
    return lifetime_ == null ? com.google.protobuf.Duration.getDefaultInstance() : lifetime_;
  }
  /**
   *
   *
   * <pre>
   * Required. Immutable. The desired lifetime of the CA certificate. Used to
   * create the "not_before_time" and "not_after_time" fields inside an X.509
   * certificate.
   * </pre>
   *
   * <code>
   * .google.protobuf.Duration lifetime = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
   * </code>
   */
  @java.lang.Override
  public com.google.protobuf.DurationOrBuilder getLifetimeOrBuilder() {
    return lifetime_ == null ? com.google.protobuf.Duration.getDefaultInstance() : lifetime_;
  }

  public static final int KEY_SPEC_FIELD_NUMBER = 5;
  private com.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec keySpec_;
  /**
   *
   *
   * <pre>
   * Required. Immutable. Used when issuing certificates for this
   * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
   * If this
   * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
   * is a self-signed CertificateAuthority, this key is also used to sign the
   * self-signed CA certificate. Otherwise, it is used to sign a CSR.
   * </pre>
   *
   * <code>
   * .google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec key_spec = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
   * </code>
   *
   * @return Whether the keySpec field is set.
   */
  @java.lang.Override
  public boolean hasKeySpec() {
    return keySpec_ != null;
  }
  /**
   *
   *
   * <pre>
   * Required. Immutable. Used when issuing certificates for this
   * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
   * If this
   * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
   * is a self-signed CertificateAuthority, this key is also used to sign the
   * self-signed CA certificate. Otherwise, it is used to sign a CSR.
   * </pre>
   *
   * <code>
   * .google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec key_spec = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
   * </code>
   *
   * @return The keySpec.
   */
  @java.lang.Override
  public com.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec getKeySpec() {
    return keySpec_ == null
        ? com.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec
            .getDefaultInstance()
        : keySpec_;
  }
  /**
   *
   *
   * <pre>
   * Required. Immutable. Used when issuing certificates for this
   * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
   * If this
   * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
   * is a self-signed CertificateAuthority, this key is also used to sign the
   * self-signed CA certificate. Otherwise, it is used to sign a CSR.
   * </pre>
   *
   * <code>
   * .google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec key_spec = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
   * </code>
   */
  @java.lang.Override
  public com.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpecOrBuilder
      getKeySpecOrBuilder() {
    return keySpec_ == null
        ? com.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec
            .getDefaultInstance()
        : keySpec_;
  }

  public static final int SUBORDINATE_CONFIG_FIELD_NUMBER = 6;
  private com.google.cloud.security.privateca.v1.SubordinateConfig subordinateConfig_;
  /**
   *
   *
   * <pre>
   * Optional. If this is a subordinate
   * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority],
   * this field will be set with the subordinate configuration, which describes
   * its issuers. This may be updated, but this
   * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
   * must continue to validate.
   * </pre>
   *
   * <code>
   * .google.cloud.security.privateca.v1.SubordinateConfig subordinate_config = 6 [(.google.api.field_behavior) = OPTIONAL];
   * </code>
   *
   * @return Whether the subordinateConfig field is set.
   */
  @java.lang.Override
  public boolean hasSubordinateConfig() {
    return subordinateConfig_ != null;
  }
  /**
   *
   *
   * <pre>
   * Optional. If this is a subordinate
   * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority],
   * this field will be set with the subordinate configuration, which describes
   * its issuers. This may be updated, but this
   * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
   * must continue to validate.
   * </pre>
   *
   * <code>
   * .google.cloud.security.privateca.v1.SubordinateConfig subordinate_config = 6 [(.google.api.field_behavior) = OPTIONAL];
   * </code>
   *
   * @return The subordinateConfig.
   */
  @java.lang.Override
  public com.google.cloud.security.privateca.v1.SubordinateConfig getSubordinateConfig() {
    return subordinateConfig_ == null
        ? com.google.cloud.security.privateca.v1.SubordinateConfig.getDefaultInstance()
        : subordinateConfig_;
  }
  /**
   *
   *
   * <pre>
   * Optional. If this is a subordinate
   * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority],
   * this field will be set with the subordinate configuration, which describes
   * its issuers. This may be updated, but this
   * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
   * must continue to validate.
   * </pre>
   *
   * <code>
   * .google.cloud.security.privateca.v1.SubordinateConfig subordinate_config = 6 [(.google.api.field_behavior) = OPTIONAL];
   * </code>
   */
  @java.lang.Override
  public com.google.cloud.security.privateca.v1.SubordinateConfigOrBuilder
      getSubordinateConfigOrBuilder() {
    return subordinateConfig_ == null
        ? com.google.cloud.security.privateca.v1.SubordinateConfig.getDefaultInstance()
        : subordinateConfig_;
  }

  public static final int TIER_FIELD_NUMBER = 7;
  private int tier_ = 0;
  /**
   *
   *
   * <pre>
   * Output only. The
   * [CaPool.Tier][google.cloud.security.privateca.v1.CaPool.Tier] of the
   * [CaPool][google.cloud.security.privateca.v1.CaPool] that includes this
   * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
   * </pre>
   *
   * <code>
   * .google.cloud.security.privateca.v1.CaPool.Tier tier = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   *
   * @return The enum numeric value on the wire for tier.
   */
  @java.lang.Override
  public int getTierValue() {
    return tier_;
  }
  /**
   *
   *
   * <pre>
   * Output only. The
   * [CaPool.Tier][google.cloud.security.privateca.v1.CaPool.Tier] of the
   * [CaPool][google.cloud.security.privateca.v1.CaPool] that includes this
   * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
   * </pre>
   *
   * <code>
   * .google.cloud.security.privateca.v1.CaPool.Tier tier = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   *
   * @return The tier.
   */
  @java.lang.Override
  public com.google.cloud.security.privateca.v1.CaPool.Tier getTier() {
    com.google.cloud.security.privateca.v1.CaPool.Tier result =
        com.google.cloud.security.privateca.v1.CaPool.Tier.forNumber(tier_);
    return result == null
        ? com.google.cloud.security.privateca.v1.CaPool.Tier.UNRECOGNIZED
        : result;
  }

  public static final int STATE_FIELD_NUMBER = 8;
  private int state_ = 0;
  /**
   *
   *
   * <pre>
   * Output only. The
   * [State][google.cloud.security.privateca.v1.CertificateAuthority.State] for
   * this
   * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
   * </pre>
   *
   * <code>
   * .google.cloud.security.privateca.v1.CertificateAuthority.State state = 8 [(.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
   * [State][google.cloud.security.privateca.v1.CertificateAuthority.State] for
   * this
   * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
   * </pre>
   *
   * <code>
   * .google.cloud.security.privateca.v1.CertificateAuthority.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   *
   * @return The state.
   */
  @java.lang.Override
  public com.google.cloud.security.privateca.v1.CertificateAuthority.State getState() {
    com.google.cloud.security.privateca.v1.CertificateAuthority.State result =
        com.google.cloud.security.privateca.v1.CertificateAuthority.State.forNumber(state_);
    return result == null
        ? com.google.cloud.security.privateca.v1.CertificateAuthority.State.UNRECOGNIZED
        : result;
  }

  public static final int PEM_CA_CERTIFICATES_FIELD_NUMBER = 9;

  @SuppressWarnings("serial")
  private com.google.protobuf.LazyStringArrayList pemCaCertificates_ =
      com.google.protobuf.LazyStringArrayList.emptyList();
  /**
   *
   *
   * <pre>
   * Output only. This
   * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
   * certificate chain, including the current
   * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
   * certificate. Ordered such that the root issuer is the final element
   * (consistent with RFC 5246). For a self-signed CA, this will only list the
   * current
   * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
   * certificate.
   * </pre>
   *
   * <code>repeated string pem_ca_certificates = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   *
   * @return A list containing the pemCaCertificates.
   */
  public com.google.protobuf.ProtocolStringList getPemCaCertificatesList() {
    return pemCaCertificates_;
  }
  /**
   *
   *
   * <pre>
   * Output only. This
   * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
   * certificate chain, including the current
   * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
   * certificate. Ordered such that the root issuer is the final element
   * (consistent with RFC 5246). For a self-signed CA, this will only list the
   * current
   * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
   * certificate.
   * </pre>
   *
   * <code>repeated string pem_ca_certificates = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   *
   * @return The count of pemCaCertificates.
   */
  public int getPemCaCertificatesCount() {
    return pemCaCertificates_.size();
  }
  /**
   *
   *
   * <pre>
   * Output only. This
   * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
   * certificate chain, including the current
   * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
   * certificate. Ordered such that the root issuer is the final element
   * (consistent with RFC 5246). For a self-signed CA, this will only list the
   * current
   * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
   * certificate.
   * </pre>
   *
   * <code>repeated string pem_ca_certificates = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   *
   * @param index The index of the element to return.
   * @return The pemCaCertificates at the given index.
   */
  public java.lang.String getPemCaCertificates(int index) {
    return pemCaCertificates_.get(index);
  }
  /**
   *
   *
   * <pre>
   * Output only. This
   * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
   * certificate chain, including the current
   * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
   * certificate. Ordered such that the root issuer is the final element
   * (consistent with RFC 5246). For a self-signed CA, this will only list the
   * current
   * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
   * certificate.
   * </pre>
   *
   * <code>repeated string pem_ca_certificates = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   *
   * @param index The index of the value to return.
   * @return The bytes of the pemCaCertificates at the given index.
   */
  public com.google.protobuf.ByteString getPemCaCertificatesBytes(int index) {
    return pemCaCertificates_.getByteString(index);
  }

  public static final int CA_CERTIFICATE_DESCRIPTIONS_FIELD_NUMBER = 10;

  @SuppressWarnings("serial")
  private java.util.List<com.google.cloud.security.privateca.v1.CertificateDescription>
      caCertificateDescriptions_;
  /**
   *
   *
   * <pre>
   * Output only. A structured description of this
   * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
   * CA certificate and its issuers. Ordered as self-to-root.
   * </pre>
   *
   * <code>
   * repeated .google.cloud.security.privateca.v1.CertificateDescription ca_certificate_descriptions = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   */
  @java.lang.Override
  public java.util.List<com.google.cloud.security.privateca.v1.CertificateDescription>
      getCaCertificateDescriptionsList() {
    return caCertificateDescriptions_;
  }
  /**
   *
   *
   * <pre>
   * Output only. A structured description of this
   * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
   * CA certificate and its issuers. Ordered as self-to-root.
   * </pre>
   *
   * <code>
   * repeated .google.cloud.security.privateca.v1.CertificateDescription ca_certificate_descriptions = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   */
  @java.lang.Override
  public java.util.List<
          ? extends com.google.cloud.security.privateca.v1.CertificateDescriptionOrBuilder>
      getCaCertificateDescriptionsOrBuilderList() {
    return caCertificateDescriptions_;
  }
  /**
   *
   *
   * <pre>
   * Output only. A structured description of this
   * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
   * CA certificate and its issuers. Ordered as self-to-root.
   * </pre>
   *
   * <code>
   * repeated .google.cloud.security.privateca.v1.CertificateDescription ca_certificate_descriptions = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   */
  @java.lang.Override
  public int getCaCertificateDescriptionsCount() {
    return caCertificateDescriptions_.size();
  }
  /**
   *
   *
   * <pre>
   * Output only. A structured description of this
   * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
   * CA certificate and its issuers. Ordered as self-to-root.
   * </pre>
   *
   * <code>
   * repeated .google.cloud.security.privateca.v1.CertificateDescription ca_certificate_descriptions = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   */
  @java.lang.Override
  public com.google.cloud.security.privateca.v1.CertificateDescription getCaCertificateDescriptions(
      int index) {
    return caCertificateDescriptions_.get(index);
  }
  /**
   *
   *
   * <pre>
   * Output only. A structured description of this
   * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
   * CA certificate and its issuers. Ordered as self-to-root.
   * </pre>
   *
   * <code>
   * repeated .google.cloud.security.privateca.v1.CertificateDescription ca_certificate_descriptions = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   */
  @java.lang.Override
  public com.google.cloud.security.privateca.v1.CertificateDescriptionOrBuilder
      getCaCertificateDescriptionsOrBuilder(int index) {
    return caCertificateDescriptions_.get(index);
  }

  public static final int GCS_BUCKET_FIELD_NUMBER = 11;

  @SuppressWarnings("serial")
  private volatile java.lang.Object gcsBucket_ = "";
  /**
   *
   *
   * <pre>
   * Immutable. The name of a Cloud Storage bucket where this
   * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
   * will publish content, such as the CA certificate and CRLs. This must be a
   * bucket name, without any prefixes (such as `gs://`) or suffixes (such as
   * `.googleapis.com`). For example, to use a bucket named `my-bucket`, you
   * would simply specify `my-bucket`. If not specified, a managed bucket will
   * be created.
   * </pre>
   *
   * <code>string gcs_bucket = 11 [(.google.api.field_behavior) = IMMUTABLE];</code>
   *
   * @return The gcsBucket.
   */
  @java.lang.Override
  public java.lang.String getGcsBucket() {
    java.lang.Object ref = gcsBucket_;
    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();
      gcsBucket_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * Immutable. The name of a Cloud Storage bucket where this
   * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
   * will publish content, such as the CA certificate and CRLs. This must be a
   * bucket name, without any prefixes (such as `gs://`) or suffixes (such as
   * `.googleapis.com`). For example, to use a bucket named `my-bucket`, you
   * would simply specify `my-bucket`. If not specified, a managed bucket will
   * be created.
   * </pre>
   *
   * <code>string gcs_bucket = 11 [(.google.api.field_behavior) = IMMUTABLE];</code>
   *
   * @return The bytes for gcsBucket.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getGcsBucketBytes() {
    java.lang.Object ref = gcsBucket_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      gcsBucket_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int ACCESS_URLS_FIELD_NUMBER = 12;
  private com.google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls accessUrls_;
  /**
   *
   *
   * <pre>
   * Output only. URLs for accessing content published by this CA, such as the
   * CA certificate and CRLs.
   * </pre>
   *
   * <code>
   * .google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls access_urls = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   *
   * @return Whether the accessUrls field is set.
   */
  @java.lang.Override
  public boolean hasAccessUrls() {
    return accessUrls_ != null;
  }
  /**
   *
   *
   * <pre>
   * Output only. URLs for accessing content published by this CA, such as the
   * CA certificate and CRLs.
   * </pre>
   *
   * <code>
   * .google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls access_urls = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   *
   * @return The accessUrls.
   */
  @java.lang.Override
  public com.google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls getAccessUrls() {
    return accessUrls_ == null
        ? com.google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls
            .getDefaultInstance()
        : accessUrls_;
  }
  /**
   *
   *
   * <pre>
   * Output only. URLs for accessing content published by this CA, such as the
   * CA certificate and CRLs.
   * </pre>
   *
   * <code>
   * .google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls access_urls = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   */
  @java.lang.Override
  public com.google.cloud.security.privateca.v1.CertificateAuthority.AccessUrlsOrBuilder
      getAccessUrlsOrBuilder() {
    return accessUrls_ == null
        ? com.google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls
            .getDefaultInstance()
        : accessUrls_;
  }

  public static final int CREATE_TIME_FIELD_NUMBER = 13;
  private com.google.protobuf.Timestamp createTime_;
  /**
   *
   *
   * <pre>
   * Output only. The time at which this
   * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
   * was created.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp create_time = 13 [(.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
   * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
   * was created.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp create_time = 13 [(.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
   * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
   * was created.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp create_time = 13 [(.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 UPDATE_TIME_FIELD_NUMBER = 14;
  private com.google.protobuf.Timestamp updateTime_;
  /**
   *
   *
   * <pre>
   * Output only. The time at which this
   * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
   * was last updated.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   *
   * @return Whether the updateTime field is set.
   */
  @java.lang.Override
  public boolean hasUpdateTime() {
    return updateTime_ != null;
  }
  /**
   *
   *
   * <pre>
   * Output only. The time at which this
   * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
   * was last updated.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   *
   * @return The updateTime.
   */
  @java.lang.Override
  public com.google.protobuf.Timestamp getUpdateTime() {
    return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_;
  }
  /**
   *
   *
   * <pre>
   * Output only. The time at which this
   * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
   * was last updated.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   */
  @java.lang.Override
  public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() {
    return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_;
  }

  public static final int DELETE_TIME_FIELD_NUMBER = 15;
  private com.google.protobuf.Timestamp deleteTime_;
  /**
   *
   *
   * <pre>
   * Output only. The time at which this
   * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
   * was soft deleted, if it is in the
   * [DELETED][google.cloud.security.privateca.v1.CertificateAuthority.State.DELETED]
   * state.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp delete_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   *
   * @return Whether the deleteTime field is set.
   */
  @java.lang.Override
  public boolean hasDeleteTime() {
    return deleteTime_ != null;
  }
  /**
   *
   *
   * <pre>
   * Output only. The time at which this
   * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
   * was soft deleted, if it is in the
   * [DELETED][google.cloud.security.privateca.v1.CertificateAuthority.State.DELETED]
   * state.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp delete_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   *
   * @return The deleteTime.
   */
  @java.lang.Override
  public com.google.protobuf.Timestamp getDeleteTime() {
    return deleteTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : deleteTime_;
  }
  /**
   *
   *
   * <pre>
   * Output only. The time at which this
   * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
   * was soft deleted, if it is in the
   * [DELETED][google.cloud.security.privateca.v1.CertificateAuthority.State.DELETED]
   * state.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp delete_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   */
  @java.lang.Override
  public com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder() {
    return deleteTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : deleteTime_;
  }

  public static final int EXPIRE_TIME_FIELD_NUMBER = 16;
  private com.google.protobuf.Timestamp expireTime_;
  /**
   *
   *
   * <pre>
   * Output only. The time at which this
   * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
   * will be permanently purged, if it is in the
   * [DELETED][google.cloud.security.privateca.v1.CertificateAuthority.State.DELETED]
   * state.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp expire_time = 16 [(.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
   * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
   * will be permanently purged, if it is in the
   * [DELETED][google.cloud.security.privateca.v1.CertificateAuthority.State.DELETED]
   * state.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp expire_time = 16 [(.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
   * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
   * will be permanently purged, if it is in the
   * [DELETED][google.cloud.security.privateca.v1.CertificateAuthority.State.DELETED]
   * state.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp expire_time = 16 [(.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 LABELS_FIELD_NUMBER = 17;

  private static final class LabelsDefaultEntryHolder {
    static final com.google.protobuf.MapEntry<java.lang.String, java.lang.String> defaultEntry =
        com.google.protobuf.MapEntry.<java.lang.String, java.lang.String>newDefaultInstance(
            com.google.cloud.security.privateca.v1.PrivateCaResourcesProto
                .internal_static_google_cloud_security_privateca_v1_CertificateAuthority_LabelsEntry_descriptor,
            com.google.protobuf.WireFormat.FieldType.STRING,
            "",
            com.google.protobuf.WireFormat.FieldType.STRING,
            "");
  }

  @SuppressWarnings("serial")
  private com.google.protobuf.MapField<java.lang.String, java.lang.String> labels_;

  private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetLabels() {
    if (labels_ == null) {
      return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry);
    }
    return labels_;
  }

  public int getLabelsCount() {
    return internalGetLabels().getMap().size();
  }
  /**
   *
   *
   * <pre>
   * Optional. Labels with user-defined metadata.
   * </pre>
   *
   * <code>map&lt;string, string&gt; labels = 17 [(.google.api.field_behavior) = OPTIONAL];</code>
   */
  @java.lang.Override
  public boolean containsLabels(java.lang.String key) {
    if (key == null) {
      throw new NullPointerException("map key");
    }
    return internalGetLabels().getMap().containsKey(key);
  }
  /** Use {@link #getLabelsMap()} instead. */
  @java.lang.Override
  @java.lang.Deprecated
  public java.util.Map<java.lang.String, java.lang.String> getLabels() {
    return getLabelsMap();
  }
  /**
   *
   *
   * <pre>
   * Optional. Labels with user-defined metadata.
   * </pre>
   *
   * <code>map&lt;string, string&gt; labels = 17 [(.google.api.field_behavior) = OPTIONAL];</code>
   */
  @java.lang.Override
  public java.util.Map<java.lang.String, java.lang.String> getLabelsMap() {
    return internalGetLabels().getMap();
  }
  /**
   *
   *
   * <pre>
   * Optional. Labels with user-defined metadata.
   * </pre>
   *
   * <code>map&lt;string, string&gt; labels = 17 [(.google.api.field_behavior) = OPTIONAL];</code>
   */
  @java.lang.Override
  public /* nullable */ java.lang.String getLabelsOrDefault(
      java.lang.String key,
      /* nullable */
      java.lang.String defaultValue) {
    if (key == null) {
      throw new NullPointerException("map key");
    }
    java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap();
    return map.containsKey(key) ? map.get(key) : defaultValue;
  }
  /**
   *
   *
   * <pre>
   * Optional. Labels with user-defined metadata.
   * </pre>
   *
   * <code>map&lt;string, string&gt; labels = 17 [(.google.api.field_behavior) = OPTIONAL];</code>
   */
  @java.lang.Override
  public java.lang.String getLabelsOrThrow(java.lang.String key) {
    if (key == null) {
      throw new NullPointerException("map key");
    }
    java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap();
    if (!map.containsKey(key)) {
      throw new java.lang.IllegalArgumentException();
    }
    return map.get(key);
  }

  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 (type_
        != com.google.cloud.security.privateca.v1.CertificateAuthority.Type.TYPE_UNSPECIFIED
            .getNumber()) {
      output.writeEnum(2, type_);
    }
    if (config_ != null) {
      output.writeMessage(3, getConfig());
    }
    if (lifetime_ != null) {
      output.writeMessage(4, getLifetime());
    }
    if (keySpec_ != null) {
      output.writeMessage(5, getKeySpec());
    }
    if (subordinateConfig_ != null) {
      output.writeMessage(6, getSubordinateConfig());
    }
    if (tier_ != com.google.cloud.security.privateca.v1.CaPool.Tier.TIER_UNSPECIFIED.getNumber()) {
      output.writeEnum(7, tier_);
    }
    if (state_
        != com.google.cloud.security.privateca.v1.CertificateAuthority.State.STATE_UNSPECIFIED
            .getNumber()) {
      output.writeEnum(8, state_);
    }
    for (int i = 0; i < pemCaCertificates_.size(); i++) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 9, pemCaCertificates_.getRaw(i));
    }
    for (int i = 0; i < caCertificateDescriptions_.size(); i++) {
      output.writeMessage(10, caCertificateDescriptions_.get(i));
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcsBucket_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 11, gcsBucket_);
    }
    if (accessUrls_ != null) {
      output.writeMessage(12, getAccessUrls());
    }
    if (createTime_ != null) {
      output.writeMessage(13, getCreateTime());
    }
    if (updateTime_ != null) {
      output.writeMessage(14, getUpdateTime());
    }
    if (deleteTime_ != null) {
      output.writeMessage(15, getDeleteTime());
    }
    if (expireTime_ != null) {
      output.writeMessage(16, getExpireTime());
    }
    com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
        output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 17);
    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 (type_
        != com.google.cloud.security.privateca.v1.CertificateAuthority.Type.TYPE_UNSPECIFIED
            .getNumber()) {
      size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, type_);
    }
    if (config_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getConfig());
    }
    if (lifetime_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getLifetime());
    }
    if (keySpec_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getKeySpec());
    }
    if (subordinateConfig_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getSubordinateConfig());
    }
    if (tier_ != com.google.cloud.security.privateca.v1.CaPool.Tier.TIER_UNSPECIFIED.getNumber()) {
      size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, tier_);
    }
    if (state_
        != com.google.cloud.security.privateca.v1.CertificateAuthority.State.STATE_UNSPECIFIED
            .getNumber()) {
      size += com.google.protobuf.CodedOutputStream.computeEnumSize(8, state_);
    }
    {
      int dataSize = 0;
      for (int i = 0; i < pemCaCertificates_.size(); i++) {
        dataSize += computeStringSizeNoTag(pemCaCertificates_.getRaw(i));
      }
      size += dataSize;
      size += 1 * getPemCaCertificatesList().size();
    }
    for (int i = 0; i < caCertificateDescriptions_.size(); i++) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(
              10, caCertificateDescriptions_.get(i));
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcsBucket_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, gcsBucket_);
    }
    if (accessUrls_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getAccessUrls());
    }
    if (createTime_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getCreateTime());
    }
    if (updateTime_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getUpdateTime());
    }
    if (deleteTime_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(15, getDeleteTime());
    }
    if (expireTime_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(16, getExpireTime());
    }
    for (java.util.Map.Entry<java.lang.String, java.lang.String> entry :
        internalGetLabels().getMap().entrySet()) {
      com.google.protobuf.MapEntry<java.lang.String, java.lang.String> labels__ =
          LabelsDefaultEntryHolder.defaultEntry
              .newBuilderForType()
              .setKey(entry.getKey())
              .setValue(entry.getValue())
              .build();
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(17, labels__);
    }
    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.security.privateca.v1.CertificateAuthority)) {
      return super.equals(obj);
    }
    com.google.cloud.security.privateca.v1.CertificateAuthority other =
        (com.google.cloud.security.privateca.v1.CertificateAuthority) obj;

    if (!getName().equals(other.getName())) return false;
    if (type_ != other.type_) return false;
    if (hasConfig() != other.hasConfig()) return false;
    if (hasConfig()) {
      if (!getConfig().equals(other.getConfig())) return false;
    }
    if (hasLifetime() != other.hasLifetime()) return false;
    if (hasLifetime()) {
      if (!getLifetime().equals(other.getLifetime())) return false;
    }
    if (hasKeySpec() != other.hasKeySpec()) return false;
    if (hasKeySpec()) {
      if (!getKeySpec().equals(other.getKeySpec())) return false;
    }
    if (hasSubordinateConfig() != other.hasSubordinateConfig()) return false;
    if (hasSubordinateConfig()) {
      if (!getSubordinateConfig().equals(other.getSubordinateConfig())) return false;
    }
    if (tier_ != other.tier_) return false;
    if (state_ != other.state_) return false;
    if (!getPemCaCertificatesList().equals(other.getPemCaCertificatesList())) return false;
    if (!getCaCertificateDescriptionsList().equals(other.getCaCertificateDescriptionsList()))
      return false;
    if (!getGcsBucket().equals(other.getGcsBucket())) return false;
    if (hasAccessUrls() != other.hasAccessUrls()) return false;
    if (hasAccessUrls()) {
      if (!getAccessUrls().equals(other.getAccessUrls())) return false;
    }
    if (hasCreateTime() != other.hasCreateTime()) return false;
    if (hasCreateTime()) {
      if (!getCreateTime().equals(other.getCreateTime())) return false;
    }
    if (hasUpdateTime() != other.hasUpdateTime()) return false;
    if (hasUpdateTime()) {
      if (!getUpdateTime().equals(other.getUpdateTime())) return false;
    }
    if (hasDeleteTime() != other.hasDeleteTime()) return false;
    if (hasDeleteTime()) {
      if (!getDeleteTime().equals(other.getDeleteTime())) return false;
    }
    if (hasExpireTime() != other.hasExpireTime()) return false;
    if (hasExpireTime()) {
      if (!getExpireTime().equals(other.getExpireTime())) return false;
    }
    if (!internalGetLabels().equals(other.internalGetLabels())) 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) + TYPE_FIELD_NUMBER;
    hash = (53 * hash) + type_;
    if (hasConfig()) {
      hash = (37 * hash) + CONFIG_FIELD_NUMBER;
      hash = (53 * hash) + getConfig().hashCode();
    }
    if (hasLifetime()) {
      hash = (37 * hash) + LIFETIME_FIELD_NUMBER;
      hash = (53 * hash) + getLifetime().hashCode();
    }
    if (hasKeySpec()) {
      hash = (37 * hash) + KEY_SPEC_FIELD_NUMBER;
      hash = (53 * hash) + getKeySpec().hashCode();
    }
    if (hasSubordinateConfig()) {
      hash = (37 * hash) + SUBORDINATE_CONFIG_FIELD_NUMBER;
      hash = (53 * hash) + getSubordinateConfig().hashCode();
    }
    hash = (37 * hash) + TIER_FIELD_NUMBER;
    hash = (53 * hash) + tier_;
    hash = (37 * hash) + STATE_FIELD_NUMBER;
    hash = (53 * hash) + state_;
    if (getPemCaCertificatesCount() > 0) {
      hash = (37 * hash) + PEM_CA_CERTIFICATES_FIELD_NUMBER;
      hash = (53 * hash) + getPemCaCertificatesList().hashCode();
    }
    if (getCaCertificateDescriptionsCount() > 0) {
      hash = (37 * hash) + CA_CERTIFICATE_DESCRIPTIONS_FIELD_NUMBER;
      hash = (53 * hash) + getCaCertificateDescriptionsList().hashCode();
    }
    hash = (37 * hash) + GCS_BUCKET_FIELD_NUMBER;
    hash = (53 * hash) + getGcsBucket().hashCode();
    if (hasAccessUrls()) {
      hash = (37 * hash) + ACCESS_URLS_FIELD_NUMBER;
      hash = (53 * hash) + getAccessUrls().hashCode();
    }
    if (hasCreateTime()) {
      hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER;
      hash = (53 * hash) + getCreateTime().hashCode();
    }
    if (hasUpdateTime()) {
      hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER;
      hash = (53 * hash) + getUpdateTime().hashCode();
    }
    if (hasDeleteTime()) {
      hash = (37 * hash) + DELETE_TIME_FIELD_NUMBER;
      hash = (53 * hash) + getDeleteTime().hashCode();
    }
    if (hasExpireTime()) {
      hash = (37 * hash) + EXPIRE_TIME_FIELD_NUMBER;
      hash = (53 * hash) + getExpireTime().hashCode();
    }
    if (!internalGetLabels().getMap().isEmpty()) {
      hash = (37 * hash) + LABELS_FIELD_NUMBER;
      hash = (53 * hash) + internalGetLabels().hashCode();
    }
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

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

  public static com.google.cloud.security.privateca.v1.CertificateAuthority 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.security.privateca.v1.CertificateAuthority parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.security.privateca.v1.CertificateAuthority 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.security.privateca.v1.CertificateAuthority parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

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

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

  public static com.google.cloud.security.privateca.v1.CertificateAuthority 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.security.privateca.v1.CertificateAuthority parseDelimitedFrom(
      java.io.InputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
  }

  public static com.google.cloud.security.privateca.v1.CertificateAuthority 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.security.privateca.v1.CertificateAuthority parseFrom(
      com.google.protobuf.CodedInputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

  public static com.google.cloud.security.privateca.v1.CertificateAuthority 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.security.privateca.v1.CertificateAuthority 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>
   * A
   * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
   * represents an individual Certificate Authority. A
   * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
   * can be used to create
   * [Certificates][google.cloud.security.privateca.v1.Certificate].
   * </pre>
   *
   * Protobuf type {@code google.cloud.security.privateca.v1.CertificateAuthority}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1.CertificateAuthority)
      com.google.cloud.security.privateca.v1.CertificateAuthorityOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.cloud.security.privateca.v1.PrivateCaResourcesProto
          .internal_static_google_cloud_security_privateca_v1_CertificateAuthority_descriptor;
    }

    @SuppressWarnings({"rawtypes"})
    protected com.google.protobuf.MapField internalGetMapField(int number) {
      switch (number) {
        case 17:
          return internalGetLabels();
        default:
          throw new RuntimeException("Invalid map field number: " + number);
      }
    }

    @SuppressWarnings({"rawtypes"})
    protected com.google.protobuf.MapField internalGetMutableMapField(int number) {
      switch (number) {
        case 17:
          return internalGetMutableLabels();
        default:
          throw new RuntimeException("Invalid map field number: " + number);
      }
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.cloud.security.privateca.v1.PrivateCaResourcesProto
          .internal_static_google_cloud_security_privateca_v1_CertificateAuthority_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.cloud.security.privateca.v1.CertificateAuthority.class,
              com.google.cloud.security.privateca.v1.CertificateAuthority.Builder.class);
    }

    // Construct using com.google.cloud.security.privateca.v1.CertificateAuthority.newBuilder()
    private Builder() {}

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

    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      name_ = "";
      type_ = 0;
      config_ = null;
      if (configBuilder_ != null) {
        configBuilder_.dispose();
        configBuilder_ = null;
      }
      lifetime_ = null;
      if (lifetimeBuilder_ != null) {
        lifetimeBuilder_.dispose();
        lifetimeBuilder_ = null;
      }
      keySpec_ = null;
      if (keySpecBuilder_ != null) {
        keySpecBuilder_.dispose();
        keySpecBuilder_ = null;
      }
      subordinateConfig_ = null;
      if (subordinateConfigBuilder_ != null) {
        subordinateConfigBuilder_.dispose();
        subordinateConfigBuilder_ = null;
      }
      tier_ = 0;
      state_ = 0;
      pemCaCertificates_ = com.google.protobuf.LazyStringArrayList.emptyList();
      if (caCertificateDescriptionsBuilder_ == null) {
        caCertificateDescriptions_ = java.util.Collections.emptyList();
      } else {
        caCertificateDescriptions_ = null;
        caCertificateDescriptionsBuilder_.clear();
      }
      bitField0_ = (bitField0_ & ~0x00000200);
      gcsBucket_ = "";
      accessUrls_ = null;
      if (accessUrlsBuilder_ != null) {
        accessUrlsBuilder_.dispose();
        accessUrlsBuilder_ = null;
      }
      createTime_ = null;
      if (createTimeBuilder_ != null) {
        createTimeBuilder_.dispose();
        createTimeBuilder_ = null;
      }
      updateTime_ = null;
      if (updateTimeBuilder_ != null) {
        updateTimeBuilder_.dispose();
        updateTimeBuilder_ = null;
      }
      deleteTime_ = null;
      if (deleteTimeBuilder_ != null) {
        deleteTimeBuilder_.dispose();
        deleteTimeBuilder_ = null;
      }
      expireTime_ = null;
      if (expireTimeBuilder_ != null) {
        expireTimeBuilder_.dispose();
        expireTimeBuilder_ = null;
      }
      internalGetMutableLabels().clear();
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
      return com.google.cloud.security.privateca.v1.PrivateCaResourcesProto
          .internal_static_google_cloud_security_privateca_v1_CertificateAuthority_descriptor;
    }

    @java.lang.Override
    public com.google.cloud.security.privateca.v1.CertificateAuthority getDefaultInstanceForType() {
      return com.google.cloud.security.privateca.v1.CertificateAuthority.getDefaultInstance();
    }

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

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

    private void buildPartialRepeatedFields(
        com.google.cloud.security.privateca.v1.CertificateAuthority result) {
      if (caCertificateDescriptionsBuilder_ == null) {
        if (((bitField0_ & 0x00000200) != 0)) {
          caCertificateDescriptions_ =
              java.util.Collections.unmodifiableList(caCertificateDescriptions_);
          bitField0_ = (bitField0_ & ~0x00000200);
        }
        result.caCertificateDescriptions_ = caCertificateDescriptions_;
      } else {
        result.caCertificateDescriptions_ = caCertificateDescriptionsBuilder_.build();
      }
    }

    private void buildPartial0(com.google.cloud.security.privateca.v1.CertificateAuthority result) {
      int from_bitField0_ = bitField0_;
      if (((from_bitField0_ & 0x00000001) != 0)) {
        result.name_ = name_;
      }
      if (((from_bitField0_ & 0x00000002) != 0)) {
        result.type_ = type_;
      }
      if (((from_bitField0_ & 0x00000004) != 0)) {
        result.config_ = configBuilder_ == null ? config_ : configBuilder_.build();
      }
      if (((from_bitField0_ & 0x00000008) != 0)) {
        result.lifetime_ = lifetimeBuilder_ == null ? lifetime_ : lifetimeBuilder_.build();
      }
      if (((from_bitField0_ & 0x00000010) != 0)) {
        result.keySpec_ = keySpecBuilder_ == null ? keySpec_ : keySpecBuilder_.build();
      }
      if (((from_bitField0_ & 0x00000020) != 0)) {
        result.subordinateConfig_ =
            subordinateConfigBuilder_ == null
                ? subordinateConfig_
                : subordinateConfigBuilder_.build();
      }
      if (((from_bitField0_ & 0x00000040) != 0)) {
        result.tier_ = tier_;
      }
      if (((from_bitField0_ & 0x00000080) != 0)) {
        result.state_ = state_;
      }
      if (((from_bitField0_ & 0x00000100) != 0)) {
        pemCaCertificates_.makeImmutable();
        result.pemCaCertificates_ = pemCaCertificates_;
      }
      if (((from_bitField0_ & 0x00000400) != 0)) {
        result.gcsBucket_ = gcsBucket_;
      }
      if (((from_bitField0_ & 0x00000800) != 0)) {
        result.accessUrls_ = accessUrlsBuilder_ == null ? accessUrls_ : accessUrlsBuilder_.build();
      }
      if (((from_bitField0_ & 0x00001000) != 0)) {
        result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build();
      }
      if (((from_bitField0_ & 0x00002000) != 0)) {
        result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build();
      }
      if (((from_bitField0_ & 0x00004000) != 0)) {
        result.deleteTime_ = deleteTimeBuilder_ == null ? deleteTime_ : deleteTimeBuilder_.build();
      }
      if (((from_bitField0_ & 0x00008000) != 0)) {
        result.expireTime_ = expireTimeBuilder_ == null ? expireTime_ : expireTimeBuilder_.build();
      }
      if (((from_bitField0_ & 0x00010000) != 0)) {
        result.labels_ = internalGetLabels();
        result.labels_.makeImmutable();
      }
    }

    @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.security.privateca.v1.CertificateAuthority) {
        return mergeFrom((com.google.cloud.security.privateca.v1.CertificateAuthority) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.cloud.security.privateca.v1.CertificateAuthority other) {
      if (other == com.google.cloud.security.privateca.v1.CertificateAuthority.getDefaultInstance())
        return this;
      if (!other.getName().isEmpty()) {
        name_ = other.name_;
        bitField0_ |= 0x00000001;
        onChanged();
      }
      if (other.type_ != 0) {
        setTypeValue(other.getTypeValue());
      }
      if (other.hasConfig()) {
        mergeConfig(other.getConfig());
      }
      if (other.hasLifetime()) {
        mergeLifetime(other.getLifetime());
      }
      if (other.hasKeySpec()) {
        mergeKeySpec(other.getKeySpec());
      }
      if (other.hasSubordinateConfig()) {
        mergeSubordinateConfig(other.getSubordinateConfig());
      }
      if (other.tier_ != 0) {
        setTierValue(other.getTierValue());
      }
      if (other.state_ != 0) {
        setStateValue(other.getStateValue());
      }
      if (!other.pemCaCertificates_.isEmpty()) {
        if (pemCaCertificates_.isEmpty()) {
          pemCaCertificates_ = other.pemCaCertificates_;
          bitField0_ |= 0x00000100;
        } else {
          ensurePemCaCertificatesIsMutable();
          pemCaCertificates_.addAll(other.pemCaCertificates_);
        }
        onChanged();
      }
      if (caCertificateDescriptionsBuilder_ == null) {
        if (!other.caCertificateDescriptions_.isEmpty()) {
          if (caCertificateDescriptions_.isEmpty()) {
            caCertificateDescriptions_ = other.caCertificateDescriptions_;
            bitField0_ = (bitField0_ & ~0x00000200);
          } else {
            ensureCaCertificateDescriptionsIsMutable();
            caCertificateDescriptions_.addAll(other.caCertificateDescriptions_);
          }
          onChanged();
        }
      } else {
        if (!other.caCertificateDescriptions_.isEmpty()) {
          if (caCertificateDescriptionsBuilder_.isEmpty()) {
            caCertificateDescriptionsBuilder_.dispose();
            caCertificateDescriptionsBuilder_ = null;
            caCertificateDescriptions_ = other.caCertificateDescriptions_;
            bitField0_ = (bitField0_ & ~0x00000200);
            caCertificateDescriptionsBuilder_ =
                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
                    ? getCaCertificateDescriptionsFieldBuilder()
                    : null;
          } else {
            caCertificateDescriptionsBuilder_.addAllMessages(other.caCertificateDescriptions_);
          }
        }
      }
      if (!other.getGcsBucket().isEmpty()) {
        gcsBucket_ = other.gcsBucket_;
        bitField0_ |= 0x00000400;
        onChanged();
      }
      if (other.hasAccessUrls()) {
        mergeAccessUrls(other.getAccessUrls());
      }
      if (other.hasCreateTime()) {
        mergeCreateTime(other.getCreateTime());
      }
      if (other.hasUpdateTime()) {
        mergeUpdateTime(other.getUpdateTime());
      }
      if (other.hasDeleteTime()) {
        mergeDeleteTime(other.getDeleteTime());
      }
      if (other.hasExpireTime()) {
        mergeExpireTime(other.getExpireTime());
      }
      internalGetMutableLabels().mergeFrom(other.internalGetLabels());
      bitField0_ |= 0x00010000;
      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:
              {
                type_ = input.readEnum();
                bitField0_ |= 0x00000002;
                break;
              } // case 16
            case 26:
              {
                input.readMessage(getConfigFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000004;
                break;
              } // case 26
            case 34:
              {
                input.readMessage(getLifetimeFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000008;
                break;
              } // case 34
            case 42:
              {
                input.readMessage(getKeySpecFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000010;
                break;
              } // case 42
            case 50:
              {
                input.readMessage(
                    getSubordinateConfigFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000020;
                break;
              } // case 50
            case 56:
              {
                tier_ = input.readEnum();
                bitField0_ |= 0x00000040;
                break;
              } // case 56
            case 64:
              {
                state_ = input.readEnum();
                bitField0_ |= 0x00000080;
                break;
              } // case 64
            case 74:
              {
                java.lang.String s = input.readStringRequireUtf8();
                ensurePemCaCertificatesIsMutable();
                pemCaCertificates_.add(s);
                break;
              } // case 74
            case 82:
              {
                com.google.cloud.security.privateca.v1.CertificateDescription m =
                    input.readMessage(
                        com.google.cloud.security.privateca.v1.CertificateDescription.parser(),
                        extensionRegistry);
                if (caCertificateDescriptionsBuilder_ == null) {
                  ensureCaCertificateDescriptionsIsMutable();
                  caCertificateDescriptions_.add(m);
                } else {
                  caCertificateDescriptionsBuilder_.addMessage(m);
                }
                break;
              } // case 82
            case 90:
              {
                gcsBucket_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000400;
                break;
              } // case 90
            case 98:
              {
                input.readMessage(getAccessUrlsFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000800;
                break;
              } // case 98
            case 106:
              {
                input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00001000;
                break;
              } // case 106
            case 114:
              {
                input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00002000;
                break;
              } // case 114
            case 122:
              {
                input.readMessage(getDeleteTimeFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00004000;
                break;
              } // case 122
            case 130:
              {
                input.readMessage(getExpireTimeFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00008000;
                break;
              } // case 130
            case 138:
              {
                com.google.protobuf.MapEntry<java.lang.String, java.lang.String> labels__ =
                    input.readMessage(
                        LabelsDefaultEntryHolder.defaultEntry.getParserForType(),
                        extensionRegistry);
                internalGetMutableLabels()
                    .getMutableMap()
                    .put(labels__.getKey(), labels__.getValue());
                bitField0_ |= 0x00010000;
                break;
              } // case 138
            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
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * in the format `projects/&#42;&#47;locations/&#42;&#47;caPools/&#42;&#47;certificateAuthorities/&#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
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * in the format `projects/&#42;&#47;locations/&#42;&#47;caPools/&#42;&#47;certificateAuthorities/&#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
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * in the format `projects/&#42;&#47;locations/&#42;&#47;caPools/&#42;&#47;certificateAuthorities/&#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
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * in the format `projects/&#42;&#47;locations/&#42;&#47;caPools/&#42;&#47;certificateAuthorities/&#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
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * in the format `projects/&#42;&#47;locations/&#42;&#47;caPools/&#42;&#47;certificateAuthorities/&#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 type_ = 0;
    /**
     *
     *
     * <pre>
     * Required. Immutable. The
     * [Type][google.cloud.security.privateca.v1.CertificateAuthority.Type] of
     * this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CertificateAuthority.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
     * </code>
     *
     * @return The enum numeric value on the wire for type.
     */
    @java.lang.Override
    public int getTypeValue() {
      return type_;
    }
    /**
     *
     *
     * <pre>
     * Required. Immutable. The
     * [Type][google.cloud.security.privateca.v1.CertificateAuthority.Type] of
     * this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CertificateAuthority.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
     * </code>
     *
     * @param value The enum numeric value on the wire for type to set.
     * @return This builder for chaining.
     */
    public Builder setTypeValue(int value) {
      type_ = value;
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. Immutable. The
     * [Type][google.cloud.security.privateca.v1.CertificateAuthority.Type] of
     * this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CertificateAuthority.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
     * </code>
     *
     * @return The type.
     */
    @java.lang.Override
    public com.google.cloud.security.privateca.v1.CertificateAuthority.Type getType() {
      com.google.cloud.security.privateca.v1.CertificateAuthority.Type result =
          com.google.cloud.security.privateca.v1.CertificateAuthority.Type.forNumber(type_);
      return result == null
          ? com.google.cloud.security.privateca.v1.CertificateAuthority.Type.UNRECOGNIZED
          : result;
    }
    /**
     *
     *
     * <pre>
     * Required. Immutable. The
     * [Type][google.cloud.security.privateca.v1.CertificateAuthority.Type] of
     * this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CertificateAuthority.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
     * </code>
     *
     * @param value The type to set.
     * @return This builder for chaining.
     */
    public Builder setType(com.google.cloud.security.privateca.v1.CertificateAuthority.Type value) {
      if (value == null) {
        throw new NullPointerException();
      }
      bitField0_ |= 0x00000002;
      type_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. Immutable. The
     * [Type][google.cloud.security.privateca.v1.CertificateAuthority.Type] of
     * this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CertificateAuthority.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
     * </code>
     *
     * @return This builder for chaining.
     */
    public Builder clearType() {
      bitField0_ = (bitField0_ & ~0x00000002);
      type_ = 0;
      onChanged();
      return this;
    }

    private com.google.cloud.security.privateca.v1.CertificateConfig config_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.security.privateca.v1.CertificateConfig,
            com.google.cloud.security.privateca.v1.CertificateConfig.Builder,
            com.google.cloud.security.privateca.v1.CertificateConfigOrBuilder>
        configBuilder_;
    /**
     *
     *
     * <pre>
     * Required. Immutable. The config used to create a self-signed X.509
     * certificate or CSR.
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CertificateConfig config = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
     * </code>
     *
     * @return Whether the config field is set.
     */
    public boolean hasConfig() {
      return ((bitField0_ & 0x00000004) != 0);
    }
    /**
     *
     *
     * <pre>
     * Required. Immutable. The config used to create a self-signed X.509
     * certificate or CSR.
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CertificateConfig config = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
     * </code>
     *
     * @return The config.
     */
    public com.google.cloud.security.privateca.v1.CertificateConfig getConfig() {
      if (configBuilder_ == null) {
        return config_ == null
            ? com.google.cloud.security.privateca.v1.CertificateConfig.getDefaultInstance()
            : config_;
      } else {
        return configBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Required. Immutable. The config used to create a self-signed X.509
     * certificate or CSR.
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CertificateConfig config = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
     * </code>
     */
    public Builder setConfig(com.google.cloud.security.privateca.v1.CertificateConfig value) {
      if (configBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        config_ = value;
      } else {
        configBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. Immutable. The config used to create a self-signed X.509
     * certificate or CSR.
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CertificateConfig config = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
     * </code>
     */
    public Builder setConfig(
        com.google.cloud.security.privateca.v1.CertificateConfig.Builder builderForValue) {
      if (configBuilder_ == null) {
        config_ = builderForValue.build();
      } else {
        configBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. Immutable. The config used to create a self-signed X.509
     * certificate or CSR.
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CertificateConfig config = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
     * </code>
     */
    public Builder mergeConfig(com.google.cloud.security.privateca.v1.CertificateConfig value) {
      if (configBuilder_ == null) {
        if (((bitField0_ & 0x00000004) != 0)
            && config_ != null
            && config_
                != com.google.cloud.security.privateca.v1.CertificateConfig.getDefaultInstance()) {
          getConfigBuilder().mergeFrom(value);
        } else {
          config_ = value;
        }
      } else {
        configBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. Immutable. The config used to create a self-signed X.509
     * certificate or CSR.
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CertificateConfig config = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
     * </code>
     */
    public Builder clearConfig() {
      bitField0_ = (bitField0_ & ~0x00000004);
      config_ = null;
      if (configBuilder_ != null) {
        configBuilder_.dispose();
        configBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. Immutable. The config used to create a self-signed X.509
     * certificate or CSR.
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CertificateConfig config = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
     * </code>
     */
    public com.google.cloud.security.privateca.v1.CertificateConfig.Builder getConfigBuilder() {
      bitField0_ |= 0x00000004;
      onChanged();
      return getConfigFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Required. Immutable. The config used to create a self-signed X.509
     * certificate or CSR.
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CertificateConfig config = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
     * </code>
     */
    public com.google.cloud.security.privateca.v1.CertificateConfigOrBuilder getConfigOrBuilder() {
      if (configBuilder_ != null) {
        return configBuilder_.getMessageOrBuilder();
      } else {
        return config_ == null
            ? com.google.cloud.security.privateca.v1.CertificateConfig.getDefaultInstance()
            : config_;
      }
    }
    /**
     *
     *
     * <pre>
     * Required. Immutable. The config used to create a self-signed X.509
     * certificate or CSR.
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CertificateConfig config = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
     * </code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.security.privateca.v1.CertificateConfig,
            com.google.cloud.security.privateca.v1.CertificateConfig.Builder,
            com.google.cloud.security.privateca.v1.CertificateConfigOrBuilder>
        getConfigFieldBuilder() {
      if (configBuilder_ == null) {
        configBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.cloud.security.privateca.v1.CertificateConfig,
                com.google.cloud.security.privateca.v1.CertificateConfig.Builder,
                com.google.cloud.security.privateca.v1.CertificateConfigOrBuilder>(
                getConfig(), getParentForChildren(), isClean());
        config_ = null;
      }
      return configBuilder_;
    }

    private com.google.protobuf.Duration lifetime_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Duration,
            com.google.protobuf.Duration.Builder,
            com.google.protobuf.DurationOrBuilder>
        lifetimeBuilder_;
    /**
     *
     *
     * <pre>
     * Required. Immutable. The desired lifetime of the CA certificate. Used to
     * create the "not_before_time" and "not_after_time" fields inside an X.509
     * certificate.
     * </pre>
     *
     * <code>
     * .google.protobuf.Duration lifetime = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
     * </code>
     *
     * @return Whether the lifetime field is set.
     */
    public boolean hasLifetime() {
      return ((bitField0_ & 0x00000008) != 0);
    }
    /**
     *
     *
     * <pre>
     * Required. Immutable. The desired lifetime of the CA certificate. Used to
     * create the "not_before_time" and "not_after_time" fields inside an X.509
     * certificate.
     * </pre>
     *
     * <code>
     * .google.protobuf.Duration lifetime = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
     * </code>
     *
     * @return The lifetime.
     */
    public com.google.protobuf.Duration getLifetime() {
      if (lifetimeBuilder_ == null) {
        return lifetime_ == null ? com.google.protobuf.Duration.getDefaultInstance() : lifetime_;
      } else {
        return lifetimeBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Required. Immutable. The desired lifetime of the CA certificate. Used to
     * create the "not_before_time" and "not_after_time" fields inside an X.509
     * certificate.
     * </pre>
     *
     * <code>
     * .google.protobuf.Duration lifetime = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
     * </code>
     */
    public Builder setLifetime(com.google.protobuf.Duration value) {
      if (lifetimeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        lifetime_ = value;
      } else {
        lifetimeBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. Immutable. The desired lifetime of the CA certificate. Used to
     * create the "not_before_time" and "not_after_time" fields inside an X.509
     * certificate.
     * </pre>
     *
     * <code>
     * .google.protobuf.Duration lifetime = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
     * </code>
     */
    public Builder setLifetime(com.google.protobuf.Duration.Builder builderForValue) {
      if (lifetimeBuilder_ == null) {
        lifetime_ = builderForValue.build();
      } else {
        lifetimeBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. Immutable. The desired lifetime of the CA certificate. Used to
     * create the "not_before_time" and "not_after_time" fields inside an X.509
     * certificate.
     * </pre>
     *
     * <code>
     * .google.protobuf.Duration lifetime = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
     * </code>
     */
    public Builder mergeLifetime(com.google.protobuf.Duration value) {
      if (lifetimeBuilder_ == null) {
        if (((bitField0_ & 0x00000008) != 0)
            && lifetime_ != null
            && lifetime_ != com.google.protobuf.Duration.getDefaultInstance()) {
          getLifetimeBuilder().mergeFrom(value);
        } else {
          lifetime_ = value;
        }
      } else {
        lifetimeBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. Immutable. The desired lifetime of the CA certificate. Used to
     * create the "not_before_time" and "not_after_time" fields inside an X.509
     * certificate.
     * </pre>
     *
     * <code>
     * .google.protobuf.Duration lifetime = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
     * </code>
     */
    public Builder clearLifetime() {
      bitField0_ = (bitField0_ & ~0x00000008);
      lifetime_ = null;
      if (lifetimeBuilder_ != null) {
        lifetimeBuilder_.dispose();
        lifetimeBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. Immutable. The desired lifetime of the CA certificate. Used to
     * create the "not_before_time" and "not_after_time" fields inside an X.509
     * certificate.
     * </pre>
     *
     * <code>
     * .google.protobuf.Duration lifetime = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
     * </code>
     */
    public com.google.protobuf.Duration.Builder getLifetimeBuilder() {
      bitField0_ |= 0x00000008;
      onChanged();
      return getLifetimeFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Required. Immutable. The desired lifetime of the CA certificate. Used to
     * create the "not_before_time" and "not_after_time" fields inside an X.509
     * certificate.
     * </pre>
     *
     * <code>
     * .google.protobuf.Duration lifetime = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
     * </code>
     */
    public com.google.protobuf.DurationOrBuilder getLifetimeOrBuilder() {
      if (lifetimeBuilder_ != null) {
        return lifetimeBuilder_.getMessageOrBuilder();
      } else {
        return lifetime_ == null ? com.google.protobuf.Duration.getDefaultInstance() : lifetime_;
      }
    }
    /**
     *
     *
     * <pre>
     * Required. Immutable. The desired lifetime of the CA certificate. Used to
     * create the "not_before_time" and "not_after_time" fields inside an X.509
     * certificate.
     * </pre>
     *
     * <code>
     * .google.protobuf.Duration lifetime = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
     * </code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Duration,
            com.google.protobuf.Duration.Builder,
            com.google.protobuf.DurationOrBuilder>
        getLifetimeFieldBuilder() {
      if (lifetimeBuilder_ == null) {
        lifetimeBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.protobuf.Duration,
                com.google.protobuf.Duration.Builder,
                com.google.protobuf.DurationOrBuilder>(
                getLifetime(), getParentForChildren(), isClean());
        lifetime_ = null;
      }
      return lifetimeBuilder_;
    }

    private com.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec keySpec_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec,
            com.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec.Builder,
            com.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpecOrBuilder>
        keySpecBuilder_;
    /**
     *
     *
     * <pre>
     * Required. Immutable. Used when issuing certificates for this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
     * If this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * is a self-signed CertificateAuthority, this key is also used to sign the
     * self-signed CA certificate. Otherwise, it is used to sign a CSR.
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec key_spec = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
     * </code>
     *
     * @return Whether the keySpec field is set.
     */
    public boolean hasKeySpec() {
      return ((bitField0_ & 0x00000010) != 0);
    }
    /**
     *
     *
     * <pre>
     * Required. Immutable. Used when issuing certificates for this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
     * If this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * is a self-signed CertificateAuthority, this key is also used to sign the
     * self-signed CA certificate. Otherwise, it is used to sign a CSR.
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec key_spec = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
     * </code>
     *
     * @return The keySpec.
     */
    public com.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec getKeySpec() {
      if (keySpecBuilder_ == null) {
        return keySpec_ == null
            ? com.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec
                .getDefaultInstance()
            : keySpec_;
      } else {
        return keySpecBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Required. Immutable. Used when issuing certificates for this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
     * If this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * is a self-signed CertificateAuthority, this key is also used to sign the
     * self-signed CA certificate. Otherwise, it is used to sign a CSR.
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec key_spec = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
     * </code>
     */
    public Builder setKeySpec(
        com.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec value) {
      if (keySpecBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        keySpec_ = value;
      } else {
        keySpecBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. Immutable. Used when issuing certificates for this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
     * If this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * is a self-signed CertificateAuthority, this key is also used to sign the
     * self-signed CA certificate. Otherwise, it is used to sign a CSR.
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec key_spec = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
     * </code>
     */
    public Builder setKeySpec(
        com.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec.Builder
            builderForValue) {
      if (keySpecBuilder_ == null) {
        keySpec_ = builderForValue.build();
      } else {
        keySpecBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. Immutable. Used when issuing certificates for this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
     * If this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * is a self-signed CertificateAuthority, this key is also used to sign the
     * self-signed CA certificate. Otherwise, it is used to sign a CSR.
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec key_spec = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
     * </code>
     */
    public Builder mergeKeySpec(
        com.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec value) {
      if (keySpecBuilder_ == null) {
        if (((bitField0_ & 0x00000010) != 0)
            && keySpec_ != null
            && keySpec_
                != com.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec
                    .getDefaultInstance()) {
          getKeySpecBuilder().mergeFrom(value);
        } else {
          keySpec_ = value;
        }
      } else {
        keySpecBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. Immutable. Used when issuing certificates for this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
     * If this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * is a self-signed CertificateAuthority, this key is also used to sign the
     * self-signed CA certificate. Otherwise, it is used to sign a CSR.
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec key_spec = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
     * </code>
     */
    public Builder clearKeySpec() {
      bitField0_ = (bitField0_ & ~0x00000010);
      keySpec_ = null;
      if (keySpecBuilder_ != null) {
        keySpecBuilder_.dispose();
        keySpecBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. Immutable. Used when issuing certificates for this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
     * If this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * is a self-signed CertificateAuthority, this key is also used to sign the
     * self-signed CA certificate. Otherwise, it is used to sign a CSR.
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec key_spec = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
     * </code>
     */
    public com.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec.Builder
        getKeySpecBuilder() {
      bitField0_ |= 0x00000010;
      onChanged();
      return getKeySpecFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Required. Immutable. Used when issuing certificates for this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
     * If this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * is a self-signed CertificateAuthority, this key is also used to sign the
     * self-signed CA certificate. Otherwise, it is used to sign a CSR.
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec key_spec = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
     * </code>
     */
    public com.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpecOrBuilder
        getKeySpecOrBuilder() {
      if (keySpecBuilder_ != null) {
        return keySpecBuilder_.getMessageOrBuilder();
      } else {
        return keySpec_ == null
            ? com.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec
                .getDefaultInstance()
            : keySpec_;
      }
    }
    /**
     *
     *
     * <pre>
     * Required. Immutable. Used when issuing certificates for this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
     * If this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * is a self-signed CertificateAuthority, this key is also used to sign the
     * self-signed CA certificate. Otherwise, it is used to sign a CSR.
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec key_spec = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
     * </code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec,
            com.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec.Builder,
            com.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpecOrBuilder>
        getKeySpecFieldBuilder() {
      if (keySpecBuilder_ == null) {
        keySpecBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec,
                com.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec.Builder,
                com.google.cloud.security.privateca.v1.CertificateAuthority
                    .KeyVersionSpecOrBuilder>(getKeySpec(), getParentForChildren(), isClean());
        keySpec_ = null;
      }
      return keySpecBuilder_;
    }

    private com.google.cloud.security.privateca.v1.SubordinateConfig subordinateConfig_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.security.privateca.v1.SubordinateConfig,
            com.google.cloud.security.privateca.v1.SubordinateConfig.Builder,
            com.google.cloud.security.privateca.v1.SubordinateConfigOrBuilder>
        subordinateConfigBuilder_;
    /**
     *
     *
     * <pre>
     * Optional. If this is a subordinate
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority],
     * this field will be set with the subordinate configuration, which describes
     * its issuers. This may be updated, but this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * must continue to validate.
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.SubordinateConfig subordinate_config = 6 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @return Whether the subordinateConfig field is set.
     */
    public boolean hasSubordinateConfig() {
      return ((bitField0_ & 0x00000020) != 0);
    }
    /**
     *
     *
     * <pre>
     * Optional. If this is a subordinate
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority],
     * this field will be set with the subordinate configuration, which describes
     * its issuers. This may be updated, but this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * must continue to validate.
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.SubordinateConfig subordinate_config = 6 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @return The subordinateConfig.
     */
    public com.google.cloud.security.privateca.v1.SubordinateConfig getSubordinateConfig() {
      if (subordinateConfigBuilder_ == null) {
        return subordinateConfig_ == null
            ? com.google.cloud.security.privateca.v1.SubordinateConfig.getDefaultInstance()
            : subordinateConfig_;
      } else {
        return subordinateConfigBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Optional. If this is a subordinate
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority],
     * this field will be set with the subordinate configuration, which describes
     * its issuers. This may be updated, but this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * must continue to validate.
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.SubordinateConfig subordinate_config = 6 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public Builder setSubordinateConfig(
        com.google.cloud.security.privateca.v1.SubordinateConfig value) {
      if (subordinateConfigBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        subordinateConfig_ = value;
      } else {
        subordinateConfigBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000020;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. If this is a subordinate
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority],
     * this field will be set with the subordinate configuration, which describes
     * its issuers. This may be updated, but this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * must continue to validate.
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.SubordinateConfig subordinate_config = 6 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public Builder setSubordinateConfig(
        com.google.cloud.security.privateca.v1.SubordinateConfig.Builder builderForValue) {
      if (subordinateConfigBuilder_ == null) {
        subordinateConfig_ = builderForValue.build();
      } else {
        subordinateConfigBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000020;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. If this is a subordinate
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority],
     * this field will be set with the subordinate configuration, which describes
     * its issuers. This may be updated, but this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * must continue to validate.
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.SubordinateConfig subordinate_config = 6 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public Builder mergeSubordinateConfig(
        com.google.cloud.security.privateca.v1.SubordinateConfig value) {
      if (subordinateConfigBuilder_ == null) {
        if (((bitField0_ & 0x00000020) != 0)
            && subordinateConfig_ != null
            && subordinateConfig_
                != com.google.cloud.security.privateca.v1.SubordinateConfig.getDefaultInstance()) {
          getSubordinateConfigBuilder().mergeFrom(value);
        } else {
          subordinateConfig_ = value;
        }
      } else {
        subordinateConfigBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000020;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. If this is a subordinate
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority],
     * this field will be set with the subordinate configuration, which describes
     * its issuers. This may be updated, but this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * must continue to validate.
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.SubordinateConfig subordinate_config = 6 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public Builder clearSubordinateConfig() {
      bitField0_ = (bitField0_ & ~0x00000020);
      subordinateConfig_ = null;
      if (subordinateConfigBuilder_ != null) {
        subordinateConfigBuilder_.dispose();
        subordinateConfigBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. If this is a subordinate
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority],
     * this field will be set with the subordinate configuration, which describes
     * its issuers. This may be updated, but this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * must continue to validate.
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.SubordinateConfig subordinate_config = 6 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public com.google.cloud.security.privateca.v1.SubordinateConfig.Builder
        getSubordinateConfigBuilder() {
      bitField0_ |= 0x00000020;
      onChanged();
      return getSubordinateConfigFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Optional. If this is a subordinate
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority],
     * this field will be set with the subordinate configuration, which describes
     * its issuers. This may be updated, but this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * must continue to validate.
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.SubordinateConfig subordinate_config = 6 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public com.google.cloud.security.privateca.v1.SubordinateConfigOrBuilder
        getSubordinateConfigOrBuilder() {
      if (subordinateConfigBuilder_ != null) {
        return subordinateConfigBuilder_.getMessageOrBuilder();
      } else {
        return subordinateConfig_ == null
            ? com.google.cloud.security.privateca.v1.SubordinateConfig.getDefaultInstance()
            : subordinateConfig_;
      }
    }
    /**
     *
     *
     * <pre>
     * Optional. If this is a subordinate
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority],
     * this field will be set with the subordinate configuration, which describes
     * its issuers. This may be updated, but this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * must continue to validate.
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.SubordinateConfig subordinate_config = 6 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.security.privateca.v1.SubordinateConfig,
            com.google.cloud.security.privateca.v1.SubordinateConfig.Builder,
            com.google.cloud.security.privateca.v1.SubordinateConfigOrBuilder>
        getSubordinateConfigFieldBuilder() {
      if (subordinateConfigBuilder_ == null) {
        subordinateConfigBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.cloud.security.privateca.v1.SubordinateConfig,
                com.google.cloud.security.privateca.v1.SubordinateConfig.Builder,
                com.google.cloud.security.privateca.v1.SubordinateConfigOrBuilder>(
                getSubordinateConfig(), getParentForChildren(), isClean());
        subordinateConfig_ = null;
      }
      return subordinateConfigBuilder_;
    }

    private int tier_ = 0;
    /**
     *
     *
     * <pre>
     * Output only. The
     * [CaPool.Tier][google.cloud.security.privateca.v1.CaPool.Tier] of the
     * [CaPool][google.cloud.security.privateca.v1.CaPool] that includes this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CaPool.Tier tier = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return The enum numeric value on the wire for tier.
     */
    @java.lang.Override
    public int getTierValue() {
      return tier_;
    }
    /**
     *
     *
     * <pre>
     * Output only. The
     * [CaPool.Tier][google.cloud.security.privateca.v1.CaPool.Tier] of the
     * [CaPool][google.cloud.security.privateca.v1.CaPool] that includes this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CaPool.Tier tier = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @param value The enum numeric value on the wire for tier to set.
     * @return This builder for chaining.
     */
    public Builder setTierValue(int value) {
      tier_ = value;
      bitField0_ |= 0x00000040;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The
     * [CaPool.Tier][google.cloud.security.privateca.v1.CaPool.Tier] of the
     * [CaPool][google.cloud.security.privateca.v1.CaPool] that includes this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CaPool.Tier tier = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return The tier.
     */
    @java.lang.Override
    public com.google.cloud.security.privateca.v1.CaPool.Tier getTier() {
      com.google.cloud.security.privateca.v1.CaPool.Tier result =
          com.google.cloud.security.privateca.v1.CaPool.Tier.forNumber(tier_);
      return result == null
          ? com.google.cloud.security.privateca.v1.CaPool.Tier.UNRECOGNIZED
          : result;
    }
    /**
     *
     *
     * <pre>
     * Output only. The
     * [CaPool.Tier][google.cloud.security.privateca.v1.CaPool.Tier] of the
     * [CaPool][google.cloud.security.privateca.v1.CaPool] that includes this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CaPool.Tier tier = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @param value The tier to set.
     * @return This builder for chaining.
     */
    public Builder setTier(com.google.cloud.security.privateca.v1.CaPool.Tier value) {
      if (value == null) {
        throw new NullPointerException();
      }
      bitField0_ |= 0x00000040;
      tier_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The
     * [CaPool.Tier][google.cloud.security.privateca.v1.CaPool.Tier] of the
     * [CaPool][google.cloud.security.privateca.v1.CaPool] that includes this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CaPool.Tier tier = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return This builder for chaining.
     */
    public Builder clearTier() {
      bitField0_ = (bitField0_ & ~0x00000040);
      tier_ = 0;
      onChanged();
      return this;
    }

    private int state_ = 0;
    /**
     *
     *
     * <pre>
     * Output only. The
     * [State][google.cloud.security.privateca.v1.CertificateAuthority.State] for
     * this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CertificateAuthority.State state = 8 [(.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
     * [State][google.cloud.security.privateca.v1.CertificateAuthority.State] for
     * this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CertificateAuthority.State state = 8 [(.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
     * [State][google.cloud.security.privateca.v1.CertificateAuthority.State] for
     * this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CertificateAuthority.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return The state.
     */
    @java.lang.Override
    public com.google.cloud.security.privateca.v1.CertificateAuthority.State getState() {
      com.google.cloud.security.privateca.v1.CertificateAuthority.State result =
          com.google.cloud.security.privateca.v1.CertificateAuthority.State.forNumber(state_);
      return result == null
          ? com.google.cloud.security.privateca.v1.CertificateAuthority.State.UNRECOGNIZED
          : result;
    }
    /**
     *
     *
     * <pre>
     * Output only. The
     * [State][google.cloud.security.privateca.v1.CertificateAuthority.State] for
     * this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CertificateAuthority.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @param value The state to set.
     * @return This builder for chaining.
     */
    public Builder setState(
        com.google.cloud.security.privateca.v1.CertificateAuthority.State value) {
      if (value == null) {
        throw new NullPointerException();
      }
      bitField0_ |= 0x00000080;
      state_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The
     * [State][google.cloud.security.privateca.v1.CertificateAuthority.State] for
     * this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CertificateAuthority.State state = 8 [(.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.protobuf.LazyStringArrayList pemCaCertificates_ =
        com.google.protobuf.LazyStringArrayList.emptyList();

    private void ensurePemCaCertificatesIsMutable() {
      if (!pemCaCertificates_.isModifiable()) {
        pemCaCertificates_ = new com.google.protobuf.LazyStringArrayList(pemCaCertificates_);
      }
      bitField0_ |= 0x00000100;
    }
    /**
     *
     *
     * <pre>
     * Output only. This
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
     * certificate chain, including the current
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
     * certificate. Ordered such that the root issuer is the final element
     * (consistent with RFC 5246). For a self-signed CA, this will only list the
     * current
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
     * certificate.
     * </pre>
     *
     * <code>repeated string pem_ca_certificates = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return A list containing the pemCaCertificates.
     */
    public com.google.protobuf.ProtocolStringList getPemCaCertificatesList() {
      pemCaCertificates_.makeImmutable();
      return pemCaCertificates_;
    }
    /**
     *
     *
     * <pre>
     * Output only. This
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
     * certificate chain, including the current
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
     * certificate. Ordered such that the root issuer is the final element
     * (consistent with RFC 5246). For a self-signed CA, this will only list the
     * current
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
     * certificate.
     * </pre>
     *
     * <code>repeated string pem_ca_certificates = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return The count of pemCaCertificates.
     */
    public int getPemCaCertificatesCount() {
      return pemCaCertificates_.size();
    }
    /**
     *
     *
     * <pre>
     * Output only. This
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
     * certificate chain, including the current
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
     * certificate. Ordered such that the root issuer is the final element
     * (consistent with RFC 5246). For a self-signed CA, this will only list the
     * current
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
     * certificate.
     * </pre>
     *
     * <code>repeated string pem_ca_certificates = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @param index The index of the element to return.
     * @return The pemCaCertificates at the given index.
     */
    public java.lang.String getPemCaCertificates(int index) {
      return pemCaCertificates_.get(index);
    }
    /**
     *
     *
     * <pre>
     * Output only. This
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
     * certificate chain, including the current
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
     * certificate. Ordered such that the root issuer is the final element
     * (consistent with RFC 5246). For a self-signed CA, this will only list the
     * current
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
     * certificate.
     * </pre>
     *
     * <code>repeated string pem_ca_certificates = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @param index The index of the value to return.
     * @return The bytes of the pemCaCertificates at the given index.
     */
    public com.google.protobuf.ByteString getPemCaCertificatesBytes(int index) {
      return pemCaCertificates_.getByteString(index);
    }
    /**
     *
     *
     * <pre>
     * Output only. This
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
     * certificate chain, including the current
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
     * certificate. Ordered such that the root issuer is the final element
     * (consistent with RFC 5246). For a self-signed CA, this will only list the
     * current
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
     * certificate.
     * </pre>
     *
     * <code>repeated string pem_ca_certificates = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @param index The index to set the value at.
     * @param value The pemCaCertificates to set.
     * @return This builder for chaining.
     */
    public Builder setPemCaCertificates(int index, java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensurePemCaCertificatesIsMutable();
      pemCaCertificates_.set(index, value);
      bitField0_ |= 0x00000100;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. This
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
     * certificate chain, including the current
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
     * certificate. Ordered such that the root issuer is the final element
     * (consistent with RFC 5246). For a self-signed CA, this will only list the
     * current
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
     * certificate.
     * </pre>
     *
     * <code>repeated string pem_ca_certificates = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @param value The pemCaCertificates to add.
     * @return This builder for chaining.
     */
    public Builder addPemCaCertificates(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensurePemCaCertificatesIsMutable();
      pemCaCertificates_.add(value);
      bitField0_ |= 0x00000100;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. This
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
     * certificate chain, including the current
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
     * certificate. Ordered such that the root issuer is the final element
     * (consistent with RFC 5246). For a self-signed CA, this will only list the
     * current
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
     * certificate.
     * </pre>
     *
     * <code>repeated string pem_ca_certificates = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @param values The pemCaCertificates to add.
     * @return This builder for chaining.
     */
    public Builder addAllPemCaCertificates(java.lang.Iterable<java.lang.String> values) {
      ensurePemCaCertificatesIsMutable();
      com.google.protobuf.AbstractMessageLite.Builder.addAll(values, pemCaCertificates_);
      bitField0_ |= 0x00000100;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. This
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
     * certificate chain, including the current
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
     * certificate. Ordered such that the root issuer is the final element
     * (consistent with RFC 5246). For a self-signed CA, this will only list the
     * current
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
     * certificate.
     * </pre>
     *
     * <code>repeated string pem_ca_certificates = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return This builder for chaining.
     */
    public Builder clearPemCaCertificates() {
      pemCaCertificates_ = com.google.protobuf.LazyStringArrayList.emptyList();
      bitField0_ = (bitField0_ & ~0x00000100);
      ;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. This
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
     * certificate chain, including the current
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
     * certificate. Ordered such that the root issuer is the final element
     * (consistent with RFC 5246). For a self-signed CA, this will only list the
     * current
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
     * certificate.
     * </pre>
     *
     * <code>repeated string pem_ca_certificates = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @param value The bytes of the pemCaCertificates to add.
     * @return This builder for chaining.
     */
    public Builder addPemCaCertificatesBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      ensurePemCaCertificatesIsMutable();
      pemCaCertificates_.add(value);
      bitField0_ |= 0x00000100;
      onChanged();
      return this;
    }

    private java.util.List<com.google.cloud.security.privateca.v1.CertificateDescription>
        caCertificateDescriptions_ = java.util.Collections.emptyList();

    private void ensureCaCertificateDescriptionsIsMutable() {
      if (!((bitField0_ & 0x00000200) != 0)) {
        caCertificateDescriptions_ =
            new java.util.ArrayList<com.google.cloud.security.privateca.v1.CertificateDescription>(
                caCertificateDescriptions_);
        bitField0_ |= 0x00000200;
      }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.cloud.security.privateca.v1.CertificateDescription,
            com.google.cloud.security.privateca.v1.CertificateDescription.Builder,
            com.google.cloud.security.privateca.v1.CertificateDescriptionOrBuilder>
        caCertificateDescriptionsBuilder_;

    /**
     *
     *
     * <pre>
     * Output only. A structured description of this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
     * CA certificate and its issuers. Ordered as self-to-root.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.security.privateca.v1.CertificateDescription ca_certificate_descriptions = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public java.util.List<com.google.cloud.security.privateca.v1.CertificateDescription>
        getCaCertificateDescriptionsList() {
      if (caCertificateDescriptionsBuilder_ == null) {
        return java.util.Collections.unmodifiableList(caCertificateDescriptions_);
      } else {
        return caCertificateDescriptionsBuilder_.getMessageList();
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. A structured description of this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
     * CA certificate and its issuers. Ordered as self-to-root.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.security.privateca.v1.CertificateDescription ca_certificate_descriptions = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public int getCaCertificateDescriptionsCount() {
      if (caCertificateDescriptionsBuilder_ == null) {
        return caCertificateDescriptions_.size();
      } else {
        return caCertificateDescriptionsBuilder_.getCount();
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. A structured description of this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
     * CA certificate and its issuers. Ordered as self-to-root.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.security.privateca.v1.CertificateDescription ca_certificate_descriptions = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.cloud.security.privateca.v1.CertificateDescription
        getCaCertificateDescriptions(int index) {
      if (caCertificateDescriptionsBuilder_ == null) {
        return caCertificateDescriptions_.get(index);
      } else {
        return caCertificateDescriptionsBuilder_.getMessage(index);
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. A structured description of this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
     * CA certificate and its issuers. Ordered as self-to-root.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.security.privateca.v1.CertificateDescription ca_certificate_descriptions = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder setCaCertificateDescriptions(
        int index, com.google.cloud.security.privateca.v1.CertificateDescription value) {
      if (caCertificateDescriptionsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureCaCertificateDescriptionsIsMutable();
        caCertificateDescriptions_.set(index, value);
        onChanged();
      } else {
        caCertificateDescriptionsBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. A structured description of this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
     * CA certificate and its issuers. Ordered as self-to-root.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.security.privateca.v1.CertificateDescription ca_certificate_descriptions = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder setCaCertificateDescriptions(
        int index,
        com.google.cloud.security.privateca.v1.CertificateDescription.Builder builderForValue) {
      if (caCertificateDescriptionsBuilder_ == null) {
        ensureCaCertificateDescriptionsIsMutable();
        caCertificateDescriptions_.set(index, builderForValue.build());
        onChanged();
      } else {
        caCertificateDescriptionsBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. A structured description of this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
     * CA certificate and its issuers. Ordered as self-to-root.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.security.privateca.v1.CertificateDescription ca_certificate_descriptions = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder addCaCertificateDescriptions(
        com.google.cloud.security.privateca.v1.CertificateDescription value) {
      if (caCertificateDescriptionsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureCaCertificateDescriptionsIsMutable();
        caCertificateDescriptions_.add(value);
        onChanged();
      } else {
        caCertificateDescriptionsBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. A structured description of this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
     * CA certificate and its issuers. Ordered as self-to-root.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.security.privateca.v1.CertificateDescription ca_certificate_descriptions = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder addCaCertificateDescriptions(
        int index, com.google.cloud.security.privateca.v1.CertificateDescription value) {
      if (caCertificateDescriptionsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureCaCertificateDescriptionsIsMutable();
        caCertificateDescriptions_.add(index, value);
        onChanged();
      } else {
        caCertificateDescriptionsBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. A structured description of this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
     * CA certificate and its issuers. Ordered as self-to-root.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.security.privateca.v1.CertificateDescription ca_certificate_descriptions = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder addCaCertificateDescriptions(
        com.google.cloud.security.privateca.v1.CertificateDescription.Builder builderForValue) {
      if (caCertificateDescriptionsBuilder_ == null) {
        ensureCaCertificateDescriptionsIsMutable();
        caCertificateDescriptions_.add(builderForValue.build());
        onChanged();
      } else {
        caCertificateDescriptionsBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. A structured description of this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
     * CA certificate and its issuers. Ordered as self-to-root.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.security.privateca.v1.CertificateDescription ca_certificate_descriptions = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder addCaCertificateDescriptions(
        int index,
        com.google.cloud.security.privateca.v1.CertificateDescription.Builder builderForValue) {
      if (caCertificateDescriptionsBuilder_ == null) {
        ensureCaCertificateDescriptionsIsMutable();
        caCertificateDescriptions_.add(index, builderForValue.build());
        onChanged();
      } else {
        caCertificateDescriptionsBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. A structured description of this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
     * CA certificate and its issuers. Ordered as self-to-root.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.security.privateca.v1.CertificateDescription ca_certificate_descriptions = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder addAllCaCertificateDescriptions(
        java.lang.Iterable<? extends com.google.cloud.security.privateca.v1.CertificateDescription>
            values) {
      if (caCertificateDescriptionsBuilder_ == null) {
        ensureCaCertificateDescriptionsIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(values, caCertificateDescriptions_);
        onChanged();
      } else {
        caCertificateDescriptionsBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. A structured description of this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
     * CA certificate and its issuers. Ordered as self-to-root.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.security.privateca.v1.CertificateDescription ca_certificate_descriptions = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder clearCaCertificateDescriptions() {
      if (caCertificateDescriptionsBuilder_ == null) {
        caCertificateDescriptions_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000200);
        onChanged();
      } else {
        caCertificateDescriptionsBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. A structured description of this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
     * CA certificate and its issuers. Ordered as self-to-root.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.security.privateca.v1.CertificateDescription ca_certificate_descriptions = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder removeCaCertificateDescriptions(int index) {
      if (caCertificateDescriptionsBuilder_ == null) {
        ensureCaCertificateDescriptionsIsMutable();
        caCertificateDescriptions_.remove(index);
        onChanged();
      } else {
        caCertificateDescriptionsBuilder_.remove(index);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. A structured description of this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
     * CA certificate and its issuers. Ordered as self-to-root.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.security.privateca.v1.CertificateDescription ca_certificate_descriptions = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.cloud.security.privateca.v1.CertificateDescription.Builder
        getCaCertificateDescriptionsBuilder(int index) {
      return getCaCertificateDescriptionsFieldBuilder().getBuilder(index);
    }
    /**
     *
     *
     * <pre>
     * Output only. A structured description of this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
     * CA certificate and its issuers. Ordered as self-to-root.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.security.privateca.v1.CertificateDescription ca_certificate_descriptions = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.cloud.security.privateca.v1.CertificateDescriptionOrBuilder
        getCaCertificateDescriptionsOrBuilder(int index) {
      if (caCertificateDescriptionsBuilder_ == null) {
        return caCertificateDescriptions_.get(index);
      } else {
        return caCertificateDescriptionsBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. A structured description of this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
     * CA certificate and its issuers. Ordered as self-to-root.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.security.privateca.v1.CertificateDescription ca_certificate_descriptions = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public java.util.List<
            ? extends com.google.cloud.security.privateca.v1.CertificateDescriptionOrBuilder>
        getCaCertificateDescriptionsOrBuilderList() {
      if (caCertificateDescriptionsBuilder_ != null) {
        return caCertificateDescriptionsBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(caCertificateDescriptions_);
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. A structured description of this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
     * CA certificate and its issuers. Ordered as self-to-root.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.security.privateca.v1.CertificateDescription ca_certificate_descriptions = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.cloud.security.privateca.v1.CertificateDescription.Builder
        addCaCertificateDescriptionsBuilder() {
      return getCaCertificateDescriptionsFieldBuilder()
          .addBuilder(
              com.google.cloud.security.privateca.v1.CertificateDescription.getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * Output only. A structured description of this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
     * CA certificate and its issuers. Ordered as self-to-root.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.security.privateca.v1.CertificateDescription ca_certificate_descriptions = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.cloud.security.privateca.v1.CertificateDescription.Builder
        addCaCertificateDescriptionsBuilder(int index) {
      return getCaCertificateDescriptionsFieldBuilder()
          .addBuilder(
              index,
              com.google.cloud.security.privateca.v1.CertificateDescription.getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * Output only. A structured description of this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
     * CA certificate and its issuers. Ordered as self-to-root.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.security.privateca.v1.CertificateDescription ca_certificate_descriptions = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public java.util.List<com.google.cloud.security.privateca.v1.CertificateDescription.Builder>
        getCaCertificateDescriptionsBuilderList() {
      return getCaCertificateDescriptionsFieldBuilder().getBuilderList();
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.cloud.security.privateca.v1.CertificateDescription,
            com.google.cloud.security.privateca.v1.CertificateDescription.Builder,
            com.google.cloud.security.privateca.v1.CertificateDescriptionOrBuilder>
        getCaCertificateDescriptionsFieldBuilder() {
      if (caCertificateDescriptionsBuilder_ == null) {
        caCertificateDescriptionsBuilder_ =
            new com.google.protobuf.RepeatedFieldBuilderV3<
                com.google.cloud.security.privateca.v1.CertificateDescription,
                com.google.cloud.security.privateca.v1.CertificateDescription.Builder,
                com.google.cloud.security.privateca.v1.CertificateDescriptionOrBuilder>(
                caCertificateDescriptions_,
                ((bitField0_ & 0x00000200) != 0),
                getParentForChildren(),
                isClean());
        caCertificateDescriptions_ = null;
      }
      return caCertificateDescriptionsBuilder_;
    }

    private java.lang.Object gcsBucket_ = "";
    /**
     *
     *
     * <pre>
     * Immutable. The name of a Cloud Storage bucket where this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * will publish content, such as the CA certificate and CRLs. This must be a
     * bucket name, without any prefixes (such as `gs://`) or suffixes (such as
     * `.googleapis.com`). For example, to use a bucket named `my-bucket`, you
     * would simply specify `my-bucket`. If not specified, a managed bucket will
     * be created.
     * </pre>
     *
     * <code>string gcs_bucket = 11 [(.google.api.field_behavior) = IMMUTABLE];</code>
     *
     * @return The gcsBucket.
     */
    public java.lang.String getGcsBucket() {
      java.lang.Object ref = gcsBucket_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        gcsBucket_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Immutable. The name of a Cloud Storage bucket where this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * will publish content, such as the CA certificate and CRLs. This must be a
     * bucket name, without any prefixes (such as `gs://`) or suffixes (such as
     * `.googleapis.com`). For example, to use a bucket named `my-bucket`, you
     * would simply specify `my-bucket`. If not specified, a managed bucket will
     * be created.
     * </pre>
     *
     * <code>string gcs_bucket = 11 [(.google.api.field_behavior) = IMMUTABLE];</code>
     *
     * @return The bytes for gcsBucket.
     */
    public com.google.protobuf.ByteString getGcsBucketBytes() {
      java.lang.Object ref = gcsBucket_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        gcsBucket_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Immutable. The name of a Cloud Storage bucket where this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * will publish content, such as the CA certificate and CRLs. This must be a
     * bucket name, without any prefixes (such as `gs://`) or suffixes (such as
     * `.googleapis.com`). For example, to use a bucket named `my-bucket`, you
     * would simply specify `my-bucket`. If not specified, a managed bucket will
     * be created.
     * </pre>
     *
     * <code>string gcs_bucket = 11 [(.google.api.field_behavior) = IMMUTABLE];</code>
     *
     * @param value The gcsBucket to set.
     * @return This builder for chaining.
     */
    public Builder setGcsBucket(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      gcsBucket_ = value;
      bitField0_ |= 0x00000400;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Immutable. The name of a Cloud Storage bucket where this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * will publish content, such as the CA certificate and CRLs. This must be a
     * bucket name, without any prefixes (such as `gs://`) or suffixes (such as
     * `.googleapis.com`). For example, to use a bucket named `my-bucket`, you
     * would simply specify `my-bucket`. If not specified, a managed bucket will
     * be created.
     * </pre>
     *
     * <code>string gcs_bucket = 11 [(.google.api.field_behavior) = IMMUTABLE];</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearGcsBucket() {
      gcsBucket_ = getDefaultInstance().getGcsBucket();
      bitField0_ = (bitField0_ & ~0x00000400);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Immutable. The name of a Cloud Storage bucket where this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * will publish content, such as the CA certificate and CRLs. This must be a
     * bucket name, without any prefixes (such as `gs://`) or suffixes (such as
     * `.googleapis.com`). For example, to use a bucket named `my-bucket`, you
     * would simply specify `my-bucket`. If not specified, a managed bucket will
     * be created.
     * </pre>
     *
     * <code>string gcs_bucket = 11 [(.google.api.field_behavior) = IMMUTABLE];</code>
     *
     * @param value The bytes for gcsBucket to set.
     * @return This builder for chaining.
     */
    public Builder setGcsBucketBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      gcsBucket_ = value;
      bitField0_ |= 0x00000400;
      onChanged();
      return this;
    }

    private com.google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls accessUrls_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls,
            com.google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls.Builder,
            com.google.cloud.security.privateca.v1.CertificateAuthority.AccessUrlsOrBuilder>
        accessUrlsBuilder_;
    /**
     *
     *
     * <pre>
     * Output only. URLs for accessing content published by this CA, such as the
     * CA certificate and CRLs.
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls access_urls = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return Whether the accessUrls field is set.
     */
    public boolean hasAccessUrls() {
      return ((bitField0_ & 0x00000800) != 0);
    }
    /**
     *
     *
     * <pre>
     * Output only. URLs for accessing content published by this CA, such as the
     * CA certificate and CRLs.
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls access_urls = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return The accessUrls.
     */
    public com.google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls getAccessUrls() {
      if (accessUrlsBuilder_ == null) {
        return accessUrls_ == null
            ? com.google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls
                .getDefaultInstance()
            : accessUrls_;
      } else {
        return accessUrlsBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. URLs for accessing content published by this CA, such as the
     * CA certificate and CRLs.
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls access_urls = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder setAccessUrls(
        com.google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls value) {
      if (accessUrlsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        accessUrls_ = value;
      } else {
        accessUrlsBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000800;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. URLs for accessing content published by this CA, such as the
     * CA certificate and CRLs.
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls access_urls = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder setAccessUrls(
        com.google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls.Builder
            builderForValue) {
      if (accessUrlsBuilder_ == null) {
        accessUrls_ = builderForValue.build();
      } else {
        accessUrlsBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000800;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. URLs for accessing content published by this CA, such as the
     * CA certificate and CRLs.
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls access_urls = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder mergeAccessUrls(
        com.google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls value) {
      if (accessUrlsBuilder_ == null) {
        if (((bitField0_ & 0x00000800) != 0)
            && accessUrls_ != null
            && accessUrls_
                != com.google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls
                    .getDefaultInstance()) {
          getAccessUrlsBuilder().mergeFrom(value);
        } else {
          accessUrls_ = value;
        }
      } else {
        accessUrlsBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000800;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. URLs for accessing content published by this CA, such as the
     * CA certificate and CRLs.
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls access_urls = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder clearAccessUrls() {
      bitField0_ = (bitField0_ & ~0x00000800);
      accessUrls_ = null;
      if (accessUrlsBuilder_ != null) {
        accessUrlsBuilder_.dispose();
        accessUrlsBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. URLs for accessing content published by this CA, such as the
     * CA certificate and CRLs.
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls access_urls = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls.Builder
        getAccessUrlsBuilder() {
      bitField0_ |= 0x00000800;
      onChanged();
      return getAccessUrlsFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Output only. URLs for accessing content published by this CA, such as the
     * CA certificate and CRLs.
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls access_urls = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.cloud.security.privateca.v1.CertificateAuthority.AccessUrlsOrBuilder
        getAccessUrlsOrBuilder() {
      if (accessUrlsBuilder_ != null) {
        return accessUrlsBuilder_.getMessageOrBuilder();
      } else {
        return accessUrls_ == null
            ? com.google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls
                .getDefaultInstance()
            : accessUrls_;
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. URLs for accessing content published by this CA, such as the
     * CA certificate and CRLs.
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls access_urls = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls,
            com.google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls.Builder,
            com.google.cloud.security.privateca.v1.CertificateAuthority.AccessUrlsOrBuilder>
        getAccessUrlsFieldBuilder() {
      if (accessUrlsBuilder_ == null) {
        accessUrlsBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls,
                com.google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls.Builder,
                com.google.cloud.security.privateca.v1.CertificateAuthority.AccessUrlsOrBuilder>(
                getAccessUrls(), getParentForChildren(), isClean());
        accessUrls_ = null;
      }
      return accessUrlsBuilder_;
    }

    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
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * was created.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return Whether the createTime field is set.
     */
    public boolean hasCreateTime() {
      return ((bitField0_ & 0x00001000) != 0);
    }
    /**
     *
     *
     * <pre>
     * Output only. The time at which this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * was created.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp create_time = 13 [(.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
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * was created.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp create_time = 13 [(.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_ |= 0x00001000;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The time at which this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * was created.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp create_time = 13 [(.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_ |= 0x00001000;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The time at which this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * was created.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder mergeCreateTime(com.google.protobuf.Timestamp value) {
      if (createTimeBuilder_ == null) {
        if (((bitField0_ & 0x00001000) != 0)
            && createTime_ != null
            && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
          getCreateTimeBuilder().mergeFrom(value);
        } else {
          createTime_ = value;
        }
      } else {
        createTimeBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00001000;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The time at which this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * was created.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder clearCreateTime() {
      bitField0_ = (bitField0_ & ~0x00001000);
      createTime_ = null;
      if (createTimeBuilder_ != null) {
        createTimeBuilder_.dispose();
        createTimeBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The time at which this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * was created.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() {
      bitField0_ |= 0x00001000;
      onChanged();
      return getCreateTimeFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Output only. The time at which this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * was created.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp create_time = 13 [(.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
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * was created.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp create_time = 13 [(.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 updateTime_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        updateTimeBuilder_;
    /**
     *
     *
     * <pre>
     * Output only. The time at which this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * was last updated.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return Whether the updateTime field is set.
     */
    public boolean hasUpdateTime() {
      return ((bitField0_ & 0x00002000) != 0);
    }
    /**
     *
     *
     * <pre>
     * Output only. The time at which this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * was last updated.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return The updateTime.
     */
    public com.google.protobuf.Timestamp getUpdateTime() {
      if (updateTimeBuilder_ == null) {
        return updateTime_ == null
            ? com.google.protobuf.Timestamp.getDefaultInstance()
            : updateTime_;
      } else {
        return updateTimeBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. The time at which this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * was last updated.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder setUpdateTime(com.google.protobuf.Timestamp value) {
      if (updateTimeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        updateTime_ = value;
      } else {
        updateTimeBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00002000;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The time at which this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * was last updated.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) {
      if (updateTimeBuilder_ == null) {
        updateTime_ = builderForValue.build();
      } else {
        updateTimeBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00002000;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The time at which this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * was last updated.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) {
      if (updateTimeBuilder_ == null) {
        if (((bitField0_ & 0x00002000) != 0)
            && updateTime_ != null
            && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
          getUpdateTimeBuilder().mergeFrom(value);
        } else {
          updateTime_ = value;
        }
      } else {
        updateTimeBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00002000;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The time at which this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * was last updated.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder clearUpdateTime() {
      bitField0_ = (bitField0_ & ~0x00002000);
      updateTime_ = null;
      if (updateTimeBuilder_ != null) {
        updateTimeBuilder_.dispose();
        updateTimeBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The time at which this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * was last updated.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() {
      bitField0_ |= 0x00002000;
      onChanged();
      return getUpdateTimeFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Output only. The time at which this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * was last updated.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() {
      if (updateTimeBuilder_ != null) {
        return updateTimeBuilder_.getMessageOrBuilder();
      } else {
        return updateTime_ == null
            ? com.google.protobuf.Timestamp.getDefaultInstance()
            : updateTime_;
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. The time at which this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * was last updated.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp update_time = 14 [(.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>
        getUpdateTimeFieldBuilder() {
      if (updateTimeBuilder_ == null) {
        updateTimeBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.protobuf.Timestamp,
                com.google.protobuf.Timestamp.Builder,
                com.google.protobuf.TimestampOrBuilder>(
                getUpdateTime(), getParentForChildren(), isClean());
        updateTime_ = null;
      }
      return updateTimeBuilder_;
    }

    private com.google.protobuf.Timestamp deleteTime_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        deleteTimeBuilder_;
    /**
     *
     *
     * <pre>
     * Output only. The time at which this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * was soft deleted, if it is in the
     * [DELETED][google.cloud.security.privateca.v1.CertificateAuthority.State.DELETED]
     * state.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp delete_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return Whether the deleteTime field is set.
     */
    public boolean hasDeleteTime() {
      return ((bitField0_ & 0x00004000) != 0);
    }
    /**
     *
     *
     * <pre>
     * Output only. The time at which this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * was soft deleted, if it is in the
     * [DELETED][google.cloud.security.privateca.v1.CertificateAuthority.State.DELETED]
     * state.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp delete_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return The deleteTime.
     */
    public com.google.protobuf.Timestamp getDeleteTime() {
      if (deleteTimeBuilder_ == null) {
        return deleteTime_ == null
            ? com.google.protobuf.Timestamp.getDefaultInstance()
            : deleteTime_;
      } else {
        return deleteTimeBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. The time at which this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * was soft deleted, if it is in the
     * [DELETED][google.cloud.security.privateca.v1.CertificateAuthority.State.DELETED]
     * state.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp delete_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder setDeleteTime(com.google.protobuf.Timestamp value) {
      if (deleteTimeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        deleteTime_ = value;
      } else {
        deleteTimeBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00004000;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The time at which this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * was soft deleted, if it is in the
     * [DELETED][google.cloud.security.privateca.v1.CertificateAuthority.State.DELETED]
     * state.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp delete_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder setDeleteTime(com.google.protobuf.Timestamp.Builder builderForValue) {
      if (deleteTimeBuilder_ == null) {
        deleteTime_ = builderForValue.build();
      } else {
        deleteTimeBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00004000;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The time at which this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * was soft deleted, if it is in the
     * [DELETED][google.cloud.security.privateca.v1.CertificateAuthority.State.DELETED]
     * state.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp delete_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder mergeDeleteTime(com.google.protobuf.Timestamp value) {
      if (deleteTimeBuilder_ == null) {
        if (((bitField0_ & 0x00004000) != 0)
            && deleteTime_ != null
            && deleteTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
          getDeleteTimeBuilder().mergeFrom(value);
        } else {
          deleteTime_ = value;
        }
      } else {
        deleteTimeBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00004000;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The time at which this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * was soft deleted, if it is in the
     * [DELETED][google.cloud.security.privateca.v1.CertificateAuthority.State.DELETED]
     * state.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp delete_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder clearDeleteTime() {
      bitField0_ = (bitField0_ & ~0x00004000);
      deleteTime_ = null;
      if (deleteTimeBuilder_ != null) {
        deleteTimeBuilder_.dispose();
        deleteTimeBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The time at which this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * was soft deleted, if it is in the
     * [DELETED][google.cloud.security.privateca.v1.CertificateAuthority.State.DELETED]
     * state.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp delete_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.protobuf.Timestamp.Builder getDeleteTimeBuilder() {
      bitField0_ |= 0x00004000;
      onChanged();
      return getDeleteTimeFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Output only. The time at which this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * was soft deleted, if it is in the
     * [DELETED][google.cloud.security.privateca.v1.CertificateAuthority.State.DELETED]
     * state.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp delete_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder() {
      if (deleteTimeBuilder_ != null) {
        return deleteTimeBuilder_.getMessageOrBuilder();
      } else {
        return deleteTime_ == null
            ? com.google.protobuf.Timestamp.getDefaultInstance()
            : deleteTime_;
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. The time at which this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * was soft deleted, if it is in the
     * [DELETED][google.cloud.security.privateca.v1.CertificateAuthority.State.DELETED]
     * state.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp delete_time = 15 [(.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>
        getDeleteTimeFieldBuilder() {
      if (deleteTimeBuilder_ == null) {
        deleteTimeBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.protobuf.Timestamp,
                com.google.protobuf.Timestamp.Builder,
                com.google.protobuf.TimestampOrBuilder>(
                getDeleteTime(), getParentForChildren(), isClean());
        deleteTime_ = null;
      }
      return deleteTimeBuilder_;
    }

    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
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * will be permanently purged, if it is in the
     * [DELETED][google.cloud.security.privateca.v1.CertificateAuthority.State.DELETED]
     * state.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp expire_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return Whether the expireTime field is set.
     */
    public boolean hasExpireTime() {
      return ((bitField0_ & 0x00008000) != 0);
    }
    /**
     *
     *
     * <pre>
     * Output only. The time at which this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * will be permanently purged, if it is in the
     * [DELETED][google.cloud.security.privateca.v1.CertificateAuthority.State.DELETED]
     * state.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp expire_time = 16 [(.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
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * will be permanently purged, if it is in the
     * [DELETED][google.cloud.security.privateca.v1.CertificateAuthority.State.DELETED]
     * state.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp expire_time = 16 [(.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_ |= 0x00008000;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The time at which this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * will be permanently purged, if it is in the
     * [DELETED][google.cloud.security.privateca.v1.CertificateAuthority.State.DELETED]
     * state.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp expire_time = 16 [(.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_ |= 0x00008000;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The time at which this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * will be permanently purged, if it is in the
     * [DELETED][google.cloud.security.privateca.v1.CertificateAuthority.State.DELETED]
     * state.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp expire_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder mergeExpireTime(com.google.protobuf.Timestamp value) {
      if (expireTimeBuilder_ == null) {
        if (((bitField0_ & 0x00008000) != 0)
            && expireTime_ != null
            && expireTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
          getExpireTimeBuilder().mergeFrom(value);
        } else {
          expireTime_ = value;
        }
      } else {
        expireTimeBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00008000;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The time at which this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * will be permanently purged, if it is in the
     * [DELETED][google.cloud.security.privateca.v1.CertificateAuthority.State.DELETED]
     * state.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp expire_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder clearExpireTime() {
      bitField0_ = (bitField0_ & ~0x00008000);
      expireTime_ = null;
      if (expireTimeBuilder_ != null) {
        expireTimeBuilder_.dispose();
        expireTimeBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The time at which this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * will be permanently purged, if it is in the
     * [DELETED][google.cloud.security.privateca.v1.CertificateAuthority.State.DELETED]
     * state.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp expire_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.protobuf.Timestamp.Builder getExpireTimeBuilder() {
      bitField0_ |= 0x00008000;
      onChanged();
      return getExpireTimeFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Output only. The time at which this
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * will be permanently purged, if it is in the
     * [DELETED][google.cloud.security.privateca.v1.CertificateAuthority.State.DELETED]
     * state.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp expire_time = 16 [(.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
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * will be permanently purged, if it is in the
     * [DELETED][google.cloud.security.privateca.v1.CertificateAuthority.State.DELETED]
     * state.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp expire_time = 16 [(.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.MapField<java.lang.String, java.lang.String> labels_;

    private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetLabels() {
      if (labels_ == null) {
        return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry);
      }
      return labels_;
    }

    private com.google.protobuf.MapField<java.lang.String, java.lang.String>
        internalGetMutableLabels() {
      if (labels_ == null) {
        labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry);
      }
      if (!labels_.isMutable()) {
        labels_ = labels_.copy();
      }
      bitField0_ |= 0x00010000;
      onChanged();
      return labels_;
    }

    public int getLabelsCount() {
      return internalGetLabels().getMap().size();
    }
    /**
     *
     *
     * <pre>
     * Optional. Labels with user-defined metadata.
     * </pre>
     *
     * <code>map&lt;string, string&gt; labels = 17 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    @java.lang.Override
    public boolean containsLabels(java.lang.String key) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      return internalGetLabels().getMap().containsKey(key);
    }
    /** Use {@link #getLabelsMap()} instead. */
    @java.lang.Override
    @java.lang.Deprecated
    public java.util.Map<java.lang.String, java.lang.String> getLabels() {
      return getLabelsMap();
    }
    /**
     *
     *
     * <pre>
     * Optional. Labels with user-defined metadata.
     * </pre>
     *
     * <code>map&lt;string, string&gt; labels = 17 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    @java.lang.Override
    public java.util.Map<java.lang.String, java.lang.String> getLabelsMap() {
      return internalGetLabels().getMap();
    }
    /**
     *
     *
     * <pre>
     * Optional. Labels with user-defined metadata.
     * </pre>
     *
     * <code>map&lt;string, string&gt; labels = 17 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    @java.lang.Override
    public /* nullable */ java.lang.String getLabelsOrDefault(
        java.lang.String key,
        /* nullable */
        java.lang.String defaultValue) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap();
      return map.containsKey(key) ? map.get(key) : defaultValue;
    }
    /**
     *
     *
     * <pre>
     * Optional. Labels with user-defined metadata.
     * </pre>
     *
     * <code>map&lt;string, string&gt; labels = 17 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    @java.lang.Override
    public java.lang.String getLabelsOrThrow(java.lang.String key) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap();
      if (!map.containsKey(key)) {
        throw new java.lang.IllegalArgumentException();
      }
      return map.get(key);
    }

    public Builder clearLabels() {
      bitField0_ = (bitField0_ & ~0x00010000);
      internalGetMutableLabels().getMutableMap().clear();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. Labels with user-defined metadata.
     * </pre>
     *
     * <code>map&lt;string, string&gt; labels = 17 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    public Builder removeLabels(java.lang.String key) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      internalGetMutableLabels().getMutableMap().remove(key);
      return this;
    }
    /** Use alternate mutation accessors instead. */
    @java.lang.Deprecated
    public java.util.Map<java.lang.String, java.lang.String> getMutableLabels() {
      bitField0_ |= 0x00010000;
      return internalGetMutableLabels().getMutableMap();
    }
    /**
     *
     *
     * <pre>
     * Optional. Labels with user-defined metadata.
     * </pre>
     *
     * <code>map&lt;string, string&gt; labels = 17 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    public Builder putLabels(java.lang.String key, java.lang.String value) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      if (value == null) {
        throw new NullPointerException("map value");
      }
      internalGetMutableLabels().getMutableMap().put(key, value);
      bitField0_ |= 0x00010000;
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. Labels with user-defined metadata.
     * </pre>
     *
     * <code>map&lt;string, string&gt; labels = 17 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    public Builder putAllLabels(java.util.Map<java.lang.String, java.lang.String> values) {
      internalGetMutableLabels().getMutableMap().putAll(values);
      bitField0_ |= 0x00010000;
      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.security.privateca.v1.CertificateAuthority)
  }

  // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1.CertificateAuthority)
  private static final com.google.cloud.security.privateca.v1.CertificateAuthority DEFAULT_INSTANCE;

  static {
    DEFAULT_INSTANCE = new com.google.cloud.security.privateca.v1.CertificateAuthority();
  }

  public static com.google.cloud.security.privateca.v1.CertificateAuthority getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<CertificateAuthority> PARSER =
      new com.google.protobuf.AbstractParser<CertificateAuthority>() {
        @java.lang.Override
        public CertificateAuthority 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<CertificateAuthority> parser() {
    return PARSER;
  }

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

  @java.lang.Override
  public com.google.cloud.security.privateca.v1.CertificateAuthority getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }
}
