<?php
 
 
 

namespace PhpWA\Protocol\Proto;

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




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


    protected $messageAddOnType = null;
    


    protected $messageAddOn = null;
    


    protected $senderTimestampMs = null;
    


    protected $serverTimestampMs = null;
    


    protected $status = null;
    


    protected $addOnContextInfo = null;
    


    protected $messageAddOnKey = null;
    


    protected $legacyMessage = null;

    















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

    



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

    public function hasMessageAddOnType()
    {
        return isset($this->messageAddOnType);
    }

    public function clearMessageAddOnType()
    {
        unset($this->messageAddOnType);
    }

    




    public function setMessageAddOnType($var)
    {
        GPBUtil::checkEnum($var, \PhpWA\Protocol\Proto\MessageAddOn\MessageAddOnType::class);
        $this->messageAddOnType = $var;

        return $this;
    }

    



    public function getMessageAddOn()
    {
        return $this->messageAddOn;
    }

    public function hasMessageAddOn()
    {
        return isset($this->messageAddOn);
    }

    public function clearMessageAddOn()
    {
        unset($this->messageAddOn);
    }

    




    public function setMessageAddOn($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\Message::class);
        $this->messageAddOn = $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 getStatus()
    {
        return isset($this->status) ? $this->status : 0;
    }

    public function hasStatus()
    {
        return isset($this->status);
    }

    public function clearStatus()
    {
        unset($this->status);
    }

    




    public function setStatus($var)
    {
        GPBUtil::checkEnum($var, \PhpWA\Protocol\Proto\WebMessageInfo\Status::class);
        $this->status = $var;

        return $this;
    }

    



    public function getAddOnContextInfo()
    {
        return $this->addOnContextInfo;
    }

    public function hasAddOnContextInfo()
    {
        return isset($this->addOnContextInfo);
    }

    public function clearAddOnContextInfo()
    {
        unset($this->addOnContextInfo);
    }

    




    public function setAddOnContextInfo($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\MessageAddOnContextInfo::class);
        $this->addOnContextInfo = $var;

        return $this;
    }

    



    public function getMessageAddOnKey()
    {
        return $this->messageAddOnKey;
    }

    public function hasMessageAddOnKey()
    {
        return isset($this->messageAddOnKey);
    }

    public function clearMessageAddOnKey()
    {
        unset($this->messageAddOnKey);
    }

    




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

        return $this;
    }

    



    public function getLegacyMessage()
    {
        return $this->legacyMessage;
    }

    public function hasLegacyMessage()
    {
        return isset($this->legacyMessage);
    }

    public function clearLegacyMessage()
    {
        unset($this->legacyMessage);
    }

    




    public function setLegacyMessage($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\LegacyMessage::class);
        $this->legacyMessage = $var;

        return $this;
    }

}

