// 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.Fluent;
import com.azure.core.management.ProxyResource;
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.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;

/** A credit summary resource. */
@Fluent
public final class CreditSummaryInner extends ProxyResource {
    @JsonIgnore private final ClientLogger logger = new ClientLogger(CreditSummaryInner.class);

    /*
     * The properties of the credit summary.
     */
    @JsonProperty(value = "properties")
    private CreditSummaryProperties innerProperties;

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

    /*
     * Resource tags.
     */
    @JsonProperty(value = "tags", access = JsonProperty.Access.WRITE_ONLY)
    @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
    private Map<String, String> tags;

    /**
     * Get the innerProperties property: The properties of the credit summary.
     *
     * @return the innerProperties value.
     */
    private CreditSummaryProperties innerProperties() {
        return this.innerProperties;
    }

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

    /**
     * Get the tags property: Resource tags.
     *
     * @return the tags value.
     */
    public Map<String, String> tags() {
        return this.tags;
    }

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

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

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

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

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

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

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

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

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