// 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.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;

/** The properties of modern charge summary. */
@Immutable
public final class ModernChargeSummaryProperties {
    @JsonIgnore private final ClientLogger logger = new ClientLogger(ModernChargeSummaryProperties.class);

    /*
     * The id of the billing period resource that the charge belongs to.
     */
    @JsonProperty(value = "billingPeriodId", access = JsonProperty.Access.WRITE_ONLY)
    private String billingPeriodId;

    /*
     * Usage start date.
     */
    @JsonProperty(value = "usageStart", access = JsonProperty.Access.WRITE_ONLY)
    private String usageStart;

    /*
     * Usage end date.
     */
    @JsonProperty(value = "usageEnd", access = JsonProperty.Access.WRITE_ONLY)
    private String usageEnd;

    /*
     * Azure Charges.
     */
    @JsonProperty(value = "azureCharges", access = JsonProperty.Access.WRITE_ONLY)
    private Amount azureCharges;

    /*
     * Charges Billed separately.
     */
    @JsonProperty(value = "chargesBilledSeparately", access = JsonProperty.Access.WRITE_ONLY)
    private Amount chargesBilledSeparately;

    /*
     * Marketplace Charges.
     */
    @JsonProperty(value = "marketplaceCharges", access = JsonProperty.Access.WRITE_ONLY)
    private Amount marketplaceCharges;

    /*
     * Billing Account Id
     */
    @JsonProperty(value = "billingAccountId", access = JsonProperty.Access.WRITE_ONLY)
    private String billingAccountId;

    /*
     * Billing Profile Id
     */
    @JsonProperty(value = "billingProfileId", access = JsonProperty.Access.WRITE_ONLY)
    private String billingProfileId;

    /*
     * Invoice Section Id
     */
    @JsonProperty(value = "invoiceSectionId", access = JsonProperty.Access.WRITE_ONLY)
    private String invoiceSectionId;

    /*
     * Customer Id
     */
    @JsonProperty(value = "customerId", access = JsonProperty.Access.WRITE_ONLY)
    private String customerId;

    /*
     * Is charge Invoiced
     */
    @JsonProperty(value = "isInvoiced", access = JsonProperty.Access.WRITE_ONLY)
    private Boolean isInvoiced;

    /**
     * Get the billingPeriodId property: The id of the billing period resource that the charge belongs to.
     *
     * @return the billingPeriodId value.
     */
    public String billingPeriodId() {
        return this.billingPeriodId;
    }

    /**
     * Get the usageStart property: Usage start date.
     *
     * @return the usageStart value.
     */
    public String usageStart() {
        return this.usageStart;
    }

    /**
     * Get the usageEnd property: Usage end date.
     *
     * @return the usageEnd value.
     */
    public String usageEnd() {
        return this.usageEnd;
    }

    /**
     * Get the azureCharges property: Azure Charges.
     *
     * @return the azureCharges value.
     */
    public Amount azureCharges() {
        return this.azureCharges;
    }

    /**
     * Get the chargesBilledSeparately property: Charges Billed separately.
     *
     * @return the chargesBilledSeparately value.
     */
    public Amount chargesBilledSeparately() {
        return this.chargesBilledSeparately;
    }

    /**
     * Get the marketplaceCharges property: Marketplace Charges.
     *
     * @return the marketplaceCharges value.
     */
    public Amount marketplaceCharges() {
        return this.marketplaceCharges;
    }

    /**
     * Get the billingAccountId property: Billing Account Id.
     *
     * @return the billingAccountId value.
     */
    public String billingAccountId() {
        return this.billingAccountId;
    }

    /**
     * Get the billingProfileId property: Billing Profile Id.
     *
     * @return the billingProfileId value.
     */
    public String billingProfileId() {
        return this.billingProfileId;
    }

    /**
     * Get the invoiceSectionId property: Invoice Section Id.
     *
     * @return the invoiceSectionId value.
     */
    public String invoiceSectionId() {
        return this.invoiceSectionId;
    }

    /**
     * Get the customerId property: Customer Id.
     *
     * @return the customerId value.
     */
    public String customerId() {
        return this.customerId;
    }

    /**
     * Get the isInvoiced property: Is charge Invoiced.
     *
     * @return the isInvoiced value.
     */
    public Boolean isInvoiced() {
        return this.isInvoiced;
    }

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