<?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.LastGame</code>
 */
class LastGame extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>int32 GameType = 1;</code>
     */
    protected $GameType = 0;
    /**
     * Generated from protobuf field <code>int32 MapId = 2;</code>
     */
    protected $MapId = 0;
    /**
     * Generated from protobuf field <code>int32 Time = 3;</code>
     */
    protected $Time = 0;
    /**
     * Generated from protobuf field <code>repeated .Game.Protobuf.LastGamePlayer Player = 4;</code>
     */
    private $Player;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $GameType
     *     @type int $MapId
     *     @type int $Time
     *     @type \Game\Protobuf\LastGamePlayer[]|\Google\Protobuf\Internal\RepeatedField $Player
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\ClientGamePacket::initOnce();
        parent::__construct($data);
    }

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

    /**
     * Generated from protobuf field <code>int32 GameType = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setGameType($var)
    {
        GPBUtil::checkInt32($var);
        $this->GameType = $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 Time = 3;</code>
     * @return int
     */
    public function getTime()
    {
        return $this->Time;
    }

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

        return $this;
    }

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

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

        return $this;
    }

}

