<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: livekit_ingress.proto

namespace Livekit;

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

/**
 * Generated from protobuf message <code>livekit.IngressVideoOptions</code>
 */
class IngressVideoOptions extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>string name = 1;</code>
     */
    protected $name = '';
    /**
     * Generated from protobuf field <code>.livekit.TrackSource source = 2;</code>
     */
    protected $source = 0;
    /**
     * desired mime_type to publish to room
     *
     * Generated from protobuf field <code>string mime_type = 3;</code>
     */
    protected $mime_type = '';
    /**
     * simulcast layers to publish, when empty, it'll pick default simulcast
     * layers at 1/2 and 1/4 of the dimensions
     *
     * Generated from protobuf field <code>repeated .livekit.VideoLayer layers = 4;</code>
     */
    private $layers;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *     @type int $source
     *     @type string $mime_type
     *           desired mime_type to publish to room
     *     @type \Livekit\VideoLayer[]|\Google\Protobuf\Internal\RepeatedField $layers
     *           simulcast layers to publish, when empty, it'll pick default simulcast
     *           layers at 1/2 and 1/4 of the dimensions
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\LivekitIngress::initOnce();
        parent::__construct($data);
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.livekit.TrackSource source = 2;</code>
     * @return int
     */
    public function getSource()
    {
        return $this->source;
    }

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

        return $this;
    }

    /**
     * desired mime_type to publish to room
     *
     * Generated from protobuf field <code>string mime_type = 3;</code>
     * @return string
     */
    public function getMimeType()
    {
        return $this->mime_type;
    }

    /**
     * desired mime_type to publish to room
     *
     * Generated from protobuf field <code>string mime_type = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setMimeType($var)
    {
        GPBUtil::checkString($var, True);
        $this->mime_type = $var;

        return $this;
    }

    /**
     * simulcast layers to publish, when empty, it'll pick default simulcast
     * layers at 1/2 and 1/4 of the dimensions
     *
     * Generated from protobuf field <code>repeated .livekit.VideoLayer layers = 4;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getLayers()
    {
        return $this->layers;
    }

    /**
     * simulcast layers to publish, when empty, it'll pick default simulcast
     * layers at 1/2 and 1/4 of the dimensions
     *
     * Generated from protobuf field <code>repeated .livekit.VideoLayer layers = 4;</code>
     * @param \Livekit\VideoLayer[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setLayers($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Livekit\VideoLayer::class);
        $this->layers = $arr;

        return $this;
    }

}

