<?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.GCRacingRankData</code>
 */
class GCRacingRankData extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>int32 RankType = 1;</code>
     */
    protected $RankType = 0;
    /**
     * Generated from protobuf field <code>int32 MapID = 2;</code>
     */
    protected $MapID = 0;
    /**
     * 分（自己）
     *
     * Generated from protobuf field <code>int32 RankScore = 3;</code>
     */
    protected $RankScore = 0;
    /**
     * Generated from protobuf field <code>int32 Page = 4;</code>
     */
    protected $Page = 0;
    /**
     * Generated from protobuf field <code>repeated .Game.Protobuf.RacingRank RankData = 5;</code>
     */
    private $RankData;
    /**
     * Generated from protobuf field <code>repeated uint64 Likes = 6;</code>
     */
    private $Likes;
    /**
     * 自己排名
     *
     * Generated from protobuf field <code>int32 RankSort = 7;</code>
     */
    protected $RankSort = 0;
    /**
     * 榜内自己数据
     *
     * Generated from protobuf field <code>.Game.Protobuf.RacingRank MinRankData = 8;</code>
     */
    protected $MinRankData = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $RankType
     *     @type int $MapID
     *     @type int $RankScore
     *           分（自己）
     *     @type int $Page
     *     @type \Game\Protobuf\RacingRank[]|\Google\Protobuf\Internal\RepeatedField $RankData
     *     @type int[]|string[]|\Google\Protobuf\Internal\RepeatedField $Likes
     *     @type int $RankSort
     *           自己排名
     *     @type \Game\Protobuf\RacingRank $MinRankData
     *           榜内自己数据
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\ClientGamePacket::initOnce();
        parent::__construct($data);
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

    /**
     * 分（自己）
     *
     * Generated from protobuf field <code>int32 RankScore = 3;</code>
     * @return int
     */
    public function getRankScore()
    {
        return $this->RankScore;
    }

    /**
     * 分（自己）
     *
     * Generated from protobuf field <code>int32 RankScore = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setRankScore($var)
    {
        GPBUtil::checkInt32($var);
        $this->RankScore = $var;

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .Game.Protobuf.RacingRank RankData = 5;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getRankData()
    {
        return $this->RankData;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated uint64 Likes = 6;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getLikes()
    {
        return $this->Likes;
    }

    /**
     * Generated from protobuf field <code>repeated uint64 Likes = 6;</code>
     * @param int[]|string[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setLikes($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::UINT64);
        $this->Likes = $arr;

        return $this;
    }

    /**
     * 自己排名
     *
     * Generated from protobuf field <code>int32 RankSort = 7;</code>
     * @return int
     */
    public function getRankSort()
    {
        return $this->RankSort;
    }

    /**
     * 自己排名
     *
     * Generated from protobuf field <code>int32 RankSort = 7;</code>
     * @param int $var
     * @return $this
     */
    public function setRankSort($var)
    {
        GPBUtil::checkInt32($var);
        $this->RankSort = $var;

        return $this;
    }

    /**
     * 榜内自己数据
     *
     * Generated from protobuf field <code>.Game.Protobuf.RacingRank MinRankData = 8;</code>
     * @return \Game\Protobuf\RacingRank|null
     */
    public function getMinRankData()
    {
        return $this->MinRankData;
    }

    public function hasMinRankData()
    {
        return isset($this->MinRankData);
    }

    public function clearMinRankData()
    {
        unset($this->MinRankData);
    }

    /**
     * 榜内自己数据
     *
     * Generated from protobuf field <code>.Game.Protobuf.RacingRank MinRankData = 8;</code>
     * @param \Game\Protobuf\RacingRank $var
     * @return $this
     */
    public function setMinRankData($var)
    {
        GPBUtil::checkMessage($var, \Game\Protobuf\RacingRank::class);
        $this->MinRankData = $var;

        return $this;
    }

}

