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

namespace Google\Cloud\Monitoring\V3\CreateTimeSeriesSummary;

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

/**
 * Detailed information about an error category.
 *
 * Generated from protobuf message <code>google.monitoring.v3.CreateTimeSeriesSummary.Error</code>
 */
class Error extends \Google\Protobuf\Internal\Message
{
    /**
     * The status of the requested write operation.
     *
     * Generated from protobuf field <code>.google.rpc.Status status = 1;</code>
     */
    private $status = null;
    /**
     * The number of points that couldn't be written because of `status`.
     *
     * Generated from protobuf field <code>int32 point_count = 2;</code>
     */
    private $point_count = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Rpc\Status $status
     *           The status of the requested write operation.
     *     @type int $point_count
     *           The number of points that couldn't be written because of `status`.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Monitoring\V3\MetricService::initOnce();
        parent::__construct($data);
    }

    /**
     * The status of the requested write operation.
     *
     * Generated from protobuf field <code>.google.rpc.Status status = 1;</code>
     * @return \Google\Rpc\Status
     */
    public function getStatus()
    {
        return $this->status;
    }

    /**
     * The status of the requested write operation.
     *
     * Generated from protobuf field <code>.google.rpc.Status status = 1;</code>
     * @param \Google\Rpc\Status $var
     * @return $this
     */
    public function setStatus($var)
    {
        GPBUtil::checkMessage($var, \Google\Rpc\Status::class);
        $this->status = $var;

        return $this;
    }

    /**
     * The number of points that couldn't be written because of `status`.
     *
     * Generated from protobuf field <code>int32 point_count = 2;</code>
     * @return int
     */
    public function getPointCount()
    {
        return $this->point_count;
    }

    /**
     * The number of points that couldn't be written because of `status`.
     *
     * Generated from protobuf field <code>int32 point_count = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setPointCount($var)
    {
        GPBUtil::checkInt32($var);
        $this->point_count = $var;

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Error::class, \Google\Cloud\Monitoring\V3\CreateTimeSeriesSummary_Error::class);

