<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: Game_Match_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.GMJoinMatch</code>
 */
class GMJoinMatch extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>int64 PlayerID = 1;</code>
     */
    protected $PlayerID = 0;
    /**
     * Generated from protobuf field <code>int32 ServerID = 2;</code>
     */
    protected $ServerID = 0;
    /**
     * Generated from protobuf field <code>int64 JoinID = 3;</code>
     */
    protected $JoinID = 0;
    /**
     * Generated from protobuf field <code>int32 MapID = 4;</code>
     */
    protected $MapID = 0;
    /**
     * Generated from protobuf field <code>int32 MatchType = 5;</code>
     */
    protected $MatchType = 0;
    /**
     * Generated from protobuf field <code>repeated .Game.Protobuf.RoomPlayers Player = 6;</code>
     */
    private $Player;
    /**
     *匹配需要参数,根据比赛模式调整.对应Protobuf转string,再base64转码
     *
     * Generated from protobuf field <code>string MatchParam = 7;</code>
     */
    protected $MatchParam = '';
    /**
     *MatchParam说明:
     *练习赛,自定义比赛和大乱斗为空字符串
     *单人排位赛为SingleRankingMatchParam
     *组队排位赛为TeamRankingMatchParam
     *
     * Generated from protobuf field <code>int32 MaxTime = 8;</code>
     */
    protected $MaxTime = 0;
    /**
     *需要队友数量,单人模式人数为0,团队模式为队伍缺少人数
     *
     * Generated from protobuf field <code>int32 NeedPlayerNum = 9;</code>
     */
    protected $NeedPlayerNum = 0;
    /**
     *需要对手数量,单人模式人数为需要匹配人数,团队模式为对方队伍需要人数
     *
     * Generated from protobuf field <code>int32 NeedTargetNum = 10;</code>
     */
    protected $NeedTargetNum = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int|string $PlayerID
     *     @type int $ServerID
     *     @type int|string $JoinID
     *     @type int $MapID
     *     @type int $MatchType
     *     @type \Game\Protobuf\RoomPlayers[]|\Google\Protobuf\Internal\RepeatedField $Player
     *     @type string $MatchParam
     *          匹配需要参数,根据比赛模式调整.对应Protobuf转string,再base64转码
     *     @type int $MaxTime
     *          MatchParam说明:
     *          练习赛,自定义比赛和大乱斗为空字符串
     *          单人排位赛为SingleRankingMatchParam
     *          组队排位赛为TeamRankingMatchParam
     *     @type int $NeedPlayerNum
     *          需要队友数量,单人模式人数为0,团队模式为队伍缺少人数
     *     @type int $NeedTargetNum
     *          需要对手数量,单人模式人数为需要匹配人数,团队模式为对方队伍需要人数
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\GameMatchPacket::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>int64 PlayerID = 1;</code>
     * @return int|string
     */
    public function getPlayerID()
    {
        return $this->PlayerID;
    }

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

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>int64 JoinID = 3;</code>
     * @return int|string
     */
    public function getJoinID()
    {
        return $this->JoinID;
    }

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .Game.Protobuf.RoomPlayers Player = 6;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getPlayer()
    {
        return $this->Player;
    }

    /**
     * Generated from protobuf field <code>repeated .Game.Protobuf.RoomPlayers Player = 6;</code>
     * @param \Game\Protobuf\RoomPlayers[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setPlayer($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Game\Protobuf\RoomPlayers::class);
        $this->Player = $arr;

        return $this;
    }

    /**
     *匹配需要参数,根据比赛模式调整.对应Protobuf转string,再base64转码
     *
     * Generated from protobuf field <code>string MatchParam = 7;</code>
     * @return string
     */
    public function getMatchParam()
    {
        return $this->MatchParam;
    }

    /**
     *匹配需要参数,根据比赛模式调整.对应Protobuf转string,再base64转码
     *
     * Generated from protobuf field <code>string MatchParam = 7;</code>
     * @param string $var
     * @return $this
     */
    public function setMatchParam($var)
    {
        GPBUtil::checkString($var, True);
        $this->MatchParam = $var;

        return $this;
    }

    /**
     *MatchParam说明:
     *练习赛,自定义比赛和大乱斗为空字符串
     *单人排位赛为SingleRankingMatchParam
     *组队排位赛为TeamRankingMatchParam
     *
     * Generated from protobuf field <code>int32 MaxTime = 8;</code>
     * @return int
     */
    public function getMaxTime()
    {
        return $this->MaxTime;
    }

    /**
     *MatchParam说明:
     *练习赛,自定义比赛和大乱斗为空字符串
     *单人排位赛为SingleRankingMatchParam
     *组队排位赛为TeamRankingMatchParam
     *
     * Generated from protobuf field <code>int32 MaxTime = 8;</code>
     * @param int $var
     * @return $this
     */
    public function setMaxTime($var)
    {
        GPBUtil::checkInt32($var);
        $this->MaxTime = $var;

        return $this;
    }

    /**
     *需要队友数量,单人模式人数为0,团队模式为队伍缺少人数
     *
     * Generated from protobuf field <code>int32 NeedPlayerNum = 9;</code>
     * @return int
     */
    public function getNeedPlayerNum()
    {
        return $this->NeedPlayerNum;
    }

    /**
     *需要队友数量,单人模式人数为0,团队模式为队伍缺少人数
     *
     * Generated from protobuf field <code>int32 NeedPlayerNum = 9;</code>
     * @param int $var
     * @return $this
     */
    public function setNeedPlayerNum($var)
    {
        GPBUtil::checkInt32($var);
        $this->NeedPlayerNum = $var;

        return $this;
    }

    /**
     *需要对手数量,单人模式人数为需要匹配人数,团队模式为对方队伍需要人数
     *
     * Generated from protobuf field <code>int32 NeedTargetNum = 10;</code>
     * @return int
     */
    public function getNeedTargetNum()
    {
        return $this->NeedTargetNum;
    }

    /**
     *需要对手数量,单人模式人数为需要匹配人数,团队模式为对方队伍需要人数
     *
     * Generated from protobuf field <code>int32 NeedTargetNum = 10;</code>
     * @param int $var
     * @return $this
     */
    public function setNeedTargetNum($var)
    {
        GPBUtil::checkInt32($var);
        $this->NeedTargetNum = $var;

        return $this;
    }

}

