<?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.RequestResponse</code>
 */
class RequestResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>uint32 request_id = 1 [(.logger.name) = "requestID"];</code>
     */
    protected $request_id = 0;
    /**
     * Generated from protobuf field <code>.livekit.RequestResponse.Reason reason = 2;</code>
     */
    protected $reason = 0;
    /**
     * Generated from protobuf field <code>string message = 3;</code>
     */
    protected $message = '';
    protected $request;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $request_id
     *     @type int $reason
     *     @type string $message
     *     @type \Livekit\TrickleRequest $trickle
     *     @type \Livekit\AddTrackRequest $add_track
     *     @type \Livekit\MuteTrackRequest $mute
     *     @type \Livekit\UpdateParticipantMetadata $update_metadata
     *     @type \Livekit\UpdateLocalAudioTrack $update_audio_track
     *     @type \Livekit\UpdateLocalVideoTrack $update_video_track
     *     @type \Livekit\PublishDataTrackRequest $publish_data_track
     *     @type \Livekit\UnpublishDataTrackRequest $unpublish_data_track
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\LivekitRtc::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>uint32 request_id = 1 [(.logger.name) = "requestID"];</code>
     * @return int
     */
    public function getRequestId()
    {
        return $this->request_id;
    }

    /**
     * Generated from protobuf field <code>uint32 request_id = 1 [(.logger.name) = "requestID"];</code>
     * @param int $var
     * @return $this
     */
    public function setRequestId($var)
    {
        GPBUtil::checkUint32($var);
        $this->request_id = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.livekit.RequestResponse.Reason reason = 2;</code>
     * @return int
     */
    public function getReason()
    {
        return $this->reason;
    }

    /**
     * Generated from protobuf field <code>.livekit.RequestResponse.Reason reason = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setReason($var)
    {
        GPBUtil::checkEnum($var, \Livekit\RequestResponse\Reason::class);
        $this->reason = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>string message = 3;</code>
     * @return string
     */
    public function getMessage()
    {
        return $this->message;
    }

    /**
     * Generated from protobuf field <code>string message = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setMessage($var)
    {
        GPBUtil::checkString($var, True);
        $this->message = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.livekit.TrickleRequest trickle = 4;</code>
     * @return \Livekit\TrickleRequest|null
     */
    public function getTrickle()
    {
        return $this->readOneof(4);
    }

    public function hasTrickle()
    {
        return $this->hasOneof(4);
    }

    /**
     * Generated from protobuf field <code>.livekit.TrickleRequest trickle = 4;</code>
     * @param \Livekit\TrickleRequest $var
     * @return $this
     */
    public function setTrickle($var)
    {
        GPBUtil::checkMessage($var, \Livekit\TrickleRequest::class);
        $this->writeOneof(4, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.livekit.AddTrackRequest add_track = 5;</code>
     * @return \Livekit\AddTrackRequest|null
     */
    public function getAddTrack()
    {
        return $this->readOneof(5);
    }

    public function hasAddTrack()
    {
        return $this->hasOneof(5);
    }

    /**
     * Generated from protobuf field <code>.livekit.AddTrackRequest add_track = 5;</code>
     * @param \Livekit\AddTrackRequest $var
     * @return $this
     */
    public function setAddTrack($var)
    {
        GPBUtil::checkMessage($var, \Livekit\AddTrackRequest::class);
        $this->writeOneof(5, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.livekit.MuteTrackRequest mute = 6;</code>
     * @return \Livekit\MuteTrackRequest|null
     */
    public function getMute()
    {
        return $this->readOneof(6);
    }

    public function hasMute()
    {
        return $this->hasOneof(6);
    }

    /**
     * Generated from protobuf field <code>.livekit.MuteTrackRequest mute = 6;</code>
     * @param \Livekit\MuteTrackRequest $var
     * @return $this
     */
    public function setMute($var)
    {
        GPBUtil::checkMessage($var, \Livekit\MuteTrackRequest::class);
        $this->writeOneof(6, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.livekit.UpdateParticipantMetadata update_metadata = 7;</code>
     * @return \Livekit\UpdateParticipantMetadata|null
     */
    public function getUpdateMetadata()
    {
        return $this->readOneof(7);
    }

    public function hasUpdateMetadata()
    {
        return $this->hasOneof(7);
    }

    /**
     * Generated from protobuf field <code>.livekit.UpdateParticipantMetadata update_metadata = 7;</code>
     * @param \Livekit\UpdateParticipantMetadata $var
     * @return $this
     */
    public function setUpdateMetadata($var)
    {
        GPBUtil::checkMessage($var, \Livekit\UpdateParticipantMetadata::class);
        $this->writeOneof(7, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.livekit.UpdateLocalAudioTrack update_audio_track = 8;</code>
     * @return \Livekit\UpdateLocalAudioTrack|null
     */
    public function getUpdateAudioTrack()
    {
        return $this->readOneof(8);
    }

    public function hasUpdateAudioTrack()
    {
        return $this->hasOneof(8);
    }

    /**
     * Generated from protobuf field <code>.livekit.UpdateLocalAudioTrack update_audio_track = 8;</code>
     * @param \Livekit\UpdateLocalAudioTrack $var
     * @return $this
     */
    public function setUpdateAudioTrack($var)
    {
        GPBUtil::checkMessage($var, \Livekit\UpdateLocalAudioTrack::class);
        $this->writeOneof(8, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.livekit.UpdateLocalVideoTrack update_video_track = 9;</code>
     * @return \Livekit\UpdateLocalVideoTrack|null
     */
    public function getUpdateVideoTrack()
    {
        return $this->readOneof(9);
    }

    public function hasUpdateVideoTrack()
    {
        return $this->hasOneof(9);
    }

    /**
     * Generated from protobuf field <code>.livekit.UpdateLocalVideoTrack update_video_track = 9;</code>
     * @param \Livekit\UpdateLocalVideoTrack $var
     * @return $this
     */
    public function setUpdateVideoTrack($var)
    {
        GPBUtil::checkMessage($var, \Livekit\UpdateLocalVideoTrack::class);
        $this->writeOneof(9, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.livekit.PublishDataTrackRequest publish_data_track = 10;</code>
     * @return \Livekit\PublishDataTrackRequest|null
     */
    public function getPublishDataTrack()
    {
        return $this->readOneof(10);
    }

    public function hasPublishDataTrack()
    {
        return $this->hasOneof(10);
    }

    /**
     * Generated from protobuf field <code>.livekit.PublishDataTrackRequest publish_data_track = 10;</code>
     * @param \Livekit\PublishDataTrackRequest $var
     * @return $this
     */
    public function setPublishDataTrack($var)
    {
        GPBUtil::checkMessage($var, \Livekit\PublishDataTrackRequest::class);
        $this->writeOneof(10, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.livekit.UnpublishDataTrackRequest unpublish_data_track = 11;</code>
     * @return \Livekit\UnpublishDataTrackRequest|null
     */
    public function getUnpublishDataTrack()
    {
        return $this->readOneof(11);
    }

    public function hasUnpublishDataTrack()
    {
        return $this->hasOneof(11);
    }

    /**
     * Generated from protobuf field <code>.livekit.UnpublishDataTrackRequest unpublish_data_track = 11;</code>
     * @param \Livekit\UnpublishDataTrackRequest $var
     * @return $this
     */
    public function setUnpublishDataTrack($var)
    {
        GPBUtil::checkMessage($var, \Livekit\UnpublishDataTrackRequest::class);
        $this->writeOneof(11, $var);

        return $this;
    }

    /**
     * @return string
     */
    public function getRequest()
    {
        return $this->whichOneof("request");
    }

}

