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

namespace Google\Cloud\Ces\V1;

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

/**
 * Settings for custom client certificates.
 *
 * Generated from protobuf message <code>google.cloud.ces.v1.ClientCertificateSettings</code>
 */
class ClientCertificateSettings extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The TLS certificate encoded in PEM format. This string must
     * include the begin header and end footer lines.
     *
     * Generated from protobuf field <code>string tls_certificate = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $tls_certificate = '';
    /**
     * Required. The name of the SecretManager secret version resource storing the
     * private key encoded in PEM format.
     * Format: `projects/{project}/secrets/{secret}/versions/{version}`
     *
     * Generated from protobuf field <code>string private_key = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    protected $private_key = '';
    /**
     * Optional. The name of the SecretManager secret version resource storing the
     * passphrase to decrypt the private key. Should be left unset if the private
     * key is not encrypted.
     * Format: `projects/{project}/secrets/{secret}/versions/{version}`
     *
     * Generated from protobuf field <code>string passphrase = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $passphrase = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $tls_certificate
     *           Required. The TLS certificate encoded in PEM format. This string must
     *           include the begin header and end footer lines.
     *     @type string $private_key
     *           Required. The name of the SecretManager secret version resource storing the
     *           private key encoded in PEM format.
     *           Format: `projects/{project}/secrets/{secret}/versions/{version}`
     *     @type string $passphrase
     *           Optional. The name of the SecretManager secret version resource storing the
     *           passphrase to decrypt the private key. Should be left unset if the private
     *           key is not encrypted.
     *           Format: `projects/{project}/secrets/{secret}/versions/{version}`
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Ces\V1\App::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The TLS certificate encoded in PEM format. This string must
     * include the begin header and end footer lines.
     *
     * Generated from protobuf field <code>string tls_certificate = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getTlsCertificate()
    {
        return $this->tls_certificate;
    }

    /**
     * Required. The TLS certificate encoded in PEM format. This string must
     * include the begin header and end footer lines.
     *
     * Generated from protobuf field <code>string tls_certificate = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setTlsCertificate($var)
    {
        GPBUtil::checkString($var, True);
        $this->tls_certificate = $var;

        return $this;
    }

    /**
     * Required. The name of the SecretManager secret version resource storing the
     * private key encoded in PEM format.
     * Format: `projects/{project}/secrets/{secret}/versions/{version}`
     *
     * Generated from protobuf field <code>string private_key = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getPrivateKey()
    {
        return $this->private_key;
    }

    /**
     * Required. The name of the SecretManager secret version resource storing the
     * private key encoded in PEM format.
     * Format: `projects/{project}/secrets/{secret}/versions/{version}`
     *
     * Generated from protobuf field <code>string private_key = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setPrivateKey($var)
    {
        GPBUtil::checkString($var, True);
        $this->private_key = $var;

        return $this;
    }

    /**
     * Optional. The name of the SecretManager secret version resource storing the
     * passphrase to decrypt the private key. Should be left unset if the private
     * key is not encrypted.
     * Format: `projects/{project}/secrets/{secret}/versions/{version}`
     *
     * Generated from protobuf field <code>string passphrase = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getPassphrase()
    {
        return $this->passphrase;
    }

    /**
     * Optional. The name of the SecretManager secret version resource storing the
     * passphrase to decrypt the private key. Should be left unset if the private
     * key is not encrypted.
     * Format: `projects/{project}/secrets/{secret}/versions/{version}`
     *
     * Generated from protobuf field <code>string passphrase = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setPassphrase($var)
    {
        GPBUtil::checkString($var, True);
        $this->passphrase = $var;

        return $this;
    }

}

