<?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.MatchRecord</code>
 */
class MatchRecord extends \Google\Protobuf\Internal\Message
{
    /**
     *唯一id
     *
     * Generated from protobuf field <code>uint64 Id = 1;</code>
     */
    protected $Id = 0;
    /**
     *是否收藏 true已收藏
     *
     * Generated from protobuf field <code>bool IsCollection = 2;</code>
     */
    protected $IsCollection = false;
    /**
     *比赛类型
     *
     * Generated from protobuf field <code>int32 MatchType = 3;</code>
     */
    protected $MatchType = 0;
    /**
     * Generated from protobuf field <code>int32 MapId = 4;</code>
     */
    protected $MapId = 0;
    /**
     *完成时间 0为未完成
     *
     * Generated from protobuf field <code>int32 CostTime = 5;</code>
     */
    protected $CostTime = 0;
    /**
     *个人赛为名次,团队赛1为胜利,0为失败
     *
     * Generated from protobuf field <code>int32 Rank = 6;</code>
     */
    protected $Rank = 0;
    /**
     * Generated from protobuf field <code>int32 CarId = 7;</code>
     */
    protected $CarId = 0;
    /**
     *比赛时间戳
     *
     * Generated from protobuf field <code>int32 MatchTime = 8;</code>
     */
    protected $MatchTime = 0;
    /**
     *客户端统计信息,只保存转发
     *
     * Generated from protobuf field <code>string Statistics = 9;</code>
     */
    protected $Statistics = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int|string $Id
     *          唯一id
     *     @type bool $IsCollection
     *          是否收藏 true已收藏
     *     @type int $MatchType
     *          比赛类型
     *     @type int $MapId
     *     @type int $CostTime
     *          完成时间 0为未完成
     *     @type int $Rank
     *          个人赛为名次,团队赛1为胜利,0为失败
     *     @type int $CarId
     *     @type int $MatchTime
     *          比赛时间戳
     *     @type string $Statistics
     *          客户端统计信息,只保存转发
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\ClientGamePacket::initOnce();
        parent::__construct($data);
    }

    /**
     *唯一id
     *
     * Generated from protobuf field <code>uint64 Id = 1;</code>
     * @return int|string
     */
    public function getId()
    {
        return $this->Id;
    }

    /**
     *唯一id
     *
     * Generated from protobuf field <code>uint64 Id = 1;</code>
     * @param int|string $var
     * @return $this
     */
    public function setId($var)
    {
        GPBUtil::checkUint64($var);
        $this->Id = $var;

        return $this;
    }

    /**
     *是否收藏 true已收藏
     *
     * Generated from protobuf field <code>bool IsCollection = 2;</code>
     * @return bool
     */
    public function getIsCollection()
    {
        return $this->IsCollection;
    }

    /**
     *是否收藏 true已收藏
     *
     * Generated from protobuf field <code>bool IsCollection = 2;</code>
     * @param bool $var
     * @return $this
     */
    public function setIsCollection($var)
    {
        GPBUtil::checkBool($var);
        $this->IsCollection = $var;

        return $this;
    }

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

    /**
     *比赛类型
     *
     * Generated from protobuf field <code>int32 MatchType = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setMatchType($var)
    {
        GPBUtil::checkInt32($var);
        $this->MatchType = $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;
    }

    /**
     *完成时间 0为未完成
     *
     * Generated from protobuf field <code>int32 CostTime = 5;</code>
     * @return int
     */
    public function getCostTime()
    {
        return $this->CostTime;
    }

    /**
     *完成时间 0为未完成
     *
     * Generated from protobuf field <code>int32 CostTime = 5;</code>
     * @param int $var
     * @return $this
     */
    public function setCostTime($var)
    {
        GPBUtil::checkInt32($var);
        $this->CostTime = $var;

        return $this;
    }

    /**
     *个人赛为名次,团队赛1为胜利,0为失败
     *
     * Generated from protobuf field <code>int32 Rank = 6;</code>
     * @return int
     */
    public function getRank()
    {
        return $this->Rank;
    }

    /**
     *个人赛为名次,团队赛1为胜利,0为失败
     *
     * Generated from protobuf field <code>int32 Rank = 6;</code>
     * @param int $var
     * @return $this
     */
    public function setRank($var)
    {
        GPBUtil::checkInt32($var);
        $this->Rank = $var;

        return $this;
    }

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

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

        return $this;
    }

    /**
     *比赛时间戳
     *
     * Generated from protobuf field <code>int32 MatchTime = 8;</code>
     * @return int
     */
    public function getMatchTime()
    {
        return $this->MatchTime;
    }

    /**
     *比赛时间戳
     *
     * Generated from protobuf field <code>int32 MatchTime = 8;</code>
     * @param int $var
     * @return $this
     */
    public function setMatchTime($var)
    {
        GPBUtil::checkInt32($var);
        $this->MatchTime = $var;

        return $this;
    }

    /**
     *客户端统计信息,只保存转发
     *
     * Generated from protobuf field <code>string Statistics = 9;</code>
     * @return string
     */
    public function getStatistics()
    {
        return $this->Statistics;
    }

    /**
     *客户端统计信息,只保存转发
     *
     * Generated from protobuf field <code>string Statistics = 9;</code>
     * @param string $var
     * @return $this
     */
    public function setStatistics($var)
    {
        GPBUtil::checkString($var, True);
        $this->Statistics = $var;

        return $this;
    }

}

