<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/compute/v1/compute.proto

namespace Google\Cloud\Compute\V1;

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

/**
 * Additional details for quota exceeded error for resource quota.
 *
 * Generated from protobuf message <code>google.cloud.compute.v1.QuotaExceededInfo</code>
 */
class QuotaExceededInfo extends \Google\Protobuf\Internal\Message
{
    /**
     * The map holding related quota dimensions.
     *
     * Generated from protobuf field <code>map<string, string> dimensions = 414334925;</code>
     */
    private $dimensions;
    /**
     * Future quota limit being rolled out. The limit's unit depends on the quota type or metric.
     *
     * Generated from protobuf field <code>optional double future_limit = 456564287;</code>
     */
    private $future_limit = null;
    /**
     * Current effective quota limit. The limit's unit depends on the quota type or metric.
     *
     * Generated from protobuf field <code>optional double limit = 102976443;</code>
     */
    private $limit = null;
    /**
     * The name of the quota limit.
     *
     * Generated from protobuf field <code>optional string limit_name = 398197903;</code>
     */
    private $limit_name = null;
    /**
     * The Compute Engine quota metric name.
     *
     * Generated from protobuf field <code>optional string metric_name = 409881530;</code>
     */
    private $metric_name = null;
    /**
     * Rollout status of the future quota limit.
     * Check the RolloutStatus enum for the list of possible values.
     *
     * Generated from protobuf field <code>optional string rollout_status = 476426816;</code>
     */
    private $rollout_status = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array|\Google\Protobuf\Internal\MapField $dimensions
     *           The map holding related quota dimensions.
     *     @type float $future_limit
     *           Future quota limit being rolled out. The limit's unit depends on the quota type or metric.
     *     @type float $limit
     *           Current effective quota limit. The limit's unit depends on the quota type or metric.
     *     @type string $limit_name
     *           The name of the quota limit.
     *     @type string $metric_name
     *           The Compute Engine quota metric name.
     *     @type string $rollout_status
     *           Rollout status of the future quota limit.
     *           Check the RolloutStatus enum for the list of possible values.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce();
        parent::__construct($data);
    }

    /**
     * The map holding related quota dimensions.
     *
     * Generated from protobuf field <code>map<string, string> dimensions = 414334925;</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getDimensions()
    {
        return $this->dimensions;
    }

    /**
     * The map holding related quota dimensions.
     *
     * Generated from protobuf field <code>map<string, string> dimensions = 414334925;</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setDimensions($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
        $this->dimensions = $arr;

        return $this;
    }

    /**
     * Future quota limit being rolled out. The limit's unit depends on the quota type or metric.
     *
     * Generated from protobuf field <code>optional double future_limit = 456564287;</code>
     * @return float
     */
    public function getFutureLimit()
    {
        return isset($this->future_limit) ? $this->future_limit : 0.0;
    }

    public function hasFutureLimit()
    {
        return isset($this->future_limit);
    }

    public function clearFutureLimit()
    {
        unset($this->future_limit);
    }

    /**
     * Future quota limit being rolled out. The limit's unit depends on the quota type or metric.
     *
     * Generated from protobuf field <code>optional double future_limit = 456564287;</code>
     * @param float $var
     * @return $this
     */
    public function setFutureLimit($var)
    {
        GPBUtil::checkDouble($var);
        $this->future_limit = $var;

        return $this;
    }

    /**
     * Current effective quota limit. The limit's unit depends on the quota type or metric.
     *
     * Generated from protobuf field <code>optional double limit = 102976443;</code>
     * @return float
     */
    public function getLimit()
    {
        return isset($this->limit) ? $this->limit : 0.0;
    }

    public function hasLimit()
    {
        return isset($this->limit);
    }

    public function clearLimit()
    {
        unset($this->limit);
    }

    /**
     * Current effective quota limit. The limit's unit depends on the quota type or metric.
     *
     * Generated from protobuf field <code>optional double limit = 102976443;</code>
     * @param float $var
     * @return $this
     */
    public function setLimit($var)
    {
        GPBUtil::checkDouble($var);
        $this->limit = $var;

        return $this;
    }

    /**
     * The name of the quota limit.
     *
     * Generated from protobuf field <code>optional string limit_name = 398197903;</code>
     * @return string
     */
    public function getLimitName()
    {
        return isset($this->limit_name) ? $this->limit_name : '';
    }

    public function hasLimitName()
    {
        return isset($this->limit_name);
    }

    public function clearLimitName()
    {
        unset($this->limit_name);
    }

    /**
     * The name of the quota limit.
     *
     * Generated from protobuf field <code>optional string limit_name = 398197903;</code>
     * @param string $var
     * @return $this
     */
    public function setLimitName($var)
    {
        GPBUtil::checkString($var, True);
        $this->limit_name = $var;

        return $this;
    }

    /**
     * The Compute Engine quota metric name.
     *
     * Generated from protobuf field <code>optional string metric_name = 409881530;</code>
     * @return string
     */
    public function getMetricName()
    {
        return isset($this->metric_name) ? $this->metric_name : '';
    }

    public function hasMetricName()
    {
        return isset($this->metric_name);
    }

    public function clearMetricName()
    {
        unset($this->metric_name);
    }

    /**
     * The Compute Engine quota metric name.
     *
     * Generated from protobuf field <code>optional string metric_name = 409881530;</code>
     * @param string $var
     * @return $this
     */
    public function setMetricName($var)
    {
        GPBUtil::checkString($var, True);
        $this->metric_name = $var;

        return $this;
    }

    /**
     * Rollout status of the future quota limit.
     * Check the RolloutStatus enum for the list of possible values.
     *
     * Generated from protobuf field <code>optional string rollout_status = 476426816;</code>
     * @return string
     */
    public function getRolloutStatus()
    {
        return isset($this->rollout_status) ? $this->rollout_status : '';
    }

    public function hasRolloutStatus()
    {
        return isset($this->rollout_status);
    }

    public function clearRolloutStatus()
    {
        unset($this->rollout_status);
    }

    /**
     * Rollout status of the future quota limit.
     * Check the RolloutStatus enum for the list of possible values.
     *
     * Generated from protobuf field <code>optional string rollout_status = 476426816;</code>
     * @param string $var
     * @return $this
     */
    public function setRolloutStatus($var)
    {
        GPBUtil::checkString($var, True);
        $this->rollout_status = $var;

        return $this;
    }

}

