<?php
 
 
 

namespace PhpWA\Protocol\Proto;

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




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


    protected $key = null;
    


    protected $text = null;
    


    protected $groupingKey = null;
    


    protected $senderTimestampMs = null;
    


    protected $unread = null;

    












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

    



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

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

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

    




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

        return $this;
    }

    



    public function getText()
    {
        return isset($this->text) ? $this->text : '';
    }

    public function hasText()
    {
        return isset($this->text);
    }

    public function clearText()
    {
        unset($this->text);
    }

    




    public function setText($var)
    {
        GPBUtil::checkString($var, True);
        $this->text = $var;

        return $this;
    }

    



    public function getGroupingKey()
    {
        return isset($this->groupingKey) ? $this->groupingKey : '';
    }

    public function hasGroupingKey()
    {
        return isset($this->groupingKey);
    }

    public function clearGroupingKey()
    {
        unset($this->groupingKey);
    }

    




    public function setGroupingKey($var)
    {
        GPBUtil::checkString($var, True);
        $this->groupingKey = $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 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;
    }

}

