// 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.core.management.ProxyResource;
import com.azure.resourcemanager.billing.models.AzurePlan;
import com.azure.resourcemanager.billing.models.Reseller;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** A partner's customer. */
@Fluent
public final class CustomerInner extends ProxyResource {
    /*
     * The customer.
     */
    @JsonProperty(value = "properties")
    private CustomerProperties innerProperties;

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

    /**
     * Get the innerProperties property: The customer.
     *
     * @return the innerProperties value.
     */
    private CustomerProperties innerProperties() {
        return this.innerProperties;
    }

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

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

    /**
     * Get the displayName property: The name of the customer.
     *
     * @return the displayName value.
     */
    public String displayName() {
        return this.innerProperties() == null ? null : this.innerProperties().displayName();
    }

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

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

    /**
     * Set the enabledAzurePlans property: Azure plans enabled for the customer.
     *
     * @param enabledAzurePlans the enabledAzurePlans value to set.
     * @return the CustomerInner object itself.
     */
    public CustomerInner withEnabledAzurePlans(List<AzurePlan> enabledAzurePlans) {
        if (this.innerProperties() == null) {
            this.innerProperties = new CustomerProperties();
        }
        this.innerProperties().withEnabledAzurePlans(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.innerProperties() == null ? null : this.innerProperties().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 CustomerInner object itself.
     */
    public CustomerInner withResellers(List<Reseller> resellers) {
        if (this.innerProperties() == null) {
            this.innerProperties = new CustomerProperties();
        }
        this.innerProperties().withResellers(resellers);
        return this;
    }

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