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

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

/**
 *
 *
 * <pre>
 * A [CaPool][google.cloud.security.privateca.v1.CaPool] represents a group of
 * [CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority]
 * that form a trust anchor. A
 * [CaPool][google.cloud.security.privateca.v1.CaPool] can be used to manage
 * issuance policies for one or more
 * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
 * resources and to rotate CA certificates in and out of the trust anchor.
 * </pre>
 *
 * Protobuf type {@code google.cloud.security.privateca.v1.CaPool}
 */
public final class CaPool extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1.CaPool)
    CaPoolOrBuilder {
  private static final long serialVersionUID = 0L;
  // Use CaPool.newBuilder() to construct.
  private CaPool(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }

  private CaPool() {
    name_ = "";
    tier_ = 0;
  }

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

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

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

  @SuppressWarnings({"rawtypes"})
  @java.lang.Override
  protected com.google.protobuf.MapField internalGetMapField(int number) {
    switch (number) {
      case 5:
        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_CaPool_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.cloud.security.privateca.v1.CaPool.class,
            com.google.cloud.security.privateca.v1.CaPool.Builder.class);
  }

  /**
   *
   *
   * <pre>
   * The tier of a [CaPool][google.cloud.security.privateca.v1.CaPool],
   * indicating its supported functionality and/or billing SKU.
   * </pre>
   *
   * Protobuf enum {@code google.cloud.security.privateca.v1.CaPool.Tier}
   */
  public enum Tier implements com.google.protobuf.ProtocolMessageEnum {
    /**
     *
     *
     * <pre>
     * Not specified.
     * </pre>
     *
     * <code>TIER_UNSPECIFIED = 0;</code>
     */
    TIER_UNSPECIFIED(0),
    /**
     *
     *
     * <pre>
     * Enterprise tier.
     * </pre>
     *
     * <code>ENTERPRISE = 1;</code>
     */
    ENTERPRISE(1),
    /**
     *
     *
     * <pre>
     * DevOps tier.
     * </pre>
     *
     * <code>DEVOPS = 2;</code>
     */
    DEVOPS(2),
    UNRECOGNIZED(-1),
    ;

    /**
     *
     *
     * <pre>
     * Not specified.
     * </pre>
     *
     * <code>TIER_UNSPECIFIED = 0;</code>
     */
    public static final int TIER_UNSPECIFIED_VALUE = 0;
    /**
     *
     *
     * <pre>
     * Enterprise tier.
     * </pre>
     *
     * <code>ENTERPRISE = 1;</code>
     */
    public static final int ENTERPRISE_VALUE = 1;
    /**
     *
     *
     * <pre>
     * DevOps tier.
     * </pre>
     *
     * <code>DEVOPS = 2;</code>
     */
    public static final int DEVOPS_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 Tier 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 Tier forNumber(int value) {
      switch (value) {
        case 0:
          return TIER_UNSPECIFIED;
        case 1:
          return ENTERPRISE;
        case 2:
          return DEVOPS;
        default:
          return null;
      }
    }

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

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

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

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

    // @@protoc_insertion_point(enum_scope:google.cloud.security.privateca.v1.CaPool.Tier)
  }

  public interface PublishingOptionsOrBuilder
      extends
      // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1.CaPool.PublishingOptions)
      com.google.protobuf.MessageOrBuilder {

    /**
     *
     *
     * <pre>
     * Optional. When true, publishes each
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
     * CA certificate and includes its URL in the "Authority Information Access"
     * X.509 extension in all issued
     * [Certificates][google.cloud.security.privateca.v1.Certificate]. If this
     * is false, the CA certificate will not be published and the corresponding
     * X.509 extension will not be written in issued certificates.
     * </pre>
     *
     * <code>bool publish_ca_cert = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @return The publishCaCert.
     */
    boolean getPublishCaCert();

    /**
     *
     *
     * <pre>
     * Optional. When true, publishes each
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
     * CRL and includes its URL in the "CRL Distribution Points" X.509 extension
     * in all issued
     * [Certificates][google.cloud.security.privateca.v1.Certificate]. If this
     * is false, CRLs will not be published and the corresponding X.509
     * extension will not be written in issued certificates. CRLs will expire 7
     * days from their creation. However, we will rebuild daily. CRLs are also
     * rebuilt shortly after a certificate is revoked.
     * </pre>
     *
     * <code>bool publish_crl = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @return The publishCrl.
     */
    boolean getPublishCrl();
  }
  /**
   *
   *
   * <pre>
   * Options relating to the publication of each
   * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
   * CA certificate and CRLs and their inclusion as extensions in issued
   * [Certificates][google.cloud.security.privateca.v1.Certificate]. The options
   * set here apply to certificates issued by any
   * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
   * in the [CaPool][google.cloud.security.privateca.v1.CaPool].
   * </pre>
   *
   * Protobuf type {@code google.cloud.security.privateca.v1.CaPool.PublishingOptions}
   */
  public static final class PublishingOptions extends com.google.protobuf.GeneratedMessageV3
      implements
      // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1.CaPool.PublishingOptions)
      PublishingOptionsOrBuilder {
    private static final long serialVersionUID = 0L;
    // Use PublishingOptions.newBuilder() to construct.
    private PublishingOptions(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }

    private PublishingOptions() {}

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

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

    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.cloud.security.privateca.v1.PrivateCaResourcesProto
          .internal_static_google_cloud_security_privateca_v1_CaPool_PublishingOptions_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_CaPool_PublishingOptions_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.cloud.security.privateca.v1.CaPool.PublishingOptions.class,
              com.google.cloud.security.privateca.v1.CaPool.PublishingOptions.Builder.class);
    }

    public static final int PUBLISH_CA_CERT_FIELD_NUMBER = 1;
    private boolean publishCaCert_ = false;
    /**
     *
     *
     * <pre>
     * Optional. When true, publishes each
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
     * CA certificate and includes its URL in the "Authority Information Access"
     * X.509 extension in all issued
     * [Certificates][google.cloud.security.privateca.v1.Certificate]. If this
     * is false, the CA certificate will not be published and the corresponding
     * X.509 extension will not be written in issued certificates.
     * </pre>
     *
     * <code>bool publish_ca_cert = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @return The publishCaCert.
     */
    @java.lang.Override
    public boolean getPublishCaCert() {
      return publishCaCert_;
    }

    public static final int PUBLISH_CRL_FIELD_NUMBER = 2;
    private boolean publishCrl_ = false;
    /**
     *
     *
     * <pre>
     * Optional. When true, publishes each
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
     * CRL and includes its URL in the "CRL Distribution Points" X.509 extension
     * in all issued
     * [Certificates][google.cloud.security.privateca.v1.Certificate]. If this
     * is false, CRLs will not be published and the corresponding X.509
     * extension will not be written in issued certificates. CRLs will expire 7
     * days from their creation. However, we will rebuild daily. CRLs are also
     * rebuilt shortly after a certificate is revoked.
     * </pre>
     *
     * <code>bool publish_crl = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @return The publishCrl.
     */
    @java.lang.Override
    public boolean getPublishCrl() {
      return publishCrl_;
    }

    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 (publishCaCert_ != false) {
        output.writeBool(1, publishCaCert_);
      }
      if (publishCrl_ != false) {
        output.writeBool(2, publishCrl_);
      }
      getUnknownFields().writeTo(output);
    }

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

      size = 0;
      if (publishCaCert_ != false) {
        size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, publishCaCert_);
      }
      if (publishCrl_ != false) {
        size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, publishCrl_);
      }
      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.CaPool.PublishingOptions)) {
        return super.equals(obj);
      }
      com.google.cloud.security.privateca.v1.CaPool.PublishingOptions other =
          (com.google.cloud.security.privateca.v1.CaPool.PublishingOptions) obj;

      if (getPublishCaCert() != other.getPublishCaCert()) return false;
      if (getPublishCrl() != other.getPublishCrl()) 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) + PUBLISH_CA_CERT_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getPublishCaCert());
      hash = (37 * hash) + PUBLISH_CRL_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getPublishCrl());
      hash = (29 * hash) + getUnknownFields().hashCode();
      memoizedHashCode = hash;
      return hash;
    }

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

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

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

    public static com.google.cloud.security.privateca.v1.CaPool.PublishingOptions 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.CaPool.PublishingOptions 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.CaPool.PublishingOptions 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.CaPool.PublishingOptions
        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.CaPool.PublishingOptions
        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.CaPool.PublishingOptions 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.CaPool.PublishingOptions 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.CaPool.PublishingOptions 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>
     * Options relating to the publication of each
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
     * CA certificate and CRLs and their inclusion as extensions in issued
     * [Certificates][google.cloud.security.privateca.v1.Certificate]. The options
     * set here apply to certificates issued by any
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * in the [CaPool][google.cloud.security.privateca.v1.CaPool].
     * </pre>
     *
     * Protobuf type {@code google.cloud.security.privateca.v1.CaPool.PublishingOptions}
     */
    public static final class Builder
        extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
        implements
        // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1.CaPool.PublishingOptions)
        com.google.cloud.security.privateca.v1.CaPool.PublishingOptionsOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
        return com.google.cloud.security.privateca.v1.PrivateCaResourcesProto
            .internal_static_google_cloud_security_privateca_v1_CaPool_PublishingOptions_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_CaPool_PublishingOptions_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.cloud.security.privateca.v1.CaPool.PublishingOptions.class,
                com.google.cloud.security.privateca.v1.CaPool.PublishingOptions.Builder.class);
      }

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

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

      @java.lang.Override
      public Builder clear() {
        super.clear();
        bitField0_ = 0;
        publishCaCert_ = false;
        publishCrl_ = false;
        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_CaPool_PublishingOptions_descriptor;
      }

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

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

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

      private void buildPartial0(
          com.google.cloud.security.privateca.v1.CaPool.PublishingOptions result) {
        int from_bitField0_ = bitField0_;
        if (((from_bitField0_ & 0x00000001) != 0)) {
          result.publishCaCert_ = publishCaCert_;
        }
        if (((from_bitField0_ & 0x00000002) != 0)) {
          result.publishCrl_ = publishCrl_;
        }
      }

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

      public Builder mergeFrom(
          com.google.cloud.security.privateca.v1.CaPool.PublishingOptions other) {
        if (other
            == com.google.cloud.security.privateca.v1.CaPool.PublishingOptions.getDefaultInstance())
          return this;
        if (other.getPublishCaCert() != false) {
          setPublishCaCert(other.getPublishCaCert());
        }
        if (other.getPublishCrl() != false) {
          setPublishCrl(other.getPublishCrl());
        }
        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 8:
                {
                  publishCaCert_ = input.readBool();
                  bitField0_ |= 0x00000001;
                  break;
                } // case 8
              case 16:
                {
                  publishCrl_ = input.readBool();
                  bitField0_ |= 0x00000002;
                  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 bitField0_;

      private boolean publishCaCert_;
      /**
       *
       *
       * <pre>
       * Optional. When true, publishes each
       * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
       * CA certificate and includes its URL in the "Authority Information Access"
       * X.509 extension in all issued
       * [Certificates][google.cloud.security.privateca.v1.Certificate]. If this
       * is false, the CA certificate will not be published and the corresponding
       * X.509 extension will not be written in issued certificates.
       * </pre>
       *
       * <code>bool publish_ca_cert = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
       *
       * @return The publishCaCert.
       */
      @java.lang.Override
      public boolean getPublishCaCert() {
        return publishCaCert_;
      }
      /**
       *
       *
       * <pre>
       * Optional. When true, publishes each
       * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
       * CA certificate and includes its URL in the "Authority Information Access"
       * X.509 extension in all issued
       * [Certificates][google.cloud.security.privateca.v1.Certificate]. If this
       * is false, the CA certificate will not be published and the corresponding
       * X.509 extension will not be written in issued certificates.
       * </pre>
       *
       * <code>bool publish_ca_cert = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
       *
       * @param value The publishCaCert to set.
       * @return This builder for chaining.
       */
      public Builder setPublishCaCert(boolean value) {

        publishCaCert_ = value;
        bitField0_ |= 0x00000001;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Optional. When true, publishes each
       * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
       * CA certificate and includes its URL in the "Authority Information Access"
       * X.509 extension in all issued
       * [Certificates][google.cloud.security.privateca.v1.Certificate]. If this
       * is false, the CA certificate will not be published and the corresponding
       * X.509 extension will not be written in issued certificates.
       * </pre>
       *
       * <code>bool publish_ca_cert = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearPublishCaCert() {
        bitField0_ = (bitField0_ & ~0x00000001);
        publishCaCert_ = false;
        onChanged();
        return this;
      }

      private boolean publishCrl_;
      /**
       *
       *
       * <pre>
       * Optional. When true, publishes each
       * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
       * CRL and includes its URL in the "CRL Distribution Points" X.509 extension
       * in all issued
       * [Certificates][google.cloud.security.privateca.v1.Certificate]. If this
       * is false, CRLs will not be published and the corresponding X.509
       * extension will not be written in issued certificates. CRLs will expire 7
       * days from their creation. However, we will rebuild daily. CRLs are also
       * rebuilt shortly after a certificate is revoked.
       * </pre>
       *
       * <code>bool publish_crl = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
       *
       * @return The publishCrl.
       */
      @java.lang.Override
      public boolean getPublishCrl() {
        return publishCrl_;
      }
      /**
       *
       *
       * <pre>
       * Optional. When true, publishes each
       * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
       * CRL and includes its URL in the "CRL Distribution Points" X.509 extension
       * in all issued
       * [Certificates][google.cloud.security.privateca.v1.Certificate]. If this
       * is false, CRLs will not be published and the corresponding X.509
       * extension will not be written in issued certificates. CRLs will expire 7
       * days from their creation. However, we will rebuild daily. CRLs are also
       * rebuilt shortly after a certificate is revoked.
       * </pre>
       *
       * <code>bool publish_crl = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
       *
       * @param value The publishCrl to set.
       * @return This builder for chaining.
       */
      public Builder setPublishCrl(boolean value) {

        publishCrl_ = value;
        bitField0_ |= 0x00000002;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Optional. When true, publishes each
       * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
       * CRL and includes its URL in the "CRL Distribution Points" X.509 extension
       * in all issued
       * [Certificates][google.cloud.security.privateca.v1.Certificate]. If this
       * is false, CRLs will not be published and the corresponding X.509
       * extension will not be written in issued certificates. CRLs will expire 7
       * days from their creation. However, we will rebuild daily. CRLs are also
       * rebuilt shortly after a certificate is revoked.
       * </pre>
       *
       * <code>bool publish_crl = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearPublishCrl() {
        bitField0_ = (bitField0_ & ~0x00000002);
        publishCrl_ = false;
        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.CaPool.PublishingOptions)
    }

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

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

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

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

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

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

  public interface IssuancePolicyOrBuilder
      extends
      // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1.CaPool.IssuancePolicy)
      com.google.protobuf.MessageOrBuilder {

    /**
     *
     *
     * <pre>
     * Optional. If any
     * [AllowedKeyType][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType]
     * is specified, then the certificate request's public key must match one of
     * the key types listed here. Otherwise, any key may be used.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType allowed_key_types = 1 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    java.util.List<com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType>
        getAllowedKeyTypesList();
    /**
     *
     *
     * <pre>
     * Optional. If any
     * [AllowedKeyType][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType]
     * is specified, then the certificate request's public key must match one of
     * the key types listed here. Otherwise, any key may be used.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType allowed_key_types = 1 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType getAllowedKeyTypes(
        int index);
    /**
     *
     *
     * <pre>
     * Optional. If any
     * [AllowedKeyType][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType]
     * is specified, then the certificate request's public key must match one of
     * the key types listed here. Otherwise, any key may be used.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType allowed_key_types = 1 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    int getAllowedKeyTypesCount();
    /**
     *
     *
     * <pre>
     * Optional. If any
     * [AllowedKeyType][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType]
     * is specified, then the certificate request's public key must match one of
     * the key types listed here. Otherwise, any key may be used.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType allowed_key_types = 1 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    java.util.List<
            ? extends
                com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy
                    .AllowedKeyTypeOrBuilder>
        getAllowedKeyTypesOrBuilderList();
    /**
     *
     *
     * <pre>
     * Optional. If any
     * [AllowedKeyType][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType]
     * is specified, then the certificate request's public key must match one of
     * the key types listed here. Otherwise, any key may be used.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType allowed_key_types = 1 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyTypeOrBuilder
        getAllowedKeyTypesOrBuilder(int index);

    /**
     *
     *
     * <pre>
     * Optional. The maximum lifetime allowed for issued
     * [Certificates][google.cloud.security.privateca.v1.Certificate]. Note that
     * if the issuing
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * expires before a
     * [Certificate][google.cloud.security.privateca.v1.Certificate]'s requested
     * maximum_lifetime, the effective lifetime will be explicitly truncated to
     * match it.
     * </pre>
     *
     * <code>
     * .google.protobuf.Duration maximum_lifetime = 2 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @return Whether the maximumLifetime field is set.
     */
    boolean hasMaximumLifetime();
    /**
     *
     *
     * <pre>
     * Optional. The maximum lifetime allowed for issued
     * [Certificates][google.cloud.security.privateca.v1.Certificate]. Note that
     * if the issuing
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * expires before a
     * [Certificate][google.cloud.security.privateca.v1.Certificate]'s requested
     * maximum_lifetime, the effective lifetime will be explicitly truncated to
     * match it.
     * </pre>
     *
     * <code>
     * .google.protobuf.Duration maximum_lifetime = 2 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @return The maximumLifetime.
     */
    com.google.protobuf.Duration getMaximumLifetime();
    /**
     *
     *
     * <pre>
     * Optional. The maximum lifetime allowed for issued
     * [Certificates][google.cloud.security.privateca.v1.Certificate]. Note that
     * if the issuing
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * expires before a
     * [Certificate][google.cloud.security.privateca.v1.Certificate]'s requested
     * maximum_lifetime, the effective lifetime will be explicitly truncated to
     * match it.
     * </pre>
     *
     * <code>
     * .google.protobuf.Duration maximum_lifetime = 2 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    com.google.protobuf.DurationOrBuilder getMaximumLifetimeOrBuilder();

    /**
     *
     *
     * <pre>
     * Optional. If specified, then only methods allowed in the
     * [IssuanceModes][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes]
     * may be used to issue
     * [Certificates][google.cloud.security.privateca.v1.Certificate].
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes allowed_issuance_modes = 3 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @return Whether the allowedIssuanceModes field is set.
     */
    boolean hasAllowedIssuanceModes();
    /**
     *
     *
     * <pre>
     * Optional. If specified, then only methods allowed in the
     * [IssuanceModes][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes]
     * may be used to issue
     * [Certificates][google.cloud.security.privateca.v1.Certificate].
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes allowed_issuance_modes = 3 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @return The allowedIssuanceModes.
     */
    com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes
        getAllowedIssuanceModes();
    /**
     *
     *
     * <pre>
     * Optional. If specified, then only methods allowed in the
     * [IssuanceModes][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes]
     * may be used to issue
     * [Certificates][google.cloud.security.privateca.v1.Certificate].
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes allowed_issuance_modes = 3 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModesOrBuilder
        getAllowedIssuanceModesOrBuilder();

    /**
     *
     *
     * <pre>
     * Optional. A set of X.509 values that will be applied to all certificates
     * issued through this [CaPool][google.cloud.security.privateca.v1.CaPool].
     * If a certificate request includes conflicting values for the same
     * properties, they will be overwritten by the values defined here. If a
     * certificate request uses a
     * [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]
     * that defines conflicting
     * [predefined_values][google.cloud.security.privateca.v1.CertificateTemplate.predefined_values]
     * for the same properties, the certificate issuance request will fail.
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.X509Parameters baseline_values = 4 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @return Whether the baselineValues field is set.
     */
    boolean hasBaselineValues();
    /**
     *
     *
     * <pre>
     * Optional. A set of X.509 values that will be applied to all certificates
     * issued through this [CaPool][google.cloud.security.privateca.v1.CaPool].
     * If a certificate request includes conflicting values for the same
     * properties, they will be overwritten by the values defined here. If a
     * certificate request uses a
     * [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]
     * that defines conflicting
     * [predefined_values][google.cloud.security.privateca.v1.CertificateTemplate.predefined_values]
     * for the same properties, the certificate issuance request will fail.
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.X509Parameters baseline_values = 4 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @return The baselineValues.
     */
    com.google.cloud.security.privateca.v1.X509Parameters getBaselineValues();
    /**
     *
     *
     * <pre>
     * Optional. A set of X.509 values that will be applied to all certificates
     * issued through this [CaPool][google.cloud.security.privateca.v1.CaPool].
     * If a certificate request includes conflicting values for the same
     * properties, they will be overwritten by the values defined here. If a
     * certificate request uses a
     * [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]
     * that defines conflicting
     * [predefined_values][google.cloud.security.privateca.v1.CertificateTemplate.predefined_values]
     * for the same properties, the certificate issuance request will fail.
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.X509Parameters baseline_values = 4 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    com.google.cloud.security.privateca.v1.X509ParametersOrBuilder getBaselineValuesOrBuilder();

    /**
     *
     *
     * <pre>
     * Optional. Describes constraints on identities that may appear in
     * [Certificates][google.cloud.security.privateca.v1.Certificate] issued
     * through this [CaPool][google.cloud.security.privateca.v1.CaPool]. If this
     * is omitted, then this [CaPool][google.cloud.security.privateca.v1.CaPool]
     * will not add restrictions on a certificate's identity.
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CertificateIdentityConstraints identity_constraints = 5 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @return Whether the identityConstraints field is set.
     */
    boolean hasIdentityConstraints();
    /**
     *
     *
     * <pre>
     * Optional. Describes constraints on identities that may appear in
     * [Certificates][google.cloud.security.privateca.v1.Certificate] issued
     * through this [CaPool][google.cloud.security.privateca.v1.CaPool]. If this
     * is omitted, then this [CaPool][google.cloud.security.privateca.v1.CaPool]
     * will not add restrictions on a certificate's identity.
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CertificateIdentityConstraints identity_constraints = 5 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @return The identityConstraints.
     */
    com.google.cloud.security.privateca.v1.CertificateIdentityConstraints getIdentityConstraints();
    /**
     *
     *
     * <pre>
     * Optional. Describes constraints on identities that may appear in
     * [Certificates][google.cloud.security.privateca.v1.Certificate] issued
     * through this [CaPool][google.cloud.security.privateca.v1.CaPool]. If this
     * is omitted, then this [CaPool][google.cloud.security.privateca.v1.CaPool]
     * will not add restrictions on a certificate's identity.
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CertificateIdentityConstraints identity_constraints = 5 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    com.google.cloud.security.privateca.v1.CertificateIdentityConstraintsOrBuilder
        getIdentityConstraintsOrBuilder();

    /**
     *
     *
     * <pre>
     * Optional. Describes the set of X.509 extensions that may appear in a
     * [Certificate][google.cloud.security.privateca.v1.Certificate] issued
     * through this [CaPool][google.cloud.security.privateca.v1.CaPool]. If a
     * certificate request sets extensions that don't appear in the
     * [passthrough_extensions][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.passthrough_extensions],
     * those extensions will be dropped. If a certificate request uses a
     * [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]
     * with
     * [predefined_values][google.cloud.security.privateca.v1.CertificateTemplate.predefined_values]
     * that don't appear here, the certificate issuance request will fail. If
     * this is omitted, then this
     * [CaPool][google.cloud.security.privateca.v1.CaPool] will not add
     * restrictions on a certificate's X.509 extensions. These constraints do
     * not apply to X.509 extensions set in this
     * [CaPool][google.cloud.security.privateca.v1.CaPool]'s
     * [baseline_values][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.baseline_values].
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CertificateExtensionConstraints passthrough_extensions = 6 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @return Whether the passthroughExtensions field is set.
     */
    boolean hasPassthroughExtensions();
    /**
     *
     *
     * <pre>
     * Optional. Describes the set of X.509 extensions that may appear in a
     * [Certificate][google.cloud.security.privateca.v1.Certificate] issued
     * through this [CaPool][google.cloud.security.privateca.v1.CaPool]. If a
     * certificate request sets extensions that don't appear in the
     * [passthrough_extensions][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.passthrough_extensions],
     * those extensions will be dropped. If a certificate request uses a
     * [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]
     * with
     * [predefined_values][google.cloud.security.privateca.v1.CertificateTemplate.predefined_values]
     * that don't appear here, the certificate issuance request will fail. If
     * this is omitted, then this
     * [CaPool][google.cloud.security.privateca.v1.CaPool] will not add
     * restrictions on a certificate's X.509 extensions. These constraints do
     * not apply to X.509 extensions set in this
     * [CaPool][google.cloud.security.privateca.v1.CaPool]'s
     * [baseline_values][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.baseline_values].
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CertificateExtensionConstraints passthrough_extensions = 6 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @return The passthroughExtensions.
     */
    com.google.cloud.security.privateca.v1.CertificateExtensionConstraints
        getPassthroughExtensions();
    /**
     *
     *
     * <pre>
     * Optional. Describes the set of X.509 extensions that may appear in a
     * [Certificate][google.cloud.security.privateca.v1.Certificate] issued
     * through this [CaPool][google.cloud.security.privateca.v1.CaPool]. If a
     * certificate request sets extensions that don't appear in the
     * [passthrough_extensions][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.passthrough_extensions],
     * those extensions will be dropped. If a certificate request uses a
     * [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]
     * with
     * [predefined_values][google.cloud.security.privateca.v1.CertificateTemplate.predefined_values]
     * that don't appear here, the certificate issuance request will fail. If
     * this is omitted, then this
     * [CaPool][google.cloud.security.privateca.v1.CaPool] will not add
     * restrictions on a certificate's X.509 extensions. These constraints do
     * not apply to X.509 extensions set in this
     * [CaPool][google.cloud.security.privateca.v1.CaPool]'s
     * [baseline_values][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.baseline_values].
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CertificateExtensionConstraints passthrough_extensions = 6 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    com.google.cloud.security.privateca.v1.CertificateExtensionConstraintsOrBuilder
        getPassthroughExtensionsOrBuilder();
  }
  /**
   *
   *
   * <pre>
   * Defines controls over all certificate issuance within a
   * [CaPool][google.cloud.security.privateca.v1.CaPool].
   * </pre>
   *
   * Protobuf type {@code google.cloud.security.privateca.v1.CaPool.IssuancePolicy}
   */
  public static final class IssuancePolicy extends com.google.protobuf.GeneratedMessageV3
      implements
      // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1.CaPool.IssuancePolicy)
      IssuancePolicyOrBuilder {
    private static final long serialVersionUID = 0L;
    // Use IssuancePolicy.newBuilder() to construct.
    private IssuancePolicy(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }

    private IssuancePolicy() {
      allowedKeyTypes_ = java.util.Collections.emptyList();
    }

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

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

    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.cloud.security.privateca.v1.PrivateCaResourcesProto
          .internal_static_google_cloud_security_privateca_v1_CaPool_IssuancePolicy_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_CaPool_IssuancePolicy_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.class,
              com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.Builder.class);
    }

    public interface AllowedKeyTypeOrBuilder
        extends
        // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType)
        com.google.protobuf.MessageOrBuilder {

      /**
       *
       *
       * <pre>
       * Represents an allowed RSA key type.
       * </pre>
       *
       * <code>
       * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType rsa = 1;
       * </code>
       *
       * @return Whether the rsa field is set.
       */
      boolean hasRsa();
      /**
       *
       *
       * <pre>
       * Represents an allowed RSA key type.
       * </pre>
       *
       * <code>
       * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType rsa = 1;
       * </code>
       *
       * @return The rsa.
       */
      com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType
          getRsa();
      /**
       *
       *
       * <pre>
       * Represents an allowed RSA key type.
       * </pre>
       *
       * <code>
       * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType rsa = 1;
       * </code>
       */
      com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
              .RsaKeyTypeOrBuilder
          getRsaOrBuilder();

      /**
       *
       *
       * <pre>
       * Represents an allowed Elliptic Curve key type.
       * </pre>
       *
       * <code>
       * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType elliptic_curve = 2;
       * </code>
       *
       * @return Whether the ellipticCurve field is set.
       */
      boolean hasEllipticCurve();
      /**
       *
       *
       * <pre>
       * Represents an allowed Elliptic Curve key type.
       * </pre>
       *
       * <code>
       * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType elliptic_curve = 2;
       * </code>
       *
       * @return The ellipticCurve.
       */
      com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType
          getEllipticCurve();
      /**
       *
       *
       * <pre>
       * Represents an allowed Elliptic Curve key type.
       * </pre>
       *
       * <code>
       * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType elliptic_curve = 2;
       * </code>
       */
      com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyTypeOrBuilder
          getEllipticCurveOrBuilder();

      public com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.KeyTypeCase
          getKeyTypeCase();
    }
    /**
     *
     *
     * <pre>
     * Describes a "type" of key that may be used in a
     * [Certificate][google.cloud.security.privateca.v1.Certificate] issued from
     * a [CaPool][google.cloud.security.privateca.v1.CaPool]. Note that a single
     * [AllowedKeyType][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType]
     * may refer to either a fully-qualified key algorithm, such as RSA 4096, or
     * a family of key algorithms, such as any RSA key.
     * </pre>
     *
     * Protobuf type {@code google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType}
     */
    public static final class AllowedKeyType extends com.google.protobuf.GeneratedMessageV3
        implements
        // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType)
        AllowedKeyTypeOrBuilder {
      private static final long serialVersionUID = 0L;
      // Use AllowedKeyType.newBuilder() to construct.
      private AllowedKeyType(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
        super(builder);
      }

      private AllowedKeyType() {}

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

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

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
        return com.google.cloud.security.privateca.v1.PrivateCaResourcesProto
            .internal_static_google_cloud_security_privateca_v1_CaPool_IssuancePolicy_AllowedKeyType_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_CaPool_IssuancePolicy_AllowedKeyType_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.class,
                com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.Builder
                    .class);
      }

      public interface RsaKeyTypeOrBuilder
          extends
          // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType)
          com.google.protobuf.MessageOrBuilder {

        /**
         *
         *
         * <pre>
         * Optional. The minimum allowed RSA modulus size (inclusive), in bits.
         * If this is not set, or if set to zero, the service-level min RSA
         * modulus size will continue to apply.
         * </pre>
         *
         * <code>int64 min_modulus_size = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
         *
         * @return The minModulusSize.
         */
        long getMinModulusSize();

        /**
         *
         *
         * <pre>
         * Optional. The maximum allowed RSA modulus size (inclusive), in bits.
         * If this is not set, or if set to zero, the service will not enforce
         * an explicit upper bound on RSA modulus sizes.
         * </pre>
         *
         * <code>int64 max_modulus_size = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
         *
         * @return The maxModulusSize.
         */
        long getMaxModulusSize();
      }
      /**
       *
       *
       * <pre>
       * Describes an RSA key that may be used in a
       * [Certificate][google.cloud.security.privateca.v1.Certificate] issued
       * from a [CaPool][google.cloud.security.privateca.v1.CaPool].
       * </pre>
       *
       * Protobuf type {@code
       * google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType}
       */
      public static final class RsaKeyType extends com.google.protobuf.GeneratedMessageV3
          implements
          // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType)
          RsaKeyTypeOrBuilder {
        private static final long serialVersionUID = 0L;
        // Use RsaKeyType.newBuilder() to construct.
        private RsaKeyType(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
          super(builder);
        }

        private RsaKeyType() {}

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

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

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
          return com.google.cloud.security.privateca.v1.PrivateCaResourcesProto
              .internal_static_google_cloud_security_privateca_v1_CaPool_IssuancePolicy_AllowedKeyType_RsaKeyType_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_CaPool_IssuancePolicy_AllowedKeyType_RsaKeyType_fieldAccessorTable
              .ensureFieldAccessorsInitialized(
                  com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                      .RsaKeyType.class,
                  com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                      .RsaKeyType.Builder.class);
        }

        public static final int MIN_MODULUS_SIZE_FIELD_NUMBER = 1;
        private long minModulusSize_ = 0L;
        /**
         *
         *
         * <pre>
         * Optional. The minimum allowed RSA modulus size (inclusive), in bits.
         * If this is not set, or if set to zero, the service-level min RSA
         * modulus size will continue to apply.
         * </pre>
         *
         * <code>int64 min_modulus_size = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
         *
         * @return The minModulusSize.
         */
        @java.lang.Override
        public long getMinModulusSize() {
          return minModulusSize_;
        }

        public static final int MAX_MODULUS_SIZE_FIELD_NUMBER = 2;
        private long maxModulusSize_ = 0L;
        /**
         *
         *
         * <pre>
         * Optional. The maximum allowed RSA modulus size (inclusive), in bits.
         * If this is not set, or if set to zero, the service will not enforce
         * an explicit upper bound on RSA modulus sizes.
         * </pre>
         *
         * <code>int64 max_modulus_size = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
         *
         * @return The maxModulusSize.
         */
        @java.lang.Override
        public long getMaxModulusSize() {
          return maxModulusSize_;
        }

        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 (minModulusSize_ != 0L) {
            output.writeInt64(1, minModulusSize_);
          }
          if (maxModulusSize_ != 0L) {
            output.writeInt64(2, maxModulusSize_);
          }
          getUnknownFields().writeTo(output);
        }

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

          size = 0;
          if (minModulusSize_ != 0L) {
            size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, minModulusSize_);
          }
          if (maxModulusSize_ != 0L) {
            size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, maxModulusSize_);
          }
          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.CaPool.IssuancePolicy.AllowedKeyType
                  .RsaKeyType)) {
            return super.equals(obj);
          }
          com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType
              other =
                  (com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                          .RsaKeyType)
                      obj;

          if (getMinModulusSize() != other.getMinModulusSize()) return false;
          if (getMaxModulusSize() != other.getMaxModulusSize()) 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) + MIN_MODULUS_SIZE_FIELD_NUMBER;
          hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getMinModulusSize());
          hash = (37 * hash) + MAX_MODULUS_SIZE_FIELD_NUMBER;
          hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getMaxModulusSize());
          hash = (29 * hash) + getUnknownFields().hashCode();
          memoizedHashCode = hash;
          return hash;
        }

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

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

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

        public static com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                .RsaKeyType
            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.CaPool.IssuancePolicy.AllowedKeyType
                .RsaKeyType
            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.CaPool.IssuancePolicy.AllowedKeyType
                .RsaKeyType
            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.CaPool.IssuancePolicy.AllowedKeyType
                .RsaKeyType
            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.CaPool.IssuancePolicy.AllowedKeyType
                .RsaKeyType
            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.CaPool.IssuancePolicy.AllowedKeyType
                .RsaKeyType
            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.CaPool.IssuancePolicy.AllowedKeyType
                .RsaKeyType
            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.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType
                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>
         * Describes an RSA key that may be used in a
         * [Certificate][google.cloud.security.privateca.v1.Certificate] issued
         * from a [CaPool][google.cloud.security.privateca.v1.CaPool].
         * </pre>
         *
         * Protobuf type {@code
         * google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType}
         */
        public static final class Builder
            extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
            implements
            // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType)
            com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                .RsaKeyTypeOrBuilder {
          public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
            return com.google.cloud.security.privateca.v1.PrivateCaResourcesProto
                .internal_static_google_cloud_security_privateca_v1_CaPool_IssuancePolicy_AllowedKeyType_RsaKeyType_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_CaPool_IssuancePolicy_AllowedKeyType_RsaKeyType_fieldAccessorTable
                .ensureFieldAccessorsInitialized(
                    com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                        .RsaKeyType.class,
                    com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                        .RsaKeyType.Builder.class);
          }

          // Construct using
          // com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType.newBuilder()
          private Builder() {}

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

          @java.lang.Override
          public Builder clear() {
            super.clear();
            bitField0_ = 0;
            minModulusSize_ = 0L;
            maxModulusSize_ = 0L;
            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_CaPool_IssuancePolicy_AllowedKeyType_RsaKeyType_descriptor;
          }

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

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

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

          private void buildPartial0(
              com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType
                  result) {
            int from_bitField0_ = bitField0_;
            if (((from_bitField0_ & 0x00000001) != 0)) {
              result.minModulusSize_ = minModulusSize_;
            }
            if (((from_bitField0_ & 0x00000002) != 0)) {
              result.maxModulusSize_ = maxModulusSize_;
            }
          }

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

          public Builder mergeFrom(
              com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType
                  other) {
            if (other
                == com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                    .RsaKeyType.getDefaultInstance()) return this;
            if (other.getMinModulusSize() != 0L) {
              setMinModulusSize(other.getMinModulusSize());
            }
            if (other.getMaxModulusSize() != 0L) {
              setMaxModulusSize(other.getMaxModulusSize());
            }
            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 8:
                    {
                      minModulusSize_ = input.readInt64();
                      bitField0_ |= 0x00000001;
                      break;
                    } // case 8
                  case 16:
                    {
                      maxModulusSize_ = input.readInt64();
                      bitField0_ |= 0x00000002;
                      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 bitField0_;

          private long minModulusSize_;
          /**
           *
           *
           * <pre>
           * Optional. The minimum allowed RSA modulus size (inclusive), in bits.
           * If this is not set, or if set to zero, the service-level min RSA
           * modulus size will continue to apply.
           * </pre>
           *
           * <code>int64 min_modulus_size = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
           *
           * @return The minModulusSize.
           */
          @java.lang.Override
          public long getMinModulusSize() {
            return minModulusSize_;
          }
          /**
           *
           *
           * <pre>
           * Optional. The minimum allowed RSA modulus size (inclusive), in bits.
           * If this is not set, or if set to zero, the service-level min RSA
           * modulus size will continue to apply.
           * </pre>
           *
           * <code>int64 min_modulus_size = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
           *
           * @param value The minModulusSize to set.
           * @return This builder for chaining.
           */
          public Builder setMinModulusSize(long value) {

            minModulusSize_ = value;
            bitField0_ |= 0x00000001;
            onChanged();
            return this;
          }
          /**
           *
           *
           * <pre>
           * Optional. The minimum allowed RSA modulus size (inclusive), in bits.
           * If this is not set, or if set to zero, the service-level min RSA
           * modulus size will continue to apply.
           * </pre>
           *
           * <code>int64 min_modulus_size = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
           *
           * @return This builder for chaining.
           */
          public Builder clearMinModulusSize() {
            bitField0_ = (bitField0_ & ~0x00000001);
            minModulusSize_ = 0L;
            onChanged();
            return this;
          }

          private long maxModulusSize_;
          /**
           *
           *
           * <pre>
           * Optional. The maximum allowed RSA modulus size (inclusive), in bits.
           * If this is not set, or if set to zero, the service will not enforce
           * an explicit upper bound on RSA modulus sizes.
           * </pre>
           *
           * <code>int64 max_modulus_size = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
           *
           * @return The maxModulusSize.
           */
          @java.lang.Override
          public long getMaxModulusSize() {
            return maxModulusSize_;
          }
          /**
           *
           *
           * <pre>
           * Optional. The maximum allowed RSA modulus size (inclusive), in bits.
           * If this is not set, or if set to zero, the service will not enforce
           * an explicit upper bound on RSA modulus sizes.
           * </pre>
           *
           * <code>int64 max_modulus_size = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
           *
           * @param value The maxModulusSize to set.
           * @return This builder for chaining.
           */
          public Builder setMaxModulusSize(long value) {

            maxModulusSize_ = value;
            bitField0_ |= 0x00000002;
            onChanged();
            return this;
          }
          /**
           *
           *
           * <pre>
           * Optional. The maximum allowed RSA modulus size (inclusive), in bits.
           * If this is not set, or if set to zero, the service will not enforce
           * an explicit upper bound on RSA modulus sizes.
           * </pre>
           *
           * <code>int64 max_modulus_size = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
           *
           * @return This builder for chaining.
           */
          public Builder clearMaxModulusSize() {
            bitField0_ = (bitField0_ & ~0x00000002);
            maxModulusSize_ = 0L;
            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.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType)
        }

        // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType)
        private static final com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy
                .AllowedKeyType.RsaKeyType
            DEFAULT_INSTANCE;

        static {
          DEFAULT_INSTANCE =
              new com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                  .RsaKeyType();
        }

        public static com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                .RsaKeyType
            getDefaultInstance() {
          return DEFAULT_INSTANCE;
        }

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

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

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

      public interface EcKeyTypeOrBuilder
          extends
          // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType)
          com.google.protobuf.MessageOrBuilder {

        /**
         *
         *
         * <pre>
         * Optional. A signature algorithm that must be used. If this is
         * omitted, any EC-based signature algorithm will be allowed.
         * </pre>
         *
         * <code>
         * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType.EcSignatureAlgorithm signature_algorithm = 1 [(.google.api.field_behavior) = OPTIONAL];
         * </code>
         *
         * @return The enum numeric value on the wire for signatureAlgorithm.
         */
        int getSignatureAlgorithmValue();
        /**
         *
         *
         * <pre>
         * Optional. A signature algorithm that must be used. If this is
         * omitted, any EC-based signature algorithm will be allowed.
         * </pre>
         *
         * <code>
         * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType.EcSignatureAlgorithm signature_algorithm = 1 [(.google.api.field_behavior) = OPTIONAL];
         * </code>
         *
         * @return The signatureAlgorithm.
         */
        com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType
                .EcSignatureAlgorithm
            getSignatureAlgorithm();
      }
      /**
       *
       *
       * <pre>
       * Describes an Elliptic Curve key that may be used in a
       * [Certificate][google.cloud.security.privateca.v1.Certificate] issued
       * from a [CaPool][google.cloud.security.privateca.v1.CaPool].
       * </pre>
       *
       * Protobuf type {@code
       * google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType}
       */
      public static final class EcKeyType extends com.google.protobuf.GeneratedMessageV3
          implements
          // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType)
          EcKeyTypeOrBuilder {
        private static final long serialVersionUID = 0L;
        // Use EcKeyType.newBuilder() to construct.
        private EcKeyType(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
          super(builder);
        }

        private EcKeyType() {
          signatureAlgorithm_ = 0;
        }

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

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

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
          return com.google.cloud.security.privateca.v1.PrivateCaResourcesProto
              .internal_static_google_cloud_security_privateca_v1_CaPool_IssuancePolicy_AllowedKeyType_EcKeyType_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_CaPool_IssuancePolicy_AllowedKeyType_EcKeyType_fieldAccessorTable
              .ensureFieldAccessorsInitialized(
                  com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                      .EcKeyType.class,
                  com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                      .EcKeyType.Builder.class);
        }

        /**
         *
         *
         * <pre>
         * Describes an elliptic curve-based signature algorithm that may be
         * used in a
         * [Certificate][google.cloud.security.privateca.v1.Certificate] issued
         * from a [CaPool][google.cloud.security.privateca.v1.CaPool].
         * </pre>
         *
         * Protobuf enum {@code
         * google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType.EcSignatureAlgorithm}
         */
        public enum EcSignatureAlgorithm implements com.google.protobuf.ProtocolMessageEnum {
          /**
           *
           *
           * <pre>
           * Not specified. Signifies that any signature algorithm may be used.
           * </pre>
           *
           * <code>EC_SIGNATURE_ALGORITHM_UNSPECIFIED = 0;</code>
           */
          EC_SIGNATURE_ALGORITHM_UNSPECIFIED(0),
          /**
           *
           *
           * <pre>
           * Refers to the Elliptic Curve Digital Signature Algorithm over the
           * NIST P-256 curve.
           * </pre>
           *
           * <code>ECDSA_P256 = 1;</code>
           */
          ECDSA_P256(1),
          /**
           *
           *
           * <pre>
           * Refers to the Elliptic Curve Digital Signature Algorithm over the
           * NIST P-384 curve.
           * </pre>
           *
           * <code>ECDSA_P384 = 2;</code>
           */
          ECDSA_P384(2),
          /**
           *
           *
           * <pre>
           * Refers to the Edwards-curve Digital Signature Algorithm over curve
           * 25519, as described in RFC 8410.
           * </pre>
           *
           * <code>EDDSA_25519 = 3;</code>
           */
          EDDSA_25519(3),
          UNRECOGNIZED(-1),
          ;

          /**
           *
           *
           * <pre>
           * Not specified. Signifies that any signature algorithm may be used.
           * </pre>
           *
           * <code>EC_SIGNATURE_ALGORITHM_UNSPECIFIED = 0;</code>
           */
          public static final int EC_SIGNATURE_ALGORITHM_UNSPECIFIED_VALUE = 0;
          /**
           *
           *
           * <pre>
           * Refers to the Elliptic Curve Digital Signature Algorithm over the
           * NIST P-256 curve.
           * </pre>
           *
           * <code>ECDSA_P256 = 1;</code>
           */
          public static final int ECDSA_P256_VALUE = 1;
          /**
           *
           *
           * <pre>
           * Refers to the Elliptic Curve Digital Signature Algorithm over the
           * NIST P-384 curve.
           * </pre>
           *
           * <code>ECDSA_P384 = 2;</code>
           */
          public static final int ECDSA_P384_VALUE = 2;
          /**
           *
           *
           * <pre>
           * Refers to the Edwards-curve Digital Signature Algorithm over curve
           * 25519, as described in RFC 8410.
           * </pre>
           *
           * <code>EDDSA_25519 = 3;</code>
           */
          public static final int EDDSA_25519_VALUE = 3;

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

          /**
           * @param value The numeric wire value of the corresponding enum entry.
           * @return The enum associated with the given numeric wire value.
           * @deprecated Use {@link #forNumber(int)} instead.
           */
          @java.lang.Deprecated
          public static EcSignatureAlgorithm 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 EcSignatureAlgorithm forNumber(int value) {
            switch (value) {
              case 0:
                return EC_SIGNATURE_ALGORITHM_UNSPECIFIED;
              case 1:
                return ECDSA_P256;
              case 2:
                return ECDSA_P384;
              case 3:
                return EDDSA_25519;
              default:
                return null;
            }
          }

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

          private static final com.google.protobuf.Internal.EnumLiteMap<EcSignatureAlgorithm>
              internalValueMap =
                  new com.google.protobuf.Internal.EnumLiteMap<EcSignatureAlgorithm>() {
                    public EcSignatureAlgorithm findValueByNumber(int number) {
                      return EcSignatureAlgorithm.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.CaPool.IssuancePolicy.AllowedKeyType
                .EcKeyType.getDescriptor()
                .getEnumTypes()
                .get(0);
          }

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

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

          // @@protoc_insertion_point(enum_scope:google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType.EcSignatureAlgorithm)
        }

        public static final int SIGNATURE_ALGORITHM_FIELD_NUMBER = 1;
        private int signatureAlgorithm_ = 0;
        /**
         *
         *
         * <pre>
         * Optional. A signature algorithm that must be used. If this is
         * omitted, any EC-based signature algorithm will be allowed.
         * </pre>
         *
         * <code>
         * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType.EcSignatureAlgorithm signature_algorithm = 1 [(.google.api.field_behavior) = OPTIONAL];
         * </code>
         *
         * @return The enum numeric value on the wire for signatureAlgorithm.
         */
        @java.lang.Override
        public int getSignatureAlgorithmValue() {
          return signatureAlgorithm_;
        }
        /**
         *
         *
         * <pre>
         * Optional. A signature algorithm that must be used. If this is
         * omitted, any EC-based signature algorithm will be allowed.
         * </pre>
         *
         * <code>
         * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType.EcSignatureAlgorithm signature_algorithm = 1 [(.google.api.field_behavior) = OPTIONAL];
         * </code>
         *
         * @return The signatureAlgorithm.
         */
        @java.lang.Override
        public com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType
                .EcSignatureAlgorithm
            getSignatureAlgorithm() {
          com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType
                  .EcSignatureAlgorithm
              result =
                  com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                      .EcKeyType.EcSignatureAlgorithm.forNumber(signatureAlgorithm_);
          return result == null
              ? com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                  .EcKeyType.EcSignatureAlgorithm.UNRECOGNIZED
              : result;
        }

        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 (signatureAlgorithm_
              != com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                  .EcKeyType.EcSignatureAlgorithm.EC_SIGNATURE_ALGORITHM_UNSPECIFIED
                  .getNumber()) {
            output.writeEnum(1, signatureAlgorithm_);
          }
          getUnknownFields().writeTo(output);
        }

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

          size = 0;
          if (signatureAlgorithm_
              != com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                  .EcKeyType.EcSignatureAlgorithm.EC_SIGNATURE_ALGORITHM_UNSPECIFIED
                  .getNumber()) {
            size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, signatureAlgorithm_);
          }
          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.CaPool.IssuancePolicy.AllowedKeyType
                  .EcKeyType)) {
            return super.equals(obj);
          }
          com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType
              other =
                  (com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                          .EcKeyType)
                      obj;

          if (signatureAlgorithm_ != other.signatureAlgorithm_) 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) + SIGNATURE_ALGORITHM_FIELD_NUMBER;
          hash = (53 * hash) + signatureAlgorithm_;
          hash = (29 * hash) + getUnknownFields().hashCode();
          memoizedHashCode = hash;
          return hash;
        }

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

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

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

        public static com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                .EcKeyType
            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.CaPool.IssuancePolicy.AllowedKeyType
                .EcKeyType
            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.CaPool.IssuancePolicy.AllowedKeyType
                .EcKeyType
            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.CaPool.IssuancePolicy.AllowedKeyType
                .EcKeyType
            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.CaPool.IssuancePolicy.AllowedKeyType
                .EcKeyType
            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.CaPool.IssuancePolicy.AllowedKeyType
                .EcKeyType
            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.CaPool.IssuancePolicy.AllowedKeyType
                .EcKeyType
            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.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType
                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>
         * Describes an Elliptic Curve key that may be used in a
         * [Certificate][google.cloud.security.privateca.v1.Certificate] issued
         * from a [CaPool][google.cloud.security.privateca.v1.CaPool].
         * </pre>
         *
         * Protobuf type {@code
         * google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType}
         */
        public static final class Builder
            extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
            implements
            // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType)
            com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                .EcKeyTypeOrBuilder {
          public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
            return com.google.cloud.security.privateca.v1.PrivateCaResourcesProto
                .internal_static_google_cloud_security_privateca_v1_CaPool_IssuancePolicy_AllowedKeyType_EcKeyType_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_CaPool_IssuancePolicy_AllowedKeyType_EcKeyType_fieldAccessorTable
                .ensureFieldAccessorsInitialized(
                    com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                        .EcKeyType.class,
                    com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                        .EcKeyType.Builder.class);
          }

          // Construct using
          // com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType.newBuilder()
          private Builder() {}

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

          @java.lang.Override
          public Builder clear() {
            super.clear();
            bitField0_ = 0;
            signatureAlgorithm_ = 0;
            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_CaPool_IssuancePolicy_AllowedKeyType_EcKeyType_descriptor;
          }

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

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

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

          private void buildPartial0(
              com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType
                  result) {
            int from_bitField0_ = bitField0_;
            if (((from_bitField0_ & 0x00000001) != 0)) {
              result.signatureAlgorithm_ = signatureAlgorithm_;
            }
          }

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

          public Builder mergeFrom(
              com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType
                  other) {
            if (other
                == com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                    .EcKeyType.getDefaultInstance()) return this;
            if (other.signatureAlgorithm_ != 0) {
              setSignatureAlgorithmValue(other.getSignatureAlgorithmValue());
            }
            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 8:
                    {
                      signatureAlgorithm_ = input.readEnum();
                      bitField0_ |= 0x00000001;
                      break;
                    } // case 8
                  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 int signatureAlgorithm_ = 0;
          /**
           *
           *
           * <pre>
           * Optional. A signature algorithm that must be used. If this is
           * omitted, any EC-based signature algorithm will be allowed.
           * </pre>
           *
           * <code>
           * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType.EcSignatureAlgorithm signature_algorithm = 1 [(.google.api.field_behavior) = OPTIONAL];
           * </code>
           *
           * @return The enum numeric value on the wire for signatureAlgorithm.
           */
          @java.lang.Override
          public int getSignatureAlgorithmValue() {
            return signatureAlgorithm_;
          }
          /**
           *
           *
           * <pre>
           * Optional. A signature algorithm that must be used. If this is
           * omitted, any EC-based signature algorithm will be allowed.
           * </pre>
           *
           * <code>
           * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType.EcSignatureAlgorithm signature_algorithm = 1 [(.google.api.field_behavior) = OPTIONAL];
           * </code>
           *
           * @param value The enum numeric value on the wire for signatureAlgorithm to set.
           * @return This builder for chaining.
           */
          public Builder setSignatureAlgorithmValue(int value) {
            signatureAlgorithm_ = value;
            bitField0_ |= 0x00000001;
            onChanged();
            return this;
          }
          /**
           *
           *
           * <pre>
           * Optional. A signature algorithm that must be used. If this is
           * omitted, any EC-based signature algorithm will be allowed.
           * </pre>
           *
           * <code>
           * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType.EcSignatureAlgorithm signature_algorithm = 1 [(.google.api.field_behavior) = OPTIONAL];
           * </code>
           *
           * @return The signatureAlgorithm.
           */
          @java.lang.Override
          public com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                  .EcKeyType.EcSignatureAlgorithm
              getSignatureAlgorithm() {
            com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType
                    .EcSignatureAlgorithm
                result =
                    com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                        .EcKeyType.EcSignatureAlgorithm.forNumber(signatureAlgorithm_);
            return result == null
                ? com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                    .EcKeyType.EcSignatureAlgorithm.UNRECOGNIZED
                : result;
          }
          /**
           *
           *
           * <pre>
           * Optional. A signature algorithm that must be used. If this is
           * omitted, any EC-based signature algorithm will be allowed.
           * </pre>
           *
           * <code>
           * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType.EcSignatureAlgorithm signature_algorithm = 1 [(.google.api.field_behavior) = OPTIONAL];
           * </code>
           *
           * @param value The signatureAlgorithm to set.
           * @return This builder for chaining.
           */
          public Builder setSignatureAlgorithm(
              com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType
                      .EcSignatureAlgorithm
                  value) {
            if (value == null) {
              throw new NullPointerException();
            }
            bitField0_ |= 0x00000001;
            signatureAlgorithm_ = value.getNumber();
            onChanged();
            return this;
          }
          /**
           *
           *
           * <pre>
           * Optional. A signature algorithm that must be used. If this is
           * omitted, any EC-based signature algorithm will be allowed.
           * </pre>
           *
           * <code>
           * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType.EcSignatureAlgorithm signature_algorithm = 1 [(.google.api.field_behavior) = OPTIONAL];
           * </code>
           *
           * @return This builder for chaining.
           */
          public Builder clearSignatureAlgorithm() {
            bitField0_ = (bitField0_ & ~0x00000001);
            signatureAlgorithm_ = 0;
            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.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType)
        }

        // @@protoc_insertion_point(class_scope:google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType)
        private static final com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy
                .AllowedKeyType.EcKeyType
            DEFAULT_INSTANCE;

        static {
          DEFAULT_INSTANCE =
              new com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                  .EcKeyType();
        }

        public static com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                .EcKeyType
            getDefaultInstance() {
          return DEFAULT_INSTANCE;
        }

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

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

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

      private int keyTypeCase_ = 0;
      private java.lang.Object keyType_;

      public enum KeyTypeCase
          implements
              com.google.protobuf.Internal.EnumLite,
              com.google.protobuf.AbstractMessage.InternalOneOfEnum {
        RSA(1),
        ELLIPTIC_CURVE(2),
        KEYTYPE_NOT_SET(0);
        private final int value;

        private KeyTypeCase(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 KeyTypeCase valueOf(int value) {
          return forNumber(value);
        }

        public static KeyTypeCase forNumber(int value) {
          switch (value) {
            case 1:
              return RSA;
            case 2:
              return ELLIPTIC_CURVE;
            case 0:
              return KEYTYPE_NOT_SET;
            default:
              return null;
          }
        }

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

      public KeyTypeCase getKeyTypeCase() {
        return KeyTypeCase.forNumber(keyTypeCase_);
      }

      public static final int RSA_FIELD_NUMBER = 1;
      /**
       *
       *
       * <pre>
       * Represents an allowed RSA key type.
       * </pre>
       *
       * <code>
       * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType rsa = 1;
       * </code>
       *
       * @return Whether the rsa field is set.
       */
      @java.lang.Override
      public boolean hasRsa() {
        return keyTypeCase_ == 1;
      }
      /**
       *
       *
       * <pre>
       * Represents an allowed RSA key type.
       * </pre>
       *
       * <code>
       * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType rsa = 1;
       * </code>
       *
       * @return The rsa.
       */
      @java.lang.Override
      public com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType
          getRsa() {
        if (keyTypeCase_ == 1) {
          return (com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                  .RsaKeyType)
              keyType_;
        }
        return com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
            .RsaKeyType.getDefaultInstance();
      }
      /**
       *
       *
       * <pre>
       * Represents an allowed RSA key type.
       * </pre>
       *
       * <code>
       * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType rsa = 1;
       * </code>
       */
      @java.lang.Override
      public com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
              .RsaKeyTypeOrBuilder
          getRsaOrBuilder() {
        if (keyTypeCase_ == 1) {
          return (com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                  .RsaKeyType)
              keyType_;
        }
        return com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
            .RsaKeyType.getDefaultInstance();
      }

      public static final int ELLIPTIC_CURVE_FIELD_NUMBER = 2;
      /**
       *
       *
       * <pre>
       * Represents an allowed Elliptic Curve key type.
       * </pre>
       *
       * <code>
       * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType elliptic_curve = 2;
       * </code>
       *
       * @return Whether the ellipticCurve field is set.
       */
      @java.lang.Override
      public boolean hasEllipticCurve() {
        return keyTypeCase_ == 2;
      }
      /**
       *
       *
       * <pre>
       * Represents an allowed Elliptic Curve key type.
       * </pre>
       *
       * <code>
       * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType elliptic_curve = 2;
       * </code>
       *
       * @return The ellipticCurve.
       */
      @java.lang.Override
      public com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType
          getEllipticCurve() {
        if (keyTypeCase_ == 2) {
          return (com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                  .EcKeyType)
              keyType_;
        }
        return com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType
            .getDefaultInstance();
      }
      /**
       *
       *
       * <pre>
       * Represents an allowed Elliptic Curve key type.
       * </pre>
       *
       * <code>
       * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType elliptic_curve = 2;
       * </code>
       */
      @java.lang.Override
      public com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
              .EcKeyTypeOrBuilder
          getEllipticCurveOrBuilder() {
        if (keyTypeCase_ == 2) {
          return (com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                  .EcKeyType)
              keyType_;
        }
        return com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType
            .getDefaultInstance();
      }

      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 (keyTypeCase_ == 1) {
          output.writeMessage(
              1,
              (com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                      .RsaKeyType)
                  keyType_);
        }
        if (keyTypeCase_ == 2) {
          output.writeMessage(
              2,
              (com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                      .EcKeyType)
                  keyType_);
        }
        getUnknownFields().writeTo(output);
      }

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

        size = 0;
        if (keyTypeCase_ == 1) {
          size +=
              com.google.protobuf.CodedOutputStream.computeMessageSize(
                  1,
                  (com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                          .RsaKeyType)
                      keyType_);
        }
        if (keyTypeCase_ == 2) {
          size +=
              com.google.protobuf.CodedOutputStream.computeMessageSize(
                  2,
                  (com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                          .EcKeyType)
                      keyType_);
        }
        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.CaPool.IssuancePolicy.AllowedKeyType)) {
          return super.equals(obj);
        }
        com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType other =
            (com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType) obj;

        if (!getKeyTypeCase().equals(other.getKeyTypeCase())) return false;
        switch (keyTypeCase_) {
          case 1:
            if (!getRsa().equals(other.getRsa())) return false;
            break;
          case 2:
            if (!getEllipticCurve().equals(other.getEllipticCurve())) 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 (keyTypeCase_) {
          case 1:
            hash = (37 * hash) + RSA_FIELD_NUMBER;
            hash = (53 * hash) + getRsa().hashCode();
            break;
          case 2:
            hash = (37 * hash) + ELLIPTIC_CURVE_FIELD_NUMBER;
            hash = (53 * hash) + getEllipticCurve().hashCode();
            break;
          case 0:
          default:
        }
        hash = (29 * hash) + getUnknownFields().hashCode();
        memoizedHashCode = hash;
        return hash;
      }

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

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

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

      public static com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
          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.CaPool.IssuancePolicy.AllowedKeyType
          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.CaPool.IssuancePolicy.AllowedKeyType
          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.CaPool.IssuancePolicy.AllowedKeyType
          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.CaPool.IssuancePolicy.AllowedKeyType
          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.CaPool.IssuancePolicy.AllowedKeyType
          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.CaPool.IssuancePolicy.AllowedKeyType
          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.CaPool.IssuancePolicy.AllowedKeyType 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>
       * Describes a "type" of key that may be used in a
       * [Certificate][google.cloud.security.privateca.v1.Certificate] issued from
       * a [CaPool][google.cloud.security.privateca.v1.CaPool]. Note that a single
       * [AllowedKeyType][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType]
       * may refer to either a fully-qualified key algorithm, such as RSA 4096, or
       * a family of key algorithms, such as any RSA key.
       * </pre>
       *
       * Protobuf type {@code
       * google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType}
       */
      public static final class Builder
          extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
          implements
          // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType)
          com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyTypeOrBuilder {
        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
          return com.google.cloud.security.privateca.v1.PrivateCaResourcesProto
              .internal_static_google_cloud_security_privateca_v1_CaPool_IssuancePolicy_AllowedKeyType_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_CaPool_IssuancePolicy_AllowedKeyType_fieldAccessorTable
              .ensureFieldAccessorsInitialized(
                  com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.class,
                  com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                      .Builder.class);
        }

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

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

        @java.lang.Override
        public Builder clear() {
          super.clear();
          bitField0_ = 0;
          if (rsaBuilder_ != null) {
            rsaBuilder_.clear();
          }
          if (ellipticCurveBuilder_ != null) {
            ellipticCurveBuilder_.clear();
          }
          keyTypeCase_ = 0;
          keyType_ = 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_CaPool_IssuancePolicy_AllowedKeyType_descriptor;
        }

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

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

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

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

        private void buildPartialOneofs(
            com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType result) {
          result.keyTypeCase_ = keyTypeCase_;
          result.keyType_ = this.keyType_;
          if (keyTypeCase_ == 1 && rsaBuilder_ != null) {
            result.keyType_ = rsaBuilder_.build();
          }
          if (keyTypeCase_ == 2 && ellipticCurveBuilder_ != null) {
            result.keyType_ = ellipticCurveBuilder_.build();
          }
        }

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

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

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

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

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

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

        @java.lang.Override
        public Builder mergeFrom(com.google.protobuf.Message other) {
          if (other
              instanceof
              com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType) {
            return mergeFrom(
                (com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType)
                    other);
          } else {
            super.mergeFrom(other);
            return this;
          }
        }

        public Builder mergeFrom(
            com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType other) {
          if (other
              == com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                  .getDefaultInstance()) return this;
          switch (other.getKeyTypeCase()) {
            case RSA:
              {
                mergeRsa(other.getRsa());
                break;
              }
            case ELLIPTIC_CURVE:
              {
                mergeEllipticCurve(other.getEllipticCurve());
                break;
              }
            case KEYTYPE_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:
                  {
                    input.readMessage(getRsaFieldBuilder().getBuilder(), extensionRegistry);
                    keyTypeCase_ = 1;
                    break;
                  } // case 10
                case 18:
                  {
                    input.readMessage(
                        getEllipticCurveFieldBuilder().getBuilder(), extensionRegistry);
                    keyTypeCase_ = 2;
                    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 keyTypeCase_ = 0;
        private java.lang.Object keyType_;

        public KeyTypeCase getKeyTypeCase() {
          return KeyTypeCase.forNumber(keyTypeCase_);
        }

        public Builder clearKeyType() {
          keyTypeCase_ = 0;
          keyType_ = null;
          onChanged();
          return this;
        }

        private int bitField0_;

        private com.google.protobuf.SingleFieldBuilderV3<
                com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                    .RsaKeyType,
                com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                    .RsaKeyType.Builder,
                com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                    .RsaKeyTypeOrBuilder>
            rsaBuilder_;
        /**
         *
         *
         * <pre>
         * Represents an allowed RSA key type.
         * </pre>
         *
         * <code>
         * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType rsa = 1;
         * </code>
         *
         * @return Whether the rsa field is set.
         */
        @java.lang.Override
        public boolean hasRsa() {
          return keyTypeCase_ == 1;
        }
        /**
         *
         *
         * <pre>
         * Represents an allowed RSA key type.
         * </pre>
         *
         * <code>
         * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType rsa = 1;
         * </code>
         *
         * @return The rsa.
         */
        @java.lang.Override
        public com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                .RsaKeyType
            getRsa() {
          if (rsaBuilder_ == null) {
            if (keyTypeCase_ == 1) {
              return (com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                      .RsaKeyType)
                  keyType_;
            }
            return com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                .RsaKeyType.getDefaultInstance();
          } else {
            if (keyTypeCase_ == 1) {
              return rsaBuilder_.getMessage();
            }
            return com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                .RsaKeyType.getDefaultInstance();
          }
        }
        /**
         *
         *
         * <pre>
         * Represents an allowed RSA key type.
         * </pre>
         *
         * <code>
         * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType rsa = 1;
         * </code>
         */
        public Builder setRsa(
            com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType
                value) {
          if (rsaBuilder_ == null) {
            if (value == null) {
              throw new NullPointerException();
            }
            keyType_ = value;
            onChanged();
          } else {
            rsaBuilder_.setMessage(value);
          }
          keyTypeCase_ = 1;
          return this;
        }
        /**
         *
         *
         * <pre>
         * Represents an allowed RSA key type.
         * </pre>
         *
         * <code>
         * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType rsa = 1;
         * </code>
         */
        public Builder setRsa(
            com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType
                    .Builder
                builderForValue) {
          if (rsaBuilder_ == null) {
            keyType_ = builderForValue.build();
            onChanged();
          } else {
            rsaBuilder_.setMessage(builderForValue.build());
          }
          keyTypeCase_ = 1;
          return this;
        }
        /**
         *
         *
         * <pre>
         * Represents an allowed RSA key type.
         * </pre>
         *
         * <code>
         * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType rsa = 1;
         * </code>
         */
        public Builder mergeRsa(
            com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType
                value) {
          if (rsaBuilder_ == null) {
            if (keyTypeCase_ == 1
                && keyType_
                    != com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                        .RsaKeyType.getDefaultInstance()) {
              keyType_ =
                  com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                      .RsaKeyType.newBuilder(
                          (com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy
                                  .AllowedKeyType.RsaKeyType)
                              keyType_)
                      .mergeFrom(value)
                      .buildPartial();
            } else {
              keyType_ = value;
            }
            onChanged();
          } else {
            if (keyTypeCase_ == 1) {
              rsaBuilder_.mergeFrom(value);
            } else {
              rsaBuilder_.setMessage(value);
            }
          }
          keyTypeCase_ = 1;
          return this;
        }
        /**
         *
         *
         * <pre>
         * Represents an allowed RSA key type.
         * </pre>
         *
         * <code>
         * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType rsa = 1;
         * </code>
         */
        public Builder clearRsa() {
          if (rsaBuilder_ == null) {
            if (keyTypeCase_ == 1) {
              keyTypeCase_ = 0;
              keyType_ = null;
              onChanged();
            }
          } else {
            if (keyTypeCase_ == 1) {
              keyTypeCase_ = 0;
              keyType_ = null;
            }
            rsaBuilder_.clear();
          }
          return this;
        }
        /**
         *
         *
         * <pre>
         * Represents an allowed RSA key type.
         * </pre>
         *
         * <code>
         * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType rsa = 1;
         * </code>
         */
        public com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                .RsaKeyType.Builder
            getRsaBuilder() {
          return getRsaFieldBuilder().getBuilder();
        }
        /**
         *
         *
         * <pre>
         * Represents an allowed RSA key type.
         * </pre>
         *
         * <code>
         * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType rsa = 1;
         * </code>
         */
        @java.lang.Override
        public com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                .RsaKeyTypeOrBuilder
            getRsaOrBuilder() {
          if ((keyTypeCase_ == 1) && (rsaBuilder_ != null)) {
            return rsaBuilder_.getMessageOrBuilder();
          } else {
            if (keyTypeCase_ == 1) {
              return (com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                      .RsaKeyType)
                  keyType_;
            }
            return com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                .RsaKeyType.getDefaultInstance();
          }
        }
        /**
         *
         *
         * <pre>
         * Represents an allowed RSA key type.
         * </pre>
         *
         * <code>
         * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType rsa = 1;
         * </code>
         */
        private com.google.protobuf.SingleFieldBuilderV3<
                com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                    .RsaKeyType,
                com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                    .RsaKeyType.Builder,
                com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                    .RsaKeyTypeOrBuilder>
            getRsaFieldBuilder() {
          if (rsaBuilder_ == null) {
            if (!(keyTypeCase_ == 1)) {
              keyType_ =
                  com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                      .RsaKeyType.getDefaultInstance();
            }
            rsaBuilder_ =
                new com.google.protobuf.SingleFieldBuilderV3<
                    com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                        .RsaKeyType,
                    com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                        .RsaKeyType.Builder,
                    com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                        .RsaKeyTypeOrBuilder>(
                    (com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                            .RsaKeyType)
                        keyType_,
                    getParentForChildren(),
                    isClean());
            keyType_ = null;
          }
          keyTypeCase_ = 1;
          onChanged();
          return rsaBuilder_;
        }

        private com.google.protobuf.SingleFieldBuilderV3<
                com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                    .EcKeyType,
                com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                    .EcKeyType.Builder,
                com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                    .EcKeyTypeOrBuilder>
            ellipticCurveBuilder_;
        /**
         *
         *
         * <pre>
         * Represents an allowed Elliptic Curve key type.
         * </pre>
         *
         * <code>
         * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType elliptic_curve = 2;
         * </code>
         *
         * @return Whether the ellipticCurve field is set.
         */
        @java.lang.Override
        public boolean hasEllipticCurve() {
          return keyTypeCase_ == 2;
        }
        /**
         *
         *
         * <pre>
         * Represents an allowed Elliptic Curve key type.
         * </pre>
         *
         * <code>
         * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType elliptic_curve = 2;
         * </code>
         *
         * @return The ellipticCurve.
         */
        @java.lang.Override
        public com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType
            getEllipticCurve() {
          if (ellipticCurveBuilder_ == null) {
            if (keyTypeCase_ == 2) {
              return (com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                      .EcKeyType)
                  keyType_;
            }
            return com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                .EcKeyType.getDefaultInstance();
          } else {
            if (keyTypeCase_ == 2) {
              return ellipticCurveBuilder_.getMessage();
            }
            return com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                .EcKeyType.getDefaultInstance();
          }
        }
        /**
         *
         *
         * <pre>
         * Represents an allowed Elliptic Curve key type.
         * </pre>
         *
         * <code>
         * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType elliptic_curve = 2;
         * </code>
         */
        public Builder setEllipticCurve(
            com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType
                value) {
          if (ellipticCurveBuilder_ == null) {
            if (value == null) {
              throw new NullPointerException();
            }
            keyType_ = value;
            onChanged();
          } else {
            ellipticCurveBuilder_.setMessage(value);
          }
          keyTypeCase_ = 2;
          return this;
        }
        /**
         *
         *
         * <pre>
         * Represents an allowed Elliptic Curve key type.
         * </pre>
         *
         * <code>
         * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType elliptic_curve = 2;
         * </code>
         */
        public Builder setEllipticCurve(
            com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType
                    .Builder
                builderForValue) {
          if (ellipticCurveBuilder_ == null) {
            keyType_ = builderForValue.build();
            onChanged();
          } else {
            ellipticCurveBuilder_.setMessage(builderForValue.build());
          }
          keyTypeCase_ = 2;
          return this;
        }
        /**
         *
         *
         * <pre>
         * Represents an allowed Elliptic Curve key type.
         * </pre>
         *
         * <code>
         * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType elliptic_curve = 2;
         * </code>
         */
        public Builder mergeEllipticCurve(
            com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType
                value) {
          if (ellipticCurveBuilder_ == null) {
            if (keyTypeCase_ == 2
                && keyType_
                    != com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                        .EcKeyType.getDefaultInstance()) {
              keyType_ =
                  com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                      .EcKeyType.newBuilder(
                          (com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy
                                  .AllowedKeyType.EcKeyType)
                              keyType_)
                      .mergeFrom(value)
                      .buildPartial();
            } else {
              keyType_ = value;
            }
            onChanged();
          } else {
            if (keyTypeCase_ == 2) {
              ellipticCurveBuilder_.mergeFrom(value);
            } else {
              ellipticCurveBuilder_.setMessage(value);
            }
          }
          keyTypeCase_ = 2;
          return this;
        }
        /**
         *
         *
         * <pre>
         * Represents an allowed Elliptic Curve key type.
         * </pre>
         *
         * <code>
         * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType elliptic_curve = 2;
         * </code>
         */
        public Builder clearEllipticCurve() {
          if (ellipticCurveBuilder_ == null) {
            if (keyTypeCase_ == 2) {
              keyTypeCase_ = 0;
              keyType_ = null;
              onChanged();
            }
          } else {
            if (keyTypeCase_ == 2) {
              keyTypeCase_ = 0;
              keyType_ = null;
            }
            ellipticCurveBuilder_.clear();
          }
          return this;
        }
        /**
         *
         *
         * <pre>
         * Represents an allowed Elliptic Curve key type.
         * </pre>
         *
         * <code>
         * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType elliptic_curve = 2;
         * </code>
         */
        public com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType
                .Builder
            getEllipticCurveBuilder() {
          return getEllipticCurveFieldBuilder().getBuilder();
        }
        /**
         *
         *
         * <pre>
         * Represents an allowed Elliptic Curve key type.
         * </pre>
         *
         * <code>
         * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType elliptic_curve = 2;
         * </code>
         */
        @java.lang.Override
        public com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                .EcKeyTypeOrBuilder
            getEllipticCurveOrBuilder() {
          if ((keyTypeCase_ == 2) && (ellipticCurveBuilder_ != null)) {
            return ellipticCurveBuilder_.getMessageOrBuilder();
          } else {
            if (keyTypeCase_ == 2) {
              return (com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                      .EcKeyType)
                  keyType_;
            }
            return com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                .EcKeyType.getDefaultInstance();
          }
        }
        /**
         *
         *
         * <pre>
         * Represents an allowed Elliptic Curve key type.
         * </pre>
         *
         * <code>
         * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType elliptic_curve = 2;
         * </code>
         */
        private com.google.protobuf.SingleFieldBuilderV3<
                com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                    .EcKeyType,
                com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                    .EcKeyType.Builder,
                com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                    .EcKeyTypeOrBuilder>
            getEllipticCurveFieldBuilder() {
          if (ellipticCurveBuilder_ == null) {
            if (!(keyTypeCase_ == 2)) {
              keyType_ =
                  com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                      .EcKeyType.getDefaultInstance();
            }
            ellipticCurveBuilder_ =
                new com.google.protobuf.SingleFieldBuilderV3<
                    com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                        .EcKeyType,
                    com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                        .EcKeyType.Builder,
                    com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                        .EcKeyTypeOrBuilder>(
                    (com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                            .EcKeyType)
                        keyType_,
                    getParentForChildren(),
                    isClean());
            keyType_ = null;
          }
          keyTypeCase_ = 2;
          onChanged();
          return ellipticCurveBuilder_;
        }

        @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.CaPool.IssuancePolicy.AllowedKeyType)
      }

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

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

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

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

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

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

    public interface IssuanceModesOrBuilder
        extends
        // @@protoc_insertion_point(interface_extends:google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes)
        com.google.protobuf.MessageOrBuilder {

      /**
       *
       *
       * <pre>
       * Optional. When true, allows callers to create
       * [Certificates][google.cloud.security.privateca.v1.Certificate] by
       * specifying a CSR.
       * </pre>
       *
       * <code>bool allow_csr_based_issuance = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
       *
       * @return The allowCsrBasedIssuance.
       */
      boolean getAllowCsrBasedIssuance();

      /**
       *
       *
       * <pre>
       * Optional. When true, allows callers to create
       * [Certificates][google.cloud.security.privateca.v1.Certificate] by
       * specifying a
       * [CertificateConfig][google.cloud.security.privateca.v1.CertificateConfig].
       * </pre>
       *
       * <code>bool allow_config_based_issuance = 2 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       *
       * @return The allowConfigBasedIssuance.
       */
      boolean getAllowConfigBasedIssuance();
    }
    /**
     *
     *
     * <pre>
     * [IssuanceModes][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes]
     * specifies the allowed ways in which
     * [Certificates][google.cloud.security.privateca.v1.Certificate] may be
     * requested from this [CaPool][google.cloud.security.privateca.v1.CaPool].
     * </pre>
     *
     * Protobuf type {@code google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes}
     */
    public static final class IssuanceModes extends com.google.protobuf.GeneratedMessageV3
        implements
        // @@protoc_insertion_point(message_implements:google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes)
        IssuanceModesOrBuilder {
      private static final long serialVersionUID = 0L;
      // Use IssuanceModes.newBuilder() to construct.
      private IssuanceModes(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
        super(builder);
      }

      private IssuanceModes() {}

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

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

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
        return com.google.cloud.security.privateca.v1.PrivateCaResourcesProto
            .internal_static_google_cloud_security_privateca_v1_CaPool_IssuancePolicy_IssuanceModes_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_CaPool_IssuancePolicy_IssuanceModes_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes.class,
                com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes.Builder
                    .class);
      }

      public static final int ALLOW_CSR_BASED_ISSUANCE_FIELD_NUMBER = 1;
      private boolean allowCsrBasedIssuance_ = false;
      /**
       *
       *
       * <pre>
       * Optional. When true, allows callers to create
       * [Certificates][google.cloud.security.privateca.v1.Certificate] by
       * specifying a CSR.
       * </pre>
       *
       * <code>bool allow_csr_based_issuance = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
       *
       * @return The allowCsrBasedIssuance.
       */
      @java.lang.Override
      public boolean getAllowCsrBasedIssuance() {
        return allowCsrBasedIssuance_;
      }

      public static final int ALLOW_CONFIG_BASED_ISSUANCE_FIELD_NUMBER = 2;
      private boolean allowConfigBasedIssuance_ = false;
      /**
       *
       *
       * <pre>
       * Optional. When true, allows callers to create
       * [Certificates][google.cloud.security.privateca.v1.Certificate] by
       * specifying a
       * [CertificateConfig][google.cloud.security.privateca.v1.CertificateConfig].
       * </pre>
       *
       * <code>bool allow_config_based_issuance = 2 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       *
       * @return The allowConfigBasedIssuance.
       */
      @java.lang.Override
      public boolean getAllowConfigBasedIssuance() {
        return allowConfigBasedIssuance_;
      }

      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 (allowCsrBasedIssuance_ != false) {
          output.writeBool(1, allowCsrBasedIssuance_);
        }
        if (allowConfigBasedIssuance_ != false) {
          output.writeBool(2, allowConfigBasedIssuance_);
        }
        getUnknownFields().writeTo(output);
      }

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

        size = 0;
        if (allowCsrBasedIssuance_ != false) {
          size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, allowCsrBasedIssuance_);
        }
        if (allowConfigBasedIssuance_ != false) {
          size +=
              com.google.protobuf.CodedOutputStream.computeBoolSize(2, allowConfigBasedIssuance_);
        }
        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.CaPool.IssuancePolicy.IssuanceModes)) {
          return super.equals(obj);
        }
        com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes other =
            (com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes) obj;

        if (getAllowCsrBasedIssuance() != other.getAllowCsrBasedIssuance()) return false;
        if (getAllowConfigBasedIssuance() != other.getAllowConfigBasedIssuance()) 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) + ALLOW_CSR_BASED_ISSUANCE_FIELD_NUMBER;
        hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowCsrBasedIssuance());
        hash = (37 * hash) + ALLOW_CONFIG_BASED_ISSUANCE_FIELD_NUMBER;
        hash =
            (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowConfigBasedIssuance());
        hash = (29 * hash) + getUnknownFields().hashCode();
        memoizedHashCode = hash;
        return hash;
      }

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

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

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

      public static com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes
          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.CaPool.IssuancePolicy.IssuanceModes
          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.CaPool.IssuancePolicy.IssuanceModes
          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.CaPool.IssuancePolicy.IssuanceModes
          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.CaPool.IssuancePolicy.IssuanceModes
          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.CaPool.IssuancePolicy.IssuanceModes
          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.CaPool.IssuancePolicy.IssuanceModes
          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.CaPool.IssuancePolicy.IssuanceModes 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>
       * [IssuanceModes][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes]
       * specifies the allowed ways in which
       * [Certificates][google.cloud.security.privateca.v1.Certificate] may be
       * requested from this [CaPool][google.cloud.security.privateca.v1.CaPool].
       * </pre>
       *
       * Protobuf type {@code
       * google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes}
       */
      public static final class Builder
          extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
          implements
          // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes)
          com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModesOrBuilder {
        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
          return com.google.cloud.security.privateca.v1.PrivateCaResourcesProto
              .internal_static_google_cloud_security_privateca_v1_CaPool_IssuancePolicy_IssuanceModes_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_CaPool_IssuancePolicy_IssuanceModes_fieldAccessorTable
              .ensureFieldAccessorsInitialized(
                  com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes.class,
                  com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes.Builder
                      .class);
        }

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

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

        @java.lang.Override
        public Builder clear() {
          super.clear();
          bitField0_ = 0;
          allowCsrBasedIssuance_ = false;
          allowConfigBasedIssuance_ = false;
          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_CaPool_IssuancePolicy_IssuanceModes_descriptor;
        }

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

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

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

        private void buildPartial0(
            com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes result) {
          int from_bitField0_ = bitField0_;
          if (((from_bitField0_ & 0x00000001) != 0)) {
            result.allowCsrBasedIssuance_ = allowCsrBasedIssuance_;
          }
          if (((from_bitField0_ & 0x00000002) != 0)) {
            result.allowConfigBasedIssuance_ = allowConfigBasedIssuance_;
          }
        }

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

        public Builder mergeFrom(
            com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes other) {
          if (other
              == com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes
                  .getDefaultInstance()) return this;
          if (other.getAllowCsrBasedIssuance() != false) {
            setAllowCsrBasedIssuance(other.getAllowCsrBasedIssuance());
          }
          if (other.getAllowConfigBasedIssuance() != false) {
            setAllowConfigBasedIssuance(other.getAllowConfigBasedIssuance());
          }
          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 8:
                  {
                    allowCsrBasedIssuance_ = input.readBool();
                    bitField0_ |= 0x00000001;
                    break;
                  } // case 8
                case 16:
                  {
                    allowConfigBasedIssuance_ = input.readBool();
                    bitField0_ |= 0x00000002;
                    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 bitField0_;

        private boolean allowCsrBasedIssuance_;
        /**
         *
         *
         * <pre>
         * Optional. When true, allows callers to create
         * [Certificates][google.cloud.security.privateca.v1.Certificate] by
         * specifying a CSR.
         * </pre>
         *
         * <code>bool allow_csr_based_issuance = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
         *
         * @return The allowCsrBasedIssuance.
         */
        @java.lang.Override
        public boolean getAllowCsrBasedIssuance() {
          return allowCsrBasedIssuance_;
        }
        /**
         *
         *
         * <pre>
         * Optional. When true, allows callers to create
         * [Certificates][google.cloud.security.privateca.v1.Certificate] by
         * specifying a CSR.
         * </pre>
         *
         * <code>bool allow_csr_based_issuance = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
         *
         * @param value The allowCsrBasedIssuance to set.
         * @return This builder for chaining.
         */
        public Builder setAllowCsrBasedIssuance(boolean value) {

          allowCsrBasedIssuance_ = value;
          bitField0_ |= 0x00000001;
          onChanged();
          return this;
        }
        /**
         *
         *
         * <pre>
         * Optional. When true, allows callers to create
         * [Certificates][google.cloud.security.privateca.v1.Certificate] by
         * specifying a CSR.
         * </pre>
         *
         * <code>bool allow_csr_based_issuance = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
         *
         * @return This builder for chaining.
         */
        public Builder clearAllowCsrBasedIssuance() {
          bitField0_ = (bitField0_ & ~0x00000001);
          allowCsrBasedIssuance_ = false;
          onChanged();
          return this;
        }

        private boolean allowConfigBasedIssuance_;
        /**
         *
         *
         * <pre>
         * Optional. When true, allows callers to create
         * [Certificates][google.cloud.security.privateca.v1.Certificate] by
         * specifying a
         * [CertificateConfig][google.cloud.security.privateca.v1.CertificateConfig].
         * </pre>
         *
         * <code>bool allow_config_based_issuance = 2 [(.google.api.field_behavior) = OPTIONAL];
         * </code>
         *
         * @return The allowConfigBasedIssuance.
         */
        @java.lang.Override
        public boolean getAllowConfigBasedIssuance() {
          return allowConfigBasedIssuance_;
        }
        /**
         *
         *
         * <pre>
         * Optional. When true, allows callers to create
         * [Certificates][google.cloud.security.privateca.v1.Certificate] by
         * specifying a
         * [CertificateConfig][google.cloud.security.privateca.v1.CertificateConfig].
         * </pre>
         *
         * <code>bool allow_config_based_issuance = 2 [(.google.api.field_behavior) = OPTIONAL];
         * </code>
         *
         * @param value The allowConfigBasedIssuance to set.
         * @return This builder for chaining.
         */
        public Builder setAllowConfigBasedIssuance(boolean value) {

          allowConfigBasedIssuance_ = value;
          bitField0_ |= 0x00000002;
          onChanged();
          return this;
        }
        /**
         *
         *
         * <pre>
         * Optional. When true, allows callers to create
         * [Certificates][google.cloud.security.privateca.v1.Certificate] by
         * specifying a
         * [CertificateConfig][google.cloud.security.privateca.v1.CertificateConfig].
         * </pre>
         *
         * <code>bool allow_config_based_issuance = 2 [(.google.api.field_behavior) = OPTIONAL];
         * </code>
         *
         * @return This builder for chaining.
         */
        public Builder clearAllowConfigBasedIssuance() {
          bitField0_ = (bitField0_ & ~0x00000002);
          allowConfigBasedIssuance_ = false;
          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.CaPool.IssuancePolicy.IssuanceModes)
      }

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

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

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

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

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

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

    public static final int ALLOWED_KEY_TYPES_FIELD_NUMBER = 1;

    @SuppressWarnings("serial")
    private java.util.List<
            com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType>
        allowedKeyTypes_;
    /**
     *
     *
     * <pre>
     * Optional. If any
     * [AllowedKeyType][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType]
     * is specified, then the certificate request's public key must match one of
     * the key types listed here. Otherwise, any key may be used.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType allowed_key_types = 1 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    @java.lang.Override
    public java.util.List<
            com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType>
        getAllowedKeyTypesList() {
      return allowedKeyTypes_;
    }
    /**
     *
     *
     * <pre>
     * Optional. If any
     * [AllowedKeyType][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType]
     * is specified, then the certificate request's public key must match one of
     * the key types listed here. Otherwise, any key may be used.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType allowed_key_types = 1 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    @java.lang.Override
    public java.util.List<
            ? extends
                com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy
                    .AllowedKeyTypeOrBuilder>
        getAllowedKeyTypesOrBuilderList() {
      return allowedKeyTypes_;
    }
    /**
     *
     *
     * <pre>
     * Optional. If any
     * [AllowedKeyType][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType]
     * is specified, then the certificate request's public key must match one of
     * the key types listed here. Otherwise, any key may be used.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType allowed_key_types = 1 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    @java.lang.Override
    public int getAllowedKeyTypesCount() {
      return allowedKeyTypes_.size();
    }
    /**
     *
     *
     * <pre>
     * Optional. If any
     * [AllowedKeyType][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType]
     * is specified, then the certificate request's public key must match one of
     * the key types listed here. Otherwise, any key may be used.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType allowed_key_types = 1 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    @java.lang.Override
    public com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
        getAllowedKeyTypes(int index) {
      return allowedKeyTypes_.get(index);
    }
    /**
     *
     *
     * <pre>
     * Optional. If any
     * [AllowedKeyType][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType]
     * is specified, then the certificate request's public key must match one of
     * the key types listed here. Otherwise, any key may be used.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType allowed_key_types = 1 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    @java.lang.Override
    public com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyTypeOrBuilder
        getAllowedKeyTypesOrBuilder(int index) {
      return allowedKeyTypes_.get(index);
    }

    public static final int MAXIMUM_LIFETIME_FIELD_NUMBER = 2;
    private com.google.protobuf.Duration maximumLifetime_;
    /**
     *
     *
     * <pre>
     * Optional. The maximum lifetime allowed for issued
     * [Certificates][google.cloud.security.privateca.v1.Certificate]. Note that
     * if the issuing
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * expires before a
     * [Certificate][google.cloud.security.privateca.v1.Certificate]'s requested
     * maximum_lifetime, the effective lifetime will be explicitly truncated to
     * match it.
     * </pre>
     *
     * <code>
     * .google.protobuf.Duration maximum_lifetime = 2 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @return Whether the maximumLifetime field is set.
     */
    @java.lang.Override
    public boolean hasMaximumLifetime() {
      return maximumLifetime_ != null;
    }
    /**
     *
     *
     * <pre>
     * Optional. The maximum lifetime allowed for issued
     * [Certificates][google.cloud.security.privateca.v1.Certificate]. Note that
     * if the issuing
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * expires before a
     * [Certificate][google.cloud.security.privateca.v1.Certificate]'s requested
     * maximum_lifetime, the effective lifetime will be explicitly truncated to
     * match it.
     * </pre>
     *
     * <code>
     * .google.protobuf.Duration maximum_lifetime = 2 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @return The maximumLifetime.
     */
    @java.lang.Override
    public com.google.protobuf.Duration getMaximumLifetime() {
      return maximumLifetime_ == null
          ? com.google.protobuf.Duration.getDefaultInstance()
          : maximumLifetime_;
    }
    /**
     *
     *
     * <pre>
     * Optional. The maximum lifetime allowed for issued
     * [Certificates][google.cloud.security.privateca.v1.Certificate]. Note that
     * if the issuing
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * expires before a
     * [Certificate][google.cloud.security.privateca.v1.Certificate]'s requested
     * maximum_lifetime, the effective lifetime will be explicitly truncated to
     * match it.
     * </pre>
     *
     * <code>
     * .google.protobuf.Duration maximum_lifetime = 2 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    @java.lang.Override
    public com.google.protobuf.DurationOrBuilder getMaximumLifetimeOrBuilder() {
      return maximumLifetime_ == null
          ? com.google.protobuf.Duration.getDefaultInstance()
          : maximumLifetime_;
    }

    public static final int ALLOWED_ISSUANCE_MODES_FIELD_NUMBER = 3;
    private com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes
        allowedIssuanceModes_;
    /**
     *
     *
     * <pre>
     * Optional. If specified, then only methods allowed in the
     * [IssuanceModes][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes]
     * may be used to issue
     * [Certificates][google.cloud.security.privateca.v1.Certificate].
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes allowed_issuance_modes = 3 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @return Whether the allowedIssuanceModes field is set.
     */
    @java.lang.Override
    public boolean hasAllowedIssuanceModes() {
      return allowedIssuanceModes_ != null;
    }
    /**
     *
     *
     * <pre>
     * Optional. If specified, then only methods allowed in the
     * [IssuanceModes][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes]
     * may be used to issue
     * [Certificates][google.cloud.security.privateca.v1.Certificate].
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes allowed_issuance_modes = 3 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @return The allowedIssuanceModes.
     */
    @java.lang.Override
    public com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes
        getAllowedIssuanceModes() {
      return allowedIssuanceModes_ == null
          ? com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes
              .getDefaultInstance()
          : allowedIssuanceModes_;
    }
    /**
     *
     *
     * <pre>
     * Optional. If specified, then only methods allowed in the
     * [IssuanceModes][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes]
     * may be used to issue
     * [Certificates][google.cloud.security.privateca.v1.Certificate].
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes allowed_issuance_modes = 3 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    @java.lang.Override
    public com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModesOrBuilder
        getAllowedIssuanceModesOrBuilder() {
      return allowedIssuanceModes_ == null
          ? com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes
              .getDefaultInstance()
          : allowedIssuanceModes_;
    }

    public static final int BASELINE_VALUES_FIELD_NUMBER = 4;
    private com.google.cloud.security.privateca.v1.X509Parameters baselineValues_;
    /**
     *
     *
     * <pre>
     * Optional. A set of X.509 values that will be applied to all certificates
     * issued through this [CaPool][google.cloud.security.privateca.v1.CaPool].
     * If a certificate request includes conflicting values for the same
     * properties, they will be overwritten by the values defined here. If a
     * certificate request uses a
     * [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]
     * that defines conflicting
     * [predefined_values][google.cloud.security.privateca.v1.CertificateTemplate.predefined_values]
     * for the same properties, the certificate issuance request will fail.
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.X509Parameters baseline_values = 4 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @return Whether the baselineValues field is set.
     */
    @java.lang.Override
    public boolean hasBaselineValues() {
      return baselineValues_ != null;
    }
    /**
     *
     *
     * <pre>
     * Optional. A set of X.509 values that will be applied to all certificates
     * issued through this [CaPool][google.cloud.security.privateca.v1.CaPool].
     * If a certificate request includes conflicting values for the same
     * properties, they will be overwritten by the values defined here. If a
     * certificate request uses a
     * [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]
     * that defines conflicting
     * [predefined_values][google.cloud.security.privateca.v1.CertificateTemplate.predefined_values]
     * for the same properties, the certificate issuance request will fail.
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.X509Parameters baseline_values = 4 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @return The baselineValues.
     */
    @java.lang.Override
    public com.google.cloud.security.privateca.v1.X509Parameters getBaselineValues() {
      return baselineValues_ == null
          ? com.google.cloud.security.privateca.v1.X509Parameters.getDefaultInstance()
          : baselineValues_;
    }
    /**
     *
     *
     * <pre>
     * Optional. A set of X.509 values that will be applied to all certificates
     * issued through this [CaPool][google.cloud.security.privateca.v1.CaPool].
     * If a certificate request includes conflicting values for the same
     * properties, they will be overwritten by the values defined here. If a
     * certificate request uses a
     * [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]
     * that defines conflicting
     * [predefined_values][google.cloud.security.privateca.v1.CertificateTemplate.predefined_values]
     * for the same properties, the certificate issuance request will fail.
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.X509Parameters baseline_values = 4 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    @java.lang.Override
    public com.google.cloud.security.privateca.v1.X509ParametersOrBuilder
        getBaselineValuesOrBuilder() {
      return baselineValues_ == null
          ? com.google.cloud.security.privateca.v1.X509Parameters.getDefaultInstance()
          : baselineValues_;
    }

    public static final int IDENTITY_CONSTRAINTS_FIELD_NUMBER = 5;
    private com.google.cloud.security.privateca.v1.CertificateIdentityConstraints
        identityConstraints_;
    /**
     *
     *
     * <pre>
     * Optional. Describes constraints on identities that may appear in
     * [Certificates][google.cloud.security.privateca.v1.Certificate] issued
     * through this [CaPool][google.cloud.security.privateca.v1.CaPool]. If this
     * is omitted, then this [CaPool][google.cloud.security.privateca.v1.CaPool]
     * will not add restrictions on a certificate's identity.
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CertificateIdentityConstraints identity_constraints = 5 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @return Whether the identityConstraints field is set.
     */
    @java.lang.Override
    public boolean hasIdentityConstraints() {
      return identityConstraints_ != null;
    }
    /**
     *
     *
     * <pre>
     * Optional. Describes constraints on identities that may appear in
     * [Certificates][google.cloud.security.privateca.v1.Certificate] issued
     * through this [CaPool][google.cloud.security.privateca.v1.CaPool]. If this
     * is omitted, then this [CaPool][google.cloud.security.privateca.v1.CaPool]
     * will not add restrictions on a certificate's identity.
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CertificateIdentityConstraints identity_constraints = 5 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @return The identityConstraints.
     */
    @java.lang.Override
    public com.google.cloud.security.privateca.v1.CertificateIdentityConstraints
        getIdentityConstraints() {
      return identityConstraints_ == null
          ? com.google.cloud.security.privateca.v1.CertificateIdentityConstraints
              .getDefaultInstance()
          : identityConstraints_;
    }
    /**
     *
     *
     * <pre>
     * Optional. Describes constraints on identities that may appear in
     * [Certificates][google.cloud.security.privateca.v1.Certificate] issued
     * through this [CaPool][google.cloud.security.privateca.v1.CaPool]. If this
     * is omitted, then this [CaPool][google.cloud.security.privateca.v1.CaPool]
     * will not add restrictions on a certificate's identity.
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CertificateIdentityConstraints identity_constraints = 5 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    @java.lang.Override
    public com.google.cloud.security.privateca.v1.CertificateIdentityConstraintsOrBuilder
        getIdentityConstraintsOrBuilder() {
      return identityConstraints_ == null
          ? com.google.cloud.security.privateca.v1.CertificateIdentityConstraints
              .getDefaultInstance()
          : identityConstraints_;
    }

    public static final int PASSTHROUGH_EXTENSIONS_FIELD_NUMBER = 6;
    private com.google.cloud.security.privateca.v1.CertificateExtensionConstraints
        passthroughExtensions_;
    /**
     *
     *
     * <pre>
     * Optional. Describes the set of X.509 extensions that may appear in a
     * [Certificate][google.cloud.security.privateca.v1.Certificate] issued
     * through this [CaPool][google.cloud.security.privateca.v1.CaPool]. If a
     * certificate request sets extensions that don't appear in the
     * [passthrough_extensions][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.passthrough_extensions],
     * those extensions will be dropped. If a certificate request uses a
     * [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]
     * with
     * [predefined_values][google.cloud.security.privateca.v1.CertificateTemplate.predefined_values]
     * that don't appear here, the certificate issuance request will fail. If
     * this is omitted, then this
     * [CaPool][google.cloud.security.privateca.v1.CaPool] will not add
     * restrictions on a certificate's X.509 extensions. These constraints do
     * not apply to X.509 extensions set in this
     * [CaPool][google.cloud.security.privateca.v1.CaPool]'s
     * [baseline_values][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.baseline_values].
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CertificateExtensionConstraints passthrough_extensions = 6 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @return Whether the passthroughExtensions field is set.
     */
    @java.lang.Override
    public boolean hasPassthroughExtensions() {
      return passthroughExtensions_ != null;
    }
    /**
     *
     *
     * <pre>
     * Optional. Describes the set of X.509 extensions that may appear in a
     * [Certificate][google.cloud.security.privateca.v1.Certificate] issued
     * through this [CaPool][google.cloud.security.privateca.v1.CaPool]. If a
     * certificate request sets extensions that don't appear in the
     * [passthrough_extensions][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.passthrough_extensions],
     * those extensions will be dropped. If a certificate request uses a
     * [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]
     * with
     * [predefined_values][google.cloud.security.privateca.v1.CertificateTemplate.predefined_values]
     * that don't appear here, the certificate issuance request will fail. If
     * this is omitted, then this
     * [CaPool][google.cloud.security.privateca.v1.CaPool] will not add
     * restrictions on a certificate's X.509 extensions. These constraints do
     * not apply to X.509 extensions set in this
     * [CaPool][google.cloud.security.privateca.v1.CaPool]'s
     * [baseline_values][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.baseline_values].
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CertificateExtensionConstraints passthrough_extensions = 6 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @return The passthroughExtensions.
     */
    @java.lang.Override
    public com.google.cloud.security.privateca.v1.CertificateExtensionConstraints
        getPassthroughExtensions() {
      return passthroughExtensions_ == null
          ? com.google.cloud.security.privateca.v1.CertificateExtensionConstraints
              .getDefaultInstance()
          : passthroughExtensions_;
    }
    /**
     *
     *
     * <pre>
     * Optional. Describes the set of X.509 extensions that may appear in a
     * [Certificate][google.cloud.security.privateca.v1.Certificate] issued
     * through this [CaPool][google.cloud.security.privateca.v1.CaPool]. If a
     * certificate request sets extensions that don't appear in the
     * [passthrough_extensions][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.passthrough_extensions],
     * those extensions will be dropped. If a certificate request uses a
     * [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]
     * with
     * [predefined_values][google.cloud.security.privateca.v1.CertificateTemplate.predefined_values]
     * that don't appear here, the certificate issuance request will fail. If
     * this is omitted, then this
     * [CaPool][google.cloud.security.privateca.v1.CaPool] will not add
     * restrictions on a certificate's X.509 extensions. These constraints do
     * not apply to X.509 extensions set in this
     * [CaPool][google.cloud.security.privateca.v1.CaPool]'s
     * [baseline_values][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.baseline_values].
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CertificateExtensionConstraints passthrough_extensions = 6 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    @java.lang.Override
    public com.google.cloud.security.privateca.v1.CertificateExtensionConstraintsOrBuilder
        getPassthroughExtensionsOrBuilder() {
      return passthroughExtensions_ == null
          ? com.google.cloud.security.privateca.v1.CertificateExtensionConstraints
              .getDefaultInstance()
          : passthroughExtensions_;
    }

    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 {
      for (int i = 0; i < allowedKeyTypes_.size(); i++) {
        output.writeMessage(1, allowedKeyTypes_.get(i));
      }
      if (maximumLifetime_ != null) {
        output.writeMessage(2, getMaximumLifetime());
      }
      if (allowedIssuanceModes_ != null) {
        output.writeMessage(3, getAllowedIssuanceModes());
      }
      if (baselineValues_ != null) {
        output.writeMessage(4, getBaselineValues());
      }
      if (identityConstraints_ != null) {
        output.writeMessage(5, getIdentityConstraints());
      }
      if (passthroughExtensions_ != null) {
        output.writeMessage(6, getPassthroughExtensions());
      }
      getUnknownFields().writeTo(output);
    }

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

      size = 0;
      for (int i = 0; i < allowedKeyTypes_.size(); i++) {
        size +=
            com.google.protobuf.CodedOutputStream.computeMessageSize(1, allowedKeyTypes_.get(i));
      }
      if (maximumLifetime_ != null) {
        size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getMaximumLifetime());
      }
      if (allowedIssuanceModes_ != null) {
        size +=
            com.google.protobuf.CodedOutputStream.computeMessageSize(3, getAllowedIssuanceModes());
      }
      if (baselineValues_ != null) {
        size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getBaselineValues());
      }
      if (identityConstraints_ != null) {
        size +=
            com.google.protobuf.CodedOutputStream.computeMessageSize(5, getIdentityConstraints());
      }
      if (passthroughExtensions_ != null) {
        size +=
            com.google.protobuf.CodedOutputStream.computeMessageSize(6, getPassthroughExtensions());
      }
      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.CaPool.IssuancePolicy)) {
        return super.equals(obj);
      }
      com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy other =
          (com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy) obj;

      if (!getAllowedKeyTypesList().equals(other.getAllowedKeyTypesList())) return false;
      if (hasMaximumLifetime() != other.hasMaximumLifetime()) return false;
      if (hasMaximumLifetime()) {
        if (!getMaximumLifetime().equals(other.getMaximumLifetime())) return false;
      }
      if (hasAllowedIssuanceModes() != other.hasAllowedIssuanceModes()) return false;
      if (hasAllowedIssuanceModes()) {
        if (!getAllowedIssuanceModes().equals(other.getAllowedIssuanceModes())) return false;
      }
      if (hasBaselineValues() != other.hasBaselineValues()) return false;
      if (hasBaselineValues()) {
        if (!getBaselineValues().equals(other.getBaselineValues())) return false;
      }
      if (hasIdentityConstraints() != other.hasIdentityConstraints()) return false;
      if (hasIdentityConstraints()) {
        if (!getIdentityConstraints().equals(other.getIdentityConstraints())) return false;
      }
      if (hasPassthroughExtensions() != other.hasPassthroughExtensions()) return false;
      if (hasPassthroughExtensions()) {
        if (!getPassthroughExtensions().equals(other.getPassthroughExtensions())) 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();
      if (getAllowedKeyTypesCount() > 0) {
        hash = (37 * hash) + ALLOWED_KEY_TYPES_FIELD_NUMBER;
        hash = (53 * hash) + getAllowedKeyTypesList().hashCode();
      }
      if (hasMaximumLifetime()) {
        hash = (37 * hash) + MAXIMUM_LIFETIME_FIELD_NUMBER;
        hash = (53 * hash) + getMaximumLifetime().hashCode();
      }
      if (hasAllowedIssuanceModes()) {
        hash = (37 * hash) + ALLOWED_ISSUANCE_MODES_FIELD_NUMBER;
        hash = (53 * hash) + getAllowedIssuanceModes().hashCode();
      }
      if (hasBaselineValues()) {
        hash = (37 * hash) + BASELINE_VALUES_FIELD_NUMBER;
        hash = (53 * hash) + getBaselineValues().hashCode();
      }
      if (hasIdentityConstraints()) {
        hash = (37 * hash) + IDENTITY_CONSTRAINTS_FIELD_NUMBER;
        hash = (53 * hash) + getIdentityConstraints().hashCode();
      }
      if (hasPassthroughExtensions()) {
        hash = (37 * hash) + PASSTHROUGH_EXTENSIONS_FIELD_NUMBER;
        hash = (53 * hash) + getPassthroughExtensions().hashCode();
      }
      hash = (29 * hash) + getUnknownFields().hashCode();
      memoizedHashCode = hash;
      return hash;
    }

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

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

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

    public static com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy 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.CaPool.IssuancePolicy 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.CaPool.IssuancePolicy 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.CaPool.IssuancePolicy 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.CaPool.IssuancePolicy 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.CaPool.IssuancePolicy 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.CaPool.IssuancePolicy 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.CaPool.IssuancePolicy 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>
     * Defines controls over all certificate issuance within a
     * [CaPool][google.cloud.security.privateca.v1.CaPool].
     * </pre>
     *
     * Protobuf type {@code google.cloud.security.privateca.v1.CaPool.IssuancePolicy}
     */
    public static final class Builder
        extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
        implements
        // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1.CaPool.IssuancePolicy)
        com.google.cloud.security.privateca.v1.CaPool.IssuancePolicyOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
        return com.google.cloud.security.privateca.v1.PrivateCaResourcesProto
            .internal_static_google_cloud_security_privateca_v1_CaPool_IssuancePolicy_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_CaPool_IssuancePolicy_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.class,
                com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.Builder.class);
      }

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

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

      @java.lang.Override
      public Builder clear() {
        super.clear();
        bitField0_ = 0;
        if (allowedKeyTypesBuilder_ == null) {
          allowedKeyTypes_ = java.util.Collections.emptyList();
        } else {
          allowedKeyTypes_ = null;
          allowedKeyTypesBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000001);
        maximumLifetime_ = null;
        if (maximumLifetimeBuilder_ != null) {
          maximumLifetimeBuilder_.dispose();
          maximumLifetimeBuilder_ = null;
        }
        allowedIssuanceModes_ = null;
        if (allowedIssuanceModesBuilder_ != null) {
          allowedIssuanceModesBuilder_.dispose();
          allowedIssuanceModesBuilder_ = null;
        }
        baselineValues_ = null;
        if (baselineValuesBuilder_ != null) {
          baselineValuesBuilder_.dispose();
          baselineValuesBuilder_ = null;
        }
        identityConstraints_ = null;
        if (identityConstraintsBuilder_ != null) {
          identityConstraintsBuilder_.dispose();
          identityConstraintsBuilder_ = null;
        }
        passthroughExtensions_ = null;
        if (passthroughExtensionsBuilder_ != null) {
          passthroughExtensionsBuilder_.dispose();
          passthroughExtensionsBuilder_ = 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_CaPool_IssuancePolicy_descriptor;
      }

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

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

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

      private void buildPartialRepeatedFields(
          com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy result) {
        if (allowedKeyTypesBuilder_ == null) {
          if (((bitField0_ & 0x00000001) != 0)) {
            allowedKeyTypes_ = java.util.Collections.unmodifiableList(allowedKeyTypes_);
            bitField0_ = (bitField0_ & ~0x00000001);
          }
          result.allowedKeyTypes_ = allowedKeyTypes_;
        } else {
          result.allowedKeyTypes_ = allowedKeyTypesBuilder_.build();
        }
      }

      private void buildPartial0(
          com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy result) {
        int from_bitField0_ = bitField0_;
        if (((from_bitField0_ & 0x00000002) != 0)) {
          result.maximumLifetime_ =
              maximumLifetimeBuilder_ == null ? maximumLifetime_ : maximumLifetimeBuilder_.build();
        }
        if (((from_bitField0_ & 0x00000004) != 0)) {
          result.allowedIssuanceModes_ =
              allowedIssuanceModesBuilder_ == null
                  ? allowedIssuanceModes_
                  : allowedIssuanceModesBuilder_.build();
        }
        if (((from_bitField0_ & 0x00000008) != 0)) {
          result.baselineValues_ =
              baselineValuesBuilder_ == null ? baselineValues_ : baselineValuesBuilder_.build();
        }
        if (((from_bitField0_ & 0x00000010) != 0)) {
          result.identityConstraints_ =
              identityConstraintsBuilder_ == null
                  ? identityConstraints_
                  : identityConstraintsBuilder_.build();
        }
        if (((from_bitField0_ & 0x00000020) != 0)) {
          result.passthroughExtensions_ =
              passthroughExtensionsBuilder_ == null
                  ? passthroughExtensions_
                  : passthroughExtensionsBuilder_.build();
        }
      }

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

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

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

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

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

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

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

      public Builder mergeFrom(com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy other) {
        if (other
            == com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.getDefaultInstance())
          return this;
        if (allowedKeyTypesBuilder_ == null) {
          if (!other.allowedKeyTypes_.isEmpty()) {
            if (allowedKeyTypes_.isEmpty()) {
              allowedKeyTypes_ = other.allowedKeyTypes_;
              bitField0_ = (bitField0_ & ~0x00000001);
            } else {
              ensureAllowedKeyTypesIsMutable();
              allowedKeyTypes_.addAll(other.allowedKeyTypes_);
            }
            onChanged();
          }
        } else {
          if (!other.allowedKeyTypes_.isEmpty()) {
            if (allowedKeyTypesBuilder_.isEmpty()) {
              allowedKeyTypesBuilder_.dispose();
              allowedKeyTypesBuilder_ = null;
              allowedKeyTypes_ = other.allowedKeyTypes_;
              bitField0_ = (bitField0_ & ~0x00000001);
              allowedKeyTypesBuilder_ =
                  com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
                      ? getAllowedKeyTypesFieldBuilder()
                      : null;
            } else {
              allowedKeyTypesBuilder_.addAllMessages(other.allowedKeyTypes_);
            }
          }
        }
        if (other.hasMaximumLifetime()) {
          mergeMaximumLifetime(other.getMaximumLifetime());
        }
        if (other.hasAllowedIssuanceModes()) {
          mergeAllowedIssuanceModes(other.getAllowedIssuanceModes());
        }
        if (other.hasBaselineValues()) {
          mergeBaselineValues(other.getBaselineValues());
        }
        if (other.hasIdentityConstraints()) {
          mergeIdentityConstraints(other.getIdentityConstraints());
        }
        if (other.hasPassthroughExtensions()) {
          mergePassthroughExtensions(other.getPassthroughExtensions());
        }
        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:
                {
                  com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType m =
                      input.readMessage(
                          com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy
                              .AllowedKeyType.parser(),
                          extensionRegistry);
                  if (allowedKeyTypesBuilder_ == null) {
                    ensureAllowedKeyTypesIsMutable();
                    allowedKeyTypes_.add(m);
                  } else {
                    allowedKeyTypesBuilder_.addMessage(m);
                  }
                  break;
                } // case 10
              case 18:
                {
                  input.readMessage(
                      getMaximumLifetimeFieldBuilder().getBuilder(), extensionRegistry);
                  bitField0_ |= 0x00000002;
                  break;
                } // case 18
              case 26:
                {
                  input.readMessage(
                      getAllowedIssuanceModesFieldBuilder().getBuilder(), extensionRegistry);
                  bitField0_ |= 0x00000004;
                  break;
                } // case 26
              case 34:
                {
                  input.readMessage(
                      getBaselineValuesFieldBuilder().getBuilder(), extensionRegistry);
                  bitField0_ |= 0x00000008;
                  break;
                } // case 34
              case 42:
                {
                  input.readMessage(
                      getIdentityConstraintsFieldBuilder().getBuilder(), extensionRegistry);
                  bitField0_ |= 0x00000010;
                  break;
                } // case 42
              case 50:
                {
                  input.readMessage(
                      getPassthroughExtensionsFieldBuilder().getBuilder(), extensionRegistry);
                  bitField0_ |= 0x00000020;
                  break;
                } // case 50
              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.util.List<
              com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType>
          allowedKeyTypes_ = java.util.Collections.emptyList();

      private void ensureAllowedKeyTypesIsMutable() {
        if (!((bitField0_ & 0x00000001) != 0)) {
          allowedKeyTypes_ =
              new java.util.ArrayList<
                  com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType>(
                  allowedKeyTypes_);
          bitField0_ |= 0x00000001;
        }
      }

      private com.google.protobuf.RepeatedFieldBuilderV3<
              com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType,
              com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.Builder,
              com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyTypeOrBuilder>
          allowedKeyTypesBuilder_;

      /**
       *
       *
       * <pre>
       * Optional. If any
       * [AllowedKeyType][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType]
       * is specified, then the certificate request's public key must match one of
       * the key types listed here. Otherwise, any key may be used.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType allowed_key_types = 1 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      public java.util.List<
              com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType>
          getAllowedKeyTypesList() {
        if (allowedKeyTypesBuilder_ == null) {
          return java.util.Collections.unmodifiableList(allowedKeyTypes_);
        } else {
          return allowedKeyTypesBuilder_.getMessageList();
        }
      }
      /**
       *
       *
       * <pre>
       * Optional. If any
       * [AllowedKeyType][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType]
       * is specified, then the certificate request's public key must match one of
       * the key types listed here. Otherwise, any key may be used.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType allowed_key_types = 1 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      public int getAllowedKeyTypesCount() {
        if (allowedKeyTypesBuilder_ == null) {
          return allowedKeyTypes_.size();
        } else {
          return allowedKeyTypesBuilder_.getCount();
        }
      }
      /**
       *
       *
       * <pre>
       * Optional. If any
       * [AllowedKeyType][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType]
       * is specified, then the certificate request's public key must match one of
       * the key types listed here. Otherwise, any key may be used.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType allowed_key_types = 1 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      public com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
          getAllowedKeyTypes(int index) {
        if (allowedKeyTypesBuilder_ == null) {
          return allowedKeyTypes_.get(index);
        } else {
          return allowedKeyTypesBuilder_.getMessage(index);
        }
      }
      /**
       *
       *
       * <pre>
       * Optional. If any
       * [AllowedKeyType][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType]
       * is specified, then the certificate request's public key must match one of
       * the key types listed here. Otherwise, any key may be used.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType allowed_key_types = 1 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      public Builder setAllowedKeyTypes(
          int index,
          com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType value) {
        if (allowedKeyTypesBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureAllowedKeyTypesIsMutable();
          allowedKeyTypes_.set(index, value);
          onChanged();
        } else {
          allowedKeyTypesBuilder_.setMessage(index, value);
        }
        return this;
      }
      /**
       *
       *
       * <pre>
       * Optional. If any
       * [AllowedKeyType][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType]
       * is specified, then the certificate request's public key must match one of
       * the key types listed here. Otherwise, any key may be used.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType allowed_key_types = 1 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      public Builder setAllowedKeyTypes(
          int index,
          com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.Builder
              builderForValue) {
        if (allowedKeyTypesBuilder_ == null) {
          ensureAllowedKeyTypesIsMutable();
          allowedKeyTypes_.set(index, builderForValue.build());
          onChanged();
        } else {
          allowedKeyTypesBuilder_.setMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       *
       *
       * <pre>
       * Optional. If any
       * [AllowedKeyType][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType]
       * is specified, then the certificate request's public key must match one of
       * the key types listed here. Otherwise, any key may be used.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType allowed_key_types = 1 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      public Builder addAllowedKeyTypes(
          com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType value) {
        if (allowedKeyTypesBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureAllowedKeyTypesIsMutable();
          allowedKeyTypes_.add(value);
          onChanged();
        } else {
          allowedKeyTypesBuilder_.addMessage(value);
        }
        return this;
      }
      /**
       *
       *
       * <pre>
       * Optional. If any
       * [AllowedKeyType][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType]
       * is specified, then the certificate request's public key must match one of
       * the key types listed here. Otherwise, any key may be used.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType allowed_key_types = 1 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      public Builder addAllowedKeyTypes(
          int index,
          com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType value) {
        if (allowedKeyTypesBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureAllowedKeyTypesIsMutable();
          allowedKeyTypes_.add(index, value);
          onChanged();
        } else {
          allowedKeyTypesBuilder_.addMessage(index, value);
        }
        return this;
      }
      /**
       *
       *
       * <pre>
       * Optional. If any
       * [AllowedKeyType][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType]
       * is specified, then the certificate request's public key must match one of
       * the key types listed here. Otherwise, any key may be used.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType allowed_key_types = 1 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      public Builder addAllowedKeyTypes(
          com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.Builder
              builderForValue) {
        if (allowedKeyTypesBuilder_ == null) {
          ensureAllowedKeyTypesIsMutable();
          allowedKeyTypes_.add(builderForValue.build());
          onChanged();
        } else {
          allowedKeyTypesBuilder_.addMessage(builderForValue.build());
        }
        return this;
      }
      /**
       *
       *
       * <pre>
       * Optional. If any
       * [AllowedKeyType][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType]
       * is specified, then the certificate request's public key must match one of
       * the key types listed here. Otherwise, any key may be used.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType allowed_key_types = 1 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      public Builder addAllowedKeyTypes(
          int index,
          com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.Builder
              builderForValue) {
        if (allowedKeyTypesBuilder_ == null) {
          ensureAllowedKeyTypesIsMutable();
          allowedKeyTypes_.add(index, builderForValue.build());
          onChanged();
        } else {
          allowedKeyTypesBuilder_.addMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       *
       *
       * <pre>
       * Optional. If any
       * [AllowedKeyType][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType]
       * is specified, then the certificate request's public key must match one of
       * the key types listed here. Otherwise, any key may be used.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType allowed_key_types = 1 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      public Builder addAllAllowedKeyTypes(
          java.lang.Iterable<
                  ? extends
                      com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType>
              values) {
        if (allowedKeyTypesBuilder_ == null) {
          ensureAllowedKeyTypesIsMutable();
          com.google.protobuf.AbstractMessageLite.Builder.addAll(values, allowedKeyTypes_);
          onChanged();
        } else {
          allowedKeyTypesBuilder_.addAllMessages(values);
        }
        return this;
      }
      /**
       *
       *
       * <pre>
       * Optional. If any
       * [AllowedKeyType][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType]
       * is specified, then the certificate request's public key must match one of
       * the key types listed here. Otherwise, any key may be used.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType allowed_key_types = 1 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      public Builder clearAllowedKeyTypes() {
        if (allowedKeyTypesBuilder_ == null) {
          allowedKeyTypes_ = java.util.Collections.emptyList();
          bitField0_ = (bitField0_ & ~0x00000001);
          onChanged();
        } else {
          allowedKeyTypesBuilder_.clear();
        }
        return this;
      }
      /**
       *
       *
       * <pre>
       * Optional. If any
       * [AllowedKeyType][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType]
       * is specified, then the certificate request's public key must match one of
       * the key types listed here. Otherwise, any key may be used.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType allowed_key_types = 1 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      public Builder removeAllowedKeyTypes(int index) {
        if (allowedKeyTypesBuilder_ == null) {
          ensureAllowedKeyTypesIsMutable();
          allowedKeyTypes_.remove(index);
          onChanged();
        } else {
          allowedKeyTypesBuilder_.remove(index);
        }
        return this;
      }
      /**
       *
       *
       * <pre>
       * Optional. If any
       * [AllowedKeyType][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType]
       * is specified, then the certificate request's public key must match one of
       * the key types listed here. Otherwise, any key may be used.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType allowed_key_types = 1 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      public com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.Builder
          getAllowedKeyTypesBuilder(int index) {
        return getAllowedKeyTypesFieldBuilder().getBuilder(index);
      }
      /**
       *
       *
       * <pre>
       * Optional. If any
       * [AllowedKeyType][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType]
       * is specified, then the certificate request's public key must match one of
       * the key types listed here. Otherwise, any key may be used.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType allowed_key_types = 1 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      public com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyTypeOrBuilder
          getAllowedKeyTypesOrBuilder(int index) {
        if (allowedKeyTypesBuilder_ == null) {
          return allowedKeyTypes_.get(index);
        } else {
          return allowedKeyTypesBuilder_.getMessageOrBuilder(index);
        }
      }
      /**
       *
       *
       * <pre>
       * Optional. If any
       * [AllowedKeyType][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType]
       * is specified, then the certificate request's public key must match one of
       * the key types listed here. Otherwise, any key may be used.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType allowed_key_types = 1 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      public java.util.List<
              ? extends
                  com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy
                      .AllowedKeyTypeOrBuilder>
          getAllowedKeyTypesOrBuilderList() {
        if (allowedKeyTypesBuilder_ != null) {
          return allowedKeyTypesBuilder_.getMessageOrBuilderList();
        } else {
          return java.util.Collections.unmodifiableList(allowedKeyTypes_);
        }
      }
      /**
       *
       *
       * <pre>
       * Optional. If any
       * [AllowedKeyType][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType]
       * is specified, then the certificate request's public key must match one of
       * the key types listed here. Otherwise, any key may be used.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType allowed_key_types = 1 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      public com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.Builder
          addAllowedKeyTypesBuilder() {
        return getAllowedKeyTypesFieldBuilder()
            .addBuilder(
                com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                    .getDefaultInstance());
      }
      /**
       *
       *
       * <pre>
       * Optional. If any
       * [AllowedKeyType][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType]
       * is specified, then the certificate request's public key must match one of
       * the key types listed here. Otherwise, any key may be used.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType allowed_key_types = 1 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      public com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.Builder
          addAllowedKeyTypesBuilder(int index) {
        return getAllowedKeyTypesFieldBuilder()
            .addBuilder(
                index,
                com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                    .getDefaultInstance());
      }
      /**
       *
       *
       * <pre>
       * Optional. If any
       * [AllowedKeyType][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType]
       * is specified, then the certificate request's public key must match one of
       * the key types listed here. Otherwise, any key may be used.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType allowed_key_types = 1 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      public java.util.List<
              com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.Builder>
          getAllowedKeyTypesBuilderList() {
        return getAllowedKeyTypesFieldBuilder().getBuilderList();
      }

      private com.google.protobuf.RepeatedFieldBuilderV3<
              com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType,
              com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.Builder,
              com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyTypeOrBuilder>
          getAllowedKeyTypesFieldBuilder() {
        if (allowedKeyTypesBuilder_ == null) {
          allowedKeyTypesBuilder_ =
              new com.google.protobuf.RepeatedFieldBuilderV3<
                  com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType,
                  com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType
                      .Builder,
                  com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy
                      .AllowedKeyTypeOrBuilder>(
                  allowedKeyTypes_,
                  ((bitField0_ & 0x00000001) != 0),
                  getParentForChildren(),
                  isClean());
          allowedKeyTypes_ = null;
        }
        return allowedKeyTypesBuilder_;
      }

      private com.google.protobuf.Duration maximumLifetime_;
      private com.google.protobuf.SingleFieldBuilderV3<
              com.google.protobuf.Duration,
              com.google.protobuf.Duration.Builder,
              com.google.protobuf.DurationOrBuilder>
          maximumLifetimeBuilder_;
      /**
       *
       *
       * <pre>
       * Optional. The maximum lifetime allowed for issued
       * [Certificates][google.cloud.security.privateca.v1.Certificate]. Note that
       * if the issuing
       * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
       * expires before a
       * [Certificate][google.cloud.security.privateca.v1.Certificate]'s requested
       * maximum_lifetime, the effective lifetime will be explicitly truncated to
       * match it.
       * </pre>
       *
       * <code>
       * .google.protobuf.Duration maximum_lifetime = 2 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       *
       * @return Whether the maximumLifetime field is set.
       */
      public boolean hasMaximumLifetime() {
        return ((bitField0_ & 0x00000002) != 0);
      }
      /**
       *
       *
       * <pre>
       * Optional. The maximum lifetime allowed for issued
       * [Certificates][google.cloud.security.privateca.v1.Certificate]. Note that
       * if the issuing
       * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
       * expires before a
       * [Certificate][google.cloud.security.privateca.v1.Certificate]'s requested
       * maximum_lifetime, the effective lifetime will be explicitly truncated to
       * match it.
       * </pre>
       *
       * <code>
       * .google.protobuf.Duration maximum_lifetime = 2 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       *
       * @return The maximumLifetime.
       */
      public com.google.protobuf.Duration getMaximumLifetime() {
        if (maximumLifetimeBuilder_ == null) {
          return maximumLifetime_ == null
              ? com.google.protobuf.Duration.getDefaultInstance()
              : maximumLifetime_;
        } else {
          return maximumLifetimeBuilder_.getMessage();
        }
      }
      /**
       *
       *
       * <pre>
       * Optional. The maximum lifetime allowed for issued
       * [Certificates][google.cloud.security.privateca.v1.Certificate]. Note that
       * if the issuing
       * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
       * expires before a
       * [Certificate][google.cloud.security.privateca.v1.Certificate]'s requested
       * maximum_lifetime, the effective lifetime will be explicitly truncated to
       * match it.
       * </pre>
       *
       * <code>
       * .google.protobuf.Duration maximum_lifetime = 2 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      public Builder setMaximumLifetime(com.google.protobuf.Duration value) {
        if (maximumLifetimeBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          maximumLifetime_ = value;
        } else {
          maximumLifetimeBuilder_.setMessage(value);
        }
        bitField0_ |= 0x00000002;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Optional. The maximum lifetime allowed for issued
       * [Certificates][google.cloud.security.privateca.v1.Certificate]. Note that
       * if the issuing
       * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
       * expires before a
       * [Certificate][google.cloud.security.privateca.v1.Certificate]'s requested
       * maximum_lifetime, the effective lifetime will be explicitly truncated to
       * match it.
       * </pre>
       *
       * <code>
       * .google.protobuf.Duration maximum_lifetime = 2 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      public Builder setMaximumLifetime(com.google.protobuf.Duration.Builder builderForValue) {
        if (maximumLifetimeBuilder_ == null) {
          maximumLifetime_ = builderForValue.build();
        } else {
          maximumLifetimeBuilder_.setMessage(builderForValue.build());
        }
        bitField0_ |= 0x00000002;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Optional. The maximum lifetime allowed for issued
       * [Certificates][google.cloud.security.privateca.v1.Certificate]. Note that
       * if the issuing
       * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
       * expires before a
       * [Certificate][google.cloud.security.privateca.v1.Certificate]'s requested
       * maximum_lifetime, the effective lifetime will be explicitly truncated to
       * match it.
       * </pre>
       *
       * <code>
       * .google.protobuf.Duration maximum_lifetime = 2 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      public Builder mergeMaximumLifetime(com.google.protobuf.Duration value) {
        if (maximumLifetimeBuilder_ == null) {
          if (((bitField0_ & 0x00000002) != 0)
              && maximumLifetime_ != null
              && maximumLifetime_ != com.google.protobuf.Duration.getDefaultInstance()) {
            getMaximumLifetimeBuilder().mergeFrom(value);
          } else {
            maximumLifetime_ = value;
          }
        } else {
          maximumLifetimeBuilder_.mergeFrom(value);
        }
        bitField0_ |= 0x00000002;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Optional. The maximum lifetime allowed for issued
       * [Certificates][google.cloud.security.privateca.v1.Certificate]. Note that
       * if the issuing
       * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
       * expires before a
       * [Certificate][google.cloud.security.privateca.v1.Certificate]'s requested
       * maximum_lifetime, the effective lifetime will be explicitly truncated to
       * match it.
       * </pre>
       *
       * <code>
       * .google.protobuf.Duration maximum_lifetime = 2 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      public Builder clearMaximumLifetime() {
        bitField0_ = (bitField0_ & ~0x00000002);
        maximumLifetime_ = null;
        if (maximumLifetimeBuilder_ != null) {
          maximumLifetimeBuilder_.dispose();
          maximumLifetimeBuilder_ = null;
        }
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Optional. The maximum lifetime allowed for issued
       * [Certificates][google.cloud.security.privateca.v1.Certificate]. Note that
       * if the issuing
       * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
       * expires before a
       * [Certificate][google.cloud.security.privateca.v1.Certificate]'s requested
       * maximum_lifetime, the effective lifetime will be explicitly truncated to
       * match it.
       * </pre>
       *
       * <code>
       * .google.protobuf.Duration maximum_lifetime = 2 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      public com.google.protobuf.Duration.Builder getMaximumLifetimeBuilder() {
        bitField0_ |= 0x00000002;
        onChanged();
        return getMaximumLifetimeFieldBuilder().getBuilder();
      }
      /**
       *
       *
       * <pre>
       * Optional. The maximum lifetime allowed for issued
       * [Certificates][google.cloud.security.privateca.v1.Certificate]. Note that
       * if the issuing
       * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
       * expires before a
       * [Certificate][google.cloud.security.privateca.v1.Certificate]'s requested
       * maximum_lifetime, the effective lifetime will be explicitly truncated to
       * match it.
       * </pre>
       *
       * <code>
       * .google.protobuf.Duration maximum_lifetime = 2 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      public com.google.protobuf.DurationOrBuilder getMaximumLifetimeOrBuilder() {
        if (maximumLifetimeBuilder_ != null) {
          return maximumLifetimeBuilder_.getMessageOrBuilder();
        } else {
          return maximumLifetime_ == null
              ? com.google.protobuf.Duration.getDefaultInstance()
              : maximumLifetime_;
        }
      }
      /**
       *
       *
       * <pre>
       * Optional. The maximum lifetime allowed for issued
       * [Certificates][google.cloud.security.privateca.v1.Certificate]. Note that
       * if the issuing
       * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
       * expires before a
       * [Certificate][google.cloud.security.privateca.v1.Certificate]'s requested
       * maximum_lifetime, the effective lifetime will be explicitly truncated to
       * match it.
       * </pre>
       *
       * <code>
       * .google.protobuf.Duration maximum_lifetime = 2 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
              com.google.protobuf.Duration,
              com.google.protobuf.Duration.Builder,
              com.google.protobuf.DurationOrBuilder>
          getMaximumLifetimeFieldBuilder() {
        if (maximumLifetimeBuilder_ == null) {
          maximumLifetimeBuilder_ =
              new com.google.protobuf.SingleFieldBuilderV3<
                  com.google.protobuf.Duration,
                  com.google.protobuf.Duration.Builder,
                  com.google.protobuf.DurationOrBuilder>(
                  getMaximumLifetime(), getParentForChildren(), isClean());
          maximumLifetime_ = null;
        }
        return maximumLifetimeBuilder_;
      }

      private com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes
          allowedIssuanceModes_;
      private com.google.protobuf.SingleFieldBuilderV3<
              com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes,
              com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes.Builder,
              com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModesOrBuilder>
          allowedIssuanceModesBuilder_;
      /**
       *
       *
       * <pre>
       * Optional. If specified, then only methods allowed in the
       * [IssuanceModes][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes]
       * may be used to issue
       * [Certificates][google.cloud.security.privateca.v1.Certificate].
       * </pre>
       *
       * <code>
       * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes allowed_issuance_modes = 3 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       *
       * @return Whether the allowedIssuanceModes field is set.
       */
      public boolean hasAllowedIssuanceModes() {
        return ((bitField0_ & 0x00000004) != 0);
      }
      /**
       *
       *
       * <pre>
       * Optional. If specified, then only methods allowed in the
       * [IssuanceModes][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes]
       * may be used to issue
       * [Certificates][google.cloud.security.privateca.v1.Certificate].
       * </pre>
       *
       * <code>
       * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes allowed_issuance_modes = 3 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       *
       * @return The allowedIssuanceModes.
       */
      public com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes
          getAllowedIssuanceModes() {
        if (allowedIssuanceModesBuilder_ == null) {
          return allowedIssuanceModes_ == null
              ? com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes
                  .getDefaultInstance()
              : allowedIssuanceModes_;
        } else {
          return allowedIssuanceModesBuilder_.getMessage();
        }
      }
      /**
       *
       *
       * <pre>
       * Optional. If specified, then only methods allowed in the
       * [IssuanceModes][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes]
       * may be used to issue
       * [Certificates][google.cloud.security.privateca.v1.Certificate].
       * </pre>
       *
       * <code>
       * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes allowed_issuance_modes = 3 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      public Builder setAllowedIssuanceModes(
          com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes value) {
        if (allowedIssuanceModesBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          allowedIssuanceModes_ = value;
        } else {
          allowedIssuanceModesBuilder_.setMessage(value);
        }
        bitField0_ |= 0x00000004;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Optional. If specified, then only methods allowed in the
       * [IssuanceModes][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes]
       * may be used to issue
       * [Certificates][google.cloud.security.privateca.v1.Certificate].
       * </pre>
       *
       * <code>
       * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes allowed_issuance_modes = 3 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      public Builder setAllowedIssuanceModes(
          com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes.Builder
              builderForValue) {
        if (allowedIssuanceModesBuilder_ == null) {
          allowedIssuanceModes_ = builderForValue.build();
        } else {
          allowedIssuanceModesBuilder_.setMessage(builderForValue.build());
        }
        bitField0_ |= 0x00000004;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Optional. If specified, then only methods allowed in the
       * [IssuanceModes][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes]
       * may be used to issue
       * [Certificates][google.cloud.security.privateca.v1.Certificate].
       * </pre>
       *
       * <code>
       * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes allowed_issuance_modes = 3 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      public Builder mergeAllowedIssuanceModes(
          com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes value) {
        if (allowedIssuanceModesBuilder_ == null) {
          if (((bitField0_ & 0x00000004) != 0)
              && allowedIssuanceModes_ != null
              && allowedIssuanceModes_
                  != com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes
                      .getDefaultInstance()) {
            getAllowedIssuanceModesBuilder().mergeFrom(value);
          } else {
            allowedIssuanceModes_ = value;
          }
        } else {
          allowedIssuanceModesBuilder_.mergeFrom(value);
        }
        bitField0_ |= 0x00000004;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Optional. If specified, then only methods allowed in the
       * [IssuanceModes][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes]
       * may be used to issue
       * [Certificates][google.cloud.security.privateca.v1.Certificate].
       * </pre>
       *
       * <code>
       * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes allowed_issuance_modes = 3 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      public Builder clearAllowedIssuanceModes() {
        bitField0_ = (bitField0_ & ~0x00000004);
        allowedIssuanceModes_ = null;
        if (allowedIssuanceModesBuilder_ != null) {
          allowedIssuanceModesBuilder_.dispose();
          allowedIssuanceModesBuilder_ = null;
        }
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Optional. If specified, then only methods allowed in the
       * [IssuanceModes][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes]
       * may be used to issue
       * [Certificates][google.cloud.security.privateca.v1.Certificate].
       * </pre>
       *
       * <code>
       * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes allowed_issuance_modes = 3 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      public com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes.Builder
          getAllowedIssuanceModesBuilder() {
        bitField0_ |= 0x00000004;
        onChanged();
        return getAllowedIssuanceModesFieldBuilder().getBuilder();
      }
      /**
       *
       *
       * <pre>
       * Optional. If specified, then only methods allowed in the
       * [IssuanceModes][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes]
       * may be used to issue
       * [Certificates][google.cloud.security.privateca.v1.Certificate].
       * </pre>
       *
       * <code>
       * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes allowed_issuance_modes = 3 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      public com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModesOrBuilder
          getAllowedIssuanceModesOrBuilder() {
        if (allowedIssuanceModesBuilder_ != null) {
          return allowedIssuanceModesBuilder_.getMessageOrBuilder();
        } else {
          return allowedIssuanceModes_ == null
              ? com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes
                  .getDefaultInstance()
              : allowedIssuanceModes_;
        }
      }
      /**
       *
       *
       * <pre>
       * Optional. If specified, then only methods allowed in the
       * [IssuanceModes][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes]
       * may be used to issue
       * [Certificates][google.cloud.security.privateca.v1.Certificate].
       * </pre>
       *
       * <code>
       * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes allowed_issuance_modes = 3 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
              com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes,
              com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes.Builder,
              com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModesOrBuilder>
          getAllowedIssuanceModesFieldBuilder() {
        if (allowedIssuanceModesBuilder_ == null) {
          allowedIssuanceModesBuilder_ =
              new com.google.protobuf.SingleFieldBuilderV3<
                  com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes,
                  com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes
                      .Builder,
                  com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy
                      .IssuanceModesOrBuilder>(
                  getAllowedIssuanceModes(), getParentForChildren(), isClean());
          allowedIssuanceModes_ = null;
        }
        return allowedIssuanceModesBuilder_;
      }

      private com.google.cloud.security.privateca.v1.X509Parameters baselineValues_;
      private com.google.protobuf.SingleFieldBuilderV3<
              com.google.cloud.security.privateca.v1.X509Parameters,
              com.google.cloud.security.privateca.v1.X509Parameters.Builder,
              com.google.cloud.security.privateca.v1.X509ParametersOrBuilder>
          baselineValuesBuilder_;
      /**
       *
       *
       * <pre>
       * Optional. A set of X.509 values that will be applied to all certificates
       * issued through this [CaPool][google.cloud.security.privateca.v1.CaPool].
       * If a certificate request includes conflicting values for the same
       * properties, they will be overwritten by the values defined here. If a
       * certificate request uses a
       * [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]
       * that defines conflicting
       * [predefined_values][google.cloud.security.privateca.v1.CertificateTemplate.predefined_values]
       * for the same properties, the certificate issuance request will fail.
       * </pre>
       *
       * <code>
       * .google.cloud.security.privateca.v1.X509Parameters baseline_values = 4 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       *
       * @return Whether the baselineValues field is set.
       */
      public boolean hasBaselineValues() {
        return ((bitField0_ & 0x00000008) != 0);
      }
      /**
       *
       *
       * <pre>
       * Optional. A set of X.509 values that will be applied to all certificates
       * issued through this [CaPool][google.cloud.security.privateca.v1.CaPool].
       * If a certificate request includes conflicting values for the same
       * properties, they will be overwritten by the values defined here. If a
       * certificate request uses a
       * [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]
       * that defines conflicting
       * [predefined_values][google.cloud.security.privateca.v1.CertificateTemplate.predefined_values]
       * for the same properties, the certificate issuance request will fail.
       * </pre>
       *
       * <code>
       * .google.cloud.security.privateca.v1.X509Parameters baseline_values = 4 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       *
       * @return The baselineValues.
       */
      public com.google.cloud.security.privateca.v1.X509Parameters getBaselineValues() {
        if (baselineValuesBuilder_ == null) {
          return baselineValues_ == null
              ? com.google.cloud.security.privateca.v1.X509Parameters.getDefaultInstance()
              : baselineValues_;
        } else {
          return baselineValuesBuilder_.getMessage();
        }
      }
      /**
       *
       *
       * <pre>
       * Optional. A set of X.509 values that will be applied to all certificates
       * issued through this [CaPool][google.cloud.security.privateca.v1.CaPool].
       * If a certificate request includes conflicting values for the same
       * properties, they will be overwritten by the values defined here. If a
       * certificate request uses a
       * [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]
       * that defines conflicting
       * [predefined_values][google.cloud.security.privateca.v1.CertificateTemplate.predefined_values]
       * for the same properties, the certificate issuance request will fail.
       * </pre>
       *
       * <code>
       * .google.cloud.security.privateca.v1.X509Parameters baseline_values = 4 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      public Builder setBaselineValues(
          com.google.cloud.security.privateca.v1.X509Parameters value) {
        if (baselineValuesBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          baselineValues_ = value;
        } else {
          baselineValuesBuilder_.setMessage(value);
        }
        bitField0_ |= 0x00000008;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Optional. A set of X.509 values that will be applied to all certificates
       * issued through this [CaPool][google.cloud.security.privateca.v1.CaPool].
       * If a certificate request includes conflicting values for the same
       * properties, they will be overwritten by the values defined here. If a
       * certificate request uses a
       * [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]
       * that defines conflicting
       * [predefined_values][google.cloud.security.privateca.v1.CertificateTemplate.predefined_values]
       * for the same properties, the certificate issuance request will fail.
       * </pre>
       *
       * <code>
       * .google.cloud.security.privateca.v1.X509Parameters baseline_values = 4 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      public Builder setBaselineValues(
          com.google.cloud.security.privateca.v1.X509Parameters.Builder builderForValue) {
        if (baselineValuesBuilder_ == null) {
          baselineValues_ = builderForValue.build();
        } else {
          baselineValuesBuilder_.setMessage(builderForValue.build());
        }
        bitField0_ |= 0x00000008;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Optional. A set of X.509 values that will be applied to all certificates
       * issued through this [CaPool][google.cloud.security.privateca.v1.CaPool].
       * If a certificate request includes conflicting values for the same
       * properties, they will be overwritten by the values defined here. If a
       * certificate request uses a
       * [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]
       * that defines conflicting
       * [predefined_values][google.cloud.security.privateca.v1.CertificateTemplate.predefined_values]
       * for the same properties, the certificate issuance request will fail.
       * </pre>
       *
       * <code>
       * .google.cloud.security.privateca.v1.X509Parameters baseline_values = 4 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      public Builder mergeBaselineValues(
          com.google.cloud.security.privateca.v1.X509Parameters value) {
        if (baselineValuesBuilder_ == null) {
          if (((bitField0_ & 0x00000008) != 0)
              && baselineValues_ != null
              && baselineValues_
                  != com.google.cloud.security.privateca.v1.X509Parameters.getDefaultInstance()) {
            getBaselineValuesBuilder().mergeFrom(value);
          } else {
            baselineValues_ = value;
          }
        } else {
          baselineValuesBuilder_.mergeFrom(value);
        }
        bitField0_ |= 0x00000008;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Optional. A set of X.509 values that will be applied to all certificates
       * issued through this [CaPool][google.cloud.security.privateca.v1.CaPool].
       * If a certificate request includes conflicting values for the same
       * properties, they will be overwritten by the values defined here. If a
       * certificate request uses a
       * [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]
       * that defines conflicting
       * [predefined_values][google.cloud.security.privateca.v1.CertificateTemplate.predefined_values]
       * for the same properties, the certificate issuance request will fail.
       * </pre>
       *
       * <code>
       * .google.cloud.security.privateca.v1.X509Parameters baseline_values = 4 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      public Builder clearBaselineValues() {
        bitField0_ = (bitField0_ & ~0x00000008);
        baselineValues_ = null;
        if (baselineValuesBuilder_ != null) {
          baselineValuesBuilder_.dispose();
          baselineValuesBuilder_ = null;
        }
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Optional. A set of X.509 values that will be applied to all certificates
       * issued through this [CaPool][google.cloud.security.privateca.v1.CaPool].
       * If a certificate request includes conflicting values for the same
       * properties, they will be overwritten by the values defined here. If a
       * certificate request uses a
       * [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]
       * that defines conflicting
       * [predefined_values][google.cloud.security.privateca.v1.CertificateTemplate.predefined_values]
       * for the same properties, the certificate issuance request will fail.
       * </pre>
       *
       * <code>
       * .google.cloud.security.privateca.v1.X509Parameters baseline_values = 4 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      public com.google.cloud.security.privateca.v1.X509Parameters.Builder
          getBaselineValuesBuilder() {
        bitField0_ |= 0x00000008;
        onChanged();
        return getBaselineValuesFieldBuilder().getBuilder();
      }
      /**
       *
       *
       * <pre>
       * Optional. A set of X.509 values that will be applied to all certificates
       * issued through this [CaPool][google.cloud.security.privateca.v1.CaPool].
       * If a certificate request includes conflicting values for the same
       * properties, they will be overwritten by the values defined here. If a
       * certificate request uses a
       * [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]
       * that defines conflicting
       * [predefined_values][google.cloud.security.privateca.v1.CertificateTemplate.predefined_values]
       * for the same properties, the certificate issuance request will fail.
       * </pre>
       *
       * <code>
       * .google.cloud.security.privateca.v1.X509Parameters baseline_values = 4 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      public com.google.cloud.security.privateca.v1.X509ParametersOrBuilder
          getBaselineValuesOrBuilder() {
        if (baselineValuesBuilder_ != null) {
          return baselineValuesBuilder_.getMessageOrBuilder();
        } else {
          return baselineValues_ == null
              ? com.google.cloud.security.privateca.v1.X509Parameters.getDefaultInstance()
              : baselineValues_;
        }
      }
      /**
       *
       *
       * <pre>
       * Optional. A set of X.509 values that will be applied to all certificates
       * issued through this [CaPool][google.cloud.security.privateca.v1.CaPool].
       * If a certificate request includes conflicting values for the same
       * properties, they will be overwritten by the values defined here. If a
       * certificate request uses a
       * [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]
       * that defines conflicting
       * [predefined_values][google.cloud.security.privateca.v1.CertificateTemplate.predefined_values]
       * for the same properties, the certificate issuance request will fail.
       * </pre>
       *
       * <code>
       * .google.cloud.security.privateca.v1.X509Parameters baseline_values = 4 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
              com.google.cloud.security.privateca.v1.X509Parameters,
              com.google.cloud.security.privateca.v1.X509Parameters.Builder,
              com.google.cloud.security.privateca.v1.X509ParametersOrBuilder>
          getBaselineValuesFieldBuilder() {
        if (baselineValuesBuilder_ == null) {
          baselineValuesBuilder_ =
              new com.google.protobuf.SingleFieldBuilderV3<
                  com.google.cloud.security.privateca.v1.X509Parameters,
                  com.google.cloud.security.privateca.v1.X509Parameters.Builder,
                  com.google.cloud.security.privateca.v1.X509ParametersOrBuilder>(
                  getBaselineValues(), getParentForChildren(), isClean());
          baselineValues_ = null;
        }
        return baselineValuesBuilder_;
      }

      private com.google.cloud.security.privateca.v1.CertificateIdentityConstraints
          identityConstraints_;
      private com.google.protobuf.SingleFieldBuilderV3<
              com.google.cloud.security.privateca.v1.CertificateIdentityConstraints,
              com.google.cloud.security.privateca.v1.CertificateIdentityConstraints.Builder,
              com.google.cloud.security.privateca.v1.CertificateIdentityConstraintsOrBuilder>
          identityConstraintsBuilder_;
      /**
       *
       *
       * <pre>
       * Optional. Describes constraints on identities that may appear in
       * [Certificates][google.cloud.security.privateca.v1.Certificate] issued
       * through this [CaPool][google.cloud.security.privateca.v1.CaPool]. If this
       * is omitted, then this [CaPool][google.cloud.security.privateca.v1.CaPool]
       * will not add restrictions on a certificate's identity.
       * </pre>
       *
       * <code>
       * .google.cloud.security.privateca.v1.CertificateIdentityConstraints identity_constraints = 5 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       *
       * @return Whether the identityConstraints field is set.
       */
      public boolean hasIdentityConstraints() {
        return ((bitField0_ & 0x00000010) != 0);
      }
      /**
       *
       *
       * <pre>
       * Optional. Describes constraints on identities that may appear in
       * [Certificates][google.cloud.security.privateca.v1.Certificate] issued
       * through this [CaPool][google.cloud.security.privateca.v1.CaPool]. If this
       * is omitted, then this [CaPool][google.cloud.security.privateca.v1.CaPool]
       * will not add restrictions on a certificate's identity.
       * </pre>
       *
       * <code>
       * .google.cloud.security.privateca.v1.CertificateIdentityConstraints identity_constraints = 5 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       *
       * @return The identityConstraints.
       */
      public com.google.cloud.security.privateca.v1.CertificateIdentityConstraints
          getIdentityConstraints() {
        if (identityConstraintsBuilder_ == null) {
          return identityConstraints_ == null
              ? com.google.cloud.security.privateca.v1.CertificateIdentityConstraints
                  .getDefaultInstance()
              : identityConstraints_;
        } else {
          return identityConstraintsBuilder_.getMessage();
        }
      }
      /**
       *
       *
       * <pre>
       * Optional. Describes constraints on identities that may appear in
       * [Certificates][google.cloud.security.privateca.v1.Certificate] issued
       * through this [CaPool][google.cloud.security.privateca.v1.CaPool]. If this
       * is omitted, then this [CaPool][google.cloud.security.privateca.v1.CaPool]
       * will not add restrictions on a certificate's identity.
       * </pre>
       *
       * <code>
       * .google.cloud.security.privateca.v1.CertificateIdentityConstraints identity_constraints = 5 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      public Builder setIdentityConstraints(
          com.google.cloud.security.privateca.v1.CertificateIdentityConstraints value) {
        if (identityConstraintsBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          identityConstraints_ = value;
        } else {
          identityConstraintsBuilder_.setMessage(value);
        }
        bitField0_ |= 0x00000010;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Optional. Describes constraints on identities that may appear in
       * [Certificates][google.cloud.security.privateca.v1.Certificate] issued
       * through this [CaPool][google.cloud.security.privateca.v1.CaPool]. If this
       * is omitted, then this [CaPool][google.cloud.security.privateca.v1.CaPool]
       * will not add restrictions on a certificate's identity.
       * </pre>
       *
       * <code>
       * .google.cloud.security.privateca.v1.CertificateIdentityConstraints identity_constraints = 5 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      public Builder setIdentityConstraints(
          com.google.cloud.security.privateca.v1.CertificateIdentityConstraints.Builder
              builderForValue) {
        if (identityConstraintsBuilder_ == null) {
          identityConstraints_ = builderForValue.build();
        } else {
          identityConstraintsBuilder_.setMessage(builderForValue.build());
        }
        bitField0_ |= 0x00000010;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Optional. Describes constraints on identities that may appear in
       * [Certificates][google.cloud.security.privateca.v1.Certificate] issued
       * through this [CaPool][google.cloud.security.privateca.v1.CaPool]. If this
       * is omitted, then this [CaPool][google.cloud.security.privateca.v1.CaPool]
       * will not add restrictions on a certificate's identity.
       * </pre>
       *
       * <code>
       * .google.cloud.security.privateca.v1.CertificateIdentityConstraints identity_constraints = 5 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      public Builder mergeIdentityConstraints(
          com.google.cloud.security.privateca.v1.CertificateIdentityConstraints value) {
        if (identityConstraintsBuilder_ == null) {
          if (((bitField0_ & 0x00000010) != 0)
              && identityConstraints_ != null
              && identityConstraints_
                  != com.google.cloud.security.privateca.v1.CertificateIdentityConstraints
                      .getDefaultInstance()) {
            getIdentityConstraintsBuilder().mergeFrom(value);
          } else {
            identityConstraints_ = value;
          }
        } else {
          identityConstraintsBuilder_.mergeFrom(value);
        }
        bitField0_ |= 0x00000010;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Optional. Describes constraints on identities that may appear in
       * [Certificates][google.cloud.security.privateca.v1.Certificate] issued
       * through this [CaPool][google.cloud.security.privateca.v1.CaPool]. If this
       * is omitted, then this [CaPool][google.cloud.security.privateca.v1.CaPool]
       * will not add restrictions on a certificate's identity.
       * </pre>
       *
       * <code>
       * .google.cloud.security.privateca.v1.CertificateIdentityConstraints identity_constraints = 5 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      public Builder clearIdentityConstraints() {
        bitField0_ = (bitField0_ & ~0x00000010);
        identityConstraints_ = null;
        if (identityConstraintsBuilder_ != null) {
          identityConstraintsBuilder_.dispose();
          identityConstraintsBuilder_ = null;
        }
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Optional. Describes constraints on identities that may appear in
       * [Certificates][google.cloud.security.privateca.v1.Certificate] issued
       * through this [CaPool][google.cloud.security.privateca.v1.CaPool]. If this
       * is omitted, then this [CaPool][google.cloud.security.privateca.v1.CaPool]
       * will not add restrictions on a certificate's identity.
       * </pre>
       *
       * <code>
       * .google.cloud.security.privateca.v1.CertificateIdentityConstraints identity_constraints = 5 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      public com.google.cloud.security.privateca.v1.CertificateIdentityConstraints.Builder
          getIdentityConstraintsBuilder() {
        bitField0_ |= 0x00000010;
        onChanged();
        return getIdentityConstraintsFieldBuilder().getBuilder();
      }
      /**
       *
       *
       * <pre>
       * Optional. Describes constraints on identities that may appear in
       * [Certificates][google.cloud.security.privateca.v1.Certificate] issued
       * through this [CaPool][google.cloud.security.privateca.v1.CaPool]. If this
       * is omitted, then this [CaPool][google.cloud.security.privateca.v1.CaPool]
       * will not add restrictions on a certificate's identity.
       * </pre>
       *
       * <code>
       * .google.cloud.security.privateca.v1.CertificateIdentityConstraints identity_constraints = 5 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      public com.google.cloud.security.privateca.v1.CertificateIdentityConstraintsOrBuilder
          getIdentityConstraintsOrBuilder() {
        if (identityConstraintsBuilder_ != null) {
          return identityConstraintsBuilder_.getMessageOrBuilder();
        } else {
          return identityConstraints_ == null
              ? com.google.cloud.security.privateca.v1.CertificateIdentityConstraints
                  .getDefaultInstance()
              : identityConstraints_;
        }
      }
      /**
       *
       *
       * <pre>
       * Optional. Describes constraints on identities that may appear in
       * [Certificates][google.cloud.security.privateca.v1.Certificate] issued
       * through this [CaPool][google.cloud.security.privateca.v1.CaPool]. If this
       * is omitted, then this [CaPool][google.cloud.security.privateca.v1.CaPool]
       * will not add restrictions on a certificate's identity.
       * </pre>
       *
       * <code>
       * .google.cloud.security.privateca.v1.CertificateIdentityConstraints identity_constraints = 5 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
              com.google.cloud.security.privateca.v1.CertificateIdentityConstraints,
              com.google.cloud.security.privateca.v1.CertificateIdentityConstraints.Builder,
              com.google.cloud.security.privateca.v1.CertificateIdentityConstraintsOrBuilder>
          getIdentityConstraintsFieldBuilder() {
        if (identityConstraintsBuilder_ == null) {
          identityConstraintsBuilder_ =
              new com.google.protobuf.SingleFieldBuilderV3<
                  com.google.cloud.security.privateca.v1.CertificateIdentityConstraints,
                  com.google.cloud.security.privateca.v1.CertificateIdentityConstraints.Builder,
                  com.google.cloud.security.privateca.v1.CertificateIdentityConstraintsOrBuilder>(
                  getIdentityConstraints(), getParentForChildren(), isClean());
          identityConstraints_ = null;
        }
        return identityConstraintsBuilder_;
      }

      private com.google.cloud.security.privateca.v1.CertificateExtensionConstraints
          passthroughExtensions_;
      private com.google.protobuf.SingleFieldBuilderV3<
              com.google.cloud.security.privateca.v1.CertificateExtensionConstraints,
              com.google.cloud.security.privateca.v1.CertificateExtensionConstraints.Builder,
              com.google.cloud.security.privateca.v1.CertificateExtensionConstraintsOrBuilder>
          passthroughExtensionsBuilder_;
      /**
       *
       *
       * <pre>
       * Optional. Describes the set of X.509 extensions that may appear in a
       * [Certificate][google.cloud.security.privateca.v1.Certificate] issued
       * through this [CaPool][google.cloud.security.privateca.v1.CaPool]. If a
       * certificate request sets extensions that don't appear in the
       * [passthrough_extensions][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.passthrough_extensions],
       * those extensions will be dropped. If a certificate request uses a
       * [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]
       * with
       * [predefined_values][google.cloud.security.privateca.v1.CertificateTemplate.predefined_values]
       * that don't appear here, the certificate issuance request will fail. If
       * this is omitted, then this
       * [CaPool][google.cloud.security.privateca.v1.CaPool] will not add
       * restrictions on a certificate's X.509 extensions. These constraints do
       * not apply to X.509 extensions set in this
       * [CaPool][google.cloud.security.privateca.v1.CaPool]'s
       * [baseline_values][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.baseline_values].
       * </pre>
       *
       * <code>
       * .google.cloud.security.privateca.v1.CertificateExtensionConstraints passthrough_extensions = 6 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       *
       * @return Whether the passthroughExtensions field is set.
       */
      public boolean hasPassthroughExtensions() {
        return ((bitField0_ & 0x00000020) != 0);
      }
      /**
       *
       *
       * <pre>
       * Optional. Describes the set of X.509 extensions that may appear in a
       * [Certificate][google.cloud.security.privateca.v1.Certificate] issued
       * through this [CaPool][google.cloud.security.privateca.v1.CaPool]. If a
       * certificate request sets extensions that don't appear in the
       * [passthrough_extensions][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.passthrough_extensions],
       * those extensions will be dropped. If a certificate request uses a
       * [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]
       * with
       * [predefined_values][google.cloud.security.privateca.v1.CertificateTemplate.predefined_values]
       * that don't appear here, the certificate issuance request will fail. If
       * this is omitted, then this
       * [CaPool][google.cloud.security.privateca.v1.CaPool] will not add
       * restrictions on a certificate's X.509 extensions. These constraints do
       * not apply to X.509 extensions set in this
       * [CaPool][google.cloud.security.privateca.v1.CaPool]'s
       * [baseline_values][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.baseline_values].
       * </pre>
       *
       * <code>
       * .google.cloud.security.privateca.v1.CertificateExtensionConstraints passthrough_extensions = 6 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       *
       * @return The passthroughExtensions.
       */
      public com.google.cloud.security.privateca.v1.CertificateExtensionConstraints
          getPassthroughExtensions() {
        if (passthroughExtensionsBuilder_ == null) {
          return passthroughExtensions_ == null
              ? com.google.cloud.security.privateca.v1.CertificateExtensionConstraints
                  .getDefaultInstance()
              : passthroughExtensions_;
        } else {
          return passthroughExtensionsBuilder_.getMessage();
        }
      }
      /**
       *
       *
       * <pre>
       * Optional. Describes the set of X.509 extensions that may appear in a
       * [Certificate][google.cloud.security.privateca.v1.Certificate] issued
       * through this [CaPool][google.cloud.security.privateca.v1.CaPool]. If a
       * certificate request sets extensions that don't appear in the
       * [passthrough_extensions][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.passthrough_extensions],
       * those extensions will be dropped. If a certificate request uses a
       * [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]
       * with
       * [predefined_values][google.cloud.security.privateca.v1.CertificateTemplate.predefined_values]
       * that don't appear here, the certificate issuance request will fail. If
       * this is omitted, then this
       * [CaPool][google.cloud.security.privateca.v1.CaPool] will not add
       * restrictions on a certificate's X.509 extensions. These constraints do
       * not apply to X.509 extensions set in this
       * [CaPool][google.cloud.security.privateca.v1.CaPool]'s
       * [baseline_values][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.baseline_values].
       * </pre>
       *
       * <code>
       * .google.cloud.security.privateca.v1.CertificateExtensionConstraints passthrough_extensions = 6 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      public Builder setPassthroughExtensions(
          com.google.cloud.security.privateca.v1.CertificateExtensionConstraints value) {
        if (passthroughExtensionsBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          passthroughExtensions_ = value;
        } else {
          passthroughExtensionsBuilder_.setMessage(value);
        }
        bitField0_ |= 0x00000020;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Optional. Describes the set of X.509 extensions that may appear in a
       * [Certificate][google.cloud.security.privateca.v1.Certificate] issued
       * through this [CaPool][google.cloud.security.privateca.v1.CaPool]. If a
       * certificate request sets extensions that don't appear in the
       * [passthrough_extensions][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.passthrough_extensions],
       * those extensions will be dropped. If a certificate request uses a
       * [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]
       * with
       * [predefined_values][google.cloud.security.privateca.v1.CertificateTemplate.predefined_values]
       * that don't appear here, the certificate issuance request will fail. If
       * this is omitted, then this
       * [CaPool][google.cloud.security.privateca.v1.CaPool] will not add
       * restrictions on a certificate's X.509 extensions. These constraints do
       * not apply to X.509 extensions set in this
       * [CaPool][google.cloud.security.privateca.v1.CaPool]'s
       * [baseline_values][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.baseline_values].
       * </pre>
       *
       * <code>
       * .google.cloud.security.privateca.v1.CertificateExtensionConstraints passthrough_extensions = 6 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      public Builder setPassthroughExtensions(
          com.google.cloud.security.privateca.v1.CertificateExtensionConstraints.Builder
              builderForValue) {
        if (passthroughExtensionsBuilder_ == null) {
          passthroughExtensions_ = builderForValue.build();
        } else {
          passthroughExtensionsBuilder_.setMessage(builderForValue.build());
        }
        bitField0_ |= 0x00000020;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Optional. Describes the set of X.509 extensions that may appear in a
       * [Certificate][google.cloud.security.privateca.v1.Certificate] issued
       * through this [CaPool][google.cloud.security.privateca.v1.CaPool]. If a
       * certificate request sets extensions that don't appear in the
       * [passthrough_extensions][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.passthrough_extensions],
       * those extensions will be dropped. If a certificate request uses a
       * [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]
       * with
       * [predefined_values][google.cloud.security.privateca.v1.CertificateTemplate.predefined_values]
       * that don't appear here, the certificate issuance request will fail. If
       * this is omitted, then this
       * [CaPool][google.cloud.security.privateca.v1.CaPool] will not add
       * restrictions on a certificate's X.509 extensions. These constraints do
       * not apply to X.509 extensions set in this
       * [CaPool][google.cloud.security.privateca.v1.CaPool]'s
       * [baseline_values][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.baseline_values].
       * </pre>
       *
       * <code>
       * .google.cloud.security.privateca.v1.CertificateExtensionConstraints passthrough_extensions = 6 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      public Builder mergePassthroughExtensions(
          com.google.cloud.security.privateca.v1.CertificateExtensionConstraints value) {
        if (passthroughExtensionsBuilder_ == null) {
          if (((bitField0_ & 0x00000020) != 0)
              && passthroughExtensions_ != null
              && passthroughExtensions_
                  != com.google.cloud.security.privateca.v1.CertificateExtensionConstraints
                      .getDefaultInstance()) {
            getPassthroughExtensionsBuilder().mergeFrom(value);
          } else {
            passthroughExtensions_ = value;
          }
        } else {
          passthroughExtensionsBuilder_.mergeFrom(value);
        }
        bitField0_ |= 0x00000020;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Optional. Describes the set of X.509 extensions that may appear in a
       * [Certificate][google.cloud.security.privateca.v1.Certificate] issued
       * through this [CaPool][google.cloud.security.privateca.v1.CaPool]. If a
       * certificate request sets extensions that don't appear in the
       * [passthrough_extensions][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.passthrough_extensions],
       * those extensions will be dropped. If a certificate request uses a
       * [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]
       * with
       * [predefined_values][google.cloud.security.privateca.v1.CertificateTemplate.predefined_values]
       * that don't appear here, the certificate issuance request will fail. If
       * this is omitted, then this
       * [CaPool][google.cloud.security.privateca.v1.CaPool] will not add
       * restrictions on a certificate's X.509 extensions. These constraints do
       * not apply to X.509 extensions set in this
       * [CaPool][google.cloud.security.privateca.v1.CaPool]'s
       * [baseline_values][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.baseline_values].
       * </pre>
       *
       * <code>
       * .google.cloud.security.privateca.v1.CertificateExtensionConstraints passthrough_extensions = 6 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      public Builder clearPassthroughExtensions() {
        bitField0_ = (bitField0_ & ~0x00000020);
        passthroughExtensions_ = null;
        if (passthroughExtensionsBuilder_ != null) {
          passthroughExtensionsBuilder_.dispose();
          passthroughExtensionsBuilder_ = null;
        }
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Optional. Describes the set of X.509 extensions that may appear in a
       * [Certificate][google.cloud.security.privateca.v1.Certificate] issued
       * through this [CaPool][google.cloud.security.privateca.v1.CaPool]. If a
       * certificate request sets extensions that don't appear in the
       * [passthrough_extensions][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.passthrough_extensions],
       * those extensions will be dropped. If a certificate request uses a
       * [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]
       * with
       * [predefined_values][google.cloud.security.privateca.v1.CertificateTemplate.predefined_values]
       * that don't appear here, the certificate issuance request will fail. If
       * this is omitted, then this
       * [CaPool][google.cloud.security.privateca.v1.CaPool] will not add
       * restrictions on a certificate's X.509 extensions. These constraints do
       * not apply to X.509 extensions set in this
       * [CaPool][google.cloud.security.privateca.v1.CaPool]'s
       * [baseline_values][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.baseline_values].
       * </pre>
       *
       * <code>
       * .google.cloud.security.privateca.v1.CertificateExtensionConstraints passthrough_extensions = 6 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      public com.google.cloud.security.privateca.v1.CertificateExtensionConstraints.Builder
          getPassthroughExtensionsBuilder() {
        bitField0_ |= 0x00000020;
        onChanged();
        return getPassthroughExtensionsFieldBuilder().getBuilder();
      }
      /**
       *
       *
       * <pre>
       * Optional. Describes the set of X.509 extensions that may appear in a
       * [Certificate][google.cloud.security.privateca.v1.Certificate] issued
       * through this [CaPool][google.cloud.security.privateca.v1.CaPool]. If a
       * certificate request sets extensions that don't appear in the
       * [passthrough_extensions][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.passthrough_extensions],
       * those extensions will be dropped. If a certificate request uses a
       * [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]
       * with
       * [predefined_values][google.cloud.security.privateca.v1.CertificateTemplate.predefined_values]
       * that don't appear here, the certificate issuance request will fail. If
       * this is omitted, then this
       * [CaPool][google.cloud.security.privateca.v1.CaPool] will not add
       * restrictions on a certificate's X.509 extensions. These constraints do
       * not apply to X.509 extensions set in this
       * [CaPool][google.cloud.security.privateca.v1.CaPool]'s
       * [baseline_values][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.baseline_values].
       * </pre>
       *
       * <code>
       * .google.cloud.security.privateca.v1.CertificateExtensionConstraints passthrough_extensions = 6 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      public com.google.cloud.security.privateca.v1.CertificateExtensionConstraintsOrBuilder
          getPassthroughExtensionsOrBuilder() {
        if (passthroughExtensionsBuilder_ != null) {
          return passthroughExtensionsBuilder_.getMessageOrBuilder();
        } else {
          return passthroughExtensions_ == null
              ? com.google.cloud.security.privateca.v1.CertificateExtensionConstraints
                  .getDefaultInstance()
              : passthroughExtensions_;
        }
      }
      /**
       *
       *
       * <pre>
       * Optional. Describes the set of X.509 extensions that may appear in a
       * [Certificate][google.cloud.security.privateca.v1.Certificate] issued
       * through this [CaPool][google.cloud.security.privateca.v1.CaPool]. If a
       * certificate request sets extensions that don't appear in the
       * [passthrough_extensions][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.passthrough_extensions],
       * those extensions will be dropped. If a certificate request uses a
       * [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]
       * with
       * [predefined_values][google.cloud.security.privateca.v1.CertificateTemplate.predefined_values]
       * that don't appear here, the certificate issuance request will fail. If
       * this is omitted, then this
       * [CaPool][google.cloud.security.privateca.v1.CaPool] will not add
       * restrictions on a certificate's X.509 extensions. These constraints do
       * not apply to X.509 extensions set in this
       * [CaPool][google.cloud.security.privateca.v1.CaPool]'s
       * [baseline_values][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.baseline_values].
       * </pre>
       *
       * <code>
       * .google.cloud.security.privateca.v1.CertificateExtensionConstraints passthrough_extensions = 6 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
              com.google.cloud.security.privateca.v1.CertificateExtensionConstraints,
              com.google.cloud.security.privateca.v1.CertificateExtensionConstraints.Builder,
              com.google.cloud.security.privateca.v1.CertificateExtensionConstraintsOrBuilder>
          getPassthroughExtensionsFieldBuilder() {
        if (passthroughExtensionsBuilder_ == null) {
          passthroughExtensionsBuilder_ =
              new com.google.protobuf.SingleFieldBuilderV3<
                  com.google.cloud.security.privateca.v1.CertificateExtensionConstraints,
                  com.google.cloud.security.privateca.v1.CertificateExtensionConstraints.Builder,
                  com.google.cloud.security.privateca.v1.CertificateExtensionConstraintsOrBuilder>(
                  getPassthroughExtensions(), getParentForChildren(), isClean());
          passthroughExtensions_ = null;
        }
        return passthroughExtensionsBuilder_;
      }

      @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.CaPool.IssuancePolicy)
    }

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

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

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

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

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

    @java.lang.Override
    public com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy
        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
   * [CaPool][google.cloud.security.privateca.v1.CaPool] in the format
   * `projects/&#42;&#47;locations/&#42;&#47;caPools/&#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
   * [CaPool][google.cloud.security.privateca.v1.CaPool] in the format
   * `projects/&#42;&#47;locations/&#42;&#47;caPools/&#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 TIER_FIELD_NUMBER = 2;
  private int tier_ = 0;
  /**
   *
   *
   * <pre>
   * Required. Immutable. The
   * [Tier][google.cloud.security.privateca.v1.CaPool.Tier] of this
   * [CaPool][google.cloud.security.privateca.v1.CaPool].
   * </pre>
   *
   * <code>
   * .google.cloud.security.privateca.v1.CaPool.Tier tier = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
   * </code>
   *
   * @return The enum numeric value on the wire for tier.
   */
  @java.lang.Override
  public int getTierValue() {
    return tier_;
  }
  /**
   *
   *
   * <pre>
   * Required. Immutable. The
   * [Tier][google.cloud.security.privateca.v1.CaPool.Tier] of this
   * [CaPool][google.cloud.security.privateca.v1.CaPool].
   * </pre>
   *
   * <code>
   * .google.cloud.security.privateca.v1.CaPool.Tier tier = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
   * </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 ISSUANCE_POLICY_FIELD_NUMBER = 3;
  private com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy issuancePolicy_;
  /**
   *
   *
   * <pre>
   * Optional. The
   * [IssuancePolicy][google.cloud.security.privateca.v1.CaPool.IssuancePolicy]
   * to control how
   * [Certificates][google.cloud.security.privateca.v1.Certificate] will be
   * issued from this [CaPool][google.cloud.security.privateca.v1.CaPool].
   * </pre>
   *
   * <code>
   * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy issuance_policy = 3 [(.google.api.field_behavior) = OPTIONAL];
   * </code>
   *
   * @return Whether the issuancePolicy field is set.
   */
  @java.lang.Override
  public boolean hasIssuancePolicy() {
    return issuancePolicy_ != null;
  }
  /**
   *
   *
   * <pre>
   * Optional. The
   * [IssuancePolicy][google.cloud.security.privateca.v1.CaPool.IssuancePolicy]
   * to control how
   * [Certificates][google.cloud.security.privateca.v1.Certificate] will be
   * issued from this [CaPool][google.cloud.security.privateca.v1.CaPool].
   * </pre>
   *
   * <code>
   * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy issuance_policy = 3 [(.google.api.field_behavior) = OPTIONAL];
   * </code>
   *
   * @return The issuancePolicy.
   */
  @java.lang.Override
  public com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy getIssuancePolicy() {
    return issuancePolicy_ == null
        ? com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.getDefaultInstance()
        : issuancePolicy_;
  }
  /**
   *
   *
   * <pre>
   * Optional. The
   * [IssuancePolicy][google.cloud.security.privateca.v1.CaPool.IssuancePolicy]
   * to control how
   * [Certificates][google.cloud.security.privateca.v1.Certificate] will be
   * issued from this [CaPool][google.cloud.security.privateca.v1.CaPool].
   * </pre>
   *
   * <code>
   * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy issuance_policy = 3 [(.google.api.field_behavior) = OPTIONAL];
   * </code>
   */
  @java.lang.Override
  public com.google.cloud.security.privateca.v1.CaPool.IssuancePolicyOrBuilder
      getIssuancePolicyOrBuilder() {
    return issuancePolicy_ == null
        ? com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.getDefaultInstance()
        : issuancePolicy_;
  }

  public static final int PUBLISHING_OPTIONS_FIELD_NUMBER = 4;
  private com.google.cloud.security.privateca.v1.CaPool.PublishingOptions publishingOptions_;
  /**
   *
   *
   * <pre>
   * Optional. The
   * [PublishingOptions][google.cloud.security.privateca.v1.CaPool.PublishingOptions]
   * to follow when issuing
   * [Certificates][google.cloud.security.privateca.v1.Certificate] from any
   * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
   * in this [CaPool][google.cloud.security.privateca.v1.CaPool].
   * </pre>
   *
   * <code>
   * .google.cloud.security.privateca.v1.CaPool.PublishingOptions publishing_options = 4 [(.google.api.field_behavior) = OPTIONAL];
   * </code>
   *
   * @return Whether the publishingOptions field is set.
   */
  @java.lang.Override
  public boolean hasPublishingOptions() {
    return publishingOptions_ != null;
  }
  /**
   *
   *
   * <pre>
   * Optional. The
   * [PublishingOptions][google.cloud.security.privateca.v1.CaPool.PublishingOptions]
   * to follow when issuing
   * [Certificates][google.cloud.security.privateca.v1.Certificate] from any
   * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
   * in this [CaPool][google.cloud.security.privateca.v1.CaPool].
   * </pre>
   *
   * <code>
   * .google.cloud.security.privateca.v1.CaPool.PublishingOptions publishing_options = 4 [(.google.api.field_behavior) = OPTIONAL];
   * </code>
   *
   * @return The publishingOptions.
   */
  @java.lang.Override
  public com.google.cloud.security.privateca.v1.CaPool.PublishingOptions getPublishingOptions() {
    return publishingOptions_ == null
        ? com.google.cloud.security.privateca.v1.CaPool.PublishingOptions.getDefaultInstance()
        : publishingOptions_;
  }
  /**
   *
   *
   * <pre>
   * Optional. The
   * [PublishingOptions][google.cloud.security.privateca.v1.CaPool.PublishingOptions]
   * to follow when issuing
   * [Certificates][google.cloud.security.privateca.v1.Certificate] from any
   * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
   * in this [CaPool][google.cloud.security.privateca.v1.CaPool].
   * </pre>
   *
   * <code>
   * .google.cloud.security.privateca.v1.CaPool.PublishingOptions publishing_options = 4 [(.google.api.field_behavior) = OPTIONAL];
   * </code>
   */
  @java.lang.Override
  public com.google.cloud.security.privateca.v1.CaPool.PublishingOptionsOrBuilder
      getPublishingOptionsOrBuilder() {
    return publishingOptions_ == null
        ? com.google.cloud.security.privateca.v1.CaPool.PublishingOptions.getDefaultInstance()
        : publishingOptions_;
  }

  public static final int LABELS_FIELD_NUMBER = 5;

  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_CaPool_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 = 5 [(.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 = 5 [(.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 = 5 [(.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 = 5 [(.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 (tier_ != com.google.cloud.security.privateca.v1.CaPool.Tier.TIER_UNSPECIFIED.getNumber()) {
      output.writeEnum(2, tier_);
    }
    if (issuancePolicy_ != null) {
      output.writeMessage(3, getIssuancePolicy());
    }
    if (publishingOptions_ != null) {
      output.writeMessage(4, getPublishingOptions());
    }
    com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
        output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 5);
    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 (tier_ != com.google.cloud.security.privateca.v1.CaPool.Tier.TIER_UNSPECIFIED.getNumber()) {
      size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, tier_);
    }
    if (issuancePolicy_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getIssuancePolicy());
    }
    if (publishingOptions_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getPublishingOptions());
    }
    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(5, 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.CaPool)) {
      return super.equals(obj);
    }
    com.google.cloud.security.privateca.v1.CaPool other =
        (com.google.cloud.security.privateca.v1.CaPool) obj;

    if (!getName().equals(other.getName())) return false;
    if (tier_ != other.tier_) return false;
    if (hasIssuancePolicy() != other.hasIssuancePolicy()) return false;
    if (hasIssuancePolicy()) {
      if (!getIssuancePolicy().equals(other.getIssuancePolicy())) return false;
    }
    if (hasPublishingOptions() != other.hasPublishingOptions()) return false;
    if (hasPublishingOptions()) {
      if (!getPublishingOptions().equals(other.getPublishingOptions())) 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) + TIER_FIELD_NUMBER;
    hash = (53 * hash) + tier_;
    if (hasIssuancePolicy()) {
      hash = (37 * hash) + ISSUANCE_POLICY_FIELD_NUMBER;
      hash = (53 * hash) + getIssuancePolicy().hashCode();
    }
    if (hasPublishingOptions()) {
      hash = (37 * hash) + PUBLISHING_OPTIONS_FIELD_NUMBER;
      hash = (53 * hash) + getPublishingOptions().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.CaPool parseFrom(java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

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

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

  public static com.google.cloud.security.privateca.v1.CaPool 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.CaPool 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.CaPool 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.CaPool 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.CaPool 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.CaPool 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.CaPool 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.CaPool 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 [CaPool][google.cloud.security.privateca.v1.CaPool] represents a group of
   * [CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority]
   * that form a trust anchor. A
   * [CaPool][google.cloud.security.privateca.v1.CaPool] can be used to manage
   * issuance policies for one or more
   * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
   * resources and to rotate CA certificates in and out of the trust anchor.
   * </pre>
   *
   * Protobuf type {@code google.cloud.security.privateca.v1.CaPool}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.cloud.security.privateca.v1.CaPool)
      com.google.cloud.security.privateca.v1.CaPoolOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.cloud.security.privateca.v1.PrivateCaResourcesProto
          .internal_static_google_cloud_security_privateca_v1_CaPool_descriptor;
    }

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

    @SuppressWarnings({"rawtypes"})
    protected com.google.protobuf.MapField internalGetMutableMapField(int number) {
      switch (number) {
        case 5:
          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_CaPool_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.cloud.security.privateca.v1.CaPool.class,
              com.google.cloud.security.privateca.v1.CaPool.Builder.class);
    }

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

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

    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      name_ = "";
      tier_ = 0;
      issuancePolicy_ = null;
      if (issuancePolicyBuilder_ != null) {
        issuancePolicyBuilder_.dispose();
        issuancePolicyBuilder_ = null;
      }
      publishingOptions_ = null;
      if (publishingOptionsBuilder_ != null) {
        publishingOptionsBuilder_.dispose();
        publishingOptionsBuilder_ = 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_CaPool_descriptor;
    }

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

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

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

    private void buildPartial0(com.google.cloud.security.privateca.v1.CaPool result) {
      int from_bitField0_ = bitField0_;
      if (((from_bitField0_ & 0x00000001) != 0)) {
        result.name_ = name_;
      }
      if (((from_bitField0_ & 0x00000002) != 0)) {
        result.tier_ = tier_;
      }
      if (((from_bitField0_ & 0x00000004) != 0)) {
        result.issuancePolicy_ =
            issuancePolicyBuilder_ == null ? issuancePolicy_ : issuancePolicyBuilder_.build();
      }
      if (((from_bitField0_ & 0x00000008) != 0)) {
        result.publishingOptions_ =
            publishingOptionsBuilder_ == null
                ? publishingOptions_
                : publishingOptionsBuilder_.build();
      }
      if (((from_bitField0_ & 0x00000010) != 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.CaPool) {
        return mergeFrom((com.google.cloud.security.privateca.v1.CaPool) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.cloud.security.privateca.v1.CaPool other) {
      if (other == com.google.cloud.security.privateca.v1.CaPool.getDefaultInstance()) return this;
      if (!other.getName().isEmpty()) {
        name_ = other.name_;
        bitField0_ |= 0x00000001;
        onChanged();
      }
      if (other.tier_ != 0) {
        setTierValue(other.getTierValue());
      }
      if (other.hasIssuancePolicy()) {
        mergeIssuancePolicy(other.getIssuancePolicy());
      }
      if (other.hasPublishingOptions()) {
        mergePublishingOptions(other.getPublishingOptions());
      }
      internalGetMutableLabels().mergeFrom(other.internalGetLabels());
      bitField0_ |= 0x00000010;
      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:
              {
                tier_ = input.readEnum();
                bitField0_ |= 0x00000002;
                break;
              } // case 16
            case 26:
              {
                input.readMessage(getIssuancePolicyFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000004;
                break;
              } // case 26
            case 34:
              {
                input.readMessage(
                    getPublishingOptionsFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000008;
                break;
              } // case 34
            case 42:
              {
                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_ |= 0x00000010;
                break;
              } // case 42
            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
     * [CaPool][google.cloud.security.privateca.v1.CaPool] in the format
     * `projects/&#42;&#47;locations/&#42;&#47;caPools/&#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
     * [CaPool][google.cloud.security.privateca.v1.CaPool] in the format
     * `projects/&#42;&#47;locations/&#42;&#47;caPools/&#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
     * [CaPool][google.cloud.security.privateca.v1.CaPool] in the format
     * `projects/&#42;&#47;locations/&#42;&#47;caPools/&#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
     * [CaPool][google.cloud.security.privateca.v1.CaPool] in the format
     * `projects/&#42;&#47;locations/&#42;&#47;caPools/&#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
     * [CaPool][google.cloud.security.privateca.v1.CaPool] in the format
     * `projects/&#42;&#47;locations/&#42;&#47;caPools/&#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 tier_ = 0;
    /**
     *
     *
     * <pre>
     * Required. Immutable. The
     * [Tier][google.cloud.security.privateca.v1.CaPool.Tier] of this
     * [CaPool][google.cloud.security.privateca.v1.CaPool].
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CaPool.Tier tier = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
     * </code>
     *
     * @return The enum numeric value on the wire for tier.
     */
    @java.lang.Override
    public int getTierValue() {
      return tier_;
    }
    /**
     *
     *
     * <pre>
     * Required. Immutable. The
     * [Tier][google.cloud.security.privateca.v1.CaPool.Tier] of this
     * [CaPool][google.cloud.security.privateca.v1.CaPool].
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CaPool.Tier tier = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
     * </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_ |= 0x00000002;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. Immutable. The
     * [Tier][google.cloud.security.privateca.v1.CaPool.Tier] of this
     * [CaPool][google.cloud.security.privateca.v1.CaPool].
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CaPool.Tier tier = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
     * </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>
     * Required. Immutable. The
     * [Tier][google.cloud.security.privateca.v1.CaPool.Tier] of this
     * [CaPool][google.cloud.security.privateca.v1.CaPool].
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CaPool.Tier tier = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
     * </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_ |= 0x00000002;
      tier_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. Immutable. The
     * [Tier][google.cloud.security.privateca.v1.CaPool.Tier] of this
     * [CaPool][google.cloud.security.privateca.v1.CaPool].
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CaPool.Tier tier = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
     * </code>
     *
     * @return This builder for chaining.
     */
    public Builder clearTier() {
      bitField0_ = (bitField0_ & ~0x00000002);
      tier_ = 0;
      onChanged();
      return this;
    }

    private com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy issuancePolicy_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy,
            com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.Builder,
            com.google.cloud.security.privateca.v1.CaPool.IssuancePolicyOrBuilder>
        issuancePolicyBuilder_;
    /**
     *
     *
     * <pre>
     * Optional. The
     * [IssuancePolicy][google.cloud.security.privateca.v1.CaPool.IssuancePolicy]
     * to control how
     * [Certificates][google.cloud.security.privateca.v1.Certificate] will be
     * issued from this [CaPool][google.cloud.security.privateca.v1.CaPool].
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy issuance_policy = 3 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @return Whether the issuancePolicy field is set.
     */
    public boolean hasIssuancePolicy() {
      return ((bitField0_ & 0x00000004) != 0);
    }
    /**
     *
     *
     * <pre>
     * Optional. The
     * [IssuancePolicy][google.cloud.security.privateca.v1.CaPool.IssuancePolicy]
     * to control how
     * [Certificates][google.cloud.security.privateca.v1.Certificate] will be
     * issued from this [CaPool][google.cloud.security.privateca.v1.CaPool].
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy issuance_policy = 3 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @return The issuancePolicy.
     */
    public com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy getIssuancePolicy() {
      if (issuancePolicyBuilder_ == null) {
        return issuancePolicy_ == null
            ? com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.getDefaultInstance()
            : issuancePolicy_;
      } else {
        return issuancePolicyBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Optional. The
     * [IssuancePolicy][google.cloud.security.privateca.v1.CaPool.IssuancePolicy]
     * to control how
     * [Certificates][google.cloud.security.privateca.v1.Certificate] will be
     * issued from this [CaPool][google.cloud.security.privateca.v1.CaPool].
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy issuance_policy = 3 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public Builder setIssuancePolicy(
        com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy value) {
      if (issuancePolicyBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        issuancePolicy_ = value;
      } else {
        issuancePolicyBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. The
     * [IssuancePolicy][google.cloud.security.privateca.v1.CaPool.IssuancePolicy]
     * to control how
     * [Certificates][google.cloud.security.privateca.v1.Certificate] will be
     * issued from this [CaPool][google.cloud.security.privateca.v1.CaPool].
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy issuance_policy = 3 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public Builder setIssuancePolicy(
        com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.Builder builderForValue) {
      if (issuancePolicyBuilder_ == null) {
        issuancePolicy_ = builderForValue.build();
      } else {
        issuancePolicyBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. The
     * [IssuancePolicy][google.cloud.security.privateca.v1.CaPool.IssuancePolicy]
     * to control how
     * [Certificates][google.cloud.security.privateca.v1.Certificate] will be
     * issued from this [CaPool][google.cloud.security.privateca.v1.CaPool].
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy issuance_policy = 3 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public Builder mergeIssuancePolicy(
        com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy value) {
      if (issuancePolicyBuilder_ == null) {
        if (((bitField0_ & 0x00000004) != 0)
            && issuancePolicy_ != null
            && issuancePolicy_
                != com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy
                    .getDefaultInstance()) {
          getIssuancePolicyBuilder().mergeFrom(value);
        } else {
          issuancePolicy_ = value;
        }
      } else {
        issuancePolicyBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. The
     * [IssuancePolicy][google.cloud.security.privateca.v1.CaPool.IssuancePolicy]
     * to control how
     * [Certificates][google.cloud.security.privateca.v1.Certificate] will be
     * issued from this [CaPool][google.cloud.security.privateca.v1.CaPool].
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy issuance_policy = 3 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public Builder clearIssuancePolicy() {
      bitField0_ = (bitField0_ & ~0x00000004);
      issuancePolicy_ = null;
      if (issuancePolicyBuilder_ != null) {
        issuancePolicyBuilder_.dispose();
        issuancePolicyBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. The
     * [IssuancePolicy][google.cloud.security.privateca.v1.CaPool.IssuancePolicy]
     * to control how
     * [Certificates][google.cloud.security.privateca.v1.Certificate] will be
     * issued from this [CaPool][google.cloud.security.privateca.v1.CaPool].
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy issuance_policy = 3 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.Builder
        getIssuancePolicyBuilder() {
      bitField0_ |= 0x00000004;
      onChanged();
      return getIssuancePolicyFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Optional. The
     * [IssuancePolicy][google.cloud.security.privateca.v1.CaPool.IssuancePolicy]
     * to control how
     * [Certificates][google.cloud.security.privateca.v1.Certificate] will be
     * issued from this [CaPool][google.cloud.security.privateca.v1.CaPool].
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy issuance_policy = 3 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public com.google.cloud.security.privateca.v1.CaPool.IssuancePolicyOrBuilder
        getIssuancePolicyOrBuilder() {
      if (issuancePolicyBuilder_ != null) {
        return issuancePolicyBuilder_.getMessageOrBuilder();
      } else {
        return issuancePolicy_ == null
            ? com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.getDefaultInstance()
            : issuancePolicy_;
      }
    }
    /**
     *
     *
     * <pre>
     * Optional. The
     * [IssuancePolicy][google.cloud.security.privateca.v1.CaPool.IssuancePolicy]
     * to control how
     * [Certificates][google.cloud.security.privateca.v1.Certificate] will be
     * issued from this [CaPool][google.cloud.security.privateca.v1.CaPool].
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CaPool.IssuancePolicy issuance_policy = 3 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy,
            com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.Builder,
            com.google.cloud.security.privateca.v1.CaPool.IssuancePolicyOrBuilder>
        getIssuancePolicyFieldBuilder() {
      if (issuancePolicyBuilder_ == null) {
        issuancePolicyBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy,
                com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.Builder,
                com.google.cloud.security.privateca.v1.CaPool.IssuancePolicyOrBuilder>(
                getIssuancePolicy(), getParentForChildren(), isClean());
        issuancePolicy_ = null;
      }
      return issuancePolicyBuilder_;
    }

    private com.google.cloud.security.privateca.v1.CaPool.PublishingOptions publishingOptions_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.security.privateca.v1.CaPool.PublishingOptions,
            com.google.cloud.security.privateca.v1.CaPool.PublishingOptions.Builder,
            com.google.cloud.security.privateca.v1.CaPool.PublishingOptionsOrBuilder>
        publishingOptionsBuilder_;
    /**
     *
     *
     * <pre>
     * Optional. The
     * [PublishingOptions][google.cloud.security.privateca.v1.CaPool.PublishingOptions]
     * to follow when issuing
     * [Certificates][google.cloud.security.privateca.v1.Certificate] from any
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * in this [CaPool][google.cloud.security.privateca.v1.CaPool].
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CaPool.PublishingOptions publishing_options = 4 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @return Whether the publishingOptions field is set.
     */
    public boolean hasPublishingOptions() {
      return ((bitField0_ & 0x00000008) != 0);
    }
    /**
     *
     *
     * <pre>
     * Optional. The
     * [PublishingOptions][google.cloud.security.privateca.v1.CaPool.PublishingOptions]
     * to follow when issuing
     * [Certificates][google.cloud.security.privateca.v1.Certificate] from any
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * in this [CaPool][google.cloud.security.privateca.v1.CaPool].
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CaPool.PublishingOptions publishing_options = 4 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @return The publishingOptions.
     */
    public com.google.cloud.security.privateca.v1.CaPool.PublishingOptions getPublishingOptions() {
      if (publishingOptionsBuilder_ == null) {
        return publishingOptions_ == null
            ? com.google.cloud.security.privateca.v1.CaPool.PublishingOptions.getDefaultInstance()
            : publishingOptions_;
      } else {
        return publishingOptionsBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Optional. The
     * [PublishingOptions][google.cloud.security.privateca.v1.CaPool.PublishingOptions]
     * to follow when issuing
     * [Certificates][google.cloud.security.privateca.v1.Certificate] from any
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * in this [CaPool][google.cloud.security.privateca.v1.CaPool].
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CaPool.PublishingOptions publishing_options = 4 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public Builder setPublishingOptions(
        com.google.cloud.security.privateca.v1.CaPool.PublishingOptions value) {
      if (publishingOptionsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        publishingOptions_ = value;
      } else {
        publishingOptionsBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. The
     * [PublishingOptions][google.cloud.security.privateca.v1.CaPool.PublishingOptions]
     * to follow when issuing
     * [Certificates][google.cloud.security.privateca.v1.Certificate] from any
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * in this [CaPool][google.cloud.security.privateca.v1.CaPool].
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CaPool.PublishingOptions publishing_options = 4 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public Builder setPublishingOptions(
        com.google.cloud.security.privateca.v1.CaPool.PublishingOptions.Builder builderForValue) {
      if (publishingOptionsBuilder_ == null) {
        publishingOptions_ = builderForValue.build();
      } else {
        publishingOptionsBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. The
     * [PublishingOptions][google.cloud.security.privateca.v1.CaPool.PublishingOptions]
     * to follow when issuing
     * [Certificates][google.cloud.security.privateca.v1.Certificate] from any
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * in this [CaPool][google.cloud.security.privateca.v1.CaPool].
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CaPool.PublishingOptions publishing_options = 4 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public Builder mergePublishingOptions(
        com.google.cloud.security.privateca.v1.CaPool.PublishingOptions value) {
      if (publishingOptionsBuilder_ == null) {
        if (((bitField0_ & 0x00000008) != 0)
            && publishingOptions_ != null
            && publishingOptions_
                != com.google.cloud.security.privateca.v1.CaPool.PublishingOptions
                    .getDefaultInstance()) {
          getPublishingOptionsBuilder().mergeFrom(value);
        } else {
          publishingOptions_ = value;
        }
      } else {
        publishingOptionsBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. The
     * [PublishingOptions][google.cloud.security.privateca.v1.CaPool.PublishingOptions]
     * to follow when issuing
     * [Certificates][google.cloud.security.privateca.v1.Certificate] from any
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * in this [CaPool][google.cloud.security.privateca.v1.CaPool].
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CaPool.PublishingOptions publishing_options = 4 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public Builder clearPublishingOptions() {
      bitField0_ = (bitField0_ & ~0x00000008);
      publishingOptions_ = null;
      if (publishingOptionsBuilder_ != null) {
        publishingOptionsBuilder_.dispose();
        publishingOptionsBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. The
     * [PublishingOptions][google.cloud.security.privateca.v1.CaPool.PublishingOptions]
     * to follow when issuing
     * [Certificates][google.cloud.security.privateca.v1.Certificate] from any
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * in this [CaPool][google.cloud.security.privateca.v1.CaPool].
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CaPool.PublishingOptions publishing_options = 4 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public com.google.cloud.security.privateca.v1.CaPool.PublishingOptions.Builder
        getPublishingOptionsBuilder() {
      bitField0_ |= 0x00000008;
      onChanged();
      return getPublishingOptionsFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Optional. The
     * [PublishingOptions][google.cloud.security.privateca.v1.CaPool.PublishingOptions]
     * to follow when issuing
     * [Certificates][google.cloud.security.privateca.v1.Certificate] from any
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * in this [CaPool][google.cloud.security.privateca.v1.CaPool].
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CaPool.PublishingOptions publishing_options = 4 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public com.google.cloud.security.privateca.v1.CaPool.PublishingOptionsOrBuilder
        getPublishingOptionsOrBuilder() {
      if (publishingOptionsBuilder_ != null) {
        return publishingOptionsBuilder_.getMessageOrBuilder();
      } else {
        return publishingOptions_ == null
            ? com.google.cloud.security.privateca.v1.CaPool.PublishingOptions.getDefaultInstance()
            : publishingOptions_;
      }
    }
    /**
     *
     *
     * <pre>
     * Optional. The
     * [PublishingOptions][google.cloud.security.privateca.v1.CaPool.PublishingOptions]
     * to follow when issuing
     * [Certificates][google.cloud.security.privateca.v1.Certificate] from any
     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
     * in this [CaPool][google.cloud.security.privateca.v1.CaPool].
     * </pre>
     *
     * <code>
     * .google.cloud.security.privateca.v1.CaPool.PublishingOptions publishing_options = 4 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.security.privateca.v1.CaPool.PublishingOptions,
            com.google.cloud.security.privateca.v1.CaPool.PublishingOptions.Builder,
            com.google.cloud.security.privateca.v1.CaPool.PublishingOptionsOrBuilder>
        getPublishingOptionsFieldBuilder() {
      if (publishingOptionsBuilder_ == null) {
        publishingOptionsBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.cloud.security.privateca.v1.CaPool.PublishingOptions,
                com.google.cloud.security.privateca.v1.CaPool.PublishingOptions.Builder,
                com.google.cloud.security.privateca.v1.CaPool.PublishingOptionsOrBuilder>(
                getPublishingOptions(), getParentForChildren(), isClean());
        publishingOptions_ = null;
      }
      return publishingOptionsBuilder_;
    }

    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_ |= 0x00000010;
      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 = 5 [(.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 = 5 [(.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 = 5 [(.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 = 5 [(.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_ & ~0x00000010);
      internalGetMutableLabels().getMutableMap().clear();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. Labels with user-defined metadata.
     * </pre>
     *
     * <code>map&lt;string, string&gt; labels = 5 [(.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_ |= 0x00000010;
      return internalGetMutableLabels().getMutableMap();
    }
    /**
     *
     *
     * <pre>
     * Optional. Labels with user-defined metadata.
     * </pre>
     *
     * <code>map&lt;string, string&gt; labels = 5 [(.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_ |= 0x00000010;
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. Labels with user-defined metadata.
     * </pre>
     *
     * <code>map&lt;string, string&gt; labels = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    public Builder putAllLabels(java.util.Map<java.lang.String, java.lang.String> values) {
      internalGetMutableLabels().getMutableMap().putAll(values);
      bitField0_ |= 0x00000010;
      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.CaPool)
  }

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

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

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

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

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

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