<?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;
    /**
     * Generated from protobuf field <code>uint32 participant_identity = 2;</code>
     */
    protected $participant_identity = 0;
    /**
     * Generated from protobuf field <code>uint32 track_sid = 3;</code>
     */
    protected $track_sid = 0;
    /**
     * samples
     *
     * Generated from protobuf field <code>int64 start_timestamp = 4;</code>
     */
    protected $start_timestamp = 0;
    /**
     * Generated from protobuf field <code>int64 end_timestamp = 5;</code>
     */
    protected $end_timestamp = 0;
    /**
     * list of samples between start_timestamp and end_timestamp
     *
     * Generated from protobuf field <code>repeated .livekit.MetricSample samples = 6;</code>
     */
    private $samples;

    /**
     * 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
     *     @type int $track_sid
     *     @type int|string $start_timestamp
     *           samples
     *     @type int|string $end_timestamp
     *     @type \Livekit\MetricSample[]|\Google\Protobuf\Internal\RepeatedField $samples
     *           list of samples between start_timestamp and end_timestamp
     * }
     */
    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;
    }

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

    /**
     * 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;
    }

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

    /**
     * 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;
    }

    /**
     * samples
     *
     * Generated from protobuf field <code>int64 start_timestamp = 4;</code>
     * @return int|string
     */
    public function getStartTimestamp()
    {
        return $this->start_timestamp;
    }

    /**
     * samples
     *
     * Generated from protobuf field <code>int64 start_timestamp = 4;</code>
     * @param int|string $var
     * @return $this
     */
    public function setStartTimestamp($var)
    {
        GPBUtil::checkInt64($var);
        $this->start_timestamp = $var;

        return $this;
    }

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

    /**
     * Generated from protobuf field <code>int64 end_timestamp = 5;</code>
     * @param int|string $var
     * @return $this
     */
    public function setEndTimestamp($var)
    {
        GPBUtil::checkInt64($var);
        $this->end_timestamp = $var;

        return $this;
    }

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

    /**
     * list of samples between start_timestamp and end_timestamp
     *
     * Generated from protobuf field <code>repeated .livekit.MetricSample samples = 6;</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;
    }

}

