<?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;

/**
 * Unified audio selection and channel routing.
 * Each route specifies both which audio to capture and which channel to output to.
 *
 * Generated from protobuf message <code>livekit.AudioConfig</code>
 */
class AudioConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * If empty, all audio captured in both channels.
     * If non-empty, only matching audio is captured and routed. Unmatched is excluded.
     *
     * Generated from protobuf field <code>repeated .livekit.AudioRoute routes = 1;</code>
     */
    private $routes;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Livekit\AudioRoute[] $routes
     *           If empty, all audio captured in both channels.
     *           If non-empty, only matching audio is captured and routed. Unmatched is excluded.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\LivekitEgress::initOnce();
        parent::__construct($data);
    }

    /**
     * If empty, all audio captured in both channels.
     * If non-empty, only matching audio is captured and routed. Unmatched is excluded.
     *
     * Generated from protobuf field <code>repeated .livekit.AudioRoute routes = 1;</code>
     * @return RepeatedField<\Livekit\AudioRoute>
     */
    public function getRoutes()
    {
        return $this->routes;
    }

    /**
     * If empty, all audio captured in both channels.
     * If non-empty, only matching audio is captured and routed. Unmatched is excluded.
     *
     * Generated from protobuf field <code>repeated .livekit.AudioRoute routes = 1;</code>
     * @param \Livekit\AudioRoute[] $var
     * @return $this
     */
    public function setRoutes($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Livekit\AudioRoute::class);
        $this->routes = $arr;

        return $this;
    }

}

