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

namespace PhpWA\Protocol\Proto\Message;

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

/**
 * Generated from protobuf message <code>proto.Message.HistorySyncNotification</code>
 */
class HistorySyncNotification extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional bytes fileSha256 = 1;</code>
     */
    protected $fileSha256 = null;
    /**
     * Generated from protobuf field <code>optional uint64 fileLength = 2;</code>
     */
    protected $fileLength = null;
    /**
     * Generated from protobuf field <code>optional bytes mediaKey = 3;</code>
     */
    protected $mediaKey = null;
    /**
     * Generated from protobuf field <code>optional bytes fileEncSha256 = 4;</code>
     */
    protected $fileEncSha256 = null;
    /**
     * Generated from protobuf field <code>optional string directPath = 5;</code>
     */
    protected $directPath = null;
    /**
     * Generated from protobuf field <code>optional .proto.Message.HistorySyncType syncType = 6;</code>
     */
    protected $syncType = null;
    /**
     * Generated from protobuf field <code>optional uint32 chunkOrder = 7;</code>
     */
    protected $chunkOrder = null;
    /**
     * Generated from protobuf field <code>optional string originalMessageId = 8;</code>
     */
    protected $originalMessageId = null;
    /**
     * Generated from protobuf field <code>optional uint32 progress = 9;</code>
     */
    protected $progress = null;
    /**
     * Generated from protobuf field <code>optional int64 oldestMsgInChunkTimestampSec = 10;</code>
     */
    protected $oldestMsgInChunkTimestampSec = null;
    /**
     * Generated from protobuf field <code>optional bytes initialHistBootstrapInlinePayload = 11;</code>
     */
    protected $initialHistBootstrapInlinePayload = null;
    /**
     * Generated from protobuf field <code>optional string peerDataRequestSessionId = 12;</code>
     */
    protected $peerDataRequestSessionId = null;
    /**
     * Generated from protobuf field <code>optional .proto.Message.FullHistorySyncOnDemandRequestMetadata fullHistorySyncOnDemandRequestMetadata = 13;</code>
     */
    protected $fullHistorySyncOnDemandRequestMetadata = null;
    /**
     * Generated from protobuf field <code>optional string encHandle = 14;</code>
     */
    protected $encHandle = null;
    /**
     * Generated from protobuf field <code>optional .proto.Message.HistorySyncMessageAccessStatus messageAccessStatus = 15;</code>
     */
    protected $messageAccessStatus = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $fileSha256
     *     @type int|string $fileLength
     *     @type string $mediaKey
     *     @type string $fileEncSha256
     *     @type string $directPath
     *     @type int $syncType
     *     @type int $chunkOrder
     *     @type string $originalMessageId
     *     @type int $progress
     *     @type int|string $oldestMsgInChunkTimestampSec
     *     @type string $initialHistBootstrapInlinePayload
     *     @type string $peerDataRequestSessionId
     *     @type \PhpWA\Protocol\Proto\Message\FullHistorySyncOnDemandRequestMetadata $fullHistorySyncOnDemandRequestMetadata
     *     @type string $encHandle
     *     @type \PhpWA\Protocol\Proto\Message\HistorySyncMessageAccessStatus $messageAccessStatus
     * }
     */
    public function __construct($data = NULL) {
        \PhpWA\Protocol\Proto\Metadata\WAProto::initOnce();
        parent::__construct($data);
    }

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

    public function hasFileSha256()
    {
        return isset($this->fileSha256);
    }

    public function clearFileSha256()
    {
        unset($this->fileSha256);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional uint64 fileLength = 2;</code>
     * @return int|string
     */
    public function getFileLength()
    {
        return isset($this->fileLength) ? $this->fileLength : 0;
    }

    public function hasFileLength()
    {
        return isset($this->fileLength);
    }

    public function clearFileLength()
    {
        unset($this->fileLength);
    }

    /**
     * Generated from protobuf field <code>optional uint64 fileLength = 2;</code>
     * @param int|string $var
     * @return $this
     */
    public function setFileLength($var)
    {
        GPBUtil::checkUint64($var);
        $this->fileLength = $var;

        return $this;
    }

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

    public function hasMediaKey()
    {
        return isset($this->mediaKey);
    }

    public function clearMediaKey()
    {
        unset($this->mediaKey);
    }

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

        return $this;
    }

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

    public function hasFileEncSha256()
    {
        return isset($this->fileEncSha256);
    }

    public function clearFileEncSha256()
    {
        unset($this->fileEncSha256);
    }

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

        return $this;
    }

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

    public function hasDirectPath()
    {
        return isset($this->directPath);
    }

    public function clearDirectPath()
    {
        unset($this->directPath);
    }

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

        return $this;
    }

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

        return $this;
    }

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

        return $this;
    }

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

    public function hasOriginalMessageId()
    {
        return isset($this->originalMessageId);
    }

    public function clearOriginalMessageId()
    {
        unset($this->originalMessageId);
    }

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

        return $this;
    }

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

        return $this;
    }

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

    public function hasOldestMsgInChunkTimestampSec()
    {
        return isset($this->oldestMsgInChunkTimestampSec);
    }

    public function clearOldestMsgInChunkTimestampSec()
    {
        unset($this->oldestMsgInChunkTimestampSec);
    }

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

        return $this;
    }

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

    public function hasInitialHistBootstrapInlinePayload()
    {
        return isset($this->initialHistBootstrapInlinePayload);
    }

    public function clearInitialHistBootstrapInlinePayload()
    {
        unset($this->initialHistBootstrapInlinePayload);
    }

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

        return $this;
    }

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

    public function hasPeerDataRequestSessionId()
    {
        return isset($this->peerDataRequestSessionId);
    }

    public function clearPeerDataRequestSessionId()
    {
        unset($this->peerDataRequestSessionId);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .proto.Message.FullHistorySyncOnDemandRequestMetadata fullHistorySyncOnDemandRequestMetadata = 13;</code>
     * @return \PhpWA\Protocol\Proto\Message\FullHistorySyncOnDemandRequestMetadata|null
     */
    public function getFullHistorySyncOnDemandRequestMetadata()
    {
        return $this->fullHistorySyncOnDemandRequestMetadata;
    }

    public function hasFullHistorySyncOnDemandRequestMetadata()
    {
        return isset($this->fullHistorySyncOnDemandRequestMetadata);
    }

    public function clearFullHistorySyncOnDemandRequestMetadata()
    {
        unset($this->fullHistorySyncOnDemandRequestMetadata);
    }

    /**
     * Generated from protobuf field <code>optional .proto.Message.FullHistorySyncOnDemandRequestMetadata fullHistorySyncOnDemandRequestMetadata = 13;</code>
     * @param \PhpWA\Protocol\Proto\Message\FullHistorySyncOnDemandRequestMetadata $var
     * @return $this
     */
    public function setFullHistorySyncOnDemandRequestMetadata($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\Message\FullHistorySyncOnDemandRequestMetadata::class);
        $this->fullHistorySyncOnDemandRequestMetadata = $var;

        return $this;
    }

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

    public function hasEncHandle()
    {
        return isset($this->encHandle);
    }

    public function clearEncHandle()
    {
        unset($this->encHandle);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .proto.Message.HistorySyncMessageAccessStatus messageAccessStatus = 15;</code>
     * @return \PhpWA\Protocol\Proto\Message\HistorySyncMessageAccessStatus|null
     */
    public function getMessageAccessStatus()
    {
        return $this->messageAccessStatus;
    }

    public function hasMessageAccessStatus()
    {
        return isset($this->messageAccessStatus);
    }

    public function clearMessageAccessStatus()
    {
        unset($this->messageAccessStatus);
    }

    /**
     * Generated from protobuf field <code>optional .proto.Message.HistorySyncMessageAccessStatus messageAccessStatus = 15;</code>
     * @param \PhpWA\Protocol\Proto\Message\HistorySyncMessageAccessStatus $var
     * @return $this
     */
    public function setMessageAccessStatus($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\Message\HistorySyncMessageAccessStatus::class);
        $this->messageAccessStatus = $var;

        return $this;
    }

}

