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

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

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.azureadexternalidentities.models.B2CTenantResourcePropertiesBillingConfig;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Properties of the Azure AD B2C tenant Azure resource. */
@Fluent
public final class B2CTenantResourceProperties {
    /*
     * The billing configuration for the tenant.
     */
    @JsonProperty(value = "billingConfig")
    private B2CTenantResourcePropertiesBillingConfig billingConfig;

    /*
     * An identifier of the Azure AD B2C tenant.
     */
    @JsonProperty(value = "tenantId")
    private String tenantId;

    /**
     * Get the billingConfig property: The billing configuration for the tenant.
     *
     * @return the billingConfig value.
     */
    public B2CTenantResourcePropertiesBillingConfig billingConfig() {
        return this.billingConfig;
    }

    /**
     * Set the billingConfig property: The billing configuration for the tenant.
     *
     * @param billingConfig the billingConfig value to set.
     * @return the B2CTenantResourceProperties object itself.
     */
    public B2CTenantResourceProperties withBillingConfig(B2CTenantResourcePropertiesBillingConfig billingConfig) {
        this.billingConfig = billingConfig;
        return this;
    }

    /**
     * Get the tenantId property: An identifier of the Azure AD B2C tenant.
     *
     * @return the tenantId value.
     */
    public String tenantId() {
        return this.tenantId;
    }

    /**
     * Set the tenantId property: An identifier of the Azure AD B2C tenant.
     *
     * @param tenantId the tenantId value to set.
     * @return the B2CTenantResourceProperties object itself.
     */
    public B2CTenantResourceProperties withTenantId(String tenantId) {
        this.tenantId = tenantId;
        return this;
    }

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