<?php
 
 
 

namespace PhpWA\Protocol\Proto;

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




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


    protected $syncType = null;
    


    private $conversations;
    


    private $statusV3Messages;
    


    protected $chunkOrder = null;
    


    protected $progress = null;
    


    private $pushnames;
    


    protected $globalSettings = null;
    


    protected $threadIdUserSecret = null;
    


    protected $threadDsTimeframeOffset = null;
    


    private $recentStickers;
    


    private $pastParticipants;
    


    private $callLogRecords;
    


    protected $aiWaitListState = null;
    


    private $phoneNumberToLidMappings;
    


    protected $companionMetaNonce = null;
    


    protected $shareableChatIdentifierEncryptionKey = null;
    


    private $accounts;

    
























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

    



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

    public function hasSyncType()
    {
        return isset($this->syncType);
    }

    public function clearSyncType()
    {
        unset($this->syncType);
    }

    




    public function setSyncType($var)
    {
        GPBUtil::checkEnum($var, \PhpWA\Protocol\Proto\HistorySync\HistorySyncType::class);
        $this->syncType = $var;

        return $this;
    }

    



    public function getConversations()
    {
        return $this->conversations;
    }

    




    public function setConversations($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \PhpWA\Protocol\Proto\Conversation::class);
        $this->conversations = $arr;

        return $this;
    }

    



    public function getStatusV3Messages()
    {
        return $this->statusV3Messages;
    }

    




    public function setStatusV3Messages($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \PhpWA\Protocol\Proto\WebMessageInfo::class);
        $this->statusV3Messages = $arr;

        return $this;
    }

    



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

    public function hasChunkOrder()
    {
        return isset($this->chunkOrder);
    }

    public function clearChunkOrder()
    {
        unset($this->chunkOrder);
    }

    




    public function setChunkOrder($var)
    {
        GPBUtil::checkUint32($var);
        $this->chunkOrder = $var;

        return $this;
    }

    



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

    public function hasProgress()
    {
        return isset($this->progress);
    }

    public function clearProgress()
    {
        unset($this->progress);
    }

    




    public function setProgress($var)
    {
        GPBUtil::checkUint32($var);
        $this->progress = $var;

        return $this;
    }

    



    public function getPushnames()
    {
        return $this->pushnames;
    }

    




    public function setPushnames($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \PhpWA\Protocol\Proto\Pushname::class);
        $this->pushnames = $arr;

        return $this;
    }

    



    public function getGlobalSettings()
    {
        return $this->globalSettings;
    }

    public function hasGlobalSettings()
    {
        return isset($this->globalSettings);
    }

    public function clearGlobalSettings()
    {
        unset($this->globalSettings);
    }

    




    public function setGlobalSettings($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\GlobalSettings::class);
        $this->globalSettings = $var;

        return $this;
    }

    



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

    public function hasThreadIdUserSecret()
    {
        return isset($this->threadIdUserSecret);
    }

    public function clearThreadIdUserSecret()
    {
        unset($this->threadIdUserSecret);
    }

    




    public function setThreadIdUserSecret($var)
    {
        GPBUtil::checkString($var, False);
        $this->threadIdUserSecret = $var;

        return $this;
    }

    



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

    public function hasThreadDsTimeframeOffset()
    {
        return isset($this->threadDsTimeframeOffset);
    }

    public function clearThreadDsTimeframeOffset()
    {
        unset($this->threadDsTimeframeOffset);
    }

    




    public function setThreadDsTimeframeOffset($var)
    {
        GPBUtil::checkUint32($var);
        $this->threadDsTimeframeOffset = $var;

        return $this;
    }

    



    public function getRecentStickers()
    {
        return $this->recentStickers;
    }

    




    public function setRecentStickers($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \PhpWA\Protocol\Proto\StickerMetadata::class);
        $this->recentStickers = $arr;

        return $this;
    }

    



    public function getPastParticipants()
    {
        return $this->pastParticipants;
    }

    




    public function setPastParticipants($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \PhpWA\Protocol\Proto\PastParticipants::class);
        $this->pastParticipants = $arr;

        return $this;
    }

    



    public function getCallLogRecords()
    {
        return $this->callLogRecords;
    }

    




    public function setCallLogRecords($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \PhpWA\Protocol\Proto\CallLogRecord::class);
        $this->callLogRecords = $arr;

        return $this;
    }

    



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

    public function hasAiWaitListState()
    {
        return isset($this->aiWaitListState);
    }

    public function clearAiWaitListState()
    {
        unset($this->aiWaitListState);
    }

    




    public function setAiWaitListState($var)
    {
        GPBUtil::checkEnum($var, \PhpWA\Protocol\Proto\HistorySync\BotAIWaitListState::class);
        $this->aiWaitListState = $var;

        return $this;
    }

    



    public function getPhoneNumberToLidMappings()
    {
        return $this->phoneNumberToLidMappings;
    }

    




    public function setPhoneNumberToLidMappings($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \PhpWA\Protocol\Proto\PhoneNumberToLIDMapping::class);
        $this->phoneNumberToLidMappings = $arr;

        return $this;
    }

    



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

    public function hasCompanionMetaNonce()
    {
        return isset($this->companionMetaNonce);
    }

    public function clearCompanionMetaNonce()
    {
        unset($this->companionMetaNonce);
    }

    




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

        return $this;
    }

    



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

    public function hasShareableChatIdentifierEncryptionKey()
    {
        return isset($this->shareableChatIdentifierEncryptionKey);
    }

    public function clearShareableChatIdentifierEncryptionKey()
    {
        unset($this->shareableChatIdentifierEncryptionKey);
    }

    




    public function setShareableChatIdentifierEncryptionKey($var)
    {
        GPBUtil::checkString($var, False);
        $this->shareableChatIdentifierEncryptionKey = $var;

        return $this;
    }

    



    public function getAccounts()
    {
        return $this->accounts;
    }

    




    public function setAccounts($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \PhpWA\Protocol\Proto\Account::class);
        $this->accounts = $arr;

        return $this;
    }

}

