// 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.Fluent;
import com.azure.resourcemanager.billing.models.AzurePlan;
import com.azure.resourcemanager.billing.models.BillingProfileStatus;
import com.azure.resourcemanager.billing.models.SpendingLimitForBillingProfile;
import com.azure.resourcemanager.billing.models.StatusReasonCodeForBillingProfile;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** Invoice section properties with create subscription permission. */
@Fluent
public final class InvoiceSectionWithCreateSubPermissionInner {
    /*
     * The ID of the invoice section.
     */
    @JsonProperty(value = "invoiceSectionId", access = JsonProperty.Access.WRITE_ONLY)
    private String invoiceSectionId;

    /*
     * The name of the invoice section.
     */
    @JsonProperty(value = "invoiceSectionDisplayName", access = JsonProperty.Access.WRITE_ONLY)
    private String invoiceSectionDisplayName;

    /*
     * The system generated unique identifier for an invoice section.
     */
    @JsonProperty(value = "invoiceSectionSystemId", access = JsonProperty.Access.WRITE_ONLY)
    private String invoiceSectionSystemId;

    /*
     * The ID of the billing profile for the invoice section.
     */
    @JsonProperty(value = "billingProfileId", access = JsonProperty.Access.WRITE_ONLY)
    private String billingProfileId;

    /*
     * The name of the billing profile for the invoice section.
     */
    @JsonProperty(value = "billingProfileDisplayName", access = JsonProperty.Access.WRITE_ONLY)
    private String billingProfileDisplayName;

    /*
     * The status of the billing profile.
     */
    @JsonProperty(value = "billingProfileStatus", access = JsonProperty.Access.WRITE_ONLY)
    private BillingProfileStatus billingProfileStatus;

    /*
     * Reason for the specified billing profile status.
     */
    @JsonProperty(value = "billingProfileStatusReasonCode", access = JsonProperty.Access.WRITE_ONLY)
    private StatusReasonCodeForBillingProfile billingProfileStatusReasonCode;

    /*
     * The billing profile spending limit.
     */
    @JsonProperty(value = "billingProfileSpendingLimit", access = JsonProperty.Access.WRITE_ONLY)
    private SpendingLimitForBillingProfile billingProfileSpendingLimit;

    /*
     * The system generated unique identifier for a billing profile.
     */
    @JsonProperty(value = "billingProfileSystemId", access = JsonProperty.Access.WRITE_ONLY)
    private String billingProfileSystemId;

    /*
     * Enabled azure plans for the associated billing profile.
     */
    @JsonProperty(value = "enabledAzurePlans")
    private List<AzurePlan> enabledAzurePlans;

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

    /**
     * Get the invoiceSectionId property: The ID of the invoice section.
     *
     * @return the invoiceSectionId value.
     */
    public String invoiceSectionId() {
        return this.invoiceSectionId;
    }

    /**
     * Get the invoiceSectionDisplayName property: The name of the invoice section.
     *
     * @return the invoiceSectionDisplayName value.
     */
    public String invoiceSectionDisplayName() {
        return this.invoiceSectionDisplayName;
    }

    /**
     * Get the invoiceSectionSystemId property: The system generated unique identifier for an invoice section.
     *
     * @return the invoiceSectionSystemId value.
     */
    public String invoiceSectionSystemId() {
        return this.invoiceSectionSystemId;
    }

    /**
     * Get the billingProfileId property: The ID of the billing profile for the invoice section.
     *
     * @return the billingProfileId value.
     */
    public String billingProfileId() {
        return this.billingProfileId;
    }

    /**
     * Get the billingProfileDisplayName property: The name of the billing profile for the invoice section.
     *
     * @return the billingProfileDisplayName value.
     */
    public String billingProfileDisplayName() {
        return this.billingProfileDisplayName;
    }

    /**
     * Get the billingProfileStatus property: The status of the billing profile.
     *
     * @return the billingProfileStatus value.
     */
    public BillingProfileStatus billingProfileStatus() {
        return this.billingProfileStatus;
    }

    /**
     * Get the billingProfileStatusReasonCode property: Reason for the specified billing profile status.
     *
     * @return the billingProfileStatusReasonCode value.
     */
    public StatusReasonCodeForBillingProfile billingProfileStatusReasonCode() {
        return this.billingProfileStatusReasonCode;
    }

    /**
     * Get the billingProfileSpendingLimit property: The billing profile spending limit.
     *
     * @return the billingProfileSpendingLimit value.
     */
    public SpendingLimitForBillingProfile billingProfileSpendingLimit() {
        return this.billingProfileSpendingLimit;
    }

    /**
     * Get the billingProfileSystemId property: The system generated unique identifier for a billing profile.
     *
     * @return the billingProfileSystemId value.
     */
    public String billingProfileSystemId() {
        return this.billingProfileSystemId;
    }

    /**
     * Get the enabledAzurePlans property: Enabled azure plans for the associated billing profile.
     *
     * @return the enabledAzurePlans value.
     */
    public List<AzurePlan> enabledAzurePlans() {
        return this.enabledAzurePlans;
    }

    /**
     * Set the enabledAzurePlans property: Enabled azure plans for the associated billing profile.
     *
     * @param enabledAzurePlans the enabledAzurePlans value to set.
     * @return the InvoiceSectionWithCreateSubPermissionInner object itself.
     */
    public InvoiceSectionWithCreateSubPermissionInner withEnabledAzurePlans(List<AzurePlan> enabledAzurePlans) {
        this.enabledAzurePlans = enabledAzurePlans;
        return this;
    }

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