<?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.IngressAudioOptions</code>
 */
class IngressAudioOptions 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;
    protected $encoding_options;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *     @type int $source
     *     @type int $preset
     *     @type \Livekit\IngressAudioEncodingOptions $options
     * }
     */
    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;
    }

    /**
     * Generated from protobuf field <code>.livekit.IngressAudioEncodingPreset preset = 3;</code>
     * @return int
     */
    public function getPreset()
    {
        return $this->readOneof(3);
    }

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

    /**
     * Generated from protobuf field <code>.livekit.IngressAudioEncodingPreset preset = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setPreset($var)
    {
        GPBUtil::checkEnum($var, \Livekit\IngressAudioEncodingPreset::class);
        $this->writeOneof(3, $var);

        return $this;
    }

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

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

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

        return $this;
    }

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

}

