// 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.fluent.models;

import com.azure.core.annotation.Immutable;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.consumption.models.Amount;
import com.azure.resourcemanager.consumption.models.CreditBalanceSummary;
import com.azure.resourcemanager.consumption.models.Reseller;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;

/** The properties of the credit summary. */
@Immutable
public final class CreditSummaryProperties {
    @JsonIgnore private final ClientLogger logger = new ClientLogger(CreditSummaryProperties.class);

    /*
     * Summary of balances associated with this credit summary.
     */
    @JsonProperty(value = "balanceSummary", access = JsonProperty.Access.WRITE_ONLY)
    private CreditBalanceSummary balanceSummary;

    /*
     * Pending credit adjustments.
     */
    @JsonProperty(value = "pendingCreditAdjustments", access = JsonProperty.Access.WRITE_ONLY)
    private Amount pendingCreditAdjustments;

    /*
     * Expired credit.
     */
    @JsonProperty(value = "expiredCredit", access = JsonProperty.Access.WRITE_ONLY)
    private Amount expiredCredit;

    /*
     * Pending eligible charges.
     */
    @JsonProperty(value = "pendingEligibleCharges", access = JsonProperty.Access.WRITE_ONLY)
    private Amount pendingEligibleCharges;

    /*
     * The credit currency.
     */
    @JsonProperty(value = "creditCurrency", access = JsonProperty.Access.WRITE_ONLY)
    private String creditCurrency;

    /*
     * The billing currency.
     */
    @JsonProperty(value = "billingCurrency", access = JsonProperty.Access.WRITE_ONLY)
    private String billingCurrency;

    /*
     * Credit's reseller.
     */
    @JsonProperty(value = "reseller", access = JsonProperty.Access.WRITE_ONLY)
    private Reseller reseller;

    /*
     * The eTag for the resource.
     */
    @JsonProperty(value = "eTag", access = JsonProperty.Access.WRITE_ONLY)
    private String etag;

    /**
     * Get the balanceSummary property: Summary of balances associated with this credit summary.
     *
     * @return the balanceSummary value.
     */
    public CreditBalanceSummary balanceSummary() {
        return this.balanceSummary;
    }

    /**
     * Get the pendingCreditAdjustments property: Pending credit adjustments.
     *
     * @return the pendingCreditAdjustments value.
     */
    public Amount pendingCreditAdjustments() {
        return this.pendingCreditAdjustments;
    }

    /**
     * Get the expiredCredit property: Expired credit.
     *
     * @return the expiredCredit value.
     */
    public Amount expiredCredit() {
        return this.expiredCredit;
    }

    /**
     * Get the pendingEligibleCharges property: Pending eligible charges.
     *
     * @return the pendingEligibleCharges value.
     */
    public Amount pendingEligibleCharges() {
        return this.pendingEligibleCharges;
    }

    /**
     * Get the creditCurrency property: The credit currency.
     *
     * @return the creditCurrency value.
     */
    public String creditCurrency() {
        return this.creditCurrency;
    }

    /**
     * Get the billingCurrency property: The billing currency.
     *
     * @return the billingCurrency value.
     */
    public String billingCurrency() {
        return this.billingCurrency;
    }

    /**
     * Get the reseller property: Credit's reseller.
     *
     * @return the reseller value.
     */
    public Reseller reseller() {
        return this.reseller;
    }

    /**
     * Get the etag property: The eTag for the resource.
     *
     * @return the etag value.
     */
    public String etag() {
        return this.etag;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (balanceSummary() != null) {
            balanceSummary().validate();
        }
        if (pendingCreditAdjustments() != null) {
            pendingCreditAdjustments().validate();
        }
        if (expiredCredit() != null) {
            expiredCredit().validate();
        }
        if (pendingEligibleCharges() != null) {
            pendingEligibleCharges().validate();
        }
        if (reseller() != null) {
            reseller().validate();
        }
    }
}
