<?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.SimulcastCodec</code>
 */
class SimulcastCodec extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>string codec = 1;</code>
     */
    protected $codec = '';
    /**
     * Generated from protobuf field <code>string cid = 2;</code>
     */
    protected $cid = '';
    /**
     * Generated from protobuf field <code>repeated .livekit.VideoLayer layers = 4;</code>
     */
    private $layers;
    /**
     * Generated from protobuf field <code>.livekit.VideoLayer.Mode video_layer_mode = 5;</code>
     */
    protected $video_layer_mode = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $codec
     *     @type string $cid
     *     @type \Livekit\VideoLayer[] $layers
     *     @type int $video_layer_mode
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\LivekitRtc::initOnce();
        parent::__construct($data);
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>string cid = 2;</code>
     * @return string
     */
    public function getCid()
    {
        return $this->cid;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .livekit.VideoLayer layers = 4;</code>
     * @return RepeatedField<\Livekit\VideoLayer>
     */
    public function getLayers()
    {
        return $this->layers;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.livekit.VideoLayer.Mode video_layer_mode = 5;</code>
     * @return int
     */
    public function getVideoLayerMode()
    {
        return $this->video_layer_mode;
    }

    /**
     * Generated from protobuf field <code>.livekit.VideoLayer.Mode video_layer_mode = 5;</code>
     * @param int $var
     * @return $this
     */
    public function setVideoLayerMode($var)
    {
        GPBUtil::checkEnum($var, \Livekit\VideoLayer\Mode::class);
        $this->video_layer_mode = $var;

        return $this;
    }

}

