// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.quantum.jobs.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Quota information. */
@Fluent
public final class Quota {
    /*
     * The name of the dimension associated with the quota.
     */
    @JsonProperty(value = "dimension")
    private String dimension;

    /*
     * The scope at which the quota is applied.
     */
    @JsonProperty(value = "scope")
    private DimensionScope scope;

    /*
     * The unique identifier for the provider.
     */
    @JsonProperty(value = "providerId")
    private String providerId;

    /*
     * The amount of the usage that has been applied for the current period.
     */
    @JsonProperty(value = "utilization")
    private Float utilization;

    /*
     * The amount of the usage that has been reserved but not applied for the
     * current period.
     */
    @JsonProperty(value = "holds")
    private Float holds;

    /*
     * The maximum amount of usage allowed for the current period.
     */
    @JsonProperty(value = "limit")
    private Float limit;

    /*
     * The time period in which the quota's underlying meter is accumulated.
     * Based on calendar year. 'None' is used for concurrent quotas.
     */
    @JsonProperty(value = "period")
    private MeterPeriod period;

    /**
     * Get the dimension property: The name of the dimension associated with the quota.
     *
     * @return the dimension value.
     */
    public String getDimension() {
        return this.dimension;
    }

    /**
     * Set the dimension property: The name of the dimension associated with the quota.
     *
     * @param dimension the dimension value to set.
     * @return the Quota object itself.
     */
    public Quota setDimension(String dimension) {
        this.dimension = dimension;
        return this;
    }

    /**
     * Get the scope property: The scope at which the quota is applied.
     *
     * @return the scope value.
     */
    public DimensionScope getScope() {
        return this.scope;
    }

    /**
     * Set the scope property: The scope at which the quota is applied.
     *
     * @param scope the scope value to set.
     * @return the Quota object itself.
     */
    public Quota setScope(DimensionScope scope) {
        this.scope = scope;
        return this;
    }

    /**
     * Get the providerId property: The unique identifier for the provider.
     *
     * @return the providerId value.
     */
    public String getProviderId() {
        return this.providerId;
    }

    /**
     * Set the providerId property: The unique identifier for the provider.
     *
     * @param providerId the providerId value to set.
     * @return the Quota object itself.
     */
    public Quota setProviderId(String providerId) {
        this.providerId = providerId;
        return this;
    }

    /**
     * Get the utilization property: The amount of the usage that has been applied for the current period.
     *
     * @return the utilization value.
     */
    public Float getUtilization() {
        return this.utilization;
    }

    /**
     * Set the utilization property: The amount of the usage that has been applied for the current period.
     *
     * @param utilization the utilization value to set.
     * @return the Quota object itself.
     */
    public Quota setUtilization(Float utilization) {
        this.utilization = utilization;
        return this;
    }

    /**
     * Get the holds property: The amount of the usage that has been reserved but not applied for the current period.
     *
     * @return the holds value.
     */
    public Float getHolds() {
        return this.holds;
    }

    /**
     * Set the holds property: The amount of the usage that has been reserved but not applied for the current period.
     *
     * @param holds the holds value to set.
     * @return the Quota object itself.
     */
    public Quota setHolds(Float holds) {
        this.holds = holds;
        return this;
    }

    /**
     * Get the limit property: The maximum amount of usage allowed for the current period.
     *
     * @return the limit value.
     */
    public Float getLimit() {
        return this.limit;
    }

    /**
     * Set the limit property: The maximum amount of usage allowed for the current period.
     *
     * @param limit the limit value to set.
     * @return the Quota object itself.
     */
    public Quota setLimit(Float limit) {
        this.limit = limit;
        return this;
    }

    /**
     * Get the period property: The time period in which the quota's underlying meter is accumulated. Based on calendar
     * year. 'None' is used for concurrent quotas.
     *
     * @return the period value.
     */
    public MeterPeriod getPeriod() {
        return this.period;
    }

    /**
     * Set the period property: The time period in which the quota's underlying meter is accumulated. Based on calendar
     * year. 'None' is used for concurrent quotas.
     *
     * @param period the period value to set.
     * @return the Quota object itself.
     */
    public Quota setPeriod(MeterPeriod period) {
        this.period = period;
        return this;
    }
}
