<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/monitoring/v3/metric_service.proto

namespace Google\Cloud\Monitoring\V3;

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

/**
 * The `ListTimeSeries` response.
 *
 * Generated from protobuf message <code>google.monitoring.v3.ListTimeSeriesResponse</code>
 */
class ListTimeSeriesResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * One or more time series that match the filter included in the request.
     *
     * Generated from protobuf field <code>repeated .google.monitoring.v3.TimeSeries time_series = 1;</code>
     */
    private $time_series;
    /**
     * If there are more results than have been returned, then this field is set
     * to a non-empty value.  To see the additional results,
     * use that value as `page_token` in the next call to this method.
     *
     * Generated from protobuf field <code>string next_page_token = 2;</code>
     */
    private $next_page_token = '';
    /**
     * Query execution errors that may have caused the time series data returned
     * to be incomplete.
     *
     * Generated from protobuf field <code>repeated .google.rpc.Status execution_errors = 3;</code>
     */
    private $execution_errors;
    /**
     * The unit in which all `time_series` point values are reported. `unit`
     * follows the UCUM format for units as seen in
     * https://unitsofmeasure.org/ucum.html.
     * If different `time_series` have different units (for example, because they
     * come from different metric types, or a unit is absent), then `unit` will be
     * "{not_a_unit}".
     *
     * Generated from protobuf field <code>string unit = 5;</code>
     */
    private $unit = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Google\Cloud\Monitoring\V3\TimeSeries>|\Google\Protobuf\Internal\RepeatedField $time_series
     *           One or more time series that match the filter included in the request.
     *     @type string $next_page_token
     *           If there are more results than have been returned, then this field is set
     *           to a non-empty value.  To see the additional results,
     *           use that value as `page_token` in the next call to this method.
     *     @type array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $execution_errors
     *           Query execution errors that may have caused the time series data returned
     *           to be incomplete.
     *     @type string $unit
     *           The unit in which all `time_series` point values are reported. `unit`
     *           follows the UCUM format for units as seen in
     *           https://unitsofmeasure.org/ucum.html.
     *           If different `time_series` have different units (for example, because they
     *           come from different metric types, or a unit is absent), then `unit` will be
     *           "{not_a_unit}".
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Monitoring\V3\MetricService::initOnce();
        parent::__construct($data);
    }

    /**
     * One or more time series that match the filter included in the request.
     *
     * Generated from protobuf field <code>repeated .google.monitoring.v3.TimeSeries time_series = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getTimeSeries()
    {
        return $this->time_series;
    }

    /**
     * One or more time series that match the filter included in the request.
     *
     * Generated from protobuf field <code>repeated .google.monitoring.v3.TimeSeries time_series = 1;</code>
     * @param array<\Google\Cloud\Monitoring\V3\TimeSeries>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setTimeSeries($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\TimeSeries::class);
        $this->time_series = $arr;

        return $this;
    }

    /**
     * If there are more results than have been returned, then this field is set
     * to a non-empty value.  To see the additional results,
     * use that value as `page_token` in the next call to this method.
     *
     * Generated from protobuf field <code>string next_page_token = 2;</code>
     * @return string
     */
    public function getNextPageToken()
    {
        return $this->next_page_token;
    }

    /**
     * If there are more results than have been returned, then this field is set
     * to a non-empty value.  To see the additional results,
     * use that value as `page_token` in the next call to this method.
     *
     * Generated from protobuf field <code>string next_page_token = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setNextPageToken($var)
    {
        GPBUtil::checkString($var, True);
        $this->next_page_token = $var;

        return $this;
    }

    /**
     * Query execution errors that may have caused the time series data returned
     * to be incomplete.
     *
     * Generated from protobuf field <code>repeated .google.rpc.Status execution_errors = 3;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getExecutionErrors()
    {
        return $this->execution_errors;
    }

    /**
     * Query execution errors that may have caused the time series data returned
     * to be incomplete.
     *
     * Generated from protobuf field <code>repeated .google.rpc.Status execution_errors = 3;</code>
     * @param array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setExecutionErrors($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Rpc\Status::class);
        $this->execution_errors = $arr;

        return $this;
    }

    /**
     * The unit in which all `time_series` point values are reported. `unit`
     * follows the UCUM format for units as seen in
     * https://unitsofmeasure.org/ucum.html.
     * If different `time_series` have different units (for example, because they
     * come from different metric types, or a unit is absent), then `unit` will be
     * "{not_a_unit}".
     *
     * Generated from protobuf field <code>string unit = 5;</code>
     * @return string
     */
    public function getUnit()
    {
        return $this->unit;
    }

    /**
     * The unit in which all `time_series` point values are reported. `unit`
     * follows the UCUM format for units as seen in
     * https://unitsofmeasure.org/ucum.html.
     * If different `time_series` have different units (for example, because they
     * come from different metric types, or a unit is absent), then `unit` will be
     * "{not_a_unit}".
     *
     * Generated from protobuf field <code>string unit = 5;</code>
     * @param string $var
     * @return $this
     */
    public function setUnit($var)
    {
        GPBUtil::checkString($var, True);
        $this->unit = $var;

        return $this;
    }

}

