<?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.HistorySyncChunkRetryRequest</code>
 */
class HistorySyncChunkRetryRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional .proto.Message.HistorySyncType syncType = 1;</code>
     */
    protected $syncType = null;
    /**
     * Generated from protobuf field <code>optional uint32 chunkOrder = 2;</code>
     */
    protected $chunkOrder = null;
    /**
     * Generated from protobuf field <code>optional string chunkNotificationId = 3;</code>
     */
    protected $chunkNotificationId = null;
    /**
     * Generated from protobuf field <code>optional bool regenerateChunk = 4;</code>
     */
    protected $regenerateChunk = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $syncType
     *     @type int $chunkOrder
     *     @type string $chunkNotificationId
     *     @type bool $regenerateChunk
     * }
     */
    public function __construct($data = NULL) {
        \PhpWA\Protocol\Proto\Metadata\WAProto::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>optional .proto.Message.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.Message.HistorySyncType syncType = 1;</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 = 2;</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 = 2;</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 chunkNotificationId = 3;</code>
     * @return string
     */
    public function getChunkNotificationId()
    {
        return isset($this->chunkNotificationId) ? $this->chunkNotificationId : '';
    }

    public function hasChunkNotificationId()
    {
        return isset($this->chunkNotificationId);
    }

    public function clearChunkNotificationId()
    {
        unset($this->chunkNotificationId);
    }

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

        return $this;
    }

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

    public function hasRegenerateChunk()
    {
        return isset($this->regenerateChunk);
    }

    public function clearRegenerateChunk()
    {
        unset($this->regenerateChunk);
    }

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

        return $this;
    }

}

