<?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.MetricsBatch</code>
 */
class MetricsBatch extends \Google\Protobuf\Internal\Message
{
    /**
     * To avoid repeating string values, we store them in a separate list and reference them by index
     * This is useful for storing participant identities, track names, etc.
     * There is also a predefined list of labels that can be used to reference common metrics.
     * They have reserved indices from 0 to 512
     *
     * Generated from protobuf field <code>repeated string str_data = 1;</code>
     */
    private $str_data;
    /**
     * Generated from protobuf field <code>repeated .livekit.TimeSeriesMetric time_series = 2;</code>
     */
    private $time_series;
    /**
     * Generated from protobuf field <code>repeated .livekit.EventMetric events = 3;</code>
     */
    private $events;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string[]|\Google\Protobuf\Internal\RepeatedField $str_data
     *           To avoid repeating string values, we store them in a separate list and reference them by index
     *           This is useful for storing participant identities, track names, etc.
     *           There is also a predefined list of labels that can be used to reference common metrics.
     *           They have reserved indices from 0 to 512
     *     @type \Livekit\TimeSeriesMetric[]|\Google\Protobuf\Internal\RepeatedField $time_series
     *     @type \Livekit\EventMetric[]|\Google\Protobuf\Internal\RepeatedField $events
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\LivekitMetrics::initOnce();
        parent::__construct($data);
    }

    /**
     * To avoid repeating string values, we store them in a separate list and reference them by index
     * This is useful for storing participant identities, track names, etc.
     * There is also a predefined list of labels that can be used to reference common metrics.
     * They have reserved indices from 0 to 512
     *
     * Generated from protobuf field <code>repeated string str_data = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getStrData()
    {
        return $this->str_data;
    }

    /**
     * To avoid repeating string values, we store them in a separate list and reference them by index
     * This is useful for storing participant identities, track names, etc.
     * There is also a predefined list of labels that can be used to reference common metrics.
     * They have reserved indices from 0 to 512
     *
     * Generated from protobuf field <code>repeated string str_data = 1;</code>
     * @param string[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setStrData($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->str_data = $arr;

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .livekit.TimeSeriesMetric time_series = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getTimeSeries()
    {
        return $this->time_series;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .livekit.EventMetric events = 3;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getEvents()
    {
        return $this->events;
    }

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

        return $this;
    }

}

