<?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.AnalyticsStat</code>
 */
class AnalyticsStat extends \Google\Protobuf\Internal\Message
{
    /**
     * unique id for this stat
     *
     * Generated from protobuf field <code>string id = 14;</code>
     */
    protected $id = '';
    /**
     * Generated from protobuf field <code>string analytics_key = 1;</code>
     */
    protected $analytics_key = '';
    /**
     * Generated from protobuf field <code>.livekit.StreamType kind = 2;</code>
     */
    protected $kind = 0;
    /**
     * Generated from protobuf field <code>.google.protobuf.Timestamp time_stamp = 3;</code>
     */
    protected $time_stamp = null;
    /**
     * Generated from protobuf field <code>string node = 4;</code>
     */
    protected $node = '';
    /**
     * Generated from protobuf field <code>string room_id = 5 [(.logger.name) = "roomID"];</code>
     */
    protected $room_id = '';
    /**
     * Generated from protobuf field <code>string room_name = 6;</code>
     */
    protected $room_name = '';
    /**
     * Generated from protobuf field <code>string participant_id = 7 [(.logger.name) = "participantID"];</code>
     */
    protected $participant_id = '';
    /**
     * Generated from protobuf field <code>string track_id = 8 [(.logger.name) = "trackID"];</code>
     */
    protected $track_id = '';
    /**
     * average score
     *
     * Generated from protobuf field <code>float score = 9;</code>
     */
    protected $score = 0.0;
    /**
     * Generated from protobuf field <code>repeated .livekit.AnalyticsStream streams = 10;</code>
     */
    private $streams;
    /**
     * Generated from protobuf field <code>string mime = 11;</code>
     */
    protected $mime = '';
    /**
     * Generated from protobuf field <code>float min_score = 12;</code>
     */
    protected $min_score = 0.0;
    /**
     * Generated from protobuf field <code>float median_score = 13;</code>
     */
    protected $median_score = 0.0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $id
     *           unique id for this stat
     *     @type string $analytics_key
     *     @type int $kind
     *     @type \Google\Protobuf\Timestamp $time_stamp
     *     @type string $node
     *     @type string $room_id
     *     @type string $room_name
     *     @type string $participant_id
     *     @type string $track_id
     *     @type float $score
     *           average score
     *     @type \Livekit\AnalyticsStream[] $streams
     *     @type string $mime
     *     @type float $min_score
     *     @type float $median_score
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\LivekitAnalytics::initOnce();
        parent::__construct($data);
    }

    /**
     * unique id for this stat
     *
     * Generated from protobuf field <code>string id = 14;</code>
     * @return string
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * unique id for this stat
     *
     * Generated from protobuf field <code>string id = 14;</code>
     * @param string $var
     * @return $this
     */
    public function setId($var)
    {
        GPBUtil::checkString($var, True);
        $this->id = $var;

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.livekit.StreamType kind = 2;</code>
     * @return int
     */
    public function getKind()
    {
        return $this->kind;
    }

    /**
     * Generated from protobuf field <code>.livekit.StreamType kind = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setKind($var)
    {
        GPBUtil::checkEnum($var, \Livekit\StreamType::class);
        $this->kind = $var;

        return $this;
    }

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

    public function hasTimeStamp()
    {
        return isset($this->time_stamp);
    }

    public function clearTimeStamp()
    {
        unset($this->time_stamp);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>string node = 4;</code>
     * @return string
     */
    public function getNode()
    {
        return $this->node;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>string room_id = 5 [(.logger.name) = "roomID"];</code>
     * @return string
     */
    public function getRoomId()
    {
        return $this->room_id;
    }

    /**
     * Generated from protobuf field <code>string room_id = 5 [(.logger.name) = "roomID"];</code>
     * @param string $var
     * @return $this
     */
    public function setRoomId($var)
    {
        GPBUtil::checkString($var, True);
        $this->room_id = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>string room_name = 6;</code>
     * @return string
     */
    public function getRoomName()
    {
        return $this->room_name;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>string participant_id = 7 [(.logger.name) = "participantID"];</code>
     * @return string
     */
    public function getParticipantId()
    {
        return $this->participant_id;
    }

    /**
     * Generated from protobuf field <code>string participant_id = 7 [(.logger.name) = "participantID"];</code>
     * @param string $var
     * @return $this
     */
    public function setParticipantId($var)
    {
        GPBUtil::checkString($var, True);
        $this->participant_id = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>string track_id = 8 [(.logger.name) = "trackID"];</code>
     * @return string
     */
    public function getTrackId()
    {
        return $this->track_id;
    }

    /**
     * Generated from protobuf field <code>string track_id = 8 [(.logger.name) = "trackID"];</code>
     * @param string $var
     * @return $this
     */
    public function setTrackId($var)
    {
        GPBUtil::checkString($var, True);
        $this->track_id = $var;

        return $this;
    }

    /**
     * average score
     *
     * Generated from protobuf field <code>float score = 9;</code>
     * @return float
     */
    public function getScore()
    {
        return $this->score;
    }

    /**
     * average score
     *
     * Generated from protobuf field <code>float score = 9;</code>
     * @param float $var
     * @return $this
     */
    public function setScore($var)
    {
        GPBUtil::checkFloat($var);
        $this->score = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .livekit.AnalyticsStream streams = 10;</code>
     * @return RepeatedField<\Livekit\AnalyticsStream>
     */
    public function getStreams()
    {
        return $this->streams;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>string mime = 11;</code>
     * @return string
     */
    public function getMime()
    {
        return $this->mime;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>float min_score = 12;</code>
     * @return float
     */
    public function getMinScore()
    {
        return $this->min_score;
    }

    /**
     * Generated from protobuf field <code>float min_score = 12;</code>
     * @param float $var
     * @return $this
     */
    public function setMinScore($var)
    {
        GPBUtil::checkFloat($var);
        $this->min_score = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>float median_score = 13;</code>
     * @return float
     */
    public function getMedianScore()
    {
        return $this->median_score;
    }

    /**
     * Generated from protobuf field <code>float median_score = 13;</code>
     * @param float $var
     * @return $this
     */
    public function setMedianScore($var)
    {
        GPBUtil::checkFloat($var);
        $this->median_score = $var;

        return $this;
    }

}

