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

namespace Google\Cloud\Security\PrivateCA\V1\KeyUsage;

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

/**
 * [KeyUsage.KeyUsageOptions][google.cloud.security.privateca.v1.KeyUsage.KeyUsageOptions]
 * corresponds to the key usage values described in
 * https://tools.ietf.org/html/rfc5280#section-4.2.1.3.
 *
 * Generated from protobuf message <code>google.cloud.security.privateca.v1.KeyUsage.KeyUsageOptions</code>
 */
class KeyUsageOptions extends \Google\Protobuf\Internal\Message
{
    /**
     * The key may be used for digital signatures.
     *
     * Generated from protobuf field <code>bool digital_signature = 1;</code>
     */
    private $digital_signature = false;
    /**
     * The key may be used for cryptographic commitments. Note that this may
     * also be referred to as "non-repudiation".
     *
     * Generated from protobuf field <code>bool content_commitment = 2;</code>
     */
    private $content_commitment = false;
    /**
     * The key may be used to encipher other keys.
     *
     * Generated from protobuf field <code>bool key_encipherment = 3;</code>
     */
    private $key_encipherment = false;
    /**
     * The key may be used to encipher data.
     *
     * Generated from protobuf field <code>bool data_encipherment = 4;</code>
     */
    private $data_encipherment = false;
    /**
     * The key may be used in a key agreement protocol.
     *
     * Generated from protobuf field <code>bool key_agreement = 5;</code>
     */
    private $key_agreement = false;
    /**
     * The key may be used to sign certificates.
     *
     * Generated from protobuf field <code>bool cert_sign = 6;</code>
     */
    private $cert_sign = false;
    /**
     * The key may be used sign certificate revocation lists.
     *
     * Generated from protobuf field <code>bool crl_sign = 7;</code>
     */
    private $crl_sign = false;
    /**
     * The key may be used to encipher only.
     *
     * Generated from protobuf field <code>bool encipher_only = 8;</code>
     */
    private $encipher_only = false;
    /**
     * The key may be used to decipher only.
     *
     * Generated from protobuf field <code>bool decipher_only = 9;</code>
     */
    private $decipher_only = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type bool $digital_signature
     *           The key may be used for digital signatures.
     *     @type bool $content_commitment
     *           The key may be used for cryptographic commitments. Note that this may
     *           also be referred to as "non-repudiation".
     *     @type bool $key_encipherment
     *           The key may be used to encipher other keys.
     *     @type bool $data_encipherment
     *           The key may be used to encipher data.
     *     @type bool $key_agreement
     *           The key may be used in a key agreement protocol.
     *     @type bool $cert_sign
     *           The key may be used to sign certificates.
     *     @type bool $crl_sign
     *           The key may be used sign certificate revocation lists.
     *     @type bool $encipher_only
     *           The key may be used to encipher only.
     *     @type bool $decipher_only
     *           The key may be used to decipher only.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Security\Privateca\V1\Resources::initOnce();
        parent::__construct($data);
    }

    /**
     * The key may be used for digital signatures.
     *
     * Generated from protobuf field <code>bool digital_signature = 1;</code>
     * @return bool
     */
    public function getDigitalSignature()
    {
        return $this->digital_signature;
    }

    /**
     * The key may be used for digital signatures.
     *
     * Generated from protobuf field <code>bool digital_signature = 1;</code>
     * @param bool $var
     * @return $this
     */
    public function setDigitalSignature($var)
    {
        GPBUtil::checkBool($var);
        $this->digital_signature = $var;

        return $this;
    }

    /**
     * The key may be used for cryptographic commitments. Note that this may
     * also be referred to as "non-repudiation".
     *
     * Generated from protobuf field <code>bool content_commitment = 2;</code>
     * @return bool
     */
    public function getContentCommitment()
    {
        return $this->content_commitment;
    }

    /**
     * The key may be used for cryptographic commitments. Note that this may
     * also be referred to as "non-repudiation".
     *
     * Generated from protobuf field <code>bool content_commitment = 2;</code>
     * @param bool $var
     * @return $this
     */
    public function setContentCommitment($var)
    {
        GPBUtil::checkBool($var);
        $this->content_commitment = $var;

        return $this;
    }

    /**
     * The key may be used to encipher other keys.
     *
     * Generated from protobuf field <code>bool key_encipherment = 3;</code>
     * @return bool
     */
    public function getKeyEncipherment()
    {
        return $this->key_encipherment;
    }

    /**
     * The key may be used to encipher other keys.
     *
     * Generated from protobuf field <code>bool key_encipherment = 3;</code>
     * @param bool $var
     * @return $this
     */
    public function setKeyEncipherment($var)
    {
        GPBUtil::checkBool($var);
        $this->key_encipherment = $var;

        return $this;
    }

    /**
     * The key may be used to encipher data.
     *
     * Generated from protobuf field <code>bool data_encipherment = 4;</code>
     * @return bool
     */
    public function getDataEncipherment()
    {
        return $this->data_encipherment;
    }

    /**
     * The key may be used to encipher data.
     *
     * Generated from protobuf field <code>bool data_encipherment = 4;</code>
     * @param bool $var
     * @return $this
     */
    public function setDataEncipherment($var)
    {
        GPBUtil::checkBool($var);
        $this->data_encipherment = $var;

        return $this;
    }

    /**
     * The key may be used in a key agreement protocol.
     *
     * Generated from protobuf field <code>bool key_agreement = 5;</code>
     * @return bool
     */
    public function getKeyAgreement()
    {
        return $this->key_agreement;
    }

    /**
     * The key may be used in a key agreement protocol.
     *
     * Generated from protobuf field <code>bool key_agreement = 5;</code>
     * @param bool $var
     * @return $this
     */
    public function setKeyAgreement($var)
    {
        GPBUtil::checkBool($var);
        $this->key_agreement = $var;

        return $this;
    }

    /**
     * The key may be used to sign certificates.
     *
     * Generated from protobuf field <code>bool cert_sign = 6;</code>
     * @return bool
     */
    public function getCertSign()
    {
        return $this->cert_sign;
    }

    /**
     * The key may be used to sign certificates.
     *
     * Generated from protobuf field <code>bool cert_sign = 6;</code>
     * @param bool $var
     * @return $this
     */
    public function setCertSign($var)
    {
        GPBUtil::checkBool($var);
        $this->cert_sign = $var;

        return $this;
    }

    /**
     * The key may be used sign certificate revocation lists.
     *
     * Generated from protobuf field <code>bool crl_sign = 7;</code>
     * @return bool
     */
    public function getCrlSign()
    {
        return $this->crl_sign;
    }

    /**
     * The key may be used sign certificate revocation lists.
     *
     * Generated from protobuf field <code>bool crl_sign = 7;</code>
     * @param bool $var
     * @return $this
     */
    public function setCrlSign($var)
    {
        GPBUtil::checkBool($var);
        $this->crl_sign = $var;

        return $this;
    }

    /**
     * The key may be used to encipher only.
     *
     * Generated from protobuf field <code>bool encipher_only = 8;</code>
     * @return bool
     */
    public function getEncipherOnly()
    {
        return $this->encipher_only;
    }

    /**
     * The key may be used to encipher only.
     *
     * Generated from protobuf field <code>bool encipher_only = 8;</code>
     * @param bool $var
     * @return $this
     */
    public function setEncipherOnly($var)
    {
        GPBUtil::checkBool($var);
        $this->encipher_only = $var;

        return $this;
    }

    /**
     * The key may be used to decipher only.
     *
     * Generated from protobuf field <code>bool decipher_only = 9;</code>
     * @return bool
     */
    public function getDecipherOnly()
    {
        return $this->decipher_only;
    }

    /**
     * The key may be used to decipher only.
     *
     * Generated from protobuf field <code>bool decipher_only = 9;</code>
     * @param bool $var
     * @return $this
     */
    public function setDecipherOnly($var)
    {
        GPBUtil::checkBool($var);
        $this->decipher_only = $var;

        return $this;
    }

}


