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

package com.azure.resourcemanager.consumption.models;

import com.azure.core.annotation.Immutable;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Summary of credit balances. */
@Immutable
public final class CreditBalanceSummary {
    @JsonIgnore private final ClientLogger logger = new ClientLogger(CreditBalanceSummary.class);

    /*
     * Estimated balance.
     */
    @JsonProperty(value = "estimatedBalance", access = JsonProperty.Access.WRITE_ONLY)
    private Amount estimatedBalance;

    /*
     * Current balance.
     */
    @JsonProperty(value = "currentBalance", access = JsonProperty.Access.WRITE_ONLY)
    private Amount currentBalance;

    /*
     * Estimated balance in billing currency.
     */
    @JsonProperty(value = "estimatedBalanceInBillingCurrency", access = JsonProperty.Access.WRITE_ONLY)
    private AmountWithExchangeRate estimatedBalanceInBillingCurrency;

    /**
     * Get the estimatedBalance property: Estimated balance.
     *
     * @return the estimatedBalance value.
     */
    public Amount estimatedBalance() {
        return this.estimatedBalance;
    }

    /**
     * Get the currentBalance property: Current balance.
     *
     * @return the currentBalance value.
     */
    public Amount currentBalance() {
        return this.currentBalance;
    }

    /**
     * Get the estimatedBalanceInBillingCurrency property: Estimated balance in billing currency.
     *
     * @return the estimatedBalanceInBillingCurrency value.
     */
    public AmountWithExchangeRate estimatedBalanceInBillingCurrency() {
        return this.estimatedBalanceInBillingCurrency;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (estimatedBalance() != null) {
            estimatedBalance().validate();
        }
        if (currentBalance() != null) {
            currentBalance().validate();
        }
        if (estimatedBalanceInBillingCurrency() != null) {
            estimatedBalanceInBillingCurrency().validate();
        }
    }
}
