<?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.FindCRoomInfo</code>
 */
class FindCRoomInfo extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>.Game.Protobuf.GCCRoomInfo Room = 1;</code>
     */
    protected $Room = null;
    /**
     * Generated from protobuf field <code>repeated .Game.Protobuf.CRoomPlayer Players = 2;</code>
     */
    private $Players;

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

    /**
     * Generated from protobuf field <code>.Game.Protobuf.GCCRoomInfo Room = 1;</code>
     * @return \Game\Protobuf\GCCRoomInfo|null
     */
    public function getRoom()
    {
        return $this->Room;
    }

    public function hasRoom()
    {
        return isset($this->Room);
    }

    public function clearRoom()
    {
        unset($this->Room);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .Game.Protobuf.CRoomPlayer Players = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getPlayers()
    {
        return $this->Players;
    }

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

        return $this;
    }

}

