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

namespace PhpWA\Protocol\Proto;

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

/**
 * Generated from protobuf message <code>proto.HistorySync</code>
 */
class HistorySync extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional .proto.HistorySync.HistorySyncType syncType = 1;</code>
     */
    protected $syncType = null;
    /**
     * Generated from protobuf field <code>repeated .proto.Conversation conversations = 2;</code>
     */
    private $conversations;
    /**
     * Generated from protobuf field <code>repeated .proto.WebMessageInfo statusV3Messages = 3;</code>
     */
    private $statusV3Messages;
    /**
     * Generated from protobuf field <code>optional uint32 chunkOrder = 5;</code>
     */
    protected $chunkOrder = null;
    /**
     * Generated from protobuf field <code>optional uint32 progress = 6;</code>
     */
    protected $progress = null;
    /**
     * Generated from protobuf field <code>repeated .proto.Pushname pushnames = 7;</code>
     */
    private $pushnames;
    /**
     * Generated from protobuf field <code>optional .proto.GlobalSettings globalSettings = 8;</code>
     */
    protected $globalSettings = null;
    /**
     * Generated from protobuf field <code>optional bytes threadIdUserSecret = 9;</code>
     */
    protected $threadIdUserSecret = null;
    /**
     * Generated from protobuf field <code>optional uint32 threadDsTimeframeOffset = 10;</code>
     */
    protected $threadDsTimeframeOffset = null;
    /**
     * Generated from protobuf field <code>repeated .proto.StickerMetadata recentStickers = 11;</code>
     */
    private $recentStickers;
    /**
     * Generated from protobuf field <code>repeated .proto.PastParticipants pastParticipants = 12;</code>
     */
    private $pastParticipants;
    /**
     * Generated from protobuf field <code>repeated .proto.CallLogRecord callLogRecords = 13;</code>
     */
    private $callLogRecords;
    /**
     * Generated from protobuf field <code>optional .proto.HistorySync.BotAIWaitListState aiWaitListState = 14;</code>
     */
    protected $aiWaitListState = null;
    /**
     * Generated from protobuf field <code>repeated .proto.PhoneNumberToLIDMapping phoneNumberToLidMappings = 15;</code>
     */
    private $phoneNumberToLidMappings;
    /**
     * Generated from protobuf field <code>optional string companionMetaNonce = 16;</code>
     */
    protected $companionMetaNonce = null;
    /**
     * Generated from protobuf field <code>optional bytes shareableChatIdentifierEncryptionKey = 17;</code>
     */
    protected $shareableChatIdentifierEncryptionKey = null;
    /**
     * Generated from protobuf field <code>repeated .proto.Account accounts = 18;</code>
     */
    private $accounts;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $syncType
     *     @type \PhpWA\Protocol\Proto\Conversation[] $conversations
     *     @type \PhpWA\Protocol\Proto\WebMessageInfo[] $statusV3Messages
     *     @type int $chunkOrder
     *     @type int $progress
     *     @type \PhpWA\Protocol\Proto\Pushname[] $pushnames
     *     @type \PhpWA\Protocol\Proto\GlobalSettings $globalSettings
     *     @type string $threadIdUserSecret
     *     @type int $threadDsTimeframeOffset
     *     @type \PhpWA\Protocol\Proto\StickerMetadata[] $recentStickers
     *     @type \PhpWA\Protocol\Proto\PastParticipants[] $pastParticipants
     *     @type \PhpWA\Protocol\Proto\CallLogRecord[] $callLogRecords
     *     @type int $aiWaitListState
     *     @type \PhpWA\Protocol\Proto\PhoneNumberToLIDMapping[] $phoneNumberToLidMappings
     *     @type string $companionMetaNonce
     *     @type string $shareableChatIdentifierEncryptionKey
     *     @type \PhpWA\Protocol\Proto\Account[] $accounts
     * }
     */
    public function __construct($data = NULL) {
        \PhpWA\Protocol\Proto\Metadata\WAProto::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>optional .proto.HistorySync.HistorySyncType syncType = 1;</code>
     * @return int
     */
    public function getSyncType()
    {
        return isset($this->syncType) ? $this->syncType : 0;
    }

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

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

    /**
     * Generated from protobuf field <code>optional .proto.HistorySync.HistorySyncType syncType = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setSyncType($var)
    {
        GPBUtil::checkEnum($var, \PhpWA\Protocol\Proto\HistorySync\HistorySyncType::class);
        $this->syncType = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .proto.Conversation conversations = 2;</code>
     * @return RepeatedField<\PhpWA\Protocol\Proto\Conversation>
     */
    public function getConversations()
    {
        return $this->conversations;
    }

    /**
     * Generated from protobuf field <code>repeated .proto.Conversation conversations = 2;</code>
     * @param \PhpWA\Protocol\Proto\Conversation[] $var
     * @return $this
     */
    public function setConversations($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \PhpWA\Protocol\Proto\Conversation::class);
        $this->conversations = $arr;

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .proto.WebMessageInfo statusV3Messages = 3;</code>
     * @return RepeatedField<\PhpWA\Protocol\Proto\WebMessageInfo>
     */
    public function getStatusV3Messages()
    {
        return $this->statusV3Messages;
    }

    /**
     * Generated from protobuf field <code>repeated .proto.WebMessageInfo statusV3Messages = 3;</code>
     * @param \PhpWA\Protocol\Proto\WebMessageInfo[] $var
     * @return $this
     */
    public function setStatusV3Messages($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \PhpWA\Protocol\Proto\WebMessageInfo::class);
        $this->statusV3Messages = $arr;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional uint32 chunkOrder = 5;</code>
     * @return int
     */
    public function getChunkOrder()
    {
        return isset($this->chunkOrder) ? $this->chunkOrder : 0;
    }

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

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

    /**
     * Generated from protobuf field <code>optional uint32 chunkOrder = 5;</code>
     * @param int $var
     * @return $this
     */
    public function setChunkOrder($var)
    {
        GPBUtil::checkUint32($var);
        $this->chunkOrder = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional uint32 progress = 6;</code>
     * @return int
     */
    public function getProgress()
    {
        return isset($this->progress) ? $this->progress : 0;
    }

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

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

    /**
     * Generated from protobuf field <code>optional uint32 progress = 6;</code>
     * @param int $var
     * @return $this
     */
    public function setProgress($var)
    {
        GPBUtil::checkUint32($var);
        $this->progress = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .proto.Pushname pushnames = 7;</code>
     * @return RepeatedField<\PhpWA\Protocol\Proto\Pushname>
     */
    public function getPushnames()
    {
        return $this->pushnames;
    }

    /**
     * Generated from protobuf field <code>repeated .proto.Pushname pushnames = 7;</code>
     * @param \PhpWA\Protocol\Proto\Pushname[] $var
     * @return $this
     */
    public function setPushnames($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \PhpWA\Protocol\Proto\Pushname::class);
        $this->pushnames = $arr;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .proto.GlobalSettings globalSettings = 8;</code>
     * @return \PhpWA\Protocol\Proto\GlobalSettings|null
     */
    public function getGlobalSettings()
    {
        return $this->globalSettings;
    }

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

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

    /**
     * Generated from protobuf field <code>optional .proto.GlobalSettings globalSettings = 8;</code>
     * @param \PhpWA\Protocol\Proto\GlobalSettings $var
     * @return $this
     */
    public function setGlobalSettings($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\GlobalSettings::class);
        $this->globalSettings = $var;

        return $this;
    }

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

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

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

    /**
     * Generated from protobuf field <code>optional bytes threadIdUserSecret = 9;</code>
     * @param string $var
     * @return $this
     */
    public function setThreadIdUserSecret($var)
    {
        GPBUtil::checkString($var, False);
        $this->threadIdUserSecret = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional uint32 threadDsTimeframeOffset = 10;</code>
     * @return int
     */
    public function getThreadDsTimeframeOffset()
    {
        return isset($this->threadDsTimeframeOffset) ? $this->threadDsTimeframeOffset : 0;
    }

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

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

    /**
     * Generated from protobuf field <code>optional uint32 threadDsTimeframeOffset = 10;</code>
     * @param int $var
     * @return $this
     */
    public function setThreadDsTimeframeOffset($var)
    {
        GPBUtil::checkUint32($var);
        $this->threadDsTimeframeOffset = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .proto.StickerMetadata recentStickers = 11;</code>
     * @return RepeatedField<\PhpWA\Protocol\Proto\StickerMetadata>
     */
    public function getRecentStickers()
    {
        return $this->recentStickers;
    }

    /**
     * Generated from protobuf field <code>repeated .proto.StickerMetadata recentStickers = 11;</code>
     * @param \PhpWA\Protocol\Proto\StickerMetadata[] $var
     * @return $this
     */
    public function setRecentStickers($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \PhpWA\Protocol\Proto\StickerMetadata::class);
        $this->recentStickers = $arr;

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .proto.PastParticipants pastParticipants = 12;</code>
     * @return RepeatedField<\PhpWA\Protocol\Proto\PastParticipants>
     */
    public function getPastParticipants()
    {
        return $this->pastParticipants;
    }

    /**
     * Generated from protobuf field <code>repeated .proto.PastParticipants pastParticipants = 12;</code>
     * @param \PhpWA\Protocol\Proto\PastParticipants[] $var
     * @return $this
     */
    public function setPastParticipants($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \PhpWA\Protocol\Proto\PastParticipants::class);
        $this->pastParticipants = $arr;

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .proto.CallLogRecord callLogRecords = 13;</code>
     * @return RepeatedField<\PhpWA\Protocol\Proto\CallLogRecord>
     */
    public function getCallLogRecords()
    {
        return $this->callLogRecords;
    }

    /**
     * Generated from protobuf field <code>repeated .proto.CallLogRecord callLogRecords = 13;</code>
     * @param \PhpWA\Protocol\Proto\CallLogRecord[] $var
     * @return $this
     */
    public function setCallLogRecords($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \PhpWA\Protocol\Proto\CallLogRecord::class);
        $this->callLogRecords = $arr;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .proto.HistorySync.BotAIWaitListState aiWaitListState = 14;</code>
     * @return int
     */
    public function getAiWaitListState()
    {
        return isset($this->aiWaitListState) ? $this->aiWaitListState : 0;
    }

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

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

    /**
     * Generated from protobuf field <code>optional .proto.HistorySync.BotAIWaitListState aiWaitListState = 14;</code>
     * @param int $var
     * @return $this
     */
    public function setAiWaitListState($var)
    {
        GPBUtil::checkEnum($var, \PhpWA\Protocol\Proto\HistorySync\BotAIWaitListState::class);
        $this->aiWaitListState = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .proto.PhoneNumberToLIDMapping phoneNumberToLidMappings = 15;</code>
     * @return RepeatedField<\PhpWA\Protocol\Proto\PhoneNumberToLIDMapping>
     */
    public function getPhoneNumberToLidMappings()
    {
        return $this->phoneNumberToLidMappings;
    }

    /**
     * Generated from protobuf field <code>repeated .proto.PhoneNumberToLIDMapping phoneNumberToLidMappings = 15;</code>
     * @param \PhpWA\Protocol\Proto\PhoneNumberToLIDMapping[] $var
     * @return $this
     */
    public function setPhoneNumberToLidMappings($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \PhpWA\Protocol\Proto\PhoneNumberToLIDMapping::class);
        $this->phoneNumberToLidMappings = $arr;

        return $this;
    }

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

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

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

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

        return $this;
    }

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

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

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

    /**
     * Generated from protobuf field <code>optional bytes shareableChatIdentifierEncryptionKey = 17;</code>
     * @param string $var
     * @return $this
     */
    public function setShareableChatIdentifierEncryptionKey($var)
    {
        GPBUtil::checkString($var, False);
        $this->shareableChatIdentifierEncryptionKey = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .proto.Account accounts = 18;</code>
     * @return RepeatedField<\PhpWA\Protocol\Proto\Account>
     */
    public function getAccounts()
    {
        return $this->accounts;
    }

    /**
     * Generated from protobuf field <code>repeated .proto.Account accounts = 18;</code>
     * @param \PhpWA\Protocol\Proto\Account[] $var
     * @return $this
     */
    public function setAccounts($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \PhpWA\Protocol\Proto\Account::class);
        $this->accounts = $arr;

        return $this;
    }

}

