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

namespace Livekit;

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

/**
 * 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;
    /**
     * Generated from protobuf field <code>int32 spatial_layer = 6;</code>
     */
    protected $spatial_layer = 0;
    /**
     * Generated from protobuf field <code>string rid = 7;</code>
     */
    protected $rid = '';
    /**
     * Generated from protobuf field <code>uint32 repair_ssrc = 8;</code>
     */
    protected $repair_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
     *     @type int $spatial_layer
     *     @type string $rid
     *     @type int $repair_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;
    }

    /**
     * Generated from protobuf field <code>int32 spatial_layer = 6;</code>
     * @return int
     */
    public function getSpatialLayer()
    {
        return $this->spatial_layer;
    }

    /**
     * Generated from protobuf field <code>int32 spatial_layer = 6;</code>
     * @param int $var
     * @return $this
     */
    public function setSpatialLayer($var)
    {
        GPBUtil::checkInt32($var);
        $this->spatial_layer = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>string rid = 7;</code>
     * @return string
     */
    public function getRid()
    {
        return $this->rid;
    }

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

        return $this;
    }

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

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

        return $this;
    }

}

