<?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;

/**
 * MongoDB SSL configuration information.
 *
 * Generated from protobuf message <code>google.cloud.datastream.v1.MongodbSslConfig</code>
 */
class MongodbSslConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * Optional. 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, (.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $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>
     */
    protected $client_key_set = false;
    /**
     * Optional. 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, (.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $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>
     */
    protected $client_certificate_set = false;
    /**
     * Optional. 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, (.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $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>
     */
    protected $ca_certificate_set = false;
    /**
     * Optional. Input only. A reference to a Secret Manager resource name storing
     * the 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. Mutually exclusive with the `client_key` field.
     *
     * Generated from protobuf field <code>string secret_manager_stored_client_key = 7 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $secret_manager_stored_client_key = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $client_key
     *           Optional. 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
     *           Optional. 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
     *           Optional. 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.
     *     @type string $secret_manager_stored_client_key
     *           Optional. Input only. A reference to a Secret Manager resource name storing
     *           the 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. Mutually exclusive with the `client_key` field.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. 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, (.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getClientKey()
    {
        return $this->client_key;
    }

    /**
     * Optional. 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, (.google.api.field_behavior) = OPTIONAL];</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;
    }

    /**
     * Optional. 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, (.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getClientCertificate()
    {
        return $this->client_certificate;
    }

    /**
     * Optional. 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, (.google.api.field_behavior) = OPTIONAL];</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;
    }

    /**
     * Optional. 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, (.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getCaCertificate()
    {
        return $this->ca_certificate;
    }

    /**
     * Optional. 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, (.google.api.field_behavior) = OPTIONAL];</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;
    }

    /**
     * Optional. Input only. A reference to a Secret Manager resource name storing
     * the 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. Mutually exclusive with the `client_key` field.
     *
     * Generated from protobuf field <code>string secret_manager_stored_client_key = 7 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getSecretManagerStoredClientKey()
    {
        return $this->secret_manager_stored_client_key;
    }

    /**
     * Optional. Input only. A reference to a Secret Manager resource name storing
     * the 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. Mutually exclusive with the `client_key` field.
     *
     * Generated from protobuf field <code>string secret_manager_stored_client_key = 7 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setSecretManagerStoredClientKey($var)
    {
        GPBUtil::checkString($var, True);
        $this->secret_manager_stored_client_key = $var;

        return $this;
    }

}

