// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.commerce.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
import java.util.List;
import java.util.Map;
import java.util.UUID;

/** Detailed information about the meter. */
@Fluent
public final class MeterInfo {
    /*
     * The unique identifier of the resource.
     */
    @JsonProperty(value = "MeterId")
    private UUID meterId;

    /*
     * The name of the meter, within the given meter category
     */
    @JsonProperty(value = "MeterName")
    private String meterName;

    /*
     * The category of the meter, e.g., 'Cloud services', 'Networking', etc..
     */
    @JsonProperty(value = "MeterCategory")
    private String meterCategory;

    /*
     * The subcategory of the meter, e.g., 'A6 Cloud services', 'ExpressRoute (IXP)', etc..
     */
    @JsonProperty(value = "MeterSubCategory")
    private String meterSubCategory;

    /*
     * The unit in which the meter consumption is charged, e.g., 'Hours', 'GB', etc.
     */
    @JsonProperty(value = "Unit")
    private String unit;

    /*
     * Provides additional meter data. 'Third Party' indicates a meter with no discount. Blanks indicate First Party.
     */
    @JsonProperty(value = "MeterTags")
    private List<String> meterTags;

    /*
     * The region in which the Azure service is available.
     */
    @JsonProperty(value = "MeterRegion")
    private String meterRegion;

    /*
     * The list of key/value pairs for the meter rates, in the format 'key':'value' where key = the meter quantity, and
     * value = the corresponding price
     */
    @JsonProperty(value = "MeterRates")
    @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
    private Map<String, Float> meterRates;

    /*
     * Indicates the date from which the meter rate is effective.
     */
    @JsonProperty(value = "EffectiveDate")
    private OffsetDateTime effectiveDate;

    /*
     * The resource quantity that is included in the offer at no cost. Consumption beyond this quantity will be
     * charged.
     */
    @JsonProperty(value = "IncludedQuantity")
    private Float includedQuantity;

    /** Creates an instance of MeterInfo class. */
    public MeterInfo() {
    }

    /**
     * Get the meterId property: The unique identifier of the resource.
     *
     * @return the meterId value.
     */
    public UUID meterId() {
        return this.meterId;
    }

    /**
     * Set the meterId property: The unique identifier of the resource.
     *
     * @param meterId the meterId value to set.
     * @return the MeterInfo object itself.
     */
    public MeterInfo withMeterId(UUID meterId) {
        this.meterId = meterId;
        return this;
    }

    /**
     * Get the meterName property: The name of the meter, within the given meter category.
     *
     * @return the meterName value.
     */
    public String meterName() {
        return this.meterName;
    }

    /**
     * Set the meterName property: The name of the meter, within the given meter category.
     *
     * @param meterName the meterName value to set.
     * @return the MeterInfo object itself.
     */
    public MeterInfo withMeterName(String meterName) {
        this.meterName = meterName;
        return this;
    }

    /**
     * Get the meterCategory property: The category of the meter, e.g., 'Cloud services', 'Networking', etc..
     *
     * @return the meterCategory value.
     */
    public String meterCategory() {
        return this.meterCategory;
    }

    /**
     * Set the meterCategory property: The category of the meter, e.g., 'Cloud services', 'Networking', etc..
     *
     * @param meterCategory the meterCategory value to set.
     * @return the MeterInfo object itself.
     */
    public MeterInfo withMeterCategory(String meterCategory) {
        this.meterCategory = meterCategory;
        return this;
    }

    /**
     * Get the meterSubCategory property: The subcategory of the meter, e.g., 'A6 Cloud services', 'ExpressRoute (IXP)',
     * etc..
     *
     * @return the meterSubCategory value.
     */
    public String meterSubCategory() {
        return this.meterSubCategory;
    }

    /**
     * Set the meterSubCategory property: The subcategory of the meter, e.g., 'A6 Cloud services', 'ExpressRoute (IXP)',
     * etc..
     *
     * @param meterSubCategory the meterSubCategory value to set.
     * @return the MeterInfo object itself.
     */
    public MeterInfo withMeterSubCategory(String meterSubCategory) {
        this.meterSubCategory = meterSubCategory;
        return this;
    }

    /**
     * Get the unit property: The unit in which the meter consumption is charged, e.g., 'Hours', 'GB', etc.
     *
     * @return the unit value.
     */
    public String unit() {
        return this.unit;
    }

    /**
     * Set the unit property: The unit in which the meter consumption is charged, e.g., 'Hours', 'GB', etc.
     *
     * @param unit the unit value to set.
     * @return the MeterInfo object itself.
     */
    public MeterInfo withUnit(String unit) {
        this.unit = unit;
        return this;
    }

    /**
     * Get the meterTags property: Provides additional meter data. 'Third Party' indicates a meter with no discount.
     * Blanks indicate First Party.
     *
     * @return the meterTags value.
     */
    public List<String> meterTags() {
        return this.meterTags;
    }

    /**
     * Set the meterTags property: Provides additional meter data. 'Third Party' indicates a meter with no discount.
     * Blanks indicate First Party.
     *
     * @param meterTags the meterTags value to set.
     * @return the MeterInfo object itself.
     */
    public MeterInfo withMeterTags(List<String> meterTags) {
        this.meterTags = meterTags;
        return this;
    }

    /**
     * Get the meterRegion property: The region in which the Azure service is available.
     *
     * @return the meterRegion value.
     */
    public String meterRegion() {
        return this.meterRegion;
    }

    /**
     * Set the meterRegion property: The region in which the Azure service is available.
     *
     * @param meterRegion the meterRegion value to set.
     * @return the MeterInfo object itself.
     */
    public MeterInfo withMeterRegion(String meterRegion) {
        this.meterRegion = meterRegion;
        return this;
    }

    /**
     * Get the meterRates property: The list of key/value pairs for the meter rates, in the format 'key':'value' where
     * key = the meter quantity, and value = the corresponding price.
     *
     * @return the meterRates value.
     */
    public Map<String, Float> meterRates() {
        return this.meterRates;
    }

    /**
     * Set the meterRates property: The list of key/value pairs for the meter rates, in the format 'key':'value' where
     * key = the meter quantity, and value = the corresponding price.
     *
     * @param meterRates the meterRates value to set.
     * @return the MeterInfo object itself.
     */
    public MeterInfo withMeterRates(Map<String, Float> meterRates) {
        this.meterRates = meterRates;
        return this;
    }

    /**
     * Get the effectiveDate property: Indicates the date from which the meter rate is effective.
     *
     * @return the effectiveDate value.
     */
    public OffsetDateTime effectiveDate() {
        return this.effectiveDate;
    }

    /**
     * Set the effectiveDate property: Indicates the date from which the meter rate is effective.
     *
     * @param effectiveDate the effectiveDate value to set.
     * @return the MeterInfo object itself.
     */
    public MeterInfo withEffectiveDate(OffsetDateTime effectiveDate) {
        this.effectiveDate = effectiveDate;
        return this;
    }

    /**
     * Get the includedQuantity property: The resource quantity that is included in the offer at no cost. Consumption
     * beyond this quantity will be charged.
     *
     * @return the includedQuantity value.
     */
    public Float includedQuantity() {
        return this.includedQuantity;
    }

    /**
     * Set the includedQuantity property: The resource quantity that is included in the offer at no cost. Consumption
     * beyond this quantity will be charged.
     *
     * @param includedQuantity the includedQuantity value to set.
     * @return the MeterInfo object itself.
     */
    public MeterInfo withIncludedQuantity(Float includedQuantity) {
        this.includedQuantity = includedQuantity;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
    }
}
