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

namespace Mynaparrot\PlugnmeetProto;

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

/**
 * Generated from protobuf message <code>plugnmeet.CreateRoomReq</code>
 */
class CreateRoomReq extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>string room_id = 1 [(.buf.validate.field) = {</code>
     */
    protected $room_id = '';
    /**
     * Generated from protobuf field <code>optional uint32 empty_timeout = 2 [(.buf.validate.field) = {</code>
     */
    protected $empty_timeout = null;
    /**
     * Generated from protobuf field <code>optional uint32 max_participants = 3 [(.buf.validate.field) = {</code>
     */
    protected $max_participants = null;
    /**
     * Generated from protobuf field <code>.plugnmeet.RoomMetadata metadata = 4 [(.buf.validate.field) = {</code>
     */
    protected $metadata = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $room_id
     *     @type int $empty_timeout
     *     @type int $max_participants
     *     @type \Mynaparrot\PlugnmeetProto\RoomMetadata $metadata
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\PlugnmeetCreateRoom::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>string room_id = 1 [(.buf.validate.field) = {</code>
     * @return string
     */
    public function getRoomId()
    {
        return $this->room_id;
    }

    /**
     * Generated from protobuf field <code>string room_id = 1 [(.buf.validate.field) = {</code>
     * @param string $var
     * @return $this
     */
    public function setRoomId($var)
    {
        GPBUtil::checkString($var, True);
        $this->room_id = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional uint32 empty_timeout = 2 [(.buf.validate.field) = {</code>
     * @return int
     */
    public function getEmptyTimeout()
    {
        return isset($this->empty_timeout) ? $this->empty_timeout : 0;
    }

    public function hasEmptyTimeout()
    {
        return isset($this->empty_timeout);
    }

    public function clearEmptyTimeout()
    {
        unset($this->empty_timeout);
    }

    /**
     * Generated from protobuf field <code>optional uint32 empty_timeout = 2 [(.buf.validate.field) = {</code>
     * @param int $var
     * @return $this
     */
    public function setEmptyTimeout($var)
    {
        GPBUtil::checkUint32($var);
        $this->empty_timeout = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional uint32 max_participants = 3 [(.buf.validate.field) = {</code>
     * @return int
     */
    public function getMaxParticipants()
    {
        return isset($this->max_participants) ? $this->max_participants : 0;
    }

    public function hasMaxParticipants()
    {
        return isset($this->max_participants);
    }

    public function clearMaxParticipants()
    {
        unset($this->max_participants);
    }

    /**
     * Generated from protobuf field <code>optional uint32 max_participants = 3 [(.buf.validate.field) = {</code>
     * @param int $var
     * @return $this
     */
    public function setMaxParticipants($var)
    {
        GPBUtil::checkUint32($var);
        $this->max_participants = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.plugnmeet.RoomMetadata metadata = 4 [(.buf.validate.field) = {</code>
     * @return \Mynaparrot\PlugnmeetProto\RoomMetadata|null
     */
    public function getMetadata()
    {
        return $this->metadata;
    }

    public function hasMetadata()
    {
        return isset($this->metadata);
    }

    public function clearMetadata()
    {
        unset($this->metadata);
    }

    /**
     * Generated from protobuf field <code>.plugnmeet.RoomMetadata metadata = 4 [(.buf.validate.field) = {</code>
     * @param \Mynaparrot\PlugnmeetProto\RoomMetadata $var
     * @return $this
     */
    public function setMetadata($var)
    {
        GPBUtil::checkMessage($var, \Mynaparrot\PlugnmeetProto\RoomMetadata::class);
        $this->metadata = $var;

        return $this;
    }

}

