<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/security/privateca/v1/resources.proto

namespace Google\Cloud\Security\PrivateCA\V1\CaPool\IssuancePolicy;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * [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].
 *
 * Generated from protobuf message <code>google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes</code>
 */
class IssuanceModes extends \Google\Protobuf\Internal\Message
{
    /**
     * Optional. When true, allows callers to create [Certificates][google.cloud.security.privateca.v1.Certificate] by
     * specifying a CSR.
     *
     * Generated from protobuf field <code>bool allow_csr_based_issuance = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $allow_csr_based_issuance = false;
    /**
     * Optional. When true, allows callers to create [Certificates][google.cloud.security.privateca.v1.Certificate] by
     * specifying a [CertificateConfig][google.cloud.security.privateca.v1.CertificateConfig].
     *
     * Generated from protobuf field <code>bool allow_config_based_issuance = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $allow_config_based_issuance = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type bool $allow_csr_based_issuance
     *           Optional. When true, allows callers to create [Certificates][google.cloud.security.privateca.v1.Certificate] by
     *           specifying a CSR.
     *     @type bool $allow_config_based_issuance
     *           Optional. When true, allows callers to create [Certificates][google.cloud.security.privateca.v1.Certificate] by
     *           specifying a [CertificateConfig][google.cloud.security.privateca.v1.CertificateConfig].
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Security\Privateca\V1\Resources::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. When true, allows callers to create [Certificates][google.cloud.security.privateca.v1.Certificate] by
     * specifying a CSR.
     *
     * Generated from protobuf field <code>bool allow_csr_based_issuance = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return bool
     */
    public function getAllowCsrBasedIssuance()
    {
        return $this->allow_csr_based_issuance;
    }

    /**
     * Optional. When true, allows callers to create [Certificates][google.cloud.security.privateca.v1.Certificate] by
     * specifying a CSR.
     *
     * Generated from protobuf field <code>bool allow_csr_based_issuance = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param bool $var
     * @return $this
     */
    public function setAllowCsrBasedIssuance($var)
    {
        GPBUtil::checkBool($var);
        $this->allow_csr_based_issuance = $var;

        return $this;
    }

    /**
     * Optional. When true, allows callers to create [Certificates][google.cloud.security.privateca.v1.Certificate] by
     * specifying a [CertificateConfig][google.cloud.security.privateca.v1.CertificateConfig].
     *
     * Generated from protobuf field <code>bool allow_config_based_issuance = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return bool
     */
    public function getAllowConfigBasedIssuance()
    {
        return $this->allow_config_based_issuance;
    }

    /**
     * Optional. When true, allows callers to create [Certificates][google.cloud.security.privateca.v1.Certificate] by
     * specifying a [CertificateConfig][google.cloud.security.privateca.v1.CertificateConfig].
     *
     * Generated from protobuf field <code>bool allow_config_based_issuance = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param bool $var
     * @return $this
     */
    public function setAllowConfigBasedIssuance($var)
    {
        GPBUtil::checkBool($var);
        $this->allow_config_based_issuance = $var;

        return $this;
    }

}


