<?php
 
 
 

namespace PhpWA\Protocol\Proto\Message;

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




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


    protected $pollCreationMessageKey = null;
    


    protected $vote = null;
    


    protected $metadata = null;
    


    protected $senderTimestampMs = null;

    











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

    



    public function getPollCreationMessageKey()
    {
        return $this->pollCreationMessageKey;
    }

    public function hasPollCreationMessageKey()
    {
        return isset($this->pollCreationMessageKey);
    }

    public function clearPollCreationMessageKey()
    {
        unset($this->pollCreationMessageKey);
    }

    




    public function setPollCreationMessageKey($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\MessageKey::class);
        $this->pollCreationMessageKey = $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\PollEncValue::class);
        $this->vote = $var;

        return $this;
    }

    



    public function getMetadata()
    {
        return $this->metadata;
    }

    public function hasMetadata()
    {
        return isset($this->metadata);
    }

    public function clearMetadata()
    {
        unset($this->metadata);
    }

    




    public function setMetadata($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\Message\PollUpdateMessageMetadata::class);
        $this->metadata = $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;
    }

}

