<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: Client_Game_Packet.proto

namespace Game\Protobuf;

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

/**
 * Generated from protobuf message <code>Game.Protobuf.GCRefreshDailyChallengeTask</code>
 */
class GCRefreshDailyChallengeTask extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>int32 Code = 1;</code>
     */
    protected $Code = 0;
    /**
     *挑战任务刷新次数
     *
     * Generated from protobuf field <code>int32 RefreshNum = 2;</code>
     */
    protected $RefreshNum = 0;
    /**
     *刷新的任务
     *
     * Generated from protobuf field <code>.Game.Protobuf.Task NewTask = 3;</code>
     */
    protected $NewTask = null;
    /**
     *要刷新的任务id
     *
     * Generated from protobuf field <code>int32 DelTaskId = 4;</code>
     */
    protected $DelTaskId = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $Code
     *     @type int $RefreshNum
     *          挑战任务刷新次数
     *     @type \Game\Protobuf\Task $NewTask
     *          刷新的任务
     *     @type int $DelTaskId
     *          要刷新的任务id
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\ClientGamePacket::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>int32 Code = 1;</code>
     * @return int
     */
    public function getCode()
    {
        return $this->Code;
    }

    /**
     * Generated from protobuf field <code>int32 Code = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setCode($var)
    {
        GPBUtil::checkInt32($var);
        $this->Code = $var;

        return $this;
    }

    /**
     *挑战任务刷新次数
     *
     * Generated from protobuf field <code>int32 RefreshNum = 2;</code>
     * @return int
     */
    public function getRefreshNum()
    {
        return $this->RefreshNum;
    }

    /**
     *挑战任务刷新次数
     *
     * Generated from protobuf field <code>int32 RefreshNum = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setRefreshNum($var)
    {
        GPBUtil::checkInt32($var);
        $this->RefreshNum = $var;

        return $this;
    }

    /**
     *刷新的任务
     *
     * Generated from protobuf field <code>.Game.Protobuf.Task NewTask = 3;</code>
     * @return \Game\Protobuf\Task|null
     */
    public function getNewTask()
    {
        return $this->NewTask;
    }

    public function hasNewTask()
    {
        return isset($this->NewTask);
    }

    public function clearNewTask()
    {
        unset($this->NewTask);
    }

    /**
     *刷新的任务
     *
     * Generated from protobuf field <code>.Game.Protobuf.Task NewTask = 3;</code>
     * @param \Game\Protobuf\Task $var
     * @return $this
     */
    public function setNewTask($var)
    {
        GPBUtil::checkMessage($var, \Game\Protobuf\Task::class);
        $this->NewTask = $var;

        return $this;
    }

    /**
     *要刷新的任务id
     *
     * Generated from protobuf field <code>int32 DelTaskId = 4;</code>
     * @return int
     */
    public function getDelTaskId()
    {
        return $this->DelTaskId;
    }

    /**
     *要刷新的任务id
     *
     * Generated from protobuf field <code>int32 DelTaskId = 4;</code>
     * @param int $var
     * @return $this
     */
    public function setDelTaskId($var)
    {
        GPBUtil::checkInt32($var);
        $this->DelTaskId = $var;

        return $this;
    }

}

