<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# NO CHECKED-IN PROTOBUF GENCODE
# source: livekit_rtc.proto

namespace Livekit;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\GPBUtil;
use Google\Protobuf\RepeatedField;

/**
 * Generated from protobuf message <code>livekit.RoomMovedResponse</code>
 */
class RoomMovedResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * information about the new room
     *
     * Generated from protobuf field <code>.livekit.Room room = 1;</code>
     */
    protected $room = null;
    /**
     * new reconnect token that can be used to reconnect to the new room
     *
     * Generated from protobuf field <code>string token = 2;</code>
     */
    protected $token = '';
    /**
     * Generated from protobuf field <code>.livekit.ParticipantInfo participant = 3;</code>
     */
    protected $participant = null;
    /**
     * Generated from protobuf field <code>repeated .livekit.ParticipantInfo other_participants = 4;</code>
     */
    private $other_participants;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Livekit\Room $room
     *           information about the new room
     *     @type string $token
     *           new reconnect token that can be used to reconnect to the new room
     *     @type \Livekit\ParticipantInfo $participant
     *     @type \Livekit\ParticipantInfo[] $other_participants
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\LivekitRtc::initOnce();
        parent::__construct($data);
    }

    /**
     * information about the new room
     *
     * Generated from protobuf field <code>.livekit.Room room = 1;</code>
     * @return \Livekit\Room|null
     */
    public function getRoom()
    {
        return $this->room;
    }

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

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

    /**
     * information about the new room
     *
     * Generated from protobuf field <code>.livekit.Room room = 1;</code>
     * @param \Livekit\Room $var
     * @return $this
     */
    public function setRoom($var)
    {
        GPBUtil::checkMessage($var, \Livekit\Room::class);
        $this->room = $var;

        return $this;
    }

    /**
     * new reconnect token that can be used to reconnect to the new room
     *
     * Generated from protobuf field <code>string token = 2;</code>
     * @return string
     */
    public function getToken()
    {
        return $this->token;
    }

    /**
     * new reconnect token that can be used to reconnect to the new room
     *
     * Generated from protobuf field <code>string token = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setToken($var)
    {
        GPBUtil::checkString($var, True);
        $this->token = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.livekit.ParticipantInfo participant = 3;</code>
     * @return \Livekit\ParticipantInfo|null
     */
    public function getParticipant()
    {
        return $this->participant;
    }

    public function hasParticipant()
    {
        return isset($this->participant);
    }

    public function clearParticipant()
    {
        unset($this->participant);
    }

    /**
     * Generated from protobuf field <code>.livekit.ParticipantInfo participant = 3;</code>
     * @param \Livekit\ParticipantInfo $var
     * @return $this
     */
    public function setParticipant($var)
    {
        GPBUtil::checkMessage($var, \Livekit\ParticipantInfo::class);
        $this->participant = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .livekit.ParticipantInfo other_participants = 4;</code>
     * @return RepeatedField<\Livekit\ParticipantInfo>
     */
    public function getOtherParticipants()
    {
        return $this->other_participants;
    }

    /**
     * Generated from protobuf field <code>repeated .livekit.ParticipantInfo other_participants = 4;</code>
     * @param \Livekit\ParticipantInfo[] $var
     * @return $this
     */
    public function setOtherParticipants($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Livekit\ParticipantInfo::class);
        $this->other_participants = $arr;

        return $this;
    }

}

