<?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.GCMapChallengeInfo</code>
 */
class GCMapChallengeInfo extends \Google\Protobuf\Internal\Message
{
    /**
     *状态码,0可进入,优先判断code,如果不为0,下面数据不发送
     *
     * Generated from protobuf field <code>int32 Code = 1;</code>
     */
    protected $Code = 0;
    /**
     *ChallengeTime表id
     *
     * Generated from protobuf field <code>int32 ActivityId = 2;</code>
     */
    protected $ActivityId = 0;
    /**
     *已开启的地图信息
     *
     * Generated from protobuf field <code>repeated .Game.Protobuf.MapChallengeMapInfo MapInfo = 3;</code>
     */
    private $MapInfo;
    /**
     *活动大奖领取状态,0不可领取 1可领取 2已领取
     *
     * Generated from protobuf field <code>int32 ActivityRewardStatus = 4;</code>
     */
    protected $ActivityRewardStatus = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $Code
     *          状态码,0可进入,优先判断code,如果不为0,下面数据不发送
     *     @type int $ActivityId
     *          ChallengeTime表id
     *     @type \Game\Protobuf\MapChallengeMapInfo[]|\Google\Protobuf\Internal\RepeatedField $MapInfo
     *          已开启的地图信息
     *     @type int $ActivityRewardStatus
     *          活动大奖领取状态,0不可领取 1可领取 2已领取
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\ClientGamePacket::initOnce();
        parent::__construct($data);
    }

    /**
     *状态码,0可进入,优先判断code,如果不为0,下面数据不发送
     *
     * Generated from protobuf field <code>int32 Code = 1;</code>
     * @return int
     */
    public function getCode()
    {
        return $this->Code;
    }

    /**
     *状态码,0可进入,优先判断code,如果不为0,下面数据不发送
     *
     * 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;
    }

    /**
     *ChallengeTime表id
     *
     * Generated from protobuf field <code>int32 ActivityId = 2;</code>
     * @return int
     */
    public function getActivityId()
    {
        return $this->ActivityId;
    }

    /**
     *ChallengeTime表id
     *
     * Generated from protobuf field <code>int32 ActivityId = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setActivityId($var)
    {
        GPBUtil::checkInt32($var);
        $this->ActivityId = $var;

        return $this;
    }

    /**
     *已开启的地图信息
     *
     * Generated from protobuf field <code>repeated .Game.Protobuf.MapChallengeMapInfo MapInfo = 3;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getMapInfo()
    {
        return $this->MapInfo;
    }

    /**
     *已开启的地图信息
     *
     * Generated from protobuf field <code>repeated .Game.Protobuf.MapChallengeMapInfo MapInfo = 3;</code>
     * @param \Game\Protobuf\MapChallengeMapInfo[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setMapInfo($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Game\Protobuf\MapChallengeMapInfo::class);
        $this->MapInfo = $arr;

        return $this;
    }

    /**
     *活动大奖领取状态,0不可领取 1可领取 2已领取
     *
     * Generated from protobuf field <code>int32 ActivityRewardStatus = 4;</code>
     * @return int
     */
    public function getActivityRewardStatus()
    {
        return $this->ActivityRewardStatus;
    }

    /**
     *活动大奖领取状态,0不可领取 1可领取 2已领取
     *
     * Generated from protobuf field <code>int32 ActivityRewardStatus = 4;</code>
     * @param int $var
     * @return $this
     */
    public function setActivityRewardStatus($var)
    {
        GPBUtil::checkInt32($var);
        $this->ActivityRewardStatus = $var;

        return $this;
    }

}

