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

namespace PhpWA\Protocol\Proto\CertChain\NoiseCertificate;

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

/**
 * Generated from protobuf message <code>proto.CertChain.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 uint32 issuerSerial = 2;</code>
     */
    protected $issuerSerial = null;
    /**
     * Generated from protobuf field <code>optional bytes key = 3;</code>
     */
    protected $key = null;
    /**
     * Generated from protobuf field <code>optional uint64 notBefore = 4;</code>
     */
    protected $notBefore = null;
    /**
     * Generated from protobuf field <code>optional uint64 notAfter = 5;</code>
     */
    protected $notAfter = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $serial
     *     @type int $issuerSerial
     *     @type string $key
     *     @type int|string $notBefore
     *     @type int|string $notAfter
     * }
     */
    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 uint32 issuerSerial = 2;</code>
     * @return int
     */
    public function getIssuerSerial()
    {
        return isset($this->issuerSerial) ? $this->issuerSerial : 0;
    }

    public function hasIssuerSerial()
    {
        return isset($this->issuerSerial);
    }

    public function clearIssuerSerial()
    {
        unset($this->issuerSerial);
    }

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

        return $this;
    }

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

        return $this;
    }

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

    public function hasNotBefore()
    {
        return isset($this->notBefore);
    }

    public function clearNotBefore()
    {
        unset($this->notBefore);
    }

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

        return $this;
    }

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

    public function hasNotAfter()
    {
        return isset($this->notAfter);
    }

    public function clearNotAfter()
    {
        unset($this->notAfter);
    }

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

        return $this;
    }

}

