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

namespace Livekit;

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

/**
 * 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;
    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\IngressVideoEncodingOptions $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.IngressVideoEncodingPreset 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.IngressVideoEncodingPreset preset = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setPreset($var)
    {
        GPBUtil::checkEnum($var, \Livekit\IngressVideoEncodingPreset::class);
        $this->writeOneof(3, $var);

        return $this;
    }

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

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

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

        return $this;
    }

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

}

