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

namespace Google\Cloud\Redis\V1;

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

/**
 * TlsCertificate Resource
 *
 * Generated from protobuf message <code>google.cloud.redis.v1.TlsCertificate</code>
 */
class TlsCertificate extends \Google\Protobuf\Internal\Message
{
    /**
     * Serial number, as extracted from the certificate.
     *
     * Generated from protobuf field <code>string serial_number = 1;</code>
     */
    private $serial_number = '';
    /**
     * PEM representation.
     *
     * Generated from protobuf field <code>string cert = 2;</code>
     */
    private $cert = '';
    /**
     * Output only. The time when the certificate was created in [RFC
     * 3339](https://tools.ietf.org/html/rfc3339) format, for example
     * `2020-05-18T00:00:00.094Z`.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $create_time = null;
    /**
     * Output only. The time when the certificate expires in [RFC
     * 3339](https://tools.ietf.org/html/rfc3339) format, for example
     * `2020-05-18T00:00:00.094Z`.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp expire_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $expire_time = null;
    /**
     * Sha1 Fingerprint of the certificate.
     *
     * Generated from protobuf field <code>string sha1_fingerprint = 5;</code>
     */
    private $sha1_fingerprint = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $serial_number
     *           Serial number, as extracted from the certificate.
     *     @type string $cert
     *           PEM representation.
     *     @type \Google\Protobuf\Timestamp $create_time
     *           Output only. The time when the certificate was created in [RFC
     *           3339](https://tools.ietf.org/html/rfc3339) format, for example
     *           `2020-05-18T00:00:00.094Z`.
     *     @type \Google\Protobuf\Timestamp $expire_time
     *           Output only. The time when the certificate expires in [RFC
     *           3339](https://tools.ietf.org/html/rfc3339) format, for example
     *           `2020-05-18T00:00:00.094Z`.
     *     @type string $sha1_fingerprint
     *           Sha1 Fingerprint of the certificate.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Redis\V1\CloudRedis::initOnce();
        parent::__construct($data);
    }

    /**
     * Serial number, as extracted from the certificate.
     *
     * Generated from protobuf field <code>string serial_number = 1;</code>
     * @return string
     */
    public function getSerialNumber()
    {
        return $this->serial_number;
    }

    /**
     * Serial number, as extracted from the certificate.
     *
     * Generated from protobuf field <code>string serial_number = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setSerialNumber($var)
    {
        GPBUtil::checkString($var, True);
        $this->serial_number = $var;

        return $this;
    }

    /**
     * PEM representation.
     *
     * Generated from protobuf field <code>string cert = 2;</code>
     * @return string
     */
    public function getCert()
    {
        return $this->cert;
    }

    /**
     * PEM representation.
     *
     * Generated from protobuf field <code>string cert = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setCert($var)
    {
        GPBUtil::checkString($var, True);
        $this->cert = $var;

        return $this;
    }

    /**
     * Output only. The time when the certificate was created in [RFC
     * 3339](https://tools.ietf.org/html/rfc3339) format, for example
     * `2020-05-18T00:00:00.094Z`.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getCreateTime()
    {
        return $this->create_time;
    }

    public function hasCreateTime()
    {
        return isset($this->create_time);
    }

    public function clearCreateTime()
    {
        unset($this->create_time);
    }

    /**
     * Output only. The time when the certificate was created in [RFC
     * 3339](https://tools.ietf.org/html/rfc3339) format, for example
     * `2020-05-18T00:00:00.094Z`.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setCreateTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->create_time = $var;

        return $this;
    }

    /**
     * Output only. The time when the certificate expires in [RFC
     * 3339](https://tools.ietf.org/html/rfc3339) format, for example
     * `2020-05-18T00:00:00.094Z`.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp expire_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getExpireTime()
    {
        return $this->expire_time;
    }

    public function hasExpireTime()
    {
        return isset($this->expire_time);
    }

    public function clearExpireTime()
    {
        unset($this->expire_time);
    }

    /**
     * Output only. The time when the certificate expires in [RFC
     * 3339](https://tools.ietf.org/html/rfc3339) format, for example
     * `2020-05-18T00:00:00.094Z`.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp expire_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setExpireTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->expire_time = $var;

        return $this;
    }

    /**
     * Sha1 Fingerprint of the certificate.
     *
     * Generated from protobuf field <code>string sha1_fingerprint = 5;</code>
     * @return string
     */
    public function getSha1Fingerprint()
    {
        return $this->sha1_fingerprint;
    }

    /**
     * Sha1 Fingerprint of the certificate.
     *
     * Generated from protobuf field <code>string sha1_fingerprint = 5;</code>
     * @param string $var
     * @return $this
     */
    public function setSha1Fingerprint($var)
    {
        GPBUtil::checkString($var, True);
        $this->sha1_fingerprint = $var;

        return $this;
    }

}

