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

namespace Livekit;

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

/**
 * Generated from protobuf message <code>livekit.TokenSourceRequest</code>
 */
class TokenSourceRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * The name of the room being requested when generating credentials
     *
     * Generated from protobuf field <code>optional string room_name = 1;</code>
     */
    protected $room_name = null;
    /**
     * The name of the participant being requested for this client when generating credentials
     *
     * Generated from protobuf field <code>optional string participant_name = 2;</code>
     */
    protected $participant_name = null;
    /**
     * The identity of the participant being requested for this client when generating credentials
     *
     * Generated from protobuf field <code>optional string participant_identity = 3;</code>
     */
    protected $participant_identity = null;
    /**
     * Any participant metadata being included along with the credentials generation operation
     *
     * Generated from protobuf field <code>optional string participant_metadata = 4;</code>
     */
    protected $participant_metadata = null;
    /**
     * Any participant attributes being included along with the credentials generation operation
     *
     * Generated from protobuf field <code>map<string, string> participant_attributes = 5;</code>
     */
    private $participant_attributes;
    /**
     * A RoomConfiguration object can be passed to request extra parameters should be included when
     * generating connection credentials - dispatching agents, defining egress settings, etc
     * More info: https://docs.livekit.io/home/get-started/authentication/#room-configuration
     *
     * Generated from protobuf field <code>optional .livekit.RoomConfiguration room_config = 6;</code>
     */
    protected $room_config = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $room_name
     *           The name of the room being requested when generating credentials
     *     @type string $participant_name
     *           The name of the participant being requested for this client when generating credentials
     *     @type string $participant_identity
     *           The identity of the participant being requested for this client when generating credentials
     *     @type string $participant_metadata
     *           Any participant metadata being included along with the credentials generation operation
     *     @type array|\Google\Protobuf\Internal\MapField $participant_attributes
     *           Any participant attributes being included along with the credentials generation operation
     *     @type \Livekit\RoomConfiguration $room_config
     *           A RoomConfiguration object can be passed to request extra parameters should be included when
     *           generating connection credentials - dispatching agents, defining egress settings, etc
     *           More info: https://docs.livekit.io/home/get-started/authentication/#room-configuration
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\LivekitTokenSource::initOnce();
        parent::__construct($data);
    }

    /**
     * The name of the room being requested when generating credentials
     *
     * Generated from protobuf field <code>optional string room_name = 1;</code>
     * @return string
     */
    public function getRoomName()
    {
        return isset($this->room_name) ? $this->room_name : '';
    }

    public function hasRoomName()
    {
        return isset($this->room_name);
    }

    public function clearRoomName()
    {
        unset($this->room_name);
    }

    /**
     * The name of the room being requested when generating credentials
     *
     * Generated from protobuf field <code>optional string room_name = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setRoomName($var)
    {
        GPBUtil::checkString($var, True);
        $this->room_name = $var;

        return $this;
    }

    /**
     * The name of the participant being requested for this client when generating credentials
     *
     * Generated from protobuf field <code>optional string participant_name = 2;</code>
     * @return string
     */
    public function getParticipantName()
    {
        return isset($this->participant_name) ? $this->participant_name : '';
    }

    public function hasParticipantName()
    {
        return isset($this->participant_name);
    }

    public function clearParticipantName()
    {
        unset($this->participant_name);
    }

    /**
     * The name of the participant being requested for this client when generating credentials
     *
     * Generated from protobuf field <code>optional string participant_name = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setParticipantName($var)
    {
        GPBUtil::checkString($var, True);
        $this->participant_name = $var;

        return $this;
    }

    /**
     * The identity of the participant being requested for this client when generating credentials
     *
     * Generated from protobuf field <code>optional string participant_identity = 3;</code>
     * @return string
     */
    public function getParticipantIdentity()
    {
        return isset($this->participant_identity) ? $this->participant_identity : '';
    }

    public function hasParticipantIdentity()
    {
        return isset($this->participant_identity);
    }

    public function clearParticipantIdentity()
    {
        unset($this->participant_identity);
    }

    /**
     * The identity of the participant being requested for this client when generating credentials
     *
     * Generated from protobuf field <code>optional string participant_identity = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setParticipantIdentity($var)
    {
        GPBUtil::checkString($var, True);
        $this->participant_identity = $var;

        return $this;
    }

    /**
     * Any participant metadata being included along with the credentials generation operation
     *
     * Generated from protobuf field <code>optional string participant_metadata = 4;</code>
     * @return string
     */
    public function getParticipantMetadata()
    {
        return isset($this->participant_metadata) ? $this->participant_metadata : '';
    }

    public function hasParticipantMetadata()
    {
        return isset($this->participant_metadata);
    }

    public function clearParticipantMetadata()
    {
        unset($this->participant_metadata);
    }

    /**
     * Any participant metadata being included along with the credentials generation operation
     *
     * Generated from protobuf field <code>optional string participant_metadata = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setParticipantMetadata($var)
    {
        GPBUtil::checkString($var, True);
        $this->participant_metadata = $var;

        return $this;
    }

    /**
     * Any participant attributes being included along with the credentials generation operation
     *
     * Generated from protobuf field <code>map<string, string> participant_attributes = 5;</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getParticipantAttributes()
    {
        return $this->participant_attributes;
    }

    /**
     * Any participant attributes being included along with the credentials generation operation
     *
     * Generated from protobuf field <code>map<string, string> participant_attributes = 5;</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setParticipantAttributes($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
        $this->participant_attributes = $arr;

        return $this;
    }

    /**
     * A RoomConfiguration object can be passed to request extra parameters should be included when
     * generating connection credentials - dispatching agents, defining egress settings, etc
     * More info: https://docs.livekit.io/home/get-started/authentication/#room-configuration
     *
     * Generated from protobuf field <code>optional .livekit.RoomConfiguration room_config = 6;</code>
     * @return \Livekit\RoomConfiguration|null
     */
    public function getRoomConfig()
    {
        return $this->room_config;
    }

    public function hasRoomConfig()
    {
        return isset($this->room_config);
    }

    public function clearRoomConfig()
    {
        unset($this->room_config);
    }

    /**
     * A RoomConfiguration object can be passed to request extra parameters should be included when
     * generating connection credentials - dispatching agents, defining egress settings, etc
     * More info: https://docs.livekit.io/home/get-started/authentication/#room-configuration
     *
     * Generated from protobuf field <code>optional .livekit.RoomConfiguration room_config = 6;</code>
     * @param \Livekit\RoomConfiguration $var
     * @return $this
     */
    public function setRoomConfig($var)
    {
        GPBUtil::checkMessage($var, \Livekit\RoomConfiguration::class);
        $this->room_config = $var;

        return $this;
    }

}

