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

namespace PhpWA\Protocol\Proto\Message\PeerDataOperationRequestResponseMessage\PeerDataOperationResult;

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

/**
 * Generated from protobuf message <code>proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.HistorySyncChunkRetryResponse</code>
 */
class HistorySyncChunkRetryResponse 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 requestId = 3;</code>
     */
    protected $requestId = null;
    /**
     * Generated from protobuf field <code>optional .proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.HistorySyncChunkRetryResponseCode responseCode = 4;</code>
     */
    protected $responseCode = null;
    /**
     * Generated from protobuf field <code>optional bool canRecover = 5;</code>
     */
    protected $canRecover = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $syncType
     *     @type int $chunkOrder
     *     @type string $requestId
     *     @type int $responseCode
     *     @type bool $canRecover
     * }
     */
    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 requestId = 3;</code>
     * @return string
     */
    public function getRequestId()
    {
        return isset($this->requestId) ? $this->requestId : '';
    }

    public function hasRequestId()
    {
        return isset($this->requestId);
    }

    public function clearRequestId()
    {
        unset($this->requestId);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.HistorySyncChunkRetryResponseCode responseCode = 4;</code>
     * @return int
     */
    public function getResponseCode()
    {
        return isset($this->responseCode) ? $this->responseCode : 0;
    }

    public function hasResponseCode()
    {
        return isset($this->responseCode);
    }

    public function clearResponseCode()
    {
        unset($this->responseCode);
    }

    /**
     * Generated from protobuf field <code>optional .proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.HistorySyncChunkRetryResponseCode responseCode = 4;</code>
     * @param int $var
     * @return $this
     */
    public function setResponseCode($var)
    {
        GPBUtil::checkEnum($var, \PhpWA\Protocol\Proto\Message\PeerDataOperationRequestResponseMessage\PeerDataOperationResult\HistorySyncChunkRetryResponseCode::class);
        $this->responseCode = $var;

        return $this;
    }

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

    public function hasCanRecover()
    {
        return isset($this->canRecover);
    }

    public function clearCanRecover()
    {
        unset($this->canRecover);
    }

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

        return $this;
    }

}

