<?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;

/**
 * This is an error detail intended to be used with INVALID_ARGUMENT errors.
 *
 * Generated from protobuf message <code>google.monitoring.v3.QueryErrorList</code>
 */
class QueryErrorList extends \Google\Protobuf\Internal\Message
{
    /**
     * Errors in parsing the time series query language text. The number of errors
     * in the response may be limited.
     *
     * Generated from protobuf field <code>repeated .google.monitoring.v3.QueryError errors = 1;</code>
     */
    private $errors;
    /**
     * A summary of all the errors.
     *
     * Generated from protobuf field <code>string error_summary = 2;</code>
     */
    private $error_summary = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Google\Cloud\Monitoring\V3\QueryError>|\Google\Protobuf\Internal\RepeatedField $errors
     *           Errors in parsing the time series query language text. The number of errors
     *           in the response may be limited.
     *     @type string $error_summary
     *           A summary of all the errors.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Monitoring\V3\MetricService::initOnce();
        parent::__construct($data);
    }

    /**
     * Errors in parsing the time series query language text. The number of errors
     * in the response may be limited.
     *
     * Generated from protobuf field <code>repeated .google.monitoring.v3.QueryError errors = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getErrors()
    {
        return $this->errors;
    }

    /**
     * Errors in parsing the time series query language text. The number of errors
     * in the response may be limited.
     *
     * Generated from protobuf field <code>repeated .google.monitoring.v3.QueryError errors = 1;</code>
     * @param array<\Google\Cloud\Monitoring\V3\QueryError>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setErrors($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\QueryError::class);
        $this->errors = $arr;

        return $this;
    }

    /**
     * A summary of all the errors.
     *
     * Generated from protobuf field <code>string error_summary = 2;</code>
     * @return string
     */
    public function getErrorSummary()
    {
        return $this->error_summary;
    }

    /**
     * A summary of all the errors.
     *
     * Generated from protobuf field <code>string error_summary = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setErrorSummary($var)
    {
        GPBUtil::checkString($var, True);
        $this->error_summary = $var;

        return $this;
    }

}

