// 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.Reseller;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** The properties of a customer. */
@Fluent
public final class CustomerProperties {
    /*
     * 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 name of the customer.
     */
    @JsonProperty(value = "displayName")
    private String displayName;

    /*
     * Azure plans enabled for the customer.
     */
    @JsonProperty(value = "enabledAzurePlans")
    private List<AzurePlan> enabledAzurePlans;

    /*
     * The list of resellers for which an Azure plan is enabled for the customer.
     */
    @JsonProperty(value = "resellers")
    private List<Reseller> resellers;

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

    /**
     * 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 displayName property: The name of the customer.
     *
     * @return the displayName value.
     */
    public String displayName() {
        return this.displayName;
    }

    /**
     * Set the displayName property: The name of the customer.
     *
     * @param displayName the displayName value to set.
     * @return the CustomerProperties object itself.
     */
    public CustomerProperties withDisplayName(String displayName) {
        this.displayName = displayName;
        return this;
    }

    /**
     * Get the enabledAzurePlans property: Azure plans enabled for the customer.
     *
     * @return the enabledAzurePlans value.
     */
    public List<AzurePlan> enabledAzurePlans() {
        return this.enabledAzurePlans;
    }

    /**
     * Set the enabledAzurePlans property: Azure plans enabled for the customer.
     *
     * @param enabledAzurePlans the enabledAzurePlans value to set.
     * @return the CustomerProperties object itself.
     */
    public CustomerProperties withEnabledAzurePlans(List<AzurePlan> enabledAzurePlans) {
        this.enabledAzurePlans = enabledAzurePlans;
        return this;
    }

    /**
     * Get the resellers property: The list of resellers for which an Azure plan is enabled for the customer.
     *
     * @return the resellers value.
     */
    public List<Reseller> resellers() {
        return this.resellers;
    }

    /**
     * Set the resellers property: The list of resellers for which an Azure plan is enabled for the customer.
     *
     * @param resellers the resellers value to set.
     * @return the CustomerProperties object itself.
     */
    public CustomerProperties withResellers(List<Reseller> resellers) {
        this.resellers = resellers;
        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());
        }
        if (resellers() != null) {
            resellers().forEach(e -> e.validate());
        }
    }
}
