<?php
 
 
 

namespace PhpWA\Protocol\Proto;

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




class PollUpdate extends \Google\Protobuf\Internal\Message
{
    


    protected $pollUpdateMessageKey = null;
    


    protected $vote = null;
    


    protected $senderTimestampMs = null;
    


    protected $serverTimestampMs = null;
    


    protected $unread = null;

    












    public function __construct($data = NULL) {
        \PhpWA\Protocol\Proto\Metadata\WAProto::initOnce();
        parent::__construct($data);
    }

    



    public function getPollUpdateMessageKey()
    {
        return $this->pollUpdateMessageKey;
    }

    public function hasPollUpdateMessageKey()
    {
        return isset($this->pollUpdateMessageKey);
    }

    public function clearPollUpdateMessageKey()
    {
        unset($this->pollUpdateMessageKey);
    }

    




    public function setPollUpdateMessageKey($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\MessageKey::class);
        $this->pollUpdateMessageKey = $var;

        return $this;
    }

    



    public function getVote()
    {
        return $this->vote;
    }

    public function hasVote()
    {
        return isset($this->vote);
    }

    public function clearVote()
    {
        unset($this->vote);
    }

    




    public function setVote($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\Message\PollVoteMessage::class);
        $this->vote = $var;

        return $this;
    }

    



    public function getSenderTimestampMs()
    {
        return isset($this->senderTimestampMs) ? $this->senderTimestampMs : 0;
    }

    public function hasSenderTimestampMs()
    {
        return isset($this->senderTimestampMs);
    }

    public function clearSenderTimestampMs()
    {
        unset($this->senderTimestampMs);
    }

    




    public function setSenderTimestampMs($var)
    {
        GPBUtil::checkInt64($var);
        $this->senderTimestampMs = $var;

        return $this;
    }

    



    public function getServerTimestampMs()
    {
        return isset($this->serverTimestampMs) ? $this->serverTimestampMs : 0;
    }

    public function hasServerTimestampMs()
    {
        return isset($this->serverTimestampMs);
    }

    public function clearServerTimestampMs()
    {
        unset($this->serverTimestampMs);
    }

    




    public function setServerTimestampMs($var)
    {
        GPBUtil::checkInt64($var);
        $this->serverTimestampMs = $var;

        return $this;
    }

    



    public function getUnread()
    {
        return isset($this->unread) ? $this->unread : false;
    }

    public function hasUnread()
    {
        return isset($this->unread);
    }

    public function clearUnread()
    {
        unset($this->unread);
    }

    




    public function setUnread($var)
    {
        GPBUtil::checkBool($var);
        $this->unread = $var;

        return $this;
    }

}

