<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: livekit_models.proto

namespace Livekit;

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

/**
 * provide information about available spatial layers
 *
 * Generated from protobuf message <code>livekit.VideoLayer</code>
 */
class VideoLayer extends \Google\Protobuf\Internal\Message
{
    /**
     * for tracks with a single layer, this should be HIGH
     *
     * Generated from protobuf field <code>.livekit.VideoQuality quality = 1;</code>
     */
    protected $quality = 0;
    /**
     * Generated from protobuf field <code>uint32 width = 2;</code>
     */
    protected $width = 0;
    /**
     * Generated from protobuf field <code>uint32 height = 3;</code>
     */
    protected $height = 0;
    /**
     * target bitrate in bit per second (bps), server will measure actual
     *
     * Generated from protobuf field <code>uint32 bitrate = 4;</code>
     */
    protected $bitrate = 0;
    /**
     * Generated from protobuf field <code>uint32 ssrc = 5;</code>
     */
    protected $ssrc = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $quality
     *           for tracks with a single layer, this should be HIGH
     *     @type int $width
     *     @type int $height
     *     @type int $bitrate
     *           target bitrate in bit per second (bps), server will measure actual
     *     @type int $ssrc
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\LivekitModels::initOnce();
        parent::__construct($data);
    }

    /**
     * for tracks with a single layer, this should be HIGH
     *
     * Generated from protobuf field <code>.livekit.VideoQuality quality = 1;</code>
     * @return int
     */
    public function getQuality()
    {
        return $this->quality;
    }

    /**
     * for tracks with a single layer, this should be HIGH
     *
     * Generated from protobuf field <code>.livekit.VideoQuality quality = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setQuality($var)
    {
        GPBUtil::checkEnum($var, \Livekit\VideoQuality::class);
        $this->quality = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>uint32 width = 2;</code>
     * @return int
     */
    public function getWidth()
    {
        return $this->width;
    }

    /**
     * Generated from protobuf field <code>uint32 width = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setWidth($var)
    {
        GPBUtil::checkUint32($var);
        $this->width = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>uint32 height = 3;</code>
     * @return int
     */
    public function getHeight()
    {
        return $this->height;
    }

    /**
     * Generated from protobuf field <code>uint32 height = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setHeight($var)
    {
        GPBUtil::checkUint32($var);
        $this->height = $var;

        return $this;
    }

    /**
     * target bitrate in bit per second (bps), server will measure actual
     *
     * Generated from protobuf field <code>uint32 bitrate = 4;</code>
     * @return int
     */
    public function getBitrate()
    {
        return $this->bitrate;
    }

    /**
     * target bitrate in bit per second (bps), server will measure actual
     *
     * Generated from protobuf field <code>uint32 bitrate = 4;</code>
     * @param int $var
     * @return $this
     */
    public function setBitrate($var)
    {
        GPBUtil::checkUint32($var);
        $this->bitrate = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>uint32 ssrc = 5;</code>
     * @return int
     */
    public function getSsrc()
    {
        return $this->ssrc;
    }

    /**
     * Generated from protobuf field <code>uint32 ssrc = 5;</code>
     * @param int $var
     * @return $this
     */
    public function setSsrc($var)
    {
        GPBUtil::checkUint32($var);
        $this->ssrc = $var;

        return $this;
    }

}

