<?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 `QueryTimeSeries` response.
 *
 * Generated from protobuf message <code>google.monitoring.v3.QueryTimeSeriesResponse</code>
 */
class QueryTimeSeriesResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * The descriptor for the time series data.
     *
     * Generated from protobuf field <code>.google.monitoring.v3.TimeSeriesDescriptor time_series_descriptor = 8;</code>
     */
    private $time_series_descriptor = null;
    /**
     * The time series data.
     *
     * Generated from protobuf field <code>repeated .google.monitoring.v3.TimeSeriesData time_series_data = 9;</code>
     */
    private $time_series_data;
    /**
     * 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 = 10;</code>
     */
    private $next_page_token = '';
    /**
     * Query execution errors that may have caused the time series data returned
     * to be incomplete. The available data will be available in the
     * response.
     *
     * Generated from protobuf field <code>repeated .google.rpc.Status partial_errors = 11;</code>
     */
    private $partial_errors;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Monitoring\V3\TimeSeriesDescriptor $time_series_descriptor
     *           The descriptor for the time series data.
     *     @type \Google\Cloud\Monitoring\V3\TimeSeriesData[]|\Google\Protobuf\Internal\RepeatedField $time_series_data
     *           The time series data.
     *     @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 \Google\Rpc\Status[]|\Google\Protobuf\Internal\RepeatedField $partial_errors
     *           Query execution errors that may have caused the time series data returned
     *           to be incomplete. The available data will be available in the
     *           response.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Monitoring\V3\MetricService::initOnce();
        parent::__construct($data);
    }

    /**
     * The descriptor for the time series data.
     *
     * Generated from protobuf field <code>.google.monitoring.v3.TimeSeriesDescriptor time_series_descriptor = 8;</code>
     * @return \Google\Cloud\Monitoring\V3\TimeSeriesDescriptor
     */
    public function getTimeSeriesDescriptor()
    {
        return $this->time_series_descriptor;
    }

    /**
     * The descriptor for the time series data.
     *
     * Generated from protobuf field <code>.google.monitoring.v3.TimeSeriesDescriptor time_series_descriptor = 8;</code>
     * @param \Google\Cloud\Monitoring\V3\TimeSeriesDescriptor $var
     * @return $this
     */
    public function setTimeSeriesDescriptor($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\TimeSeriesDescriptor::class);
        $this->time_series_descriptor = $var;

        return $this;
    }

    /**
     * The time series data.
     *
     * Generated from protobuf field <code>repeated .google.monitoring.v3.TimeSeriesData time_series_data = 9;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getTimeSeriesData()
    {
        return $this->time_series_data;
    }

    /**
     * The time series data.
     *
     * Generated from protobuf field <code>repeated .google.monitoring.v3.TimeSeriesData time_series_data = 9;</code>
     * @param \Google\Cloud\Monitoring\V3\TimeSeriesData[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setTimeSeriesData($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\TimeSeriesData::class);
        $this->time_series_data = $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 = 10;</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 = 10;</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. The available data will be available in the
     * response.
     *
     * Generated from protobuf field <code>repeated .google.rpc.Status partial_errors = 11;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getPartialErrors()
    {
        return $this->partial_errors;
    }

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

        return $this;
    }

}

