<?php
 
 
 

namespace PhpWA\Protocol\Proto\Message;

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




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


    private $historyReceivers;
    


    protected $oldestMessageTimestamp = null;
    


    protected $messageCount = null;

    










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

    



    public function getHistoryReceivers()
    {
        return $this->historyReceivers;
    }

    




    public function setHistoryReceivers($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->historyReceivers = $arr;

        return $this;
    }

    



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

    public function hasOldestMessageTimestamp()
    {
        return isset($this->oldestMessageTimestamp);
    }

    public function clearOldestMessageTimestamp()
    {
        unset($this->oldestMessageTimestamp);
    }

    




    public function setOldestMessageTimestamp($var)
    {
        GPBUtil::checkInt64($var);
        $this->oldestMessageTimestamp = $var;

        return $this;
    }

    



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

    public function hasMessageCount()
    {
        return isset($this->messageCount);
    }

    public function clearMessageCount()
    {
        unset($this->messageCount);
    }

    




    public function setMessageCount($var)
    {
        GPBUtil::checkInt64($var);
        $this->messageCount = $var;

        return $this;
    }

}

