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

package com.azure.resourcemanager.billing.fluent.models;

import com.azure.core.annotation.Immutable;
import com.azure.core.management.ProxyResource;
import com.azure.resourcemanager.billing.models.Amount;
import com.fasterxml.jackson.annotation.JsonProperty;

/** The latest Azure credit balance. This is the balance available for pay now. */
@Immutable
public final class AvailableBalanceInner extends ProxyResource {
    /*
     * The properties of available balance.
     */
    @JsonProperty(value = "properties")
    private AvailableBalanceProperties innerProperties;

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

    /**
     * Get the innerProperties property: The properties of available balance.
     *
     * @return the innerProperties value.
     */
    private AvailableBalanceProperties innerProperties() {
        return this.innerProperties;
    }

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

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