<?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.FriendGame</code>
 */
class FriendGame extends \Google\Protobuf\Internal\Message
{
    /**
     *比赛模式
     *
     * Generated from protobuf field <code>int32 GameType = 1;</code>
     */
    protected $GameType = 0;
    /**
     * Generated from protobuf field <code>int32 RoomId = 2;</code>
     */
    protected $RoomId = 0;
    /**
     * Generated from protobuf field <code>.Game.Protobuf.FriendNotice InfoExt = 3;</code>
     */
    protected $InfoExt = null;
    /**
     * 房间类型 0 普通房间 1 自定义房间
     *
     * Generated from protobuf field <code>int32 RoomType = 4;</code>
     */
    protected $RoomType = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $GameType
     *          比赛模式
     *     @type int $RoomId
     *     @type \Game\Protobuf\FriendNotice $InfoExt
     *     @type int $RoomType
     *           房间类型 0 普通房间 1 自定义房间
     * }
     */
    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 RoomId = 2;</code>
     * @return int
     */
    public function getRoomId()
    {
        return $this->RoomId;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.Game.Protobuf.FriendNotice InfoExt = 3;</code>
     * @return \Game\Protobuf\FriendNotice|null
     */
    public function getInfoExt()
    {
        return $this->InfoExt;
    }

    public function hasInfoExt()
    {
        return isset($this->InfoExt);
    }

    public function clearInfoExt()
    {
        unset($this->InfoExt);
    }

    /**
     * Generated from protobuf field <code>.Game.Protobuf.FriendNotice InfoExt = 3;</code>
     * @param \Game\Protobuf\FriendNotice $var
     * @return $this
     */
    public function setInfoExt($var)
    {
        GPBUtil::checkMessage($var, \Game\Protobuf\FriendNotice::class);
        $this->InfoExt = $var;

        return $this;
    }

    /**
     * 房间类型 0 普通房间 1 自定义房间
     *
     * Generated from protobuf field <code>int32 RoomType = 4;</code>
     * @return int
     */
    public function getRoomType()
    {
        return $this->RoomType;
    }

    /**
     * 房间类型 0 普通房间 1 自定义房间
     *
     * Generated from protobuf field <code>int32 RoomType = 4;</code>
     * @param int $var
     * @return $this
     */
    public function setRoomType($var)
    {
        GPBUtil::checkInt32($var);
        $this->RoomType = $var;

        return $this;
    }

}

