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

namespace Livekit;

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

/**
 * Generated from protobuf message <code>livekit.TimeSeriesMetric</code>
 */
class TimeSeriesMetric extends \Google\Protobuf\Internal\Message
{
    /**
     * Metric name e.g "speech_probablity". The string value is not directly stored in the message, but referenced by index
     * in the `str_data` field of `MetricsBatch`
     *
     * Generated from protobuf field <code>uint32 label = 1;</code>
     */
    protected $label = 0;
    /**
     * index into `str_data`
     *
     * Generated from protobuf field <code>uint32 participant_identity = 2;</code>
     */
    protected $participant_identity = 0;
    /**
     * index into `str_data`
     *
     * Generated from protobuf field <code>uint32 track_sid = 3;</code>
     */
    protected $track_sid = 0;
    /**
     * Generated from protobuf field <code>repeated .livekit.MetricSample samples = 4;</code>
     */
    private $samples;
    /**
     * index into 'str_data'
     *
     * Generated from protobuf field <code>uint32 rid = 5;</code>
     */
    protected $rid = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $label
     *           Metric name e.g "speech_probablity". The string value is not directly stored in the message, but referenced by index
     *           in the `str_data` field of `MetricsBatch`
     *     @type int $participant_identity
     *           index into `str_data`
     *     @type int $track_sid
     *           index into `str_data`
     *     @type \Livekit\MetricSample[]|\Google\Protobuf\Internal\RepeatedField $samples
     *     @type int $rid
     *           index into 'str_data'
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\LivekitMetrics::initOnce();
        parent::__construct($data);
    }

    /**
     * Metric name e.g "speech_probablity". The string value is not directly stored in the message, but referenced by index
     * in the `str_data` field of `MetricsBatch`
     *
     * Generated from protobuf field <code>uint32 label = 1;</code>
     * @return int
     */
    public function getLabel()
    {
        return $this->label;
    }

    /**
     * Metric name e.g "speech_probablity". The string value is not directly stored in the message, but referenced by index
     * in the `str_data` field of `MetricsBatch`
     *
     * Generated from protobuf field <code>uint32 label = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setLabel($var)
    {
        GPBUtil::checkUint32($var);
        $this->label = $var;

        return $this;
    }

    /**
     * index into `str_data`
     *
     * Generated from protobuf field <code>uint32 participant_identity = 2;</code>
     * @return int
     */
    public function getParticipantIdentity()
    {
        return $this->participant_identity;
    }

    /**
     * index into `str_data`
     *
     * Generated from protobuf field <code>uint32 participant_identity = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setParticipantIdentity($var)
    {
        GPBUtil::checkUint32($var);
        $this->participant_identity = $var;

        return $this;
    }

    /**
     * index into `str_data`
     *
     * Generated from protobuf field <code>uint32 track_sid = 3;</code>
     * @return int
     */
    public function getTrackSid()
    {
        return $this->track_sid;
    }

    /**
     * index into `str_data`
     *
     * Generated from protobuf field <code>uint32 track_sid = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setTrackSid($var)
    {
        GPBUtil::checkUint32($var);
        $this->track_sid = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .livekit.MetricSample samples = 4;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getSamples()
    {
        return $this->samples;
    }

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

        return $this;
    }

    /**
     * index into 'str_data'
     *
     * Generated from protobuf field <code>uint32 rid = 5;</code>
     * @return int
     */
    public function getRid()
    {
        return $this->rid;
    }

    /**
     * index into 'str_data'
     *
     * Generated from protobuf field <code>uint32 rid = 5;</code>
     * @param int $var
     * @return $this
     */
    public function setRid($var)
    {
        GPBUtil::checkUint32($var);
        $this->rid = $var;

        return $this;
    }

}

