<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/sql/v1beta4/cloud_sql_resources.proto

namespace Google\Cloud\Sql\V1beta4;

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

/**
 * SslCertDetail.
 *
 * Generated from protobuf message <code>google.cloud.sql.v1beta4.SslCertDetail</code>
 */
class SslCertDetail extends \Google\Protobuf\Internal\Message
{
    /**
     * The public information about the cert.
     *
     * Generated from protobuf field <code>.google.cloud.sql.v1beta4.SslCert cert_info = 1;</code>
     */
    private $cert_info = null;
    /**
     * The private key for the client cert, in pem format.  Keep private in order
     * to protect your security.
     *
     * Generated from protobuf field <code>string cert_private_key = 2;</code>
     */
    private $cert_private_key = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Sql\V1beta4\SslCert $cert_info
     *           The public information about the cert.
     *     @type string $cert_private_key
     *           The private key for the client cert, in pem format.  Keep private in order
     *           to protect your security.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce();
        parent::__construct($data);
    }

    /**
     * The public information about the cert.
     *
     * Generated from protobuf field <code>.google.cloud.sql.v1beta4.SslCert cert_info = 1;</code>
     * @return \Google\Cloud\Sql\V1beta4\SslCert|null
     */
    public function getCertInfo()
    {
        return $this->cert_info;
    }

    public function hasCertInfo()
    {
        return isset($this->cert_info);
    }

    public function clearCertInfo()
    {
        unset($this->cert_info);
    }

    /**
     * The public information about the cert.
     *
     * Generated from protobuf field <code>.google.cloud.sql.v1beta4.SslCert cert_info = 1;</code>
     * @param \Google\Cloud\Sql\V1beta4\SslCert $var
     * @return $this
     */
    public function setCertInfo($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\SslCert::class);
        $this->cert_info = $var;

        return $this;
    }

    /**
     * The private key for the client cert, in pem format.  Keep private in order
     * to protect your security.
     *
     * Generated from protobuf field <code>string cert_private_key = 2;</code>
     * @return string
     */
    public function getCertPrivateKey()
    {
        return $this->cert_private_key;
    }

    /**
     * The private key for the client cert, in pem format.  Keep private in order
     * to protect your security.
     *
     * Generated from protobuf field <code>string cert_private_key = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setCertPrivateKey($var)
    {
        GPBUtil::checkString($var, True);
        $this->cert_private_key = $var;

        return $this;
    }

}

