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

namespace Google\Cloud\Datastream\V1;

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

/**
 * MySQL SSL configuration information.
 *
 * Generated from protobuf message <code>google.cloud.datastream.v1.MysqlSslConfig</code>
 */
class MysqlSslConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * Input only. PEM-encoded private key associated with the Client Certificate.
     * If this field is used then the 'client_certificate' and the
     * 'ca_certificate' fields are mandatory.
     *
     * Generated from protobuf field <code>string client_key = 1 [(.google.api.field_behavior) = INPUT_ONLY];</code>
     */
    private $client_key = '';
    /**
     * Output only. Indicates whether the client_key field is set.
     *
     * Generated from protobuf field <code>bool client_key_set = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $client_key_set = false;
    /**
     * Input only. PEM-encoded certificate that will be used by the replica to
     * authenticate against the source database server. If this field is used
     * then the 'client_key' and the 'ca_certificate' fields are mandatory.
     *
     * Generated from protobuf field <code>string client_certificate = 3 [(.google.api.field_behavior) = INPUT_ONLY];</code>
     */
    private $client_certificate = '';
    /**
     * Output only. Indicates whether the client_certificate field is set.
     *
     * Generated from protobuf field <code>bool client_certificate_set = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $client_certificate_set = false;
    /**
     * Input only. PEM-encoded certificate of the CA that signed the source database
     * server's certificate.
     *
     * Generated from protobuf field <code>string ca_certificate = 5 [(.google.api.field_behavior) = INPUT_ONLY];</code>
     */
    private $ca_certificate = '';
    /**
     * Output only. Indicates whether the ca_certificate field is set.
     *
     * Generated from protobuf field <code>bool ca_certificate_set = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $ca_certificate_set = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $client_key
     *           Input only. PEM-encoded private key associated with the Client Certificate.
     *           If this field is used then the 'client_certificate' and the
     *           'ca_certificate' fields are mandatory.
     *     @type bool $client_key_set
     *           Output only. Indicates whether the client_key field is set.
     *     @type string $client_certificate
     *           Input only. PEM-encoded certificate that will be used by the replica to
     *           authenticate against the source database server. If this field is used
     *           then the 'client_key' and the 'ca_certificate' fields are mandatory.
     *     @type bool $client_certificate_set
     *           Output only. Indicates whether the client_certificate field is set.
     *     @type string $ca_certificate
     *           Input only. PEM-encoded certificate of the CA that signed the source database
     *           server's certificate.
     *     @type bool $ca_certificate_set
     *           Output only. Indicates whether the ca_certificate field is set.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce();
        parent::__construct($data);
    }

    /**
     * Input only. PEM-encoded private key associated with the Client Certificate.
     * If this field is used then the 'client_certificate' and the
     * 'ca_certificate' fields are mandatory.
     *
     * Generated from protobuf field <code>string client_key = 1 [(.google.api.field_behavior) = INPUT_ONLY];</code>
     * @return string
     */
    public function getClientKey()
    {
        return $this->client_key;
    }

    /**
     * Input only. PEM-encoded private key associated with the Client Certificate.
     * If this field is used then the 'client_certificate' and the
     * 'ca_certificate' fields are mandatory.
     *
     * Generated from protobuf field <code>string client_key = 1 [(.google.api.field_behavior) = INPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setClientKey($var)
    {
        GPBUtil::checkString($var, True);
        $this->client_key = $var;

        return $this;
    }

    /**
     * Output only. Indicates whether the client_key field is set.
     *
     * Generated from protobuf field <code>bool client_key_set = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return bool
     */
    public function getClientKeySet()
    {
        return $this->client_key_set;
    }

    /**
     * Output only. Indicates whether the client_key field is set.
     *
     * Generated from protobuf field <code>bool client_key_set = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param bool $var
     * @return $this
     */
    public function setClientKeySet($var)
    {
        GPBUtil::checkBool($var);
        $this->client_key_set = $var;

        return $this;
    }

    /**
     * Input only. PEM-encoded certificate that will be used by the replica to
     * authenticate against the source database server. If this field is used
     * then the 'client_key' and the 'ca_certificate' fields are mandatory.
     *
     * Generated from protobuf field <code>string client_certificate = 3 [(.google.api.field_behavior) = INPUT_ONLY];</code>
     * @return string
     */
    public function getClientCertificate()
    {
        return $this->client_certificate;
    }

    /**
     * Input only. PEM-encoded certificate that will be used by the replica to
     * authenticate against the source database server. If this field is used
     * then the 'client_key' and the 'ca_certificate' fields are mandatory.
     *
     * Generated from protobuf field <code>string client_certificate = 3 [(.google.api.field_behavior) = INPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setClientCertificate($var)
    {
        GPBUtil::checkString($var, True);
        $this->client_certificate = $var;

        return $this;
    }

    /**
     * Output only. Indicates whether the client_certificate field is set.
     *
     * Generated from protobuf field <code>bool client_certificate_set = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return bool
     */
    public function getClientCertificateSet()
    {
        return $this->client_certificate_set;
    }

    /**
     * Output only. Indicates whether the client_certificate field is set.
     *
     * Generated from protobuf field <code>bool client_certificate_set = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param bool $var
     * @return $this
     */
    public function setClientCertificateSet($var)
    {
        GPBUtil::checkBool($var);
        $this->client_certificate_set = $var;

        return $this;
    }

    /**
     * Input only. PEM-encoded certificate of the CA that signed the source database
     * server's certificate.
     *
     * Generated from protobuf field <code>string ca_certificate = 5 [(.google.api.field_behavior) = INPUT_ONLY];</code>
     * @return string
     */
    public function getCaCertificate()
    {
        return $this->ca_certificate;
    }

    /**
     * Input only. PEM-encoded certificate of the CA that signed the source database
     * server's certificate.
     *
     * Generated from protobuf field <code>string ca_certificate = 5 [(.google.api.field_behavior) = INPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setCaCertificate($var)
    {
        GPBUtil::checkString($var, True);
        $this->ca_certificate = $var;

        return $this;
    }

    /**
     * Output only. Indicates whether the ca_certificate field is set.
     *
     * Generated from protobuf field <code>bool ca_certificate_set = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return bool
     */
    public function getCaCertificateSet()
    {
        return $this->ca_certificate_set;
    }

    /**
     * Output only. Indicates whether the ca_certificate field is set.
     *
     * Generated from protobuf field <code>bool ca_certificate_set = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param bool $var
     * @return $this
     */
    public function setCaCertificateSet($var)
    {
        GPBUtil::checkBool($var);
        $this->ca_certificate_set = $var;

        return $this;
    }

}

