<?php
 
 
 

namespace PhpWA\Protocol\Proto;

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




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


    protected $type = null;
    


    protected $key = null;
    


    protected $senderTimestampMs = null;
    


    protected $serverTimestampMs = null;
    


    protected $messageAddOnContextInfo = null;

    












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

    



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

    public function hasType()
    {
        return isset($this->type);
    }

    public function clearType()
    {
        unset($this->type);
    }

    




    public function setType($var)
    {
        GPBUtil::checkEnum($var, \PhpWA\Protocol\Proto\PinInChat\Type::class);
        $this->type = $var;

        return $this;
    }

    



    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 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 getMessageAddOnContextInfo()
    {
        return $this->messageAddOnContextInfo;
    }

    public function hasMessageAddOnContextInfo()
    {
        return isset($this->messageAddOnContextInfo);
    }

    public function clearMessageAddOnContextInfo()
    {
        unset($this->messageAddOnContextInfo);
    }

    




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

        return $this;
    }

}

