<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# NO CHECKED-IN PROTOBUF GENCODE
# source: WAProto.proto

namespace PhpWA\Protocol\Proto\NoiseCertificate;

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

/**
 * Generated from protobuf message <code>proto.NoiseCertificate.Details</code>
 */
class Details extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional uint32 serial = 1;</code>
     */
    protected $serial = null;
    /**
     * Generated from protobuf field <code>optional string issuer = 2;</code>
     */
    protected $issuer = null;
    /**
     * Generated from protobuf field <code>optional uint64 expires = 3;</code>
     */
    protected $expires = null;
    /**
     * Generated from protobuf field <code>optional string subject = 4;</code>
     */
    protected $subject = null;
    /**
     * Generated from protobuf field <code>optional bytes key = 5;</code>
     */
    protected $key = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $serial
     *     @type string $issuer
     *     @type int|string $expires
     *     @type string $subject
     *     @type string $key
     * }
     */
    public function __construct($data = NULL) {
        \PhpWA\Protocol\Proto\Metadata\WAProto::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>optional uint32 serial = 1;</code>
     * @return int
     */
    public function getSerial()
    {
        return isset($this->serial) ? $this->serial : 0;
    }

    public function hasSerial()
    {
        return isset($this->serial);
    }

    public function clearSerial()
    {
        unset($this->serial);
    }

    /**
     * Generated from protobuf field <code>optional uint32 serial = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setSerial($var)
    {
        GPBUtil::checkUint32($var);
        $this->serial = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional string issuer = 2;</code>
     * @return string
     */
    public function getIssuer()
    {
        return isset($this->issuer) ? $this->issuer : '';
    }

    public function hasIssuer()
    {
        return isset($this->issuer);
    }

    public function clearIssuer()
    {
        unset($this->issuer);
    }

    /**
     * Generated from protobuf field <code>optional string issuer = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setIssuer($var)
    {
        GPBUtil::checkString($var, True);
        $this->issuer = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional uint64 expires = 3;</code>
     * @return int|string
     */
    public function getExpires()
    {
        return isset($this->expires) ? $this->expires : 0;
    }

    public function hasExpires()
    {
        return isset($this->expires);
    }

    public function clearExpires()
    {
        unset($this->expires);
    }

    /**
     * Generated from protobuf field <code>optional uint64 expires = 3;</code>
     * @param int|string $var
     * @return $this
     */
    public function setExpires($var)
    {
        GPBUtil::checkUint64($var);
        $this->expires = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional string subject = 4;</code>
     * @return string
     */
    public function getSubject()
    {
        return isset($this->subject) ? $this->subject : '';
    }

    public function hasSubject()
    {
        return isset($this->subject);
    }

    public function clearSubject()
    {
        unset($this->subject);
    }

    /**
     * Generated from protobuf field <code>optional string subject = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setSubject($var)
    {
        GPBUtil::checkString($var, True);
        $this->subject = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional bytes key = 5;</code>
     * @return string
     */
    public function getKey()
    {
        return isset($this->key) ? $this->key : '';
    }

    public function hasKey()
    {
        return isset($this->key);
    }

    public function clearKey()
    {
        unset($this->key);
    }

    /**
     * Generated from protobuf field <code>optional bytes key = 5;</code>
     * @param string $var
     * @return $this
     */
    public function setKey($var)
    {
        GPBUtil::checkString($var, False);
        $this->key = $var;

        return $this;
    }

}

