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

namespace Livekit;

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

/**
 * Generated from protobuf message <code>livekit.AnalyticsStream</code>
 */
class AnalyticsStream extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>uint32 ssrc = 1;</code>
     */
    protected $ssrc = 0;
    /**
     * Generated from protobuf field <code>uint32 primary_packets = 2;</code>
     */
    protected $primary_packets = 0;
    /**
     * Generated from protobuf field <code>uint64 primary_bytes = 3;</code>
     */
    protected $primary_bytes = 0;
    /**
     * Generated from protobuf field <code>uint32 retransmit_packets = 4;</code>
     */
    protected $retransmit_packets = 0;
    /**
     * Generated from protobuf field <code>uint64 retransmit_bytes = 5;</code>
     */
    protected $retransmit_bytes = 0;
    /**
     * Generated from protobuf field <code>uint32 padding_packets = 6;</code>
     */
    protected $padding_packets = 0;
    /**
     * Generated from protobuf field <code>uint64 padding_bytes = 7;</code>
     */
    protected $padding_bytes = 0;
    /**
     * Generated from protobuf field <code>uint32 packets_lost = 8;</code>
     */
    protected $packets_lost = 0;
    /**
     * Generated from protobuf field <code>uint32 frames = 9;</code>
     */
    protected $frames = 0;
    /**
     * Generated from protobuf field <code>uint32 rtt = 10;</code>
     */
    protected $rtt = 0;
    /**
     * Generated from protobuf field <code>uint32 jitter = 11;</code>
     */
    protected $jitter = 0;
    /**
     * Generated from protobuf field <code>uint32 nacks = 12;</code>
     */
    protected $nacks = 0;
    /**
     * Generated from protobuf field <code>uint32 plis = 13;</code>
     */
    protected $plis = 0;
    /**
     * Generated from protobuf field <code>uint32 firs = 14;</code>
     */
    protected $firs = 0;
    /**
     * Generated from protobuf field <code>repeated .livekit.AnalyticsVideoLayer video_layers = 15;</code>
     */
    private $video_layers;
    /**
     * Generated from protobuf field <code>.google.protobuf.Timestamp start_time = 17;</code>
     */
    protected $start_time = null;
    /**
     * Generated from protobuf field <code>.google.protobuf.Timestamp end_time = 18;</code>
     */
    protected $end_time = null;
    /**
     * Generated from protobuf field <code>uint32 packets_out_of_order = 19;</code>
     */
    protected $packets_out_of_order = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $ssrc
     *     @type int $primary_packets
     *     @type int|string $primary_bytes
     *     @type int $retransmit_packets
     *     @type int|string $retransmit_bytes
     *     @type int $padding_packets
     *     @type int|string $padding_bytes
     *     @type int $packets_lost
     *     @type int $frames
     *     @type int $rtt
     *     @type int $jitter
     *     @type int $nacks
     *     @type int $plis
     *     @type int $firs
     *     @type \Livekit\AnalyticsVideoLayer[] $video_layers
     *     @type \Google\Protobuf\Timestamp $start_time
     *     @type \Google\Protobuf\Timestamp $end_time
     *     @type int $packets_out_of_order
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\LivekitAnalytics::initOnce();
        parent::__construct($data);
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>uint64 primary_bytes = 3;</code>
     * @return int|string
     */
    public function getPrimaryBytes()
    {
        return $this->primary_bytes;
    }

    /**
     * Generated from protobuf field <code>uint64 primary_bytes = 3;</code>
     * @param int|string $var
     * @return $this
     */
    public function setPrimaryBytes($var)
    {
        GPBUtil::checkUint64($var);
        $this->primary_bytes = $var;

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>uint64 retransmit_bytes = 5;</code>
     * @return int|string
     */
    public function getRetransmitBytes()
    {
        return $this->retransmit_bytes;
    }

    /**
     * Generated from protobuf field <code>uint64 retransmit_bytes = 5;</code>
     * @param int|string $var
     * @return $this
     */
    public function setRetransmitBytes($var)
    {
        GPBUtil::checkUint64($var);
        $this->retransmit_bytes = $var;

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>uint64 padding_bytes = 7;</code>
     * @return int|string
     */
    public function getPaddingBytes()
    {
        return $this->padding_bytes;
    }

    /**
     * Generated from protobuf field <code>uint64 padding_bytes = 7;</code>
     * @param int|string $var
     * @return $this
     */
    public function setPaddingBytes($var)
    {
        GPBUtil::checkUint64($var);
        $this->padding_bytes = $var;

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .livekit.AnalyticsVideoLayer video_layers = 15;</code>
     * @return RepeatedField<\Livekit\AnalyticsVideoLayer>
     */
    public function getVideoLayers()
    {
        return $this->video_layers;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.google.protobuf.Timestamp start_time = 17;</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getStartTime()
    {
        return $this->start_time;
    }

    public function hasStartTime()
    {
        return isset($this->start_time);
    }

    public function clearStartTime()
    {
        unset($this->start_time);
    }

    /**
     * Generated from protobuf field <code>.google.protobuf.Timestamp start_time = 17;</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setStartTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->start_time = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.google.protobuf.Timestamp end_time = 18;</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getEndTime()
    {
        return $this->end_time;
    }

    public function hasEndTime()
    {
        return isset($this->end_time);
    }

    public function clearEndTime()
    {
        unset($this->end_time);
    }

    /**
     * Generated from protobuf field <code>.google.protobuf.Timestamp end_time = 18;</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setEndTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->end_time = $var;

        return $this;
    }

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

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

        return $this;
    }

}

