<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# NO CHECKED-IN PROTOBUF GENCODE
# source: WAProto.proto

namespace PhpWA\Protocol\Proto\Message\PeerDataOperationRequestMessage;

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

/**
 * Generated from protobuf message <code>proto.Message.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest</code>
 */
class HistorySyncOnDemandRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional string chatJid = 1;</code>
     */
    protected $chatJid = null;
    /**
     * Generated from protobuf field <code>optional string oldestMsgId = 2;</code>
     */
    protected $oldestMsgId = null;
    /**
     * Generated from protobuf field <code>optional bool oldestMsgFromMe = 3;</code>
     */
    protected $oldestMsgFromMe = null;
    /**
     * Generated from protobuf field <code>optional int32 onDemandMsgCount = 4;</code>
     */
    protected $onDemandMsgCount = null;
    /**
     * Generated from protobuf field <code>optional int64 oldestMsgTimestampMs = 5;</code>
     */
    protected $oldestMsgTimestampMs = null;
    /**
     * Generated from protobuf field <code>optional string accountLid = 6;</code>
     */
    protected $accountLid = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $chatJid
     *     @type string $oldestMsgId
     *     @type bool $oldestMsgFromMe
     *     @type int $onDemandMsgCount
     *     @type int|string $oldestMsgTimestampMs
     *     @type string $accountLid
     * }
     */
    public function __construct($data = NULL) {
        \PhpWA\Protocol\Proto\Metadata\WAProto::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>optional string chatJid = 1;</code>
     * @return string
     */
    public function getChatJid()
    {
        return isset($this->chatJid) ? $this->chatJid : '';
    }

    public function hasChatJid()
    {
        return isset($this->chatJid);
    }

    public function clearChatJid()
    {
        unset($this->chatJid);
    }

    /**
     * Generated from protobuf field <code>optional string chatJid = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setChatJid($var)
    {
        GPBUtil::checkString($var, True);
        $this->chatJid = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional string oldestMsgId = 2;</code>
     * @return string
     */
    public function getOldestMsgId()
    {
        return isset($this->oldestMsgId) ? $this->oldestMsgId : '';
    }

    public function hasOldestMsgId()
    {
        return isset($this->oldestMsgId);
    }

    public function clearOldestMsgId()
    {
        unset($this->oldestMsgId);
    }

    /**
     * Generated from protobuf field <code>optional string oldestMsgId = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setOldestMsgId($var)
    {
        GPBUtil::checkString($var, True);
        $this->oldestMsgId = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional bool oldestMsgFromMe = 3;</code>
     * @return bool
     */
    public function getOldestMsgFromMe()
    {
        return isset($this->oldestMsgFromMe) ? $this->oldestMsgFromMe : false;
    }

    public function hasOldestMsgFromMe()
    {
        return isset($this->oldestMsgFromMe);
    }

    public function clearOldestMsgFromMe()
    {
        unset($this->oldestMsgFromMe);
    }

    /**
     * Generated from protobuf field <code>optional bool oldestMsgFromMe = 3;</code>
     * @param bool $var
     * @return $this
     */
    public function setOldestMsgFromMe($var)
    {
        GPBUtil::checkBool($var);
        $this->oldestMsgFromMe = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional int32 onDemandMsgCount = 4;</code>
     * @return int
     */
    public function getOnDemandMsgCount()
    {
        return isset($this->onDemandMsgCount) ? $this->onDemandMsgCount : 0;
    }

    public function hasOnDemandMsgCount()
    {
        return isset($this->onDemandMsgCount);
    }

    public function clearOnDemandMsgCount()
    {
        unset($this->onDemandMsgCount);
    }

    /**
     * Generated from protobuf field <code>optional int32 onDemandMsgCount = 4;</code>
     * @param int $var
     * @return $this
     */
    public function setOnDemandMsgCount($var)
    {
        GPBUtil::checkInt32($var);
        $this->onDemandMsgCount = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional int64 oldestMsgTimestampMs = 5;</code>
     * @return int|string
     */
    public function getOldestMsgTimestampMs()
    {
        return isset($this->oldestMsgTimestampMs) ? $this->oldestMsgTimestampMs : 0;
    }

    public function hasOldestMsgTimestampMs()
    {
        return isset($this->oldestMsgTimestampMs);
    }

    public function clearOldestMsgTimestampMs()
    {
        unset($this->oldestMsgTimestampMs);
    }

    /**
     * Generated from protobuf field <code>optional int64 oldestMsgTimestampMs = 5;</code>
     * @param int|string $var
     * @return $this
     */
    public function setOldestMsgTimestampMs($var)
    {
        GPBUtil::checkInt64($var);
        $this->oldestMsgTimestampMs = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional string accountLid = 6;</code>
     * @return string
     */
    public function getAccountLid()
    {
        return isset($this->accountLid) ? $this->accountLid : '';
    }

    public function hasAccountLid()
    {
        return isset($this->accountLid);
    }

    public function clearAccountLid()
    {
        unset($this->accountLid);
    }

    /**
     * Generated from protobuf field <code>optional string accountLid = 6;</code>
     * @param string $var
     * @return $this
     */
    public function setAccountLid($var)
    {
        GPBUtil::checkString($var, True);
        $this->accountLid = $var;

        return $this;
    }

}

