<?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.SubscribedQualityUpdate</code>
 */
class SubscribedQualityUpdate extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>string track_sid = 1;</code>
     */
    protected $track_sid = '';
    /**
     * Generated from protobuf field <code>repeated .livekit.SubscribedQuality subscribed_qualities = 2 [deprecated = true];</code>
     * @deprecated
     */
    private $subscribed_qualities;
    /**
     * Generated from protobuf field <code>repeated .livekit.SubscribedCodec subscribed_codecs = 3;</code>
     */
    private $subscribed_codecs;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $track_sid
     *     @type \Livekit\SubscribedQuality[] $subscribed_qualities
     *     @type \Livekit\SubscribedCodec[] $subscribed_codecs
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\LivekitRtc::initOnce();
        parent::__construct($data);
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .livekit.SubscribedQuality subscribed_qualities = 2 [deprecated = true];</code>
     * @return RepeatedField<\Livekit\SubscribedQuality>
     * @deprecated
     */
    public function getSubscribedQualities()
    {
        if (count($this->subscribed_qualities) !== 0) {
            @trigger_error('subscribed_qualities is deprecated.', E_USER_DEPRECATED);
        }
        return $this->subscribed_qualities;
    }

    /**
     * Generated from protobuf field <code>repeated .livekit.SubscribedQuality subscribed_qualities = 2 [deprecated = true];</code>
     * @param \Livekit\SubscribedQuality[] $var
     * @return $this
     * @deprecated
     */
    public function setSubscribedQualities($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Livekit\SubscribedQuality::class);
        if (count($arr) !== 0) {
            @trigger_error('subscribed_qualities is deprecated.', E_USER_DEPRECATED);
        }
        $this->subscribed_qualities = $arr;

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .livekit.SubscribedCodec subscribed_codecs = 3;</code>
     * @return RepeatedField<\Livekit\SubscribedCodec>
     */
    public function getSubscribedCodecs()
    {
        return $this->subscribed_codecs;
    }

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

        return $this;
    }

}

