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

namespace Livekit;

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

/**
 * Generated from protobuf message <code>livekit.TrackEgressRequest</code>
 */
class TrackEgressRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>string room_name = 1;</code>
     */
    protected $room_name = '';
    /**
     * Generated from protobuf field <code>string track_id = 2 [(.logger.name) = "trackID"];</code>
     */
    protected $track_id = '';
    /**
     * Generated from protobuf field <code>repeated .livekit.WebhookConfig webhooks = 5;</code>
     */
    private $webhooks;
    protected $output;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $room_name
     *     @type string $track_id
     *     @type \Livekit\DirectFileOutput $file
     *     @type string $websocket_url
     *     @type \Livekit\WebhookConfig[] $webhooks
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\LivekitEgress::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>string room_name = 1;</code>
     * @return string
     */
    public function getRoomName()
    {
        return $this->room_name;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>string track_id = 2 [(.logger.name) = "trackID"];</code>
     * @return string
     */
    public function getTrackId()
    {
        return $this->track_id;
    }

    /**
     * Generated from protobuf field <code>string track_id = 2 [(.logger.name) = "trackID"];</code>
     * @param string $var
     * @return $this
     */
    public function setTrackId($var)
    {
        GPBUtil::checkString($var, True);
        $this->track_id = $var;

        return $this;
    }

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

    public function hasFile()
    {
        return $this->hasOneof(3);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>string websocket_url = 4;</code>
     * @return string
     */
    public function getWebsocketUrl()
    {
        return $this->readOneof(4);
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .livekit.WebhookConfig webhooks = 5;</code>
     * @return RepeatedField<\Livekit\WebhookConfig>
     */
    public function getWebhooks()
    {
        return $this->webhooks;
    }

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

        return $this;
    }

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

}

